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]   Go Down

Author Topic: Members have to upload 1 Pic to see the Album...  (Read 5067 times)

0 Members and 1 Guest are viewing this topic.

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Members have to upload 1 Pic to see the Album...
« on: January 06, 2005, 11:02:24 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Members have to upload 1 Pic to see the Album...
« Reply #1 on: January 07, 2005, 11:48:05 am »

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
Logged

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Members have to upload 1 Pic to see the Album...
« Reply #2 on: January 07, 2005, 04:22:46 pm »

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

Nibbler

  • Guest
Re: Members have to upload 1 Pic to see the Album...
« Reply #3 on: January 07, 2005, 04:50:02 pm »

You need this checking code:

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

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

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Members have to upload 1 Pic to see the Album...
« Reply #4 on: January 07, 2005, 05:29:18 pm »

Cool!

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

Quote
if ($num < 1)
here?

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

Logged

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Members have to upload 1 Pic to see the Album...
« Reply #5 on: January 08, 2005, 03:23:09 pm »

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:

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Members have to upload 1 Pic to see the Album...
« Reply #6 on: January 08, 2005, 07:57:55 pm »

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
Logged

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Members have to upload 1 Pic to see the Album...
« Reply #7 on: January 08, 2005, 08:03:05 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Members have to upload 1 Pic to see the Album...
« Reply #8 on: January 08, 2005, 08:06:47 pm »

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

Joachim
Logged

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Members have to upload 1 Pic to see the Album...
« Reply #9 on: January 08, 2005, 08:15:38 pm »

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

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

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 :-\\
Logged

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Members have to upload 1 Pic to see the Album...
« Reply #10 on: January 09, 2005, 01:22:41 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Members have to upload 1 Pic to see the Album...
« Reply #11 on: January 09, 2005, 11:16:07 pm »

is your above posting a question or just a moan?

Joachim
Logged

HerrSieben

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Members have to upload 1 Pic to see the Album...
« Reply #12 on: January 10, 2005, 05:08:25 am »

Both... ;)
No, i am trying to tell you exactly about my Situation. Perhaps you have another Solution...
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.