Advanced search  

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]

Pages: [1]   Go Down

Author Topic: How to hide the text in random/last added section?  (Read 6601 times)

0 Members and 1 Guest are viewing this topic.

whmeeske

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 68
    • WHMEESKE.NL
How to hide the text in random/last added section?
« on: December 24, 2005, 06:13:50 pm »

In the mainpage of CPG 1.4.2 there is a section with random items and a section with last added items.
The difference with for example 1.3.4 is that in these sections extra text is shown (filename, comment).

How can I hide these text? Only the add-date must be shown in the last added section (like 1.3.4.).
Is there someone who knows if this can be done?
« Last Edit: January 05, 2006, 04:33:26 am by GauGau »
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: How to hide the text in random/last added section?
« Reply #1 on: December 24, 2005, 10:42:08 pm »

I think what you are looking for can be found in "Config" under "Thumbnail view," starting on the fourth line down. If you set all five thumbnail settings to "no," you should have what you are looking for.

   
Logged
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

whmeeske

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 68
    • WHMEESKE.NL
Re: How to hide the text in random/last added section?
« Reply #2 on: December 24, 2005, 10:56:28 pm »

I think what you are looking for can be found in "Config" under "Thumbnail view," starting on the fourth line down. If you set all five thumbnail settings to "no," you should have what you are looking for.
This affects all the thumbnail views, also in the albums. And there I want this information shown, but not on the main page.
So I guess this is not a solution for me.

Any other suggestions?
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: How to hide the text in random/last added section?
« Reply #3 on: December 25, 2005, 06:04:48 am »

Ah, now I understand! I'm not savvy enough to be able to give you a quick answer. I think I know how this can be done, but I'd want to test it out on my scratch gallery to see if I'm right.  Doubt I'll have enough peace on the holiday tomorrow to get much done, but if no one more knowlegeable than I jumps in with a solution in the meantime, I'll experiment a bit on Sunday and see if my idea works.
Logged
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

whmeeske

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 68
    • WHMEESKE.NL
Re: How to hide the text in random/last added section?
« Reply #4 on: December 27, 2005, 10:38:11 pm »

OK, thanks for thinking with me  :)

I don't understand why this is changed. In older versions it was good, but now the mainpage is too crowdy with all the extra text shown there.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to hide the text in random/last added section?
« Reply #5 on: December 27, 2005, 11:40:16 pm »

the feature has frequently been requested by others, and you can savely turn it off. The "why" question is irrelevant.
Logged

whmeeske

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 68
    • WHMEESKE.NL
Re: How to hide the text in random/last added section?
« Reply #6 on: December 28, 2005, 11:43:09 am »

the feature has frequently been requested by others, and you can savely turn it off.
Then you probably can tell me how to turn it off? I can't find it in the documentation.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: How to hide the text in random/last added section?
« Reply #7 on: December 28, 2005, 12:53:37 pm »

Config -> Thumbnail view
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to hide the text in random/last added section?
« Reply #8 on: December 28, 2005, 02:29:50 pm »

Logged

whmeeske

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 68
    • WHMEESKE.NL
Re: How to hide the text in random/last added section?
« Reply #9 on: December 28, 2005, 03:16:18 pm »

Please RTFM before asking questions: http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_thumbnail_view
I did read the documentation  >:(
The config of the thumbnails affects the view of ALL the thumbs. But that is NOT what I want.
In an album I want the extra text shown (filename, times viewed etc). In the mainpage I want this information NOT to be shown in the parts "Random pictures" en "Last added".
I described this earlier in this topic, so why should I repeat myself?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to hide the text in random/last added section?
« Reply #10 on: December 28, 2005, 03:43:37 pm »

happy coding then ::)
Logged

ecto

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 144
    • My very incomplete gallery
Re: How to hide the text in random/last added section?
« Reply #11 on: December 28, 2005, 04:07:37 pm »

whmeeske, I have a little mini-hack for you. It may not be the prettiest solution, but it works. It's not a complete hack for what you want, more like a proof of concept.. it could be done a lot more nicely with config settings and so on.

Btw, I saw that there's a plugin hook after build_caption is called from get_pic_data(), so maybe this can be done with a plugin?

Disclaimer; as always, don't edit stuff if you don't know what you're doing. And as I said.. this is not a complete hack, nor are the instructions super-complete either.

This is all in include/functions.inc.php.

Find (line 1226 for Random files, line 1058 for Last additions (they look a little different))
Code: [Select]
                if ($set_caption) build_caption($rowset,array('ctime'));Replace with
Code: [Select]
                if ($set_caption) build_caption($rowset,array('ctime'),array('hits'));

Find (line 814)
Code: [Select]
        if ($CONFIG['views_in_thumbview'] || in_array('hits',$must_have)) {Replace with
Code: [Select]
        if (!in_array('hits', $mustnt_have) && $CONFIG['views_in_thumbview'] || in_array('hits',$must_have)) {Do the above with all the caption fields you want to be able to exclude (they might look a bit different from the above one)

Then find (line 800)
Code: [Select]
function build_caption(&$rowset,$must_have=array())Replace with
Code: [Select]
function build_caption(&$rowset,$must_have=array(),$mustnt_have=array())
So what this does is when build_caption() is called you pass an array to it, called $mustnt_have, then when the caption is built you do an extra check to ensure that that part of the caption isn't built if it's in the $mustnt_have array. So if you also don't want the uploader name to show in the above example, you would pass:

Code: [Select]
array('hits','uploader')instead of just:
Code: [Select]
array('hits')
And then you would also change (line 826)
Code: [Select]
        if ($CONFIG['display_uploader']to include the $mustnt_have stuff:
Code: [Select]
        if (!in_array('uploader', $mustnt_have) && $CONFIG['display_uploader']
Happy coding  :D
Logged

whmeeske

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 68
    • WHMEESKE.NL
Re: How to hide the text in random/last added section?
« Reply #12 on: December 28, 2005, 04:18:42 pm »

@GauGau:
Is it possible to make a new feature in a next version where you can make a difference between thumbs on the mainpage and thumbs on an album page?
I'm not pleased that this has been changed, in older versions it worked all very well. But it's not my intention to downgrade.

Anyway thanks for the help.
Maybe I'll try to implement the given adjustments by ecto, after I've made a backup of include/functions.inc.php  ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to hide the text in random/last added section?
« Reply #13 on: December 28, 2005, 07:46:55 pm »

not planned
Logged

whmeeske

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 68
    • WHMEESKE.NL
Re: How to hide the text in random/last added section?
« Reply #14 on: January 05, 2006, 12:53:23 am »

@ecto :

I've experimented with your instructions for the mini-hack.
It works fine, so I'd like to thank you for your advise  :)

It has also another positive thing: by experimenting with it I've learned a further more of how the PHP scripts work ;)
Logged

ecto

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 144
    • My very incomplete gallery
Re: How to hide the text in random/last added section?
« Reply #15 on: January 05, 2006, 01:08:25 am »

Glad to help :)

Good thing you learned something, too!
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.