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: Exclude 1 albom from Randomly picked Pics!!!??? (Important)  (Read 6338 times)

0 Members and 1 Guest are viewing this topic.

gazon_zaseyan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« 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 !!!!!!!!!
Logged

gazon_zaseyan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #1 on: January 16, 2004, 03:18:13 pm »

anyone?  :roll:
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #2 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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #3 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #4 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.
Logged
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

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #5 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?
Logged
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

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #6 on: January 16, 2004, 06:59:01 pm »

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

SysAdm

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Add another column variable in the database...
« Reply #7 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
Logged

gazon_zaseyan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #8 on: January 17, 2004, 04:17:33 am »

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

Thank you guys :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Exclude 1 albom from Randomly picked Pics!!!??? (Important)
« Reply #9 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Add another column variable in the database...
« Reply #10 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.
Logged
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
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 18 queries.