Home Forums Plugin Support WP User Frontend Pro Image required

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Alexandre 4 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44172

    Alexandre
    Member
    Post count: 73

    Hi

    How to require at least one image in a post ?

    then in case a user doesnt upload an image, a warning message would show up requiring an image

    Tx

    Alex

    #44191

    towhid
    Participant
    Post count: 4505

    Hello Alexandre,

    I am really sorry that we do not have this kind of feature right now. But if you need this feature urgent you can do code or you can hire a developer.

    Thank you ๐Ÿ™‚

    #44205

    Alexandre
    Member
    Post count: 73

    Hi

    In a previous tinymce frontend submitter, i used this to check if there was one image, if the text was more than 200 words, if there were less than 5 links etc :

    $nummin = 50;
    $nummax = 5000;
    if (str_word_count (strip_tags($_POST[‘bondi_submission_content'])) < $nummin) $errors[] = __('Error : You post must be more than 50 words', 'frontend-post'); if (str_word_count (strip_tags($_POST['bondi_submission_content'])) > $nummax)
    $errors[] = __(‘Error : Your post must be less than 5000 words !', ‘frontend-post');
    if (substr_count ($_POST[‘bondi_submission_content'], ‘href') > 5)
    $errors[] = __(‘Error : No more than 5 links', ‘frontend-post');
    if (substr_count ($_POST[‘bondi_submission_content'], ‘One image at least is required !‘, ‘frontend-post');

    How can i implement this to WPUF, what file is dealing with those checks ?

    Tx

    Alex

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Image required’ is closed to new replies.