Hack to add Digg button to Blogs.

ZopfWare posted 27th of February 2009 in Community Voice. 0 comments.

These instructions are for v 6.1.4 with a clean install.  I cannot guarantee that they will work with other versions...but you get the idea

open inc/classes/BxDolBlogs.php in your favorite editor.

Locate the following section of code:

//339933 color green
$sPostText = ($iView==2) ? $aResSQL['PostText'] : $aResSQL['PostText'];

if ($iView==2) $sActions='';

replace all lines of code after the code above and up to but NOT including the line:

$sFriendStyle = "";

With the following:

if ($iView==3) $sTags = <<<EOF
<div class="fr_small_gray_centered">
<span style="vertical-align:middle;"><img src="{$site['icons']}tag_small.png" class="marg_icon" alt="{$sTagsC}" /></span>{$sTagsC}:&nbsp;{$sTagsHrefs}<div class="cat_edit">
<div class="fr_small">
<span style="vertical-align:top;"><script type="text/javascript">
digg_skin = 'compact';
digg_window = 'new';
</script><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></span>
</div> </div>
</div>
EOF;
else $sTags=<<<EOF
<div class="fr_small_gray_centered">
<span style="vertical-align:middle;"><img src="{$site['icons']}tag_small.png" class="marg_icon" alt="{$sTagsC}" /></span>{$sTagsC}:&nbsp;{$sTagsHrefs}
</div>
EOF;

Thats it... it will put a Digg button on all blog posts that are shown in view 3 (the one where the path is to the actual title of the blog) full view mode.

You can see an example of this HERE

Let me know if you have any trouble.  This is just a personal hack that I developed and I don't guarantee or warrant its use or fitness for any particular purpose.

Remember! ALWAYS make a BACKUP of any files you are working on so that you can restore the original if you mess up putting in this or any other code modification.

This hack should show you how you could add other "Digg" type buttons, just like you see here on the Boonex Blogs.

 
Comments
·Oldest
·Top
Please login to post a comment.
No comments so far.
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.057494163513184