Adding "Add This" To Forum Posts
QuoteFeb 24, 2011 22:551 likesLike
 

I was asked how to do this a while ago and thought I would post it for everyone - in case you might want to use it.

 

To add "AddThis" to your forum posts do the following AFTER making a backup of this file

 

In "modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl"

Find the following block of code:

-------------------------------------------------------------

    <xsl:call-template name="breadcrumbs">
        <xsl:with-param name="link1">
            <a href="{$rw_cat}{cat/uri}{$rw_cat_ext}" onclick="return f.selectForumIndex('{cat/uri}')"><xsl:value-of select="cat/title" disable-output-escaping="yes" /></a>
        </xsl:with-param>
        <xsl:with-param name="link2">
            <a href="{$rw_forum}{forum/uri}{$rw_forum_page}0{$rw_forum_ext}" onclick="return f.selectForum('{forum/uri}', 0);"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a>
        </xsl:with-param>       
    </xsl:call-template>

-------------------------------------------------------------

 

JUST BELOW THIS PASTE THE FOLLOWING

 

------------------------------------------------------------

<div class="addthis" style="margin-top:10px; margin-bottom:15px;">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
</div>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4d672bfa2a973983"></script>
<!-- AddThis Button END --> 

--------------------------------------------------

 

After you are done your addthis section should appear as seen below:

 

PicDepict.com Free Image Hosting

Of course you can use a different set of links from addthis then I did - just replace the addthis code with your own.

Unfortunately, this will only use your logo for the thumbnail on Facebook. It is limited, but it will link to the post that it is clicked within so that you can share the actual link. It's a bit easier than copying the URL and looks a tad more professional.

 

NOTE: The addthis bar only appears when logged in. Otherwise it is not visible.

 

 

If someone can figure out how to make it pull the image from the post instead of the logo - please let me know.

~ Corey

QuoteFeb 25, 2011 07:191 likesLike
 

Well Done

Thank's 4 sharing

Post Reply - if you going to help - No for - bla bla bla bla
QuoteFeb 25, 2011 20:480 likesLike
 

 

Well Done

Thank's 4 sharing

 No problem UFO, thanks.

QuoteApr 05, 2011 04:170 likesLike
 

I did just as explained and it is not showing anything. Here is the code I put in

 

         <a href="{$rw_forum}{forum/uri}{$rw_forum_page}0{$rw_forum_ext}" onclick="return f.selectForum('{forum/uri}', 0);"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a>
        </xsl:with-param>       
    </xsl:call-template>
   
    <div class="addthis" style="margin-top:10px; margin-bottom:15px;">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_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=ra-4d9ad59b3b35385e"></script>
<!-- AddThis Button END -->

 

Did I do something wrong?

 

QuoteApr 05, 2011 12:530 likesLike
 

How would you add this to the groups and blogs

I was asked how to do this a while ago and thought I would post it for everyone - in case you might want to use it.

To add "AddThis" to your forum posts do the following AFTER making a backup of this file

In "modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl"

Find the following block of code:

-------------------------------------------------------------

<xsl:call-template name="breadcrumbs">
<xsl:with-param name="link1">
<a href="{$rw_cat}{cat/uri}{$rw_cat_ext}" onclick="return f.selectForumIndex('{cat/uri}')"><xsl:value-of select="cat/title" disable-output-escaping="yes" /></a>
</xsl:with-param>
<xsl:with-param name="link2">
<a href="{$rw_forum}{forum/uri}{$rw_forum_page}0{$rw_forum_ext}" onclick="return f.selectForum('{forum/uri}', 0);"><xsl:value-of select="forum/title" disable-output-escaping="yes" /></a>
</xsl:with-param>       
</xsl:call-template>

-------------------------------------------------------------

JUST BELOW THIS PASTE THE FOLLOWING

------------------------------------------------------------

<div class="addthis" style="margin-top:10px; margin-bottom:15px;">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
</div>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4d672bfa2a973983"></script>
<!-- AddThis Button END -->

