vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=92410)

Ncturnal 12-11-2005 02:53 AM

It should be right next to your "Edit" button. You may want to recheck your template modifications.

Bubble #5 12-11-2005 04:38 AM

No, we're not talking about where the button goes, we're talking about the code that feeds this:

HTML Code:

$post_thanks_button
It is aligning LEFT, even though it is wrapped in center tags.

HTML Code:

<center><if condition="$show['quickreply'] AND !$show['threadedmode']"><a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a></if>

<!-- Start Post Thank You Hack -->
$post_thanks_button
<!-- End Post Thank You Hack -->

<if condition="$post['editlink']"><a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a></if></center>

All of the other buttons in our fieldset align center as they should. The post thanks button is the ONLY one that aligns left :ermm: When a thread is closed the edit and quick reply buttons do not appear, just the thanks button appears, only it aligns left :ermm: We need to fix that or we cannot use the hack, and we'd really like to use it. We just need to know where that button is picking up the left align from...

Abe1 12-11-2005 02:55 PM

Quote:

Originally Posted by Bubble #5
No, we're not talking about where the button goes, we're talking about the code that feeds this:

HTML Code:

$post_thanks_button
It is aligning LEFT, even though it is wrapped in center tags.

HTML Code:

<center><if condition="$show['quickreply'] AND !$show['threadedmode']"><a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a></if>

<!-- Start Post Thank You Hack -->
$post_thanks_button
<!-- End Post Thank You Hack -->

<if condition="$post['editlink']"><a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a></if></center>

All of the other buttons in our fieldset align center as they should. The post thanks button is the ONLY one that aligns left :ermm: When a thread is closed the edit and quick reply buttons do not appear, just the thanks button appears, only it aligns left :ermm: We need to fix that or we cannot use the hack, and we'd really like to use it. We just need to know where that button is picking up the left align from...

The code is in the plugin. I will move it to a template some day in the future.

Tulsa 12-11-2005 03:29 PM

[high]* Tulsa drops a reminder in Abe's ear, "groan button". ;)[/high]

Abe1 12-11-2005 03:32 PM

Quote:

Originally Posted by Tulsa
[high]* Tulsa drops a reminder in Abe's ear, "groan button". ;)[/high]

Thanks. Any other feature people are waiting for?

Dollah 12-11-2005 04:00 PM

i had to unistall it and now when i got to reinstall its not showing the template mods i need to do. i'm usuing 3.5.1 havent upgraded as of yet

Abe1 12-11-2005 06:49 PM

Quote:

Originally Posted by Dollah
i had to unistall it and now when i got to reinstall its not showing the template mods i need to do. i'm usuing 3.5.1 havent upgraded as of yet

The template mods are in the zip file.

siriuxs 12-11-2005 08:48 PM

Hi, I want installed the hack, but i don't see a button tank...:S Why?

Bubble #5 12-11-2005 10:15 PM

Quote:

Originally Posted by Abe1
The code is in the plugin.

Can we get to the code through the ACP in anyway?

Bubble #5 12-11-2005 10:17 PM

Quote:

Originally Posted by siriuxs
i don't see a button tank...:S Why?

Did you double check your template installs?

Did you upload the button to the correct place on the server?

Abe1 12-11-2005 11:32 PM

Quote:

Originally Posted by Bubble #5
Can we get to the code through the ACP in anyway?

Sure.

ACP -> Plugin System -> Plugin Manager -> postbit_display_start hook location

siriuxs 12-12-2005 06:55 AM

Quote:

Originally Posted by Bubble #5
Did you double check your template installs?

Did you upload the button to the correct place on the server?

Yes, I do all...:'(

Abe1 12-12-2005 12:13 PM

Quote:

Originally Posted by siriuxs
Yes, I do all...:'(

Are you looking at your own post? You can't thank yourself so you have to look at someone elses post to see if it's there.

siriuxs 12-12-2005 12:19 PM

Quote:

Originally Posted by Abe1
Are you looking at your own post? You can't thank yourself so you have to look at someone elses post to see if it's there.

Ahhhhhhh..... ok...Tank...;)

webspider 12-12-2005 07:39 PM

I love this hack as do my users but I was thinking today that it would be great is the VB promotion system could use the thanks data for auto promotions. Right now it will count posts, reputation,and check date.

VaaKo 12-18-2005 02:41 PM

can you integrate this hack with the hide hack?

Abe1 12-18-2005 03:09 PM

Quote:

Originally Posted by Don Corleone
can you integrate this hack with the hide hack?

Can you give me a link?

pipin 12-18-2005 08:23 PM

thanx abe for this one.

