forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: gazon_zaseyan on January 15, 2004, 05:37:48 am

Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: gazon_zaseyan on January 15, 2004, 05:37:48 am
Hi,
 Guys, thank you very much for the batch uploading thing, that saved me TONS of time.

Now I have another problem, I uploaded a lot of pics, in different albums, like, Nature, Cars, Airplains, Cities, Girls,..... and here is my problem...

Album Girls... it has some naked chicks in it, I wanna keep them there, because those are really nice Wallpapers... ppl can also use them for E-Cards(which is a GREAT future, thanks a bunch for that :) ) ... BUT, I don't want pictures from that album to show up on my main page, in Randomly selected photos....

PLEASE tell me, is there a way to exclude that albom from randomly piced pictures ????

I don't wanna keep that Album as a private one, because I want ppl to see those pics, but only when then go to that album, not on the main page..


PLEASE HELP ME WITH THIS THING...

THANK YOU VERY MUCH !!!!!!!!!
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: gazon_zaseyan on January 16, 2004, 03:18:13 pm
anyone?  :roll:
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: Casper on January 16, 2004, 03:28:42 pm
Hi again,

there is no problem. The meta albums respect permissions. Pics in the random or last upload sections will only come from albums the viewer is allowed to see.

So for your girls album, restricted to certain members only, will only be in the random album for those viewers, not anyone else.

Try it and see.  Log out, and make sure the gallery thinks you are an anonymous visitor.  you will see no pics from that album in the random.
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: gazon_zaseyan on January 16, 2004, 03:59:52 pm
yeah, I know that works, that's what i'm doing actualy... I created a group called "Adults" and gave it permission to see that album...

but what I wanted to do, I wanted to let not registered users to see it too... I just didn't want those pics in Randomly selected ones.

I want it to be open to everybody, but not use that albom for RandomPics.

:)

thanks
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: Casper on January 16, 2004, 04:07:44 pm
ok I understand now.

I don't know if it's possible, because I don't know how the random works.  But if random respects permissions, there must be a way of allocating permissions for meta albums only.
I'm going to try and find out though.
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: Casper on January 16, 2004, 06:36:53 pm
The task I am after is to make coppermine ignore individual albums from the meta albums, even when viewing permissions are set to be viewed.

OK, this is where I'm at.

I have modified modifyalb.php to include a selection to include or remove the album from 'meta' albums.
I have added a new field in the database table_albums, called 'meta', which is set to default = yes (include).
I have modified english.php to include the new function.
I have modified db_input.php to update the database as required.

All the above work well, but the crucial bit is still missing.  That is how to add this to the functions.inc.php so that meta albums require this field to be set at yes to include pics from the album in meta albums.  

can anyone point me in the right direction here please?
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: omniscientdeveloper on January 16, 2004, 06:59:01 pm
Try modifying the display_thumbnails function, since it's called to display the images.
Title: Add another column variable in the database...
Post by: SysAdm on January 17, 2004, 04:04:34 am
All we have to do is edit this db query in the functions.inc.php file that will ignore your "Adult" album...

Code: [Select]

$result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $ALBUM_SET");


I'm not exactly sure how to do this, but it should be like adding another variable column in the database to the albums.

We need to add a WHERE display = 'YES' and have 'NO' in the column for the albums you don't want to be randomly displayed...

Anybody out there good with db_query strings?

____SysAdm
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: gazon_zaseyan on January 17, 2004, 04:17:33 am
oh cool, so probably it will be possible to do soon?

Thank you guys :)
Title: Exclude 1 albom from Randomly picked Pics!!!??? (Important)
Post by: Joachim Müller on January 17, 2004, 11:23:45 am
it's up to you now: SysAdm has shown you the way to do it, now you have to find the code and modify it accordingly...

GauGau
Title: Re: Add another column variable in the database...
Post by: Casper on January 17, 2004, 11:51:00 am
Quote from: "SysAdm"
All we have to do is edit this db query in the functions.inc.php file that will ignore your "Adult" album...

Code: [Select]

$result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $ALBUM_SET");


I'm not exactly sure how to do this, but it should be like adding another variable column in the database to the albums.

We need to add a WHERE display = 'YES' and have 'NO' in the column for the albums you don't want to be randomly displayed...


I have tried this, in many different ways, but all attempts end with either a parse error or a database error.
I have added the following to the array in modifyalb.php
Code: [Select]
array($lang_modifyalb_php['can_meta'], 'meta', 1)

I have added the field 'meta' in the table ALBUMS, and have added the db_input.php, so the entry does update.

But I am obviously missing something.  I am not a coder, and struggle to understand how this all works, so if anyone is willing to help, please do.