--------------------------------------------------

After you are done your addthis section should appear as seen below:

PicDepict.com Free Image Hosting

Of course you can use a different set of links from addthis then I did - just replace the addthis code with your own.

Unfortunately, this will only use your logo for the thumbnail on Facebook. It is limited, but it will link to the post that it is clicked within so that you can share the actual link. It's a bit easier than copying the URL and looks a tad more professional.

NOTE: The addthis bar only appears when logged in. Otherwise it is not visible.

 

 

If someone can figure out how to make it pull the image from the post instead of the logo - please let me know.

~ Corey

 

What's that falling? its a bird, its a plane, oh wait its Facebook
QuoteApr 10, 2011 23:400 likesLike
 

Hi, I tried to do this but got the following error codes when I looked at my forum post

 

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl:122: parser error : Opening and ending tag mismatch: div line 26 and xsl:template in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: </xsl:template> in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: ^ in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl:350: parser error : Opening and ending tag mismatch: template line 15 and stylesheet in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: </xsl:stylesheet> in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: ^ in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl:353: parser error : Premature end of data in tag stylesheet line 1 in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: ^ in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: compilation error: file /home/scottdb/public_html/modules/boonex/forum/layout/sWhiteMoon_ruby_en/xsl/forum_posts.xsl line 3 element include in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: xsl:include : unable to load /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: No stylesheet associated to this object in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 88

Any ideaa what went wrong? Is this compatable with 7.0.5?

QuoteApr 11, 2011 01:290 likesLike
 

This doesn't seem to be compatible with Dolphin 7.05

I'm not really sure why.

I added it and it didn't break anything though. It just doesn't show now. If you broke something, you most likely did something differently than what I posted.

Sorry.

QuoteApr 11, 2011 09:020 likesLike
 

Try adding an html block and see if it works

Hi, I tried to do this but got the following error codes when I looked at my forum post

 

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl:122: parser error : Opening and ending tag mismatch: div line 26 and xsl:template in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: </xsl:template> in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: ^ in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl:350: parser error : Opening and ending tag mismatch: template line 15 and stylesheet in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: </xsl:stylesheet> in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: ^ in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl:353: parser error : Premature end of data in tag stylesheet line 1 in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: ^ in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: compilation error: file /home/scottdb/public_html/modules/boonex/forum/layout/sWhiteMoon_ruby_en/xsl/forum_posts.xsl line 3 element include in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: xsl:include : unable to load /home/scottdb/public_html/modules/boonex/forum/layout/base_en/xsl/forum_posts.xsl in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 87

Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: No stylesheet associated to this object in /home/scottdb/public_html/modules/boonex/forum/classes/en/BxXslTransform.php on line 88

Any ideaa what went wrong? Is this compatable with 7.0.5?

 

What's that falling? its a bird, its a plane, oh wait its Facebook
QuoteApr 12, 2011 05:130 likesLike
 

Thanks for the heads up on the not being compatable with 7.0.5. And ya I probably messed up somewhere.

If I add an html block for this then it will only show up on the forum home or forum index page. Is there a way to put an html block in the posts?

QuoteApr 12, 2011 11:340 likesLike
 

http://www.boonex.com/unity/forums/#topic/How-to-Add-AddThis-to-Groups-.htm

copy the code or go to addthis and the code you want and instead in modules look for forums instead of group. what you need to look for is forumview I think it might be bxforumview I am at work so I can't access cpanel from here. Once you find it paste the code at the bottom below ?>

Thanks for the heads up on the not being compatable with 7.0.5. And ya I probably messed up somewhere.

If I add an html block for this then it will only show up on the forum home or forum index page. Is there a way to put an html block in the posts?

 

What's that falling? its a bird, its a plane, oh wait its Facebook
QuoteApr 13, 2011 04:350 likesLike
 

