add new link to thumbnail view {LINK_TGT_DETAILS} ?? add new link to thumbnail view {LINK_TGT_DETAILS} ??
 

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

add new link to thumbnail view {LINK_TGT_DETAILS} ??

Started by ravenlife, August 18, 2008, 11:41:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ravenlife

Hi Guys,

well i am currently working on a client site implementing coppermine for the first time, it is really a great gallery and im not sure why i have never looked at it before.

let me first explain what i am doing

i have integrated coppermine 1.4 with joomla 1.5.6 (i did find a possible bug - ill post that elsewhere)
i have modified an existing theme (blackbirch) and implemented some changes to get the gallery working with ninjaforge.com's shadowbox plugin

code change is in blackbirch/theme.php in the 'function theme_display_thumbnails'

'{LINK_TGT}' => $thumb['picurl'] . "\" rel=\"shadowbox",

and in functions.inc.php

$pic_fullsize_url =  get_pic_url($row, 'normal');


now this works brilliantly and my thumbnails now open the intemediate image in a shadowbox. which is exactly what i want. but i now want to modify shadowbox to display a "details" link when it opens.

i know how to make the customisation to shadowbox to do this (i made the plugin)

what i dont know is how to get the link from coppermine.

my question is a simple one and please dont worry yourself about how i will get it into shadowbox.

how do i create a link on the thumnails view (below the thumbnail) that links to the original intemediate page

old code was

'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}$uid_link",

i tried creating

'{LINK_TGT_DETAILS}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}$uid_link",

but i dont know how to then get this into the view.

if someone could give me a push in the right direction, i would be greatful.

thanks

Richie

p.s,

when completed i will post the full details of the modification (and the shadowbox mod) so that others may use it if they like

ravenlife

okay i think i figured it out

in my theme.php file i added this line

'{DETAILS}' => "<a href=\"displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}$uid_link\">Details</a>",

then i opened up theme.inc.php

adn copied the following into my theme.php file

// HTML template for thumbnails display
if (!isset($template_thumbnail_view)) { //{THEMES}
$template_thumbnail_view = <<<EOT

<!-- BEGIN header -->
        <tr>
<!-- END header -->
<!-- BEGIN thumb_cell -->
        <td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
                <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center">
                                        <a href="{LINK_TGT}">{THUMB}<br /></a>
                                        {CAPTION}
                                        {ADMIN_MENU}

                                </td>
                        </tr>
                </table>
        </td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
                <td valign="top" class="thumbnails" align="center">&nbsp;</td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
        </tr>
        <tr>
<!-- END row_separator -->
<!-- BEGIN footer -->
        </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
        <tr>
                <td colspan="{THUMB_COLS}" style="padding: 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                       {TABS}
                                </tr>
                        </table>
                </td>
        </tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;
}  //{THEMES}


i then added this line to it

{DETAILS}

this will place said link undenieth the gallery - i added it to the above code so you can see where i put it

now just to put that in shadowbox and im well away

will let you guys know when its done

thanks

Richie