vb.org Archive

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

saman 01-26-2008 03:14 PM

Hi,

Just upgraded it from 5.3 to 7.2, Suddenly the thanks option is not appearing on some of the threads anymore. Everthing looks just fine with correct thanked and thanks info. but its not showing the thanks button/option anymore.

ALSO everything is showing double like:

Posts: 155
Thanks: 21
Thanked 15 Times in 10 Posts
Thanks: 21
Thanked 15 Times in 10 Posts

what have i done wrong?

i am running 3.6.8 patch level 2

thanks for the advice in advance

drew010 01-26-2008 09:06 PM

one of my mods found that if they copy the thanks link for a given post and put it in an image tag in the thread, then anyone who views the thread will automatically thank that post.

as a bypass for now I have just added post_thanks.php as a censored word so it gets blocked from posts.

columbus614ohio 01-26-2008 09:21 PM

will not work on my skin

Abe1 01-26-2008 09:59 PM

Quote:

Originally Posted by YLP1 (Post 1428812)
I am running a new board v. 3.6.8. The button isn't showing on either postbits. I did confirm that the templates had the correct code via the instructions.

Any idea on what I did wrong?
Thanks in advance.

Are you looking at post made by you?

Abe1 01-26-2008 09:59 PM

Quote:

Originally Posted by DiesellMinded (Post 1428826)
Hey Abe

I had Thanked 2 times in 1 posts , Showing twice so I edited out a bit of code in post bit and i thouight it worked but for some reason i have forund 1 member that its still showing twice , I went back and edited legacy too and no change

What do i do ?

DM

How did you manage to thank twice?

Abe1 01-26-2008 10:02 PM

Quote:

Originally Posted by Namaless (Post 1428976)
With GARS found one error:

When view the second page of Reviews, get this error:
Code:

Warning: Invalid argument supplied for foreach() in /includes/functions_post_thanks.php on line 183
the part is:
PHP Code:

    foreach ($thanks AS $thank)
    {
        if (
$cmpt<$number_rows)
        {
            
$virg=",";
        }
        else
        {
            
$virg="";
        }

        if (
show_thanks_date($forumid))
        {
            
$date_thank vbdate($vbulletin->options['dateformat'], $thank['date'], true);
        }

        eval(
'$liste_user .= " ' fetch_template('post_thanks_box_bit') . '";');
        
$cmpt++;
    } 

This problem get because not found users has thanked.

Thanks for your work.

Are you sure you got this with the latest version? Also, how can i duplicate this error?

Abe1 01-26-2008 10:03 PM

Quote:

Originally Posted by Nathan2006 (Post 1429009)
Hi Abe,

I only have your version that was included within the hide hack from Psionic Vision

I'm not familiar with it. The hide hack is not an add-on?

Abe1 01-26-2008 10:05 PM

Quote:

Originally Posted by BadgerDog (Post 1429212)
I don't know ....

I just checked in AdminCP and at the top is says:



If there's anything (a test PHP script etc) that you'd like me to run and give you results on, I'd be happy to do so.

Should I run any (or all) of those counter reset routines in the AdminCp for your mod, after I altered that plug-in?

Thanks for your help... :up:

Regards,
Badger

No need to run the updates.

I'd have to run some test in that script and see why it thought you did not have version 3.6.7 installed. Maybe some time in the future if others say they get the same problem.

Abe1 01-26-2008 10:06 PM

Quote:

Originally Posted by teenhut (Post 1429218)
I get an error

Bitfield Collision: credits_cantearn = prefixrequired

Is it because I am using VB Credits?

Nothing to do with me.

Abe1 01-26-2008 10:08 PM

Quote:

Originally Posted by teenhut (Post 1429299)
I want to know that.

Is it possible to edit the post bit myself rather than automatic edit?

I only want to know as How many times user has been thanked in post bit rather this and also the one "How many he thanked in how many posts"

Plus it shows up under the Mood feature. I want to show where I want to. I could not any way to turn off the automatic editing of postbit template. Any help please.

Edit the post_thanks template then.

Abe1 01-26-2008 10:09 PM

Quote:

Originally Posted by saman (Post 1429366)
Hi,

Just upgraded it from 5.3 to 7.2, Suddenly the thanks option is not appearing on some of the threads anymore. Everthing looks just fine with correct thanked and thanks info. but its not showing the thanks button/option anymore.

ALSO everything is showing double like:

Posts: 155
Thanks: 21
Thanked 15 Times in 10 Posts
Thanks: 21
Thanked 15 Times in 10 Posts

what have i done wrong?

i am running 3.6.8 patch level 2

thanks for the advice in advance

Make sure you removed any template edits you made. The current version requires no template edits.

Abe1 01-26-2008 10:11 PM

Quote:

Originally Posted by drew010 (Post 1429599)
one of my mods found that if they copy the thanks link for a given post and put it in an image tag in the thread, then anyone who views the thread will automatically thank that post.

as a bypass for now I have just added post_thanks.php as a censored word so it gets blocked from posts.

Interesting. I will have to look into this.

Abe1 01-26-2008 10:12 PM

Quote:

