Eplexx |
04-14-2011 10:00 PM |
Custom: DB Thanks/Like Mod Edit
1 Attachment(s)
I've modded the [DBTech] Advanced Post Thanks / Like v1 (vB3) [AJAX] plugin to my personal preference. I'm posting the stuff here so others can enjoy it as well :).
What it looks like:
http://screensnapr.com/e/gA49kg.png
What you need:
[DBTech] Advanced Post Thanks / Like v1 (vB3) [AJAX]
Install the plugin above.
Template mods:
1. Add this code to additional css, the first box not the second additional css box:
Code:
}
.buttons {
display:inline;
}
.buttons a {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:9px;
font-weight:bold;
display: block;
padding:5px 21px;
background:#777777;
color:#000000;
float:left;
text-align:center;
border-top:1px solid #000000;
border-right:1px solid #000000;
border-bottom:1px solid #000000;
border-left:1px solid #000000;
}
.buttons a:hover {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:9px;
font-weight:bold;
background:#aaaaaa;
color:#000000;
border-top:1px solid #000000;
border-right:1px solid #000000;
border-bottom:1px solid #000000;
border-left:1px solid #000000;
}
2. Goto: dbtech_thanks_postbit and delete all the code.
3. Goto: dbtech_thanks_postbit_entries and replace all the code below.
Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[right]: 0px padding-$stylevar[right]: 6px">
{$vbphrase[dbtech_thanks_post_thanks_like]}
</td>
</tr>
<tr valign="top">
<td class="alt1" id="dbtech_thanks_wrapper_{$post[postid]}" style="border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
<if condition="$thanks OR $likes">
<if condition="$thanks">
<div class="smallfont" style="width:100%;">
<if condition="$otherthanks">
<phrase 1="$thanks" 2="$otherthanks" 3="$session[sessionurl]" 4="$post[postid]">$vbphrase[dbtech_thanks_x_thanked_y_others]</phrase>
<else />
<phrase 1="$thanks">$vbphrase[dbtech_thanks_x_thanked]</phrase>
</if>
</div>
</if>
<if condition="$likes">
<div class="smallfont" style="width:100%;">
<if condition="$otherlikes">
<phrase 1="$likes" 2="$otherlikes" 3="$session[sessionurl]" 4="$post[postid]">$vbphrase[dbtech_thanks_x_liked_y_others]</phrase>
<else />
<phrase 1="$likes">$vbphrase[dbtech_thanks_x_liked]</phrase>
</if>
</div>
</if>
</if>
</td>
<tr valign="top">
<if condition="$show[dbtech_thanks_thanks] OR $show[dbtech_thanks_like]">
<div id="dbtech_thanks_status_{$post[postid]}" style="display:inline"> </div>
</div>
</if>
<script type="text/javascript">
<!--
var Thanks{$post[postid]} = new Thanks_Obj();
Thanks{$post[postid]}.init('{$post[postid]}');
// -->
</script>
</tr>
</table>
4. Goto: dbtech_thanks_postbit_entries_replacement2 and replace all the code below.
Code:
<if condition="$show[dbtech_thanks_thanks] OR $show[dbtech_thanks_like]">
<div class="smallfont">
<div style="display:inline">
<if condition="$show[dbtech_thanks_thanks]"><span id="dbtech_thanks_thanks_{$post[postid]}"><a href="javascript://" onClick="Thanks{$post[postid]}.ajax_call('thanks');"> {$vbphrase[dbtech_thank_this_post]}</a></span></if>
<if condition="$show[dbtech_thanks_like]"><span id="dbtech_thanks_like_{$post[postid]}"><a href="javascript://" onClick="Thanks{$post[postid]}.ajax_call('like');"> {$vbphrase[dbtech_like_this_post]}</a></span></if>
</div>
<div id="dbtech_thanks_status_{$post[postid]}" style="display:inline"> </div>
</div>
</if>
5. Goto: postbit or postbit_legacy and post the code below wherever you'd like the liked and thanked numbers to be.
Code:
<div><strong>{$vbphrase[dbtech_thanks_liked]}:</strong> <phrase 1="$post[dbtech_thanks_liked]">{$vbphrase[dbtech_thanks_x_times]}</phrase></div>
<div><strong>{$vbphrase[dbtech_thanks_thanked]}:</strong> <phrase 1="$post[dbtech_thanks_thanked]">{$vbphrase[dbtech_thanks_x_times]}</phrase></div>
6. Goto: postbit or postbit_legacy and post the code below wherever you'd like the "say thanks" and "like this" buttons to be.
Code:
<if condition="$show[dbtech_thanks_thanks]"><span id="dbtech_thanks_thanks_{$post[postid]}"><div class="buttons"><a href="javascript://" onClick="Thanks{$post[postid]}.ajax_call('thanks');">Say Thanks</a></div></span></if>
<if condition="$show[dbtech_thanks_like]"><span id="dbtech_thanks_like_{$post[postid]}"><div class="buttons"><a href="javascript://" onClick="Thanks{$post[postid]}.ajax_call('like');">Like This</a></div></span></if>
If you have any issues just tell me and I'm down to help.
|