Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 02:24:41 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: cpg1.5.2 beta released
The brand new cpg1.5.x series that comes with a lot of new features finally has reached the release stage: a first public beta release cpg1.5.2 has been released that is mainly aimed at translators, testers and community members that have contributed in the past. The beta release is not meant to be used in a production environment, but only on testbeds and for evaluation purposes. There is currently no support for cpg1.5.x yet!
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: [Mod] Thumbnail for albums with linked files only (keyword albums)  (Read 3415 times)
0 Members and 1 Guest are viewing this topic.
Ludo Topic starter
Contributor
***
Gender: Male
Italy Italy

Posts: 537



WWW
« on: September 28, 2008, 05:13:53 pm »

Here is a mod that will display in the thumbnail selection listbox on Album properties page, for all albums, both uploaded and linked files.

DEMO: http://vanrokken.altervista.org/ (Album Fiori)

FILES TO EDIT: 2
index.php
modifyalb.php


OPEN
index.php

FIND (2 times)
Code:
if ($count > 0) {

REPLACE WITH
Code:
if ($count > 0 || $alb_stat['link_pic_count'] > 0) {


OPEN
modifyalb.php

FIND
Code:
    global $CONFIG, $ALBUM_DATA, $album, $lang_modifyalb_php,$USER_DATA;

REPLACE WITH
Code:
    global $CONFIG, $ALBUM_DATA, $album, $lang_modifyalb_php, $USER_DATA, $FORBIDDEN_SET_DATA;

FIND
Code:
    $results = cpg_db_query("SELECT pid, filepath, filename, url_prefix FROM {$CONFIG['TABLE_PICTURES']} WHERE aid='$album' AND approved='YES' ORDER BY filename");

REPLACE WITH
Code:
    (count($FORBIDDEN_SET_DATA) > 0) ? $forbidden_set_string = "AND aid NOT IN (".implode(",", $FORBIDDEN_SET_DATA).")" : $forbidden_set_string = '';   
    ($ALBUM_DATA['keyword']) ? $where_string = " (aid='$album' OR (keywords LIKE '%{$ALBUM_DATA['keyword']}%' $forbidden_set_string))" : $where_string = "aid='$album'";       
    $results = cpg_db_query("SELECT pid, filepath, filename, url_prefix FROM {$CONFIG['TABLE_PICTURES']} WHERE $where_string AND approved='YES' ORDER BY filename");


SAVE AND CLOSE ALL FILES

EDIT: added check on private albums. I don't have any private album on my gallery, so I can't test it
Logged
jakob.b
Coppermine newbie

Switzerland Switzerland

Posts: 12


« Reply #1 on: January 04, 2009, 09:23:06 pm »

Hi Ludo

Your Mod works fine, however only if you have some linked pics. My album stays totaly empty, it's only a placeholder with the info I like to display in with a thumbnail.

http://fotos.lauftreff.ch

I just started, and got stuck with this problem.

I'm very thankfull for any help

Jakob
Logged
Ludo Topic starter
Contributor
***
Gender: Male
Italy Italy

Posts: 537



WWW
« Reply #2 on: January 05, 2009, 05:15:21 pm »

Simply replace images/thumb_nopic.jpg with a custom thumbnail for empty albums!
Logged
jakob.b
Coppermine newbie

Switzerland Switzerland

Posts: 12


« Reply #3 on: January 05, 2009, 06:11:22 pm »

Thank you Ludo

unfortunately I have several albums which serve as placeholder, which should have each a different thumbnails as you may see in my gallerie.


Hope you may have an idea,

regards JAkob
Logged
Ludo Topic starter
Contributor
***
Gender: Male
Italy Italy

Posts: 537



WWW
« Reply #4 on: January 07, 2009, 08:52:44 am »

In my humble opinion there is no point in keeping empty albums for other purposes than containing and organizing images. Placeholder...for what?
Logged
jakob.b
Coppermine newbie

Switzerland Switzerland

Posts: 12


« Reply #5 on: January 18, 2009, 06:04:41 pm »

Well the club (running) I do this for in my spare time, dosen't like the idea of categories. So as you may seen in the link I provided, there are no categories. However I like to add some placeholder for the years, just to get some easier overview.

It dosen't have to be a album, a single picture I could place somhow in there would be great (just something without a link behind it, as it should not be clickable - that is why the idea of a emty album).

Can you get the idea? Or do you think there is no way and they just have to go with categories?

Ludo, I appreciate your opinion very much and thank you for your input.

Warm regards from Switzerland

Jakob
Logged
Ludo Topic starter
Contributor
***
Gender: Male
Italy Italy

Posts: 537



WWW
« Reply #6 on: January 19, 2009, 01:50:48 pm »

Using the "placeholder" album, you end putting some albums "under" a certain year...that is just the aim of organizing albums in categories!
Logged
bryaxis
Coppermine newbie

Belgium Belgium

Posts: 1


« Reply #7 on: October 02, 2009, 12:18:56 pm »

Hi,

I installed your mod by modifying the two relevant files but it seems I must have missed something since the thumbnails won't appear... I'm currently running Coppermine 1.4.25 locally on Wamp.

Any idea on why this might happen ?
Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #8 on: October 02, 2009, 12:46:16 pm »

Do a right-click, properties on the broken thumbnails. Select the full thumbnail URL, copy it and paste it into the address bar of your browser to see what is wrong. It's hard to impossible to advice such things if we can't see them at all.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.039 seconds with 16 queries.