HomeNotesHack to add Digg button to Blogs.
1080 days ago in 
Tags: blogs, button, hack, digg
Reactions: 0 comments 1 points0 reports
 
 

Hack to add Digg button to Blogs.

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.

Plussed by

 
 
 
 

Comments

Oldest First
|
Threaded
 
 
Please login to post a comment.
No comments so far.
 
 
 
PET:0.046723127365112