Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
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>
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
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):
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.
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.
Comments
Comment #1
eastcn commentedPlease take a look at this tpl.php:
tpl/photos_share.tpl.php
Comment #2
Morn commentedI 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>Comment #3
picturebook commentedDid 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
Comment #4
cajmcmahon commentedThis 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.
Comment #5
DLZJ commentedHi,
I have tried to follow the advice here, but failed.
I have replaced the original code by the following:
But nothing seems to happen. Is there any other way to remove the "share code" link?
Thank you.
Comment #6
TChapin commentedThis 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.
Comment #7
nathaniel commentedAdding 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.
Comment #9
nathaniel commented