Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Adding "AddThis" to the breadcrumb trail  (Read 5947 times)

0 Members and 1 Guest are viewing this topic.

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Adding "AddThis" to the breadcrumb trail
« on: January 14, 2011, 01:20:10 am »

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 :

Code: [Select]
<!-- 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Adding "AddThis" to the breadcrumb trail
« Reply #1 on: January 19, 2011, 09:50:33 am »

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

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Adding "AddThis" to the breadcrumb trail
« Reply #2 on: January 19, 2011, 10:43:55 am »

Well, my theme.php is a little customised, so maybe this may confuse, but basically you need to look for:
Code: [Select]
// 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:
Code: [Select]
<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>
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Adding "AddThis" to the breadcrumb trail
« Reply #3 on: January 19, 2011, 10:52:00 am »

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:

Code: [Select]
// 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:
Code: [Select]
<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.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Adding "AddThis" to the breadcrumb trail
« Reply #4 on: January 19, 2011, 10:53:37 am »

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

Nosferatu

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Adding "AddThis" to the breadcrumb trail
« Reply #5 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....

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

Code: [Select]
<!-- 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 ... )
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Adding "AddThis" to the breadcrumb trail
« Reply #6 on: May 19, 2011, 01:24:11 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!
Logged

Nosferatu

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Adding "AddThis" to the breadcrumb trail
« Reply #7 on: May 19, 2011, 01:30:44 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 ;)




Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 21 queries.