Thanks for the info you have given.  Don't want you to get in trouble at work. I knew it had to be a simple edit to get it to show. I looked for the bxforumview but could not find that. The only ones that I could find in the forums folders  are DbForum.php,  Forum.php,  BxForum.js,  forum_posts_main.xsl ,  forum_posts.xsl. There were a couple others dealing with editing, catagories, and  such but did not include those.

Also I am just learning but in going through the files I've noticed that all en folders are just copies of the main folder. Was wondering what does en stand for or what is an en file for?

QuoteApr 13, 2011 08:530 likesLike
 

Try forum_posts.xsl

Thanks for the info you have given.  Don't want you to get in trouble at work. I knew it had to be a simple edit to get it to show. I looked for the bxforumview but could not find that. The only ones that I could find in the forums folders  are DbForum.php,  Forum.php,  BxForum.js,  forum_posts_main.xsl ,  forum_posts.xsl. There were a couple others dealing with editing, catagories, and  such but did not include those.

Also I am just learning but in going through the files I've noticed that all en folders are just copies of the main folder. Was wondering what does en stand for or what is an en file for?

 

What's that falling? its a bird, its a plane, oh wait its Facebook
QuoteApr 13, 2011 13:010 likesLike
 

Tried it on forum_posts.xsl and nothing showed. I tried it in a few areas.

 

  </div>
 
</xsl:template>

</xsl:stylesheet>

 

Tried it before the template, between the template and stylesheet and after the stylesheet. Cleared cache on website after each change before I checked it out.

QuoteApr 13, 2011 14:150 likesLike
 

When I get home I will walk you through it.  make sure you are putting the code all the way at the end below this ?>

Tried it on forum_posts.xsl and nothing showed. I tried it in a few areas.

 

</div>

</xsl:template>

</xsl:stylesheet>

 

Tried it before the template, between the template and stylesheet and after the stylesheet. Cleared cache on website after each change before I checked it out.

 

What's that falling? its a bird, its a plane, oh wait its Facebook
QuoteApr 13, 2011 14:260 likesLike
 

Hey thanks for the help. I placed the code after the last line of code in the forum_posts.xsl . The last line of code being </xsl:stylesheet>. I'm just a newbie to codes but the only place I have seen ?> as the last line of code is php files.

I'm working evenings right now so it seems we are on oposite schedules. Will be back on by 2:30 pacific time to try.

QuoteApr 17, 2011 03:310 likesLike
 

I have been trying to get this to show in the forum post on my own but no luck. Anyone know how to add this to 7.0.5

QuoteApr 24, 2011 01:120 likesLike
 

Bump. Does anyone have this on 7.0.5?

jpichardo00
Jan 06, 2012 17:12 • post is hidden ( show post ) • 0 likesLike
QuoteJan 06, 2012 23:150 likesLike
 

If you are doing this in uni or any other template than i guess you have to recompile the language from manage forum.

This is forum signature. Not your answer...:)
QuoteJan 07, 2012 00:510 likesLike
 

I tried it in 7.06. Couldn't get it to work at all....

My site has banner ads here!
QuoteJan 21, 2012 15:010 likesLike
 

I was able to add "AddThis" following your instructions (Thank you!) but when my site forum URL contains a "#" in it the AddThis image-set does not display.  

For example, with the first URL below it does *not* display... this is unfortunately the default way... but if I manually remove the "#", as seen in the second URL, it does display properly.  

example.com/forum/#topic/discussion.htm

example.com/forum/topic/discussion.htm

---------

What part of Dolphin 7.0.8 is putting the # into the URL?  I see it in the Boonex forum as well.

Update: I just sent an email to AddThis... hoping they have a solution.  I'm guessing that Dolphin and/or Orca needs the # symbol in the URL.

QuoteMar 31, 2012 15:150 likesLike
 

I am having the same issue with the # sign in the URL which is essentially cutting everything else after it when being shared..

 

Anybody found any solution?

QuoteMar 31, 2012 15:360 likesLike
 

 

I am having the same issue with the # sign in the URL which is essentially cutting everything else after it when being shared..

 

Anybody found any solution?

 I never did find a solution... or an alternative method.