Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

auto approve images only

Asked Modified Viewed 1,327 times
R
remixedcat
R
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Hi, is there a way to auto-approve image submissions only.. not EVERYTHING? I can't seem to find an addon that will auto approve JUST images.

I'll have a ton of people wanting to upload images and approving 10000+ a day would suck.

I don't want to auto approve everything like news/downloads/etc and have to go and delete stuff.
0 replies

2 posts

F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Not that I am aware off.
0 replies
H
hervan
H
hervan 10
sorry my english is very bad
  • Member, joined since
  • Contributed 93 posts on the community forums.
  • Started 37 threads in the forums
answered
Member

Try using a code that I gave to the middle or side panel for auto approve of photo submissions.
Good luck.:G


if (!defined("IN_FUSION")) { exit; }
$submissions = dbquery("SELECT * FROM ".DB_SUBMISSIONS);
if ($count = dbrows($submissions)) {
   while ($submission = dbarray($submissions)) {
      switch ($submission['submit_type']) {

         case 'p':
            define("SAFEMODE", @ini_get("safe_mode") ? true : false);
            require_once INCLUDES."photo_functions_include.php";
            $photo_file = ""; $photo_thumb1 = ""; $photo_thumb2 = "";
            $photo_data = unserialize($submission['submit_criteria']);
            $photo_title = stripinput($photo_data['photo_title']);
            $photo_description = stripinput($photo_data['photo_description']);
            $album_id = isnum($photo_data['album_id']) ? $photo_data['album_id'] : "0";
            $photo_name = strtolower(substr($photo_data['photo_file'], 0, strrpos($photo_data['photo_file'], ".")));
            $photo_ext = strtolower(strrchr($photo_data['photo_file'],"."));
            $photo_dest = PHOTOS.(!SAFEMODE ? "album_".$album_id."/" : "");
            $photo_file = image_exists($photo_dest, $photo_name.$photo_ext);

            copy(PHOTOS."submissions/".$photo_data['photo_file'], $photo_dest.$photo_file);
            chmod($photo_dest.$photo_file, 0644);
            unlink(PHOTOS."submissions/".$photo_data['photo_file']);
            $imagefile = @getimagesize($photo_dest.$photo_file);

            $photo_thumb1 = image_exists($photo_dest, $photo_name."_t1".$photo_ext);
            createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb1, $settings['thumb_w'], $settings['thumb_h']);
            if ($imagefile[0] > $settings['photo_w'] || $imagefile[1] > $settings['photo_h']) {
               $photo_thumb2 = image_exists($photo_dest, $photo_name."_t2".$photo_ext);
               createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb2, $settings['photo_w'], $settings['photo_h']);
            }
            $photo_order = dbresult(dbquery("SELECT MAX(photo_order) FROM ".DB_PHOTOS." WHERE album_id='$album_id'"), 0) + 1;
            $result = dbquery("INSERT INTO ".DB_PHOTOS." (album_id, photo_title, photo_description, photo_filename, photo_thumb1, photo_thumb2, photo_datestamp, photo_user, photo_views, photo_order, photo_allow_comments, photo_allow_ratings) VALUES ('$album_id', '$photo_title', '$photo_description', '$photo_file', '$photo_thumb1', '$photo_thumb2', '".time()."', '".$submission['submit_user']."', '0', '$photo_order', '1', '1')");
            $result = dbquery("DELETE FROM ".DB_SUBMISSIONS." WHERE submit_id='".$submission['submit_id']."'");
            break;
      
      }
   }
}
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
H
H
hervan 10
sorry my english is very bad
  • Member, joined since
  • Contributed 93 posts on the community forums.
  • Started 37 threads in the forums
R
R
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet