Adding "AddThis" to the breadcrumb trail Adding "AddThis" to the breadcrumb trail
 

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

Adding "AddThis" to the breadcrumb trail

Started by uk_martin, January 14, 2011, 01:20:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

uk_martin

Hi

Further to the customised breadcrumb trail here - http://forum.coppermine-gallery.net/index.php/topic,69371.0.html

Is it possible to add the "AddThis" button into the same row as the breadcrumb trail, in such a way that it is alligned right, in the same way as I have been able to do here - http://www.brummiesfans.com/main/portal.php

Link to intended gallery : http://www.brummiesfans.com/photos/

Code for AddThis button that needs to be inserted :

<!-- ADDTHIS BUTTON BEGIN -->
<script type="text/javascript">
var addthis_config = {
     username: "Brummiesfans"
}
</script>

<a href="http://www.addthis.com/bookmark.php?v=250"
        class="addthis_button">
        <img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" border="0" alt="Share" />
</a>

<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
<!-- ADDTHIS BUTTON END -->


Thanks in advance for your assistance

Martin

ΑndrĂ©

Seems to be already solved? Please post your solution for the benefit of others trying to accomplish a similar thing.

uk_martin

Well, my theme.php is a little customised, so maybe this may confuse, but basically you need to look for:
// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
        <tr>
<td class="statlink">
          <img src="images/icon_home.gif" border="0" alt="" /> {BREADCRUMB}
          </td>
<td class="statlink">


Then after add another cell to the row, so after add:

<td colspan="3" align="right">
             <span class="statlink"><!-- ADDTHIS BUTTON BEGIN -->
<script type="text/javascript">
var addthis_config = {
      username: "Brummiesfans"
}
</script>
<a href="http://www.addthis.com/bookmark.php?v=250"
        class="addthis_button">
        <img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" border="0" alt="Share" />
</a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js">
</script>
<!-- ADDTHIS BUTTON END -->
</td>
</span>

uk_martin

Sorry, ignore the last post, my browser went stupid and posted when I was in the middle of editing. It should have said:

Well, my theme.php is a little customised, so maybe this may confuse, but basically you need to look for:

// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
        <tr>
<td class="statlink">
          <img src="images/icon_home.gif" border="0" alt="" /> {BREADCRUMB}
          </td>
<td class="statlink">
</td>


Then add another cell to the row, and in it add the script from the Addthis site:
<td colspan="3" align="right">
             <span class="statlink"><!-- ADDTHIS BUTTON BEGIN -->
<script type="text/javascript">
var addthis_config = {
      username: "Brummiesfans"
}
</script>
<a href="http://www.addthis.com/bookmark.php?v=250"
        class="addthis_button">
        <img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" border="0" alt="Share" />
</a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js">
</script>
<!-- ADDTHIS BUTTON END -->
</td>
</span>


You have the option also of removing the redundant empty <td class="statlink"></td> cell id you want to. I don't know PHO so I don't like editing PHP pages so if it's not broken I like to leave things alone.

uk_martin

oops, forgot to mention, that the "username: "Brummiesfans" will need to be changed for whatever your username is...

Nosferatu

hello,

@uk_martin i hope you can help me or an other one.

Your code work perfect but i want an other AddThis code, and my code don't realy work.... it's not on the right side....

You can see it on my test gallery (at moment i test the coppermine gallery script ;)

http://www.pj-firepower.com/wallpapers/displayimage.php?album=1&pid=1#top_display_media

<!-- BEGIN ADDTHIS -->
<td colspan="3" align="right">
<span class="statlink">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=nosferatuvn"></script>
<!-- AddThis Button END --></td>
</span>
<!-- END ADDTHIS -->


If i del the <div> and write span or p no one work ..... and the "I Like" button also work not so good i think. and if i want share something to FB i don't get an Pic ...

If i share with coppermine plugin it works .... but i want use the AddThis ... i don't want have 50 icons by the pic. ....

someone an idea ?

kind regards
Nosferatu
(sorry for my bad english ... )

uk_martin

Quote from: Nosferatu on May 19, 2011, 01:09:35 PM
hello,

@uk_martin i hope you can help me or an other one.

Your code work perfect but i want an other AddThis code, and my code don't realy work.... it's not on the right side....

Hi Nosferatu

Where exactly would you like the AddThis button to be?  Do you want it to the left of the "Like" button or do you want it yo replace all the buttons underneath the image?

The problem with the "no pic" is one that I have too, and I've sort of accepted it as a limitation of the system. If anyone else knows how to include the media into a share with FB (etc) then I'd be very keen to hear about it too!

Nosferatu

Quote from: uk_martin on May 19, 2011, 01:24:11 PM
Hi Nosferatu

Where exactly would you like the AddThis button to be?  Do you want it to the left of the "Like" button or do you want it yo replace all the buttons underneath the image?

The problem with the "no pic" is one that I have too, and I've sort of accepted it as a limitation of the system. If anyone else knows how to include the media into a share with FB (etc) then I'd be very keen to hear about it too!

Hi martin

the like button and the addthis button is the same script.

i want the like, tweet addhis button on right side. it works with the short addthis script but not with the "like, tweet addthis" version :(

no i don't want it underneath the image, but i think if it's underneath the image the facebook share work with image, did you test it ?

if the share with pic work underneath the image i want it underneath the image ;)