Author Topic: Comments before upload  (Read 6076 times)

0 Members and 1 Guest are viewing this topic.

Offline riansyah

  • Pre-Newbie
  • Posts: 4
    • View Profile
Comments before upload
« on: September 10, 2008, 05:50:29 AM »
Hello

I was just wondering if it would be possible to create the following:

a new user should rate and comment 2 or more of photos first before he is able to upload own pictures. Expectation on this is to keep out users who only want to show and are not interested in community. I want them to think about it before they sign in and would like to explain it before registration.

Does anyone have make how to manage this?

Thanks in advance!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Comments before upload
« Reply #1 on: September 10, 2008, 06:09:02 AM »
Try this:
in member.php find:if ($action == "uploadform") {
  if (
$cat_id != && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload"$cat_id))) {
    
show_error_page($lang['no_permission']);
    exit;
  }


Insert below:  $min_num 2//minimum number of comments
  
$sql "SELECT COUNT(comment_id) as num
          FROM " 
COMMENTS_TABLE "
          WHERE user_id = " 
$user_info['user_id'];
  
$result $site_db->query_firstrow($sql);
  if ((int)
$result['num'] < $min_num)
  {
//    show_error_page($lang['no_permission']);
    
show_error_page("You must post at least " . ($min_num $result['num']) . " more comment(s) before you may upload.");
    exit;
  }
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline riansyah

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Comments before upload
« Reply #2 on: September 16, 2008, 08:29:48 PM »
thanks for V@no,
It's work..

I want ask again, can we limit the comment, i mean in one foto user only can give one comment and the image owner cannot comment his foto?

Regards,
riansyah

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Comments before upload
« Reply #3 on: September 16, 2008, 08:42:49 PM »
Please start a new topic if you have more questions not related to "Comments before upload" topic ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)