Video Upload APPROVAL Video Upload APPROVAL
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Video Upload APPROVAL

Started by yazeft, July 14, 2007, 03:37:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yazeft

I would like to allow approval for everything uploaded by registered members EXPECT video files! I'm using CPG with SMF bridge

I want to approve video files separately, each time a member uploads pictures or other files it approves automatically, but only for video files (i.e. wmv, avi, mpeg etc..) it send me an email to approve the files or deny..

thanks.

Joachim Müller

Feature doesn't exist - you can't approve by file type. If you need it, you'll have to code it.

yazeft

yes i know that gaugau!

thats why im asking the question.. anyone willing to give me the code for this.. please!

Nibbler

I don't understand from your post if you want to require approval for only videos or for everything except videos so adjust the code below to suit.

Change the code in include/picmgmnt.inc.php


    // Test if picture requires approval
    if (GALLERY_ADMIN_MODE) {
        $approved = 'YES';
    } elseif (!$USER_DATA['priv_upl_need_approval'] && $category == FIRST_USER_CAT + USER_ID) {
        $approved = 'YES';
    } elseif (!$USER_DATA['pub_upl_need_approval'] && $category < FIRST_USER_CAT) {
        $approved = 'YES';
    } else {
        $approved = 'NO';
    }


to


    // Test if picture requires approval
    if (GALLERY_ADMIN_MODE) {
        $approved = 'YES';
    } elseif (is_movie($image)){
        $approved = 'NO';
    } elseif (!$USER_DATA['priv_upl_need_approval'] && $category == FIRST_USER_CAT + USER_ID) {
        $approved = 'YES';
    } elseif (!$USER_DATA['pub_upl_need_approval'] && $category < FIRST_USER_CAT) {
        $approved = 'YES';
    } else {
        $approved = 'NO';
    }

yazeft

sorry about the confusion i meant approval only for videos..

is this only for video files?

also how will i know if there is a video waiting approval? will i get an email notification?

Nibbler

This will require approval for movies uploaded by non-admin users. Disable upload approval on the groups page to make all other files not require approval. You will get email notification if you enable it in config.

yazeft

so i just need to set approval for the registered users to NO for public albums and set the config for notify admin for awaiting uploads to YES..

is that all (with the changes to the code)?

Nibbler

Yeah. It's not tested but it should work.

yazeft

thanks nibbler.. works great!

-SOLVED-