Exclude 1 albom from Randomly picked Pics!!!??? (Important) Exclude 1 albom from Randomly picked Pics!!!??? (Important)
 

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

Main Menu

Exclude 1 albom from Randomly picked Pics!!!??? (Important)

Started by gazon_zaseyan, January 15, 2004, 05:37:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gazon_zaseyan

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


Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

gazon_zaseyan

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

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

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?
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

omniscientdeveloper

Try modifying the display_thumbnails function, since it's called to display the images.

SysAdm

All we have to do is edit this db query in the functions.inc.php file that will ignore your "Adult" album...


$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

gazon_zaseyan

oh cool, so probably it will be possible to do soon?

Thank you guys :)

Joachim Müller

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

Casper

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


$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
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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here