How can I remove the Links Share Code (at the Slideshow) an All sizes ?
They confuse the normnal user.

Comments

eastcn’s picture

Please take a look at this tpl.php:
tpl/photos_share.tpl.php

Morn’s picture

I cannot find where this Link is generated in tpl/photos_share.tpl.php

The HTML of the Share code link is:
<a class="thickbox" title="Share code" href="/photos/album/470/share?KeepThis=true&TB_iframe=true&height=450&width=650">Share code</a>

picturebook’s picture

Did anyone get this link to go away?? I have looked through all the template files and cannot locate this link to remove it. Can you please help me locate where it gets generated?
thanks, I am thoroughly confused most of the time

cajmcmahon’s picture

Issue tags: +album photos

This worked for me:

Line 127 ...\sites\all\modules\photos\inc\photos.album.inc

Original code:

$v = '<p>'.l(t('Back'), "photos/$type/$node->nid"). ''.l(t('.'), "photos/$type/$node->nid/share", array('query' => 'KeepThis=true&TB_iframe=true&height=450&width=650', 'attributes' => array('title' =>t('Share code'), 'class' => 'thickbox'))).'</p>';

I changed the words "Share code" to a simple period "." and deleted the spaces so in case I ever want to embed the code, I can still get it. Now it just reads "Back." but the work "Back" and the "." go todifferent places.

Altered code (almost the identical to the original):

$v = '<p>'.l(t('Back'), "photos/$type/$node->nid"). ''.l(t('.'), "photos/$type/$node->nid/share", array('query' => 'KeepThis=true&TB_iframe=true&height=450&width=650', 'attributes' => array('title' =>t('Share code'), 'class' => 'thickbox'))).'</p>';

I also got rid of the "All Sizes" link in the individual photo view (e.g. http://example.com/photos/image/353#image-load). My visitors don't need to see any other sizes or share code.

Line 30 ...sites\all\modules\photos\inc\photos.image.inc

I simply commented out the line:
// $image['links']['more'] = l(t('All sizes'), 'photos/zoom/'.$fid);

Not sure if this is the recommended way but the link is gone.

If anyone has better methods to do any of the above, I'd be happy to hear it as I'm not the world's best coder.

DLZJ’s picture

Hi,

I have tried to follow the advice here, but failed.

I have replaced the original code by the following:

Altered code (almost the identical to the original):

        $v = '<p>'.l(t('Back'), "photos/$type/$node->nid"). ''.l(t('.'), "photos/$type/$node->nid/share", array('query' => 'KeepThis=true&TB_iframe=true&height=450&width=650', 'attributes' => array('title' =>t('Share code'), 'class' => 'thickbox'))).'</p>';

But nothing seems to happen. Is there any other way to remove the "share code" link?

Thank you.

TChapin’s picture

This guys is a nut...you have to remove the reference to the "Share code" links from each reference in the code. He has the same code reitterated for thumb/thumb, thumb/"medium" etc. Nice try in #4, but that is kind of a hackish workaround.

nathaniel’s picture

Version: 6.x-2.6-beta3 » 7.x-3.x-dev
Assigned: Unassigned » nathaniel
Issue summary: View changes

Adding an option on the admin page to "Hide link". Also renaming return = "Full page" and print = "I am using colorbox (with Enable Colorbox load)".

The hide link option will hide the "All sizes" link on the photo page and will also hide the "Copy image to share code" link in the photo information block.

  • Commit 2955af6 on 7.x-3.x by Nathaniel:
    Issue #412654 by Nathaniel: added an option to hide all sizes link and...
nathaniel’s picture

Component: Miscellaneous » Code
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.