Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2 3 4 5 6   Go Down

Author Topic: Upload permission in albums on group basis  (Read 105648 times)

0 Members and 1 Guest are viewing this topic.

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Upload permission in albums on group basis
« on: September 08, 2006, 10:07:26 am »

This mod will give admin the ability to assign upload permission for a album on group basis i.e. which group is allowed to upload in that particular album.

First you will need to add a new column to database table cpg_albums. For this run following query in phpMyAdmin or any other db tool (Replace cpgPrefix with your prefix).

Code: [Select]
ALTER TABLE `cpgPrefix_albums` ADD `upload_group` INT NOT NULL ;

All the modified files are attached in the zip. If you are using cpg1.4.x without any mods then it is recommended to replace existing files with the files in the archive. If you are using modded cpg then open each file in a editor and copy the modified/added code to your existing files.

All the lines which were added are marked with following syntax.

########## Added ##########
// some code
###########################

All the lines which were modified are marked with following syntax

########### Modified #########
// some code
############################

Admin can give permissions to groups from Album Properties page i.e. modifyalb.php script.

"Visitors can upload photos" should be set to yes (album properties page) and group should be allowed to upload to public albums (group manager page) to make this mod work.

Note: This is just an experimental mod. Do not use on galleries which contain sensitive data.


Abbas
« Last Edit: September 08, 2006, 01:01:02 pm by GauGau »
Logged
Chief Geek at Ranium Systems

nims

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Upload permission in albums on group basis
« Reply #1 on: September 11, 2006, 12:09:23 pm »

Hi Abbas,

Thanks for your efforts. I wud like to know if this fits my requirements or not.

I want to create categories ( or groups ) like female models, male models and kid models. Now when a user registers I want him to select an appropriate category ( or Group ).

Once his account is activated he shud be able to upload his pics ( create his album ) under that category ( or group ).

Now I feel that what I call categories or Groups might be different then what you have for cpg. Its just to convey my idea. Basically Males shud upload pics to males gallery, females to females gallery and so on.

any chance ? Maky
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Upload permission in albums on group basis
« Reply #2 on: September 11, 2006, 12:31:07 pm »

No, this mod won't accomplish what you want. Categories and groups are two different things. Normal users cannot create albums in categories other then their own user category.

This mod only gives permission to a user to upload in a certain album.
Logged
Chief Geek at Ranium Systems

dem_

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
    • ST Racing
Re: Upload permission in albums on group basis
« Reply #3 on: September 12, 2006, 04:12:36 am »

Dude you rock!, im gonna "install it" right now
Logged

dem_

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
    • ST Racing
Re: Upload permission in albums on group basis
« Reply #4 on: September 12, 2006, 04:27:35 am »

 ::) Question.... This wont interfere with the personal albums of a user right?
dumb question i know
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Upload permission in albums on group basis
« Reply #5 on: September 12, 2006, 06:57:46 am »

No, it won't.
Logged
Chief Geek at Ranium Systems

dem_

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 9
    • ST Racing
Re: Upload permission in albums on group basis
« Reply #6 on: September 12, 2006, 07:49:52 am »

Flawless !
Logged

jhietter

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Upload permission in albums on group basis
« Reply #7 on: September 28, 2006, 04:55:04 am »

Thank you!  This is exactly what I needed & it works great!
Logged

simoslav

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Upload permission in albums on group basis
« Reply #8 on: October 20, 2006, 10:49:59 am »

Dear Abbas
can you please explain me something , im using cpg bridged with joomla, my users register through joomla and not via cpg, but they have instant access to cpg once registred, can you tell me please if this mod require registration through cpg ? many thanks
Logged

Nibbler

  • Guest
Re: Upload permission in albums on group basis
« Reply #9 on: October 20, 2006, 01:40:08 pm »

This mod should work fine with bridging.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Upload permission in albums on group basis
« Reply #10 on: October 20, 2006, 01:45:52 pm »

I haven't tested this mod with bridged cpg. Try it yourself and report back if it works well with bridging turned on.
Logged
Chief Geek at Ranium Systems

Frasse

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Upload permission in albums on group basis
« Reply #11 on: October 21, 2006, 12:01:06 pm »

I've been looking around for an expanded permission mod or changed core in Coppermine for a long time now, and this seems to be a _very_ intreresting mod.  :)

Question: Will it be possible for users in a group to change and delete uploaded files as well, or is it just possible to upload files?
Logged

sigepjedi

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Upload permission in albums on group basis
« Reply #12 on: November 10, 2006, 05:56:05 pm »

I would also like to see moderators able to edit picture comments on this....
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload permission in albums on group basis
« Reply #13 on: November 10, 2006, 07:13:20 pm »

Your reply is not related to this mod. Comment moderation is an entirely different animal.
Logged

her_voodoo

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Upload permission in albums on group basis
« Reply #14 on: November 16, 2006, 09:19:20 pm »

Hello.

I am running CPG 1.4.9 and I have it Bridge to SMF 1.1 RC3.  I do not have any other modifications and this is pretty much the only one that I really have need for but it seems I cannot get it to work.  I have modified the database table as asked and have overwritten the files with the ones in the zipfile but when I go to the album properties, I do not see an option to select a user group who will be able to upload to this folder.  Would anyone have a suggestion as to what I perhaps did wrong or what I might do additionally to get it to work for me?  Thanks in advance for any insight or help.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Upload permission in albums on group basis
« Reply #15 on: November 17, 2006, 06:07:29 am »

Did you modified/replaced your modifyalb.php file?
Logged
Chief Geek at Ranium Systems

her_voodoo

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Upload permission in albums on group basis
« Reply #16 on: November 18, 2006, 02:27:22 am »

Yes, I did.  Since I don't have any other modifications, I did as you suggested and just replaced those files with the ones you provide in the zipfile.

I've attached the file if you wish to take a look at it. :)  I would love to use this modification because it is a great solution to my problem. Thank you for helping me.
Logged

her_voodoo

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Upload permission in albums on group basis
« Reply #17 on: November 30, 2006, 02:22:38 am »

A small question.  Should the input value for the upload_group be hidden?  That is how it shows up when I view source on the modifyalb.php 

Code: [Select]
{
    global $ALBUM_DATA, $lang_yes, $lang_no;

    if ($name == 'uploads' && USER_ADMIN_MODE) {
        echo "        <input type=\"hidden\" name=\"$name\" value=\"{$ALBUM_DATA['uploads']}\" />";
        return;
    }


Could this be the reason I can't seem to find it or use it on my gallery? :)  Any help appreciated.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Upload permission in albums on group basis
« Reply #18 on: November 30, 2006, 10:56:15 am »

PM me your gallery admin account. I will see what i can do.
Logged
Chief Geek at Ranium Systems

Marchello

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Upload permission in albums on group basis
« Reply #19 on: December 05, 2006, 06:18:38 pm »

Can this mod assign permissions to multiple groups ( for example I want to give permission to guest AND registered users to upload) or is it one group only?


Thanks

Marchello
Logged
Pages: [1] 2 3 4 5 6   Go Up
 

Page created in 0.031 seconds with 21 queries.