VistaDB.Net Logo

Share or bookmark your article in Graffiti with AddThis

by Jason Short 24 February 2009

 I have been wanting to do this for a while, because I like it when I find this link on other blogs that I read.  I bookmark things in Delicious quite a bit, but I know that others use other bookmark services.  The great thing about AddThis is that they don't care where you bookmark it.  They give you a LOT of choices for locations.  I have only turned on a few of them in the default menu, but you can see the complete list by clicking the More... button.

Adding to Graffiti

I found a couple of articles that gave parts of the answer, but here is all the code I had to add to my Post.View for this theme page.

 

<!-- AddThis Button BEGIN -->
<div>
<script type="text/javascript">
var addthis_pub="vistadb";
var addthis_brand = "VistaDB.NET";
var addthis_header_color = "#ffffff";
var addthis_header_background = "#000000";
var addthis_options = 'print, email, delicious, twitter, google, live, digg, technorati, more';
var addthis_hover_delay = 200;
</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return 
         addthis_open(this, '', '$macros.FullUrl($post.Url)', '$post.Title')" onmouseout="addthis_close()" 
         onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-bookmark-en.gif" 
         width="125" height="16" alt="Bookmark and Share" style="border:0"   /></a>
         <script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js">
         </script></div>
<!-- AddThis Button END -->

That was it.  The key parts were the replacement of the URL with the Chalk code for $macros.FullUrl($post.Url) and TITLE with $post.Title.

Bookmark, Share, Print

Now you can bookmark or share VistaDB blog entries using your favorite service.  You can also choose Print to get a cleaner CSS style sheet for printing them.

What is it?

Just in case you don't know what it is, look at the button below this post.  It has a +Bookmark on the button.  Hover over it to see the options available.  Clicking on one of them will send you to that service with this post (or any other one if you are on that page) filled in for bookmarking.

NOTE: We no longer run Graffiti - this blog entry has been kept for archival purposes only

 

Comments

25 February 2009 #

Blog engine problem? As I use an RSS feed its only your articles that do not wrap text in the RSS viewer. This is because &nbsp non break spaces are used in lines, e.g.


... blogs that I read. &nbsp;I bookmark things in Delicious quite a bit, but I know that others use other bookmark services. &nbsp;The great thing...


The web page views ok in Firefox however I prefer to read in the RSS viewer before going to the web page.




Why do you have to use &nbsp non break spaces anyway?

26 February 2009 #

js_vistadb

&nbsp; is an HTML attribute when you want to leave more than 1 space in between words.  Like that (after the . I left two spaces).  HTML has no concept of whitespace so it collapses it.  If you want it to leave extra space you have to add it (although in this case the editor is doing it for me, I don't have to think about it).


I am not sure why it is not word wrapping for you.  I use a different RSS viewer and it all word wraps fine.  Each line is delimited like normal from what I can see.  Maybe the rss reader is not displaying it correctly.


js_vistadb

28 February 2009 #

I guess we might have to agree to disagree on this one? My free RSS viewer the Attensa Outlook add-in is doing exactly what it is supposed to do when it encounters an &nbsp construct. It does not break but continues the text on the same line.




There seems to be a conflict with how you want the lines to break on the actual web page and that of this 'pure' HTML RSS reader? As this feed is the only one that gives me this problem I checked the HTML source of other blogs and found that they do not use non-break spaces. Change reader? No thanks!

28 February 2009 #

js_vistadb

nbsp should never interfere with printing lines of HTML.  We don't do anything special to the output.  nbsp never tells the display to not break the line.  HTML includes nbsp, so the output is pure.  nbsp does not mean continue on the same line, it means to not eat the whitespace.  Look at the w3 schools site.  That link you had in your comment is someones personal blog that they wrote - the information is incorrect (and why I removed it).


W3Schools -  "Normally HTML will truncate spaces in your text. If you write 10 spaces in your text HTML will remove 9 of them. To add lots of spaces to your text, use the &nbsp; character entity."  That does not say "prevent from wrapping".  


The RSS is standard output from Graffiti CMS (unless you are running through some third party aggregate service or something).  And since Telligent has a lot of copies out there I would think they would have noticed it if the output was putting something bad in the output.  I just searched their site and didn't see anything (and also verified we are running the most current version).


I have tested the site without a dozen RSS readers and have never see the behavior you describe, sorry.  I would bring it up with your RSS software vendor.

js_vistadb

Comments are closed

Powered by BlogEngine.NET and VistaDB

Log in