Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Custom: DB Thanks/Like Mod Edit Details »»
Custom: DB Thanks/Like Mod Edit
Version: 1.00, by Eplexx Eplexx is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 04-14-2011 Last Update: Never Installs: 7
Template Edits
Re-useable Code Translations  
No support by the author.

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:


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">&nbsp;</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">&nbsp;</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.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
ykkrox

Comments
  #12  
Old 09-07-2018, 11:34 AM
m7sen m7sen is offline
 
Join Date: Mar 2014
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how its work ?
any example imgs please

there is no such dbtech_thanks_postbit_entries_replacement2 template in the new version 3

is it possible to make it like vbseo likes ?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:38 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03673 seconds
  • Memory Usage 2,232KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (2)post_thanks_box
  • (1)post_thanks_box_bit
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete