Hyperlink in specific album breadcrumb line? Hyperlink in specific album breadcrumb line?
 

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]

Main Menu

Hyperlink in specific album breadcrumb line?

Started by Stacys, October 03, 2013, 11:48:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stacys

Hello to all,

I need to put a link on one specific album, somewhere at the top. Best place would be in a breadcrumb (navigation) line, somewhere beside Album Title. Please check attached screenshots to see what I mean.

This link should be seen on thumbnails page and on intermediate size photo page and should appear on one specific album only, so maybe here should be tied with album ID, but how to do it I don't know. Tokens in theme file??

I tried to put a link on album title line on Edit screen but I failed. Found a few old similar questions without answers..
Any help or ideas very appreciated.

Gallery version 1.5.22
Theme: hardwired

Thank you!
S.

Niecher

#1
This is the same process that Phill showed us in your previous post.

If the custom link is placed in the breadcrumb will be shown also in all categories showing the breadcrumb. It must be remembered also "#top_display_media"

then, I suggest these other places are also visible (attached images):

For the thumbnails page:

find:

    if (!GALLERY_ADMIN_MODE && stripos($template_thumb_view_title_row, 'admin_buttons') !== false) {
        template_extract_block($template_thumb_view_title_row, 'admin_buttons');
    }


add just below:

    if ($CURRENT_ALBUM_DATA['aid'] != 'XX') {
       template_extract_block($template_thumb_view_title_row, 'custom_lnkII');
    }


'XX' is the number of your album to show custom link

find:

        $param['{ALBUM_NAME}'] = $album_name;


add just below:

        $param['{CUSTOM_LNKII}'] = '<a href="http://example.com/">custom link II</a>';


find:

                    <!-- Use JavaScript to display the sorting options only to humans, but hide them from search engines to avoid double-content indexing (js/thumbnails.js) -->
                </td>


add just below:

<!-- BEGIN custom_lnkII -->
                <td style="text-align:right">
                    {CUSTOM_LNKII}
                </td>
<!-- END custom_lnkII -->


For the displayimage page:

find:

    // report to moderator buttons
    $report_tgt = '';
    if (($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS)) {
        $report_tgt = "report_file.php?album=$album$cat_link$date_link&amp;pid=$pid&amp;pos=$pos";
    } else {
        // remove button if report toggle is off
        template_extract_block($template_img_navbar, 'report_file_button');
    }


add just below:

    if ($CURRENT_PIC_DATA['aid'] != 'XX') {
        template_extract_block($template_img_navbar, 'custom_lnkIII');
    }

   
'XX' is the number of your album to show custom link

find:

        '{PIC_POS}' => $pic_pos,


add just below:

        '{CUSTOM_LNKIII}' => '<a href="http://example.com/">custom link III</a>',


find:

                <td align="center" valign="middle" class="navmenu" width="100%">{PIC_POS}</td>


replace:

                <td align="center" valign="middle" class="navmenu" width="90%">{PIC_POS}</td>
<!-- BEGIN custom_lnkIII -->
                <td align="center" valign="middle" class="navmenu" width="10%">{CUSTOM_LNKIII}</td>
<!-- END custom_lnkIII -->


Regards.