Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Video Upload APPROVAL  (Read 4185 times)

0 Members and 1 Guest are viewing this topic.

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Video Upload APPROVAL
« on: July 14, 2007, 03:37:00 pm »

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.
« Last Edit: July 17, 2007, 01:58:15 am by Nibbler »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Video Upload APPROVAL
« Reply #1 on: July 15, 2007, 11:34:57 am »

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

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Video Upload APPROVAL
« Reply #2 on: July 15, 2007, 02:15:10 pm »

yes i know that gaugau!

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

Nibbler

  • Guest
Re: Video Upload APPROVAL
« Reply #3 on: July 15, 2007, 02:38:51 pm »

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

Code: [Select]
    // 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

Code: [Select]
    // 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';
    }
Logged

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Video Upload APPROVAL
« Reply #4 on: July 15, 2007, 02:57:10 pm »

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?
Logged

Nibbler

  • Guest
Re: Video Upload APPROVAL
« Reply #5 on: July 15, 2007, 03:31:23 pm »

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.
Logged

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Video Upload APPROVAL
« Reply #6 on: July 16, 2007, 02:51:19 pm »

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)?
Logged

Nibbler

  • Guest
Re: Video Upload APPROVAL
« Reply #7 on: July 16, 2007, 04:37:44 pm »

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

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Video Upload APPROVAL
« Reply #8 on: July 17, 2007, 12:51:32 am »

thanks nibbler.. works great!

-SOLVED-
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.