Originally Posted by columbus614ohio (Post 1429607)
will not work on my skin

Make sure you read all the instructions.

Ordovicium 01-26-2008 11:09 PM

Quote:

Originally Posted by YLP1 (Post 1428812)
I am running a new board v. 3.6.8. The button isn't showing on either postbits. I did confirm that the templates had the correct code via the instructions.

Any idea on what I did wrong?
Thanks in advance.

I have the same problem.

Abe1 01-26-2008 11:14 PM

Quote:

Originally Posted by Ordovicium (Post 1429670)
I have the same problem.

I would have to look at your acp.

Namaless 01-27-2008 12:17 AM

Quote:

Originally Posted by Abe1 (Post 1429629)
Are you sure you got this with the latest version? Also, how can i duplicate this error?

yes is very simple.

Install vbulletin, install gars, install post thanks, setup one forum to "Review Type", create more one page into one thread, thanks the thread with more one page.

When you read the second page get this error.

Another question: is possible to take username with musername function to get styled username? Thanks :)

Abe1 01-27-2008 12:45 AM

Quote:

Originally Posted by Namaless (Post 1429703)
Another question: is possible to take username with musername function to get styled username? Thanks :)

It would be possible but wouldn't that slow down the forum?

youradhere4222 01-27-2008 05:03 AM

would it be possible to add an option that would allow the information in the post-bit to only display if the user has thanks?

jacki 01-27-2008 07:30 AM

Quote:

Originally Posted by Abe1 (Post 1428437)
Should be fixed in next version.


hi
install post Thank you 7.2

post error
PHP Code:

WarningInvalid argument supplied for foreach() in /includes/functions_post_thanks.php on line 183 

line 183 :

PHP Code:


foreach ($thanks AS $thank


Arsenalfan 01-27-2008 12:38 PM

Thanks nice mod :D

Namaless 01-27-2008 01:51 PM

Quote:

Originally Posted by Abe1 (Post 1429712)
It would be possible but wouldn't that slow down the forum?

I have added and the sistem not have problem. Without is very horrible, and if you use "fetch_musername function" get from cache and not use more system power.

Abe1 01-27-2008 04:15 PM

Quote:

Originally Posted by Namaless (Post 1430068)
I have added and the sistem not have problem. Without is very horrible, and if you use "fetch_musername function" get from cache and not use more system power.

I know about fetch_musername. I just did wasn't sure where it pulled all the infor for the so many different users.

Abe1 01-27-2008 04:35 PM

Quote:

Originally Posted by Namaless (Post 1430068)
I have added and the sistem not have problem. Without is very horrible, and if you use "fetch_musername function" get from cache and not use more system power.

This is what I found, let me know if you have a better idea:

I changed:
PHP Code:

$cache[$thank['postid']][$thank['userid']]['username'] = $thank['username']; 

to
PHP Code:

$cache[$thank['postid']][$thank['userid']]['username'] = fetch_musername(fetch_userinfo($thank['userid'])); 

In order for musername to work, you need to send the whole userinfo.

I ran this on a page that had well over a thousand thanks. I ended up runing over 1400 quesries and it taking 8 seconds to load!

Let me know if you have another way. This is NOT good.

takworld 01-27-2008 04:37 PM

thanks for this hack , very good .

Namaless 01-27-2008 06:19 PM

I have used this code:
PHP Code:

$thanks $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX"post_thanks AS ps INNER JOIN " .TABLE_PREFIX"user AS u ON (u.userid = ps.userid) WHERE ps.postid IN (" $post_ids ") ORDER BY ps.username ASC"); 

For query.

For get musername use this method:
PHP Code:

//$cache[$thank['postid']][$thank['userid']]['username'] = $thank['username'];
            // Get vBulletin User Group ID
            
$UserGroupID = ( $thank['displaygroupid'] == ) ? 'usergroupid' 'displaygroupid';
            
$cache[$thank['postid']][$thank['userid']]['username'] = fetch_musername($thank$UserGroupID); 

Without this have 21 queries and after my edit give same 21 queries.

Please check your performance..

Thanks :)

saman 01-27-2008 07:03 PM

Quote:

Originally Posted by Abe1 (Post 1429636)
Make sure you removed any template edits you made. The current version requires no template edits.

I removed the edits (in posbits) but the thanks (button/option) is still not appearing LINK

blue6995 01-27-2008 07:51 PM

Since installing latest update I get this error when clicking on the Thanks button:

Warning: Invalid argument supplied for foreach() in /includes/functions_post_thanks.php on line 183

blue6995 01-27-2008 08:02 PM

Quote:

Originally Posted by blue6995 (Post 1430305)
Since installing latest update I get this error when clicking on the Thanks button:

Warning: Invalid argument supplied for foreach() in /includes/functions_post_thanks.php on line 183


Oops! I never uploaded the new post_thanks.php file.

jacki 01-27-2008 08:17 PM

hi
install post Thank you 7.2

post error

PHP Code:

WarningInvalid argument supplied for foreach() in /includes/functions_post_thanks.php on line 183 

line 183 :




PHP Code:

foreach ($thanks AS $thank



And post eror :)

