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: Hyperlink in specific album breadcrumb line?  (Read 2582 times)

0 Members and 1 Guest are viewing this topic.

Stacys

  • Coppermine newbie
  • Country: lt
  • Offline Offline
  • Gender: Male
  • Posts: 8
Hyperlink in specific album breadcrumb line?
« on: October 03, 2013, 11:48:43 pm »

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.
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: Hyperlink in specific album breadcrumb line?
« Reply #1 on: October 04, 2013, 02:13:25 am »

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:
Code: [Select]
    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:
Code: [Select]
    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:
Code: [Select]
        $param['{ALBUM_NAME}'] = $album_name;

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

find:
Code: [Select]
                    <!-- 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:
Code: [Select]
<!-- BEGIN custom_lnkII -->
                <td style="text-align:right">
                    {CUSTOM_LNKII}
                </td>
<!-- END custom_lnkII -->

For the displayimage page:

find:
Code: [Select]
    // 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:
Code: [Select]
    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:
Code: [Select]
        '{PIC_POS}' => $pic_pos,

add just below:
Code: [Select]
        '{CUSTOM_LNKIII}' => '<a href="http://example.com/">custom link III</a>',

find:
Code: [Select]
                <td align="center" valign="middle" class="navmenu" width="100%">{PIC_POS}</td>

replace:
Code: [Select]
                <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.
« Last Edit: October 04, 2013, 03:11:58 am by Niecher »
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.