Members have to upload 1 Pic to see the Album... Members have to upload 1 Pic to see the Album...
 

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

Members have to upload 1 Pic to see the Album...

Started by HerrSieben, January 06, 2005, 11:02:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HerrSieben

Hi,

i am using an Coppermine 1.3.2 bridged to a vb 3.0.
So here is what i want to realize:

There is only  1 album and i want that the pictures in there could only be seen if the User has uploaded 1 from himself.
Till this upload is confirmed by me, he only could see an extra-pic instead of the real one which says "First upload than see the pics" or Stuff like this.

I tried to use this Mod: http://forum.coppermine-gallery.net/index.php?topic=12110.0

but it doesnt work for me (just no effect) and if it would work you also could see the thumbs.


Can you give me some advice?`

Best Regards,


HerrSieben

Joachim Müller

There's no mod available that does this in a one-step process, but here's the workaround:
Create another user group (e.g. "privileged")
Set all user uploads of "registered" users to "admin approval".
Set permissions on the album in question to be accessible only for the group "privileged". Edit the album description to say "you must have contributed to this album before you're allowed to see it".
When approving a pic, edit the user who contributed the pic as well - make him user of the group "privileged" as well.

Joachim

HerrSieben

And it doesnt matter that it is a bridged Coppermine with a vb 3.0?
The Groups of the vB are imported. Wenn i change the group of a user in Coppermine will the group automatical change in the vb too?

Thank you very much!

Nibbler

You need this checking code:


if ($CURRENT_ALBUM_DATA['aid'] == x){
$result = db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND owner_id = ".USER_ID);
$row = mysql_fetch_row($result);
$num = $row[0];

if ($num < 1)
{
pageheader('Restricted album !');
msg_box('This is a restricted area !', 'Sorry, this album ...lalala...', $lang_back, $_SERVER['HTTP_REFERER']);
pagefooter();
exit;
}
}


Placed in your thumbnails.php, just above

pageheader(isset($CURRENT_ALBUM_DATA) ? $CURRENT_ALBUM_DATA['title'] : $lang_meta_album_names[$album]);

should be ok, replacing 'x' with the actual album id to restrict, you can get this from looking at the link to that album.

You'd probably also want similar code in displayimage.php to stop people bypassing the albums page and going straight to the pic.

HerrSieben

Cool!

This is a more easier Solution because without that manual handling.
Where is the number of pics to upload before get access defined?

Quoteif ($num < 1)
here?

I'll try this. Thank you for supporting me, that's really great.


HerrSieben

Sorry, i*ve to disturb you both again :-[

Both Ways arent curently working for me.
First i try to do it with permissions but: in Albumoptions i have no option to restrict for an Usergroup.
And i had to change all my vB-Usergroups to realise this. I cant realize this.

The Code-Mod:
I could do this only for Thumbnails.php because i dont know where to add ind the displayimage.php.
But: It doestnt take any effect in the Albumview.  Every User can still see the Thmubs.
Perhaps i made a failure. Here is the passage:

if ($CURRENT_ALBUM_DATA['aid'] == 1){
$result = db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND owner_id = ".USER_ID);
$row = mysql_fetch_row($result);
$num = $row[0];

if ($num < 1)
{
pageheader('Restricted album !');
msg_box('This is a restricted area !', 'Sorry, this album ...lalala...', $lang_back, $_SERVER['HTTP_REFERER']);
pagefooter();
exit;
}
}



The Album ID is 1

Joachim Müller

enable "Users can have private albums (Note: if you switch from 'yes' to 'no' any current private albums will become public)" in coppermine config to see the option you're looking for.

Joachim

HerrSieben

Yes , but i cant edit the user with the coppermineoptions because of the bridge to vB.

If i start the usmgr.php i get directed to the usermangement of the vBulletin without the Coppermineoptions :-(

I think i cant get around without a Hack.

Thats a little bit hard to explain: I have 3 Usergroups only for the validated Members. In every Stage they have diffrent privileges, and i would be hard to work out every usergroup additional with the accesspermissions for the Album. I will loose the overlook (Überblick=) after some time.

Joachim Müller

not related, you can access coppermine config no matter if you enabled or disabled bridging.

Joachim

HerrSieben

Yeah i've seen w´hat you ment bout i edited my Posting with this  ;):

QuoteThats a little bit hard to explain: I have 3 Usergroups only for the validated Members. In every Stage they have diffrent privileges, and i would be hard to work out every usergroup additional with the accesspermissions for the Album. I will loose the overlook (Überblick=) after some time.

I thank you very much for your help, thats unbelievable good free support. Sorry for my chitchat here, but you can imagine that this solution is very time-intensive with this sort of my groupmanagement :-\\

HerrSieben

Now i've tested it and tested it, but i wont work for me. It is because of the 3 Usergroups. And because of that they change from time to  time automatically. I cant get it all and it would be an organisationschaos...

Joachim Müller

is your above posting a question or just a moan?

Joachim

HerrSieben

Both... ;)
No, i am trying to tell you exactly about my Situation. Perhaps you have another Solution...