PHP Code:

''Cookielere eklenemediba&#351;lık (header) zaten g?nderildi.
Dosya: /home/********/public_html/includes/class_core.php
Line
3142'' 


Abe1 01-27-2008 09:38 PM

Quote:

Originally Posted by Namaless (Post 1430256)
I have used this code:
PHP Code:

$thanks $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX"post_thanks AS ps INNER JOIN " .TABLE_PREFIX"user AS u ON (u.userid = ps.userid) WHERE ps.postid IN (" $post_ids ") ORDER BY ps.username ASC"); 

For query.

For get musername use this method:
PHP Code:

//$cache[$thank['postid']][$thank['userid']]['username'] = $thank['username'];
            // Get vBulletin User Group ID
            
$UserGroupID = ( $thank['displaygroupid'] == ) ? 'usergroupid' 'displaygroupid';
            
$cache[$thank['postid']][$thank['userid']]['username'] = fetch_musername($thank$UserGroupID); 

Without this have 21 queries and after my edit give same 21 queries.

Please check your performance..

Thanks :)

Not bad performance on that page. Just about .1 sec. longer to load. from .5 to .6 average to load.

Will look into now.

Abe1 01-27-2008 10:17 PM

Quote:

Originally Posted by Namaless (Post 1430256)
I have used this code:
PHP Code:

$thanks $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX"post_thanks AS ps INNER JOIN " .TABLE_PREFIX"user AS u ON (u.userid = ps.userid) WHERE ps.postid IN (" $post_ids ") ORDER BY ps.username ASC"); 

For query.

For get musername use this method:
PHP Code:

//$cache[$thank['postid']][$thank['userid']]['username'] = $thank['username'];
            // Get vBulletin User Group ID
            
$UserGroupID = ( $thank['displaygroupid'] == ) ? 'usergroupid' 'displaygroupid';
            
$cache[$thank['postid']][$thank['userid']]['username'] = fetch_musername($thank$UserGroupID); 

Without this have 21 queries and after my edit give same 21 queries.

Please check your performance..

Thanks :)

Done. Will be added in the next version.

One question though. Why did you do the fieldname check? The function does it for you.

Abe1 01-27-2008 10:26 PM

Anyone who has GARS (and getting the PHP error) and can let me view their ACP, please PM me. I can't seem to get the error and I dont want to play around with that hack too much.

Namaless 01-28-2008 05:04 AM

Quote:

Originally Posted by Abe1 (Post 1430400)
Done. Will be added in the next version.

One question though. Why did you do the fieldname check? The function does it for you.

When you use Secondary group, vbulletin get option to choice group to view.

Test this: go into user admin, and use one primary group and secondary group and save.
Now go to user admin and after primary group you found the vb menu where you choice how group you want to view.

sorry for my english.

Thanks for your support.

Dabbi 01-28-2008 09:54 AM

This is great! I highly prefer this idea to the stars rating and this looks like it's darn close to what I've been looking for. :cool:

Is there an easy way (I'm still pretty new to this) for just the number of thanks to go up but not show: the amount of thanks given or the member names of those who have said thank you? Also does the amount of "thanks" for a thread show up in the forum titles like the rating stars do? If it's not possible at this time perhaps in the future? :)

One last question.. will this slow the board down at all? We have quite a few poky dial up user (myself included) who get really frustrated if something makes the site hang or load slow.

Thank you! :)

Namaless 01-28-2008 11:29 AM

Quote:

Originally Posted by Abe1 (Post 1430408)
Anyone who has GARS (and getting the PHP error) and can let me view their ACP, please PM me. I can't seem to get the error and I dont want to play around with that hack too much.

if you want I give you GARS for testing the problem (I'm interest to solution this problem).

For query read only "musername, usergroupid, displaygroupid" for use less memory! :)

saman 01-28-2008 12:18 PM

Quote:

Originally Posted by Abe1 (Post 1429636)
Make sure you removed any template edits you made. The current version requires no template edits.

I removed the edits (in posbits) but the thanks (button/option) is still not appearing LINK

music legend 01-28-2008 01:14 PM

i got one question:

is there a way of instead of pressing the button and getting this result:
Code:

[hide][*/hide]
is their a way to get this result instead:
Code:

[hide]

[*/hide]

any help would be greatly appreciated

vnairp11 01-28-2008 03:12 PM

i wish the hide hack was updated to 3.7

Namaless 01-28-2008 04:18 PM

Quote:

Originally Posted by vnairp11 (Post 1430902)
i wish the hide hack was updated to 3.7

Hide hack is not supported for now. vbulletin is in beta stage, when release a gold version, check again.
Thanks.

Datenpapst 01-29-2008 07:30 AM

Quote:

Originally Posted by Datenpapst (Post 1425082)
When I upload the xml file the thread are not shown any more just getting white pages :(

*push* :(

I am using vbb 3.6.6. and it also happens on the default style :(


All times are GMT. The time now is 05:05 PM.

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.02455 seconds
  • Memory Usage 1,886KB
  • 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
  • (3)bbcode_code_printable
  • (14)bbcode_php_printable
  • (27)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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