just 2 points.

you should phrase the "Thanked Post" for the reputation in showthread_start

Code:

$db->query("                INSERT INTO ". TABLE_PREFIX ."reputation               
(postid, userid, reputation, whoadded, reason, dateline)               
VALUES ('$postid', '$postinfo[userid]', '$vboptions[post_thanks_reputation]', '$bbuserinfo[userid]', 'Thanked Post', " . TIMENOW . ")                ");

and is it right that removing the thanks wont remove the given reputation?

Abe1 12-18-2005 09:10 PM

Quote:

Originally Posted by pipin
thanx abe for this one.

just 2 points.

you should phrase the "Thanked Post" for the reputation in showthread_start

Code:

$db->query("                INSERT INTO ". TABLE_PREFIX ."reputation               
(postid, userid, reputation, whoadded, reason, dateline)               
VALUES ('$postid', '$postinfo[userid]', '$vboptions[post_thanks_reputation]', '$bbuserinfo[userid]', 'Thanked Post', " . TIMENOW . ")                ");

and is it right that removing the thanks wont remove the given reputation?

I fixed the pharse. It will be realised in my update comming out in the next day or two.

The replutation should be deleted. Right now I just tested it and fixed up a drop and know it works. Let me know once I release the update.

Abe1 12-18-2005 09:29 PM

Version 2.7 (12/18/05):
  • [ADDED] Made the Thanks button a template
  • [ADDED] Made a template group for this hacks templates
  • [FIXED] One template edit. Find correction in zip file.
  • [CHANGED] Made a pop-up now when you click Thanks instead of refreshing the page.
  • [FIXED] Made the line when you give reputation points for thanks, a phrase.
  • [ADDED] Paypal link so you can make a donation for this hack.

stinger2 12-18-2005 10:46 PM

Quote:

Originally Posted by Abe1
Can you give me a link?

Code:

https://vborg.vbsupport.ru/showthread.php?t=99918&highlight=hide
i would also love it if they were integrated
this is a link to a working hide

regards and thanks for this great hack

Abe1 12-18-2005 10:48 PM

Quote:

Originally Posted by stinger2
Code:

https://vborg.vbsupport.ru/showthread.php?t=99918&highlight=hide
i would also love it if they were integrated
this is a link to a working hide

regards and thanks for this great hack

How do you want me to intergrade it?

SCRIPT3R 12-18-2005 11:03 PM

Quote:

Originally Posted by Abe1
Version 2.7 (12/18/05):

current zip (update?) reads as Version 2.6 still. ;)

Quote:

- <product productid="post_thanks" active="1">
<title>Post Thank You Hack</title>
<description>Post Thank You Hack</description>
<version>2.6</version>
- <codes>
- <code version="2.6">
- <installcode>

SCRIPT3R 12-18-2005 11:07 PM

Quote:

Originally Posted by Abe1
Version 2.7 (12/18/05):
  • [CHANGED] Made a pop-up now when you click Thanks instead of refreshing the page.

could this "feature" be an option at all for the user? how will pop-up blockers respond/interfere with this?

Abe1 12-19-2005 12:15 AM

Quote:

Originally Posted by GearTripper
current zip (update?) reads as Version 2.6 still. ;)

Fixed.

Abe1 12-19-2005 12:17 AM

Quote:

Originally Posted by GearTripper
could this "feature" be an option at all for the user? how will pop-up blockers respond/interfere with this?

It is a direct pop-up on the click so a pop-up blocker should not disrupt it. They only block pop-ups that pop-up while a page is doing something else and not when a user clicks on a link that is a pop-up.

stinger2 12-19-2005 02:58 PM

Quote:

Originally Posted by Don Corleone
can you integrate this hack with the hide hack?


Quote:

Originally Posted by Abe1
How do you want me to intergrade it?

sorry for not explaining ...
i responded to Don corleone.......who asked about integrating th thank yu hack with hide hack.......

it would either be with the lockdown hack.....(reply to view the link) or the hide hack (register to view)......
but instead of (register to view link) in the hide hack....or instead of (reply to view the link) in lockdown hack.......i think he refeered to press thankyou button to see the link.....


again my apologies .......
kind regards

Abe1 12-19-2005 03:14 PM

Quote:

Originally Posted by stinger2
sorry for not explaining ...
i responded to Don corleone.......who asked about integrating th thank yu hack with hide hack.......

it would either be with the lockdown hack.....(reply to view the link) or the hide hack (register to view)......
but instead of (register to view link) in the hide hack....or instead of (reply to view the link) in lockdown hack.......i think he refeered to press thankyou button to see the link.....


again my apologies .......
kind regards

I can't intergade with a hack that blocks unregistered users. I can intergrade with a reply hack. I need a link.

stinger2 12-19-2005 05:21 PM

yap sure i forgot where i saw that but a little search in my favourite ....i found it...

this is an example of integrated for vb 3.0.9

Code:

http://www.vbhackers.com/forum/showthread.php?t=2187&highlight=Lockdown+hack
and here is the last lockdown hack ......there is no integrated version yet.....

Code:

http://www.vbhackers.com/forum/showthread.php?t=2096&highlight=Lockdown+hack
kind regards

AnhTuanCool 12-19-2005 05:26 PM

Hey, nice hack there you made Abe1. /me clicked installed.

I made a modification to optimize the querying part of the hack as follow:
In plugin Post Thank You Hack at postbit_display_start, I'd changed:
PHP Code:

    $post_thanks_querys $db->query("SELECT postid FROM "TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    
$post_thanks_postids 0;
    
    while (
$post_thanks_query $db->fetch_array($post_thanks_querys))
    {
      
$post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    
$post_thanks_cashe $db->query("SELECT * FROM " .TABLE_PREFIX"post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC"); 

Into

PHP Code:

    $post_thanks_cashe $db->query("SELECT " TABLE_PREFIX "post_thanks.* FROM " TABLE_PREFIX "post_thanks, " TABLE_PREFIX "post WHERE post.postid = post_thanks.postid AND post.threadid = '$post[threadid]' ORDER BY " TABLE_PREFIX "post_thanks.username ASC"); 

It shortened the querying by one query, for some small or moderate boards, it doesn't make any noticeable different. But in any large board, it does help a lot.

You can include the mod if you want. Thanks for great hack! ;)

aranthorn 12-20-2005 04:31 PM

Quote:

Originally Posted by AnhTuanCool
Hey, nice hack there you made Abe1. /me clicked installed.

I made a modification to optimize the querying part of the hack as follow:
In plugin Post Thank You Hack at postbit_display_start, I'd changed:
PHP Code:

    $post_thanks_querys $db->query("SELECT postid FROM "TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    
$post_thanks_postids 0;
    
    while (
$post_thanks_query $db->fetch_array($post_thanks_querys))
    {
      
$post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    
$post_thanks_cashe $db->query("SELECT * FROM " .TABLE_PREFIX"post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC"); 

Into

PHP Code:

    $post_thanks_cashe $db->query("SELECT post_thanks.* FROM " TABLE_PREFIX "post_thanks, " TABLE_PREFIX "post WHERE post.postid = post_thanks.postid AND post.threadid = '$post[threadid]'"); 

It shortened the querying by one query, for some small or moderate boards, it doesn't make any noticeable different. But in any large board, it does help a lot.

You can include the mod if you want. Thanks for great hack! ;)

changed mine over, thanks :D

masterross 12-20-2005 09:05 PM

Quote:

Originally Posted by AnhTuanCool
Hey, nice hack there you made Abe1. /me clicked installed.

I made a modification to optimize the querying part of the hack as follow:
In plugin Post Thank You Hack at postbit_display_start, I'd changed:
PHP Code:

    $post_thanks_querys $db->query("SELECT postid FROM "TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    
$post_thanks_postids 0;
    
    while (
$post_thanks_query $db->fetch_array($post_thanks_querys))
    {
      
$post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    
$post_thanks_cashe $db->query("SELECT * FROM " .TABLE_PREFIX"post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC"); 

Into

PHP Code:

    $post_thanks_cashe $db->query("SELECT post_thanks.* FROM " TABLE_PREFIX "post_thanks, " TABLE_PREFIX "post WHERE post.postid = post_thanks.postid AND post.threadid = '$post[threadid]'"); 

It shortened the querying by one query, for some small or moderate boards, it doesn't make any noticeable different. But in any large board, it does help a lot.

You can include the mod if you want. Thanks for great hack! ;)

i've change too but get:
Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT post_thanks.* FROM vb_post_thanks, vb_post WHERE post.postid = post_thanks.postid AND post.threadid = '43120';

MySQL Error : Unknown table 'post_thanks'
Error Number : 1051

AnhTuanCool 12-21-2005 03:20 PM

materros - Replace this line in that same plugin (Post Thank You Hack at postbit_display_start hook location)

PHP Code:

$post_thanks_cashe $db->query("SELECT post_thanks.* FROM " TABLE_PREFIX "post_thanks, " TABLE_PREFIX "post WHERE post.postid = post_thanks.postid AND post.threadid = '$post[threadid]'"); 

OR (if you haven't applied the change from post 310 of mine)

PHP Code:

 $post_thanks_querys $db->query("SELECT postid FROM "TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    
$post_thanks_postids 0;
    
    while (
$post_thanks_query $db->fetch_array($post_thanks_querys))
    {
      
$post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    
$post_thanks_cashe $db->query("SELECT * FROM " .TABLE_PREFIX"post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC"); 

To

PHP Code:

$post_thanks_cashe $db->query("SELECT " TABLE_PREFIX "post_thanks.* FROM " TABLE_PREFIX "post_thanks, " TABLE_PREFIX "post WHERE post.postid = post_thanks.postid AND post.threadid = '$post[threadid]' ORDER BY " TABLE_PREFIX "post_thanks.username ASC"); 

That should fix it. Good luck ;)

masterross 12-22-2005 05:14 PM

thanks for the update
after applied a little bit different error: :)
Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT vb_post_thanks.* FROM vb_post_thanks, vb_post WHERE post.postid = post_thanks.postid AND post.threadid = '44699' ORDER BY vb_post_thanks.username ASC;

MySQL Error : Unknown table 'post' in where clause
Error Number : 1109
Date : Thursday, December 22nd 2005 @ 09:10:17 PM

masterross 12-22-2005 05:16 PM

i forgot to tell that i have table prefix - "vb_"

BR,
Ross

Abe1 12-22-2005 05:17 PM

Quote:

Originally Posted by masterross
thanks for the update
after applied a little bit different error: :)
Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT vb_post_thanks.* FROM vb_post_thanks, vb_post WHERE post.postid = post_thanks.postid AND post.threadid = '44699' ORDER BY vb_post_thanks.username ASC;

MySQL Error : Unknown table 'post' in where clause
Error Number : 1109
Date : Thursday, December 22nd 2005 @ 09:10:17 PM

Here: Use this.
PHP Code:

$post_thanks_cashe $db->query("SELECT " TABLE_PREFIX "post_thanks.* FROM " TABLE_PREFIX "post_thanks, " TABLE_PREFIX "post WHERE " TABLE_PREFIX "post.postid = post_thanks.postid AND " TABLE_PREFIX "post.threadid = '$post[threadid]' ORDER BY " TABLE_PREFIX "post_thanks.username ASC"); 


masterross 12-22-2005 09:05 PM

sorry guys...
again prob:

Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT vb_post_thanks.* FROM vb_post_thanks, vb_post WHERE vb_post.postid = post_thanks.postid AND vb_post.threadid = '44699' ORDER BY vb_post_thanks.username ASC;

MySQL Error : Unknown table 'post_thanks' in where clause
Error Number : 1109

masterross 12-22-2005 09:15 PM

i've handled it :))
thanks to Abe1 !

i've added everywhere - " . TABLE_PREFIX . "

and here is the final strings:

$post_thanks_cashe = $db->query("SELECT " . TABLE_PREFIX . "post_thanks.* FROM " . TABLE_PREFIX . "post_thanks, " . TABLE_PREFIX . "post WHERE " . TABLE_PREFIX . "post.postid = " . TABLE_PREFIX . "post_thanks.postid AND " . TABLE_PREFIX . "post.threadid = '$post[threadid]' ORDER BY " . TABLE_PREFIX . "post_thanks.username ASC");

Abe1 12-23-2005 12:14 AM

Quote:

Originally Posted by masterross
sorry guys...
again prob:

Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT vb_post_thanks.* FROM vb_post_thanks, vb_post WHERE vb_post.postid = post_thanks.postid AND vb_post.threadid = '44699' ORDER BY vb_post_thanks.username ASC;

MySQL Error : Unknown table 'post_thanks' in where clause
Error Number : 1109

Yup, forgot one place.
PHP Code:

$post_thanks_cashe $db->query("SELECT " TABLE_PREFIX "post_thanks.* FROM " TABLE_PREFIX "post_thanks, " TABLE_PREFIX "post WHERE " TABLE_PREFIX "post.postid = " TABLE_PREFIX "post_thanks.postid AND " TABLE_PREFIX "post.threadid = '$post[threadid]' ORDER BY " TABLE_PREFIX "post_thanks.username ASC"); 


lolo? 12-27-2005 10:17 AM

works great thanks for this hack :p
i have one suggestion
it's possible to bump a thread when a member use the thanks button like a basic answer ?
hum i hope you understand
sorry for my bad english


All times are GMT. The time now is 01:09 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.02211 seconds
  • Memory Usage 1,911KB
  • 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
  • (6)bbcode_code_printable
  • (4)bbcode_html_printable
  • (11)bbcode_php_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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