vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=231666)

DBStattoo 12-30-2009 03:10 PM

Quote:

Originally Posted by rbu (Post 1942476)
If you are using Legacy...

post_thanks_box
Code:

<li class="postbitlegacy postbitim" id="post_thanks_box_{vb:raw post.postid}" style="top:-10px;<vb:if condition="!$post_thanks_box == 1"> display:none;</vb:if>">
        {vb:raw post_thanks_box}
</li>


post_thanks_javascript
Code:

<style type="text/css">
.postbitlegacy .postfoot .textcontrols a.quickreply, .postbitlegacy .postfoot .textcontrols a.post_thanks_button  {
        background: url(images/buttons/post_thanks.png) no-repeat transparent left;
        padding-left: 20px;
}
.postbitlegacy .postfoot .textcontrols a.quickreply:hover, .postbitlegacy .postfoot .textcontrols a.post_thanks_button:hover  {
        background: url(images/buttons/post_thanks-hover.png) no-repeat transparent left;
</style>


post_thanks_postbit
find <div class="postbody"> and change it to <div class="postbody" style="margin-left:0;">

Nice thanks :D

reimic 12-30-2009 03:11 PM

Quote:

Originally Posted by Charlie98902 (Post 1942513)
Are they your posts?

Ok sorry. I am an idiot! ;)

DBStattoo 12-30-2009 03:11 PM

Nice hack install and nominate :up:

vulture 12-30-2009 03:15 PM

Getting the following error when upgrading from 5.3

Code:

Database error in vBulletin 4.0.0:

Invalid SQL:
ALTER TABLE `user` ADD `post_thanks_user_amount` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL;

MySQL Error  : Duplicate column name 'post_thanks_user_amount'
Error Number  : 1060
Classname    : vB_Database
MySQL Version : 5.0.41-community

Edit: v5.3 is disabled when I do the upgrade

Charlie98902 12-30-2009 03:25 PM

Try removing all of the thank you hack and do a clean install of the newest version here. It's worth a shot.

vulture 12-30-2009 03:28 PM

Was thinking that but then I guess all users loose their thanks.

No big deal I guess. I'll backup the DB before I do that though!

Charlie98902 12-30-2009 03:32 PM

I am no coder but it is a shot in the dark. I agree with the loss of thanks my members lost the same too as I uninstalled the 3.8 version before I upgrade the forum but they understand too.

AdamSC 12-30-2009 03:46 PM

Hi there, thanks for the great post - I am trying to figure out how I can make this appear on a custom skin - what do I add and to which template file?

vulture 12-30-2009 03:48 PM

The install assumes that the relevant fields on the table don't exist. Is there not a way of checking to see if they already exist and skip?

Code:

<![CDATA[$db->query_write("CREATE TABLE IF NOT EXISTS`". TABLE_PREFIX ."post_thanks` ( `id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, `userid` INT(10) NOT NULL, `username` VARCHAR(50) NOT NULL, `date` INT(10) NOT NULL, `postid` INT(10) NOT NULL) "); $db->query_write("ALTER TABLE `". TABLE_PREFIX ."post_thanks` ADD INDEX ( `postid` )"); $db->query_write("ALTER TABLE `". TABLE_PREFIX ."user` ADD `post_thanks_user_amount` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL"); $db->query_write("ALTER TABLE `". TABLE_PREFIX ."post` ADD `post_thanks_amount` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL"); $db->query_write("ALTER TABLE `". TABLE_PREFIX ."user` ADD `post_thanks_thanked_posts` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL"); $db->query_write("ALTER TABLE `". TABLE_PREFIX ."user` ADD `post_thanks_thanked_times` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL");]]>

coloradomoms 12-30-2009 03:50 PM

Installed and Love it!

Is there a way to install this a second time to make it say "hugs" and track separately? Just curious. :)

ETA - I moved the postbit thingy to make the thanks go next to editpost, but its still under the avatars and stuff. No big deal, just curious as to why it isn't moving. I did the legacy thing and refreshed, cleared cache, etc. still didn't budge. I guess it just wants to hang out over there. ;)


All times are GMT. The time now is 07:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08821 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete