vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Post Thank You Hack 1.10 (https://vborg.vbsupport.ru/showthread.php?t=73410)

Abe1 05-09-2005 02:03 PM

The biggest thing about this update is that when you now view a page that has posts, this hack no longer makes one or two queries per post it shows for this hack. Now, there is only ONE query for time you access a ‘showthread’ page. To explain better, if you go to a page that has 30 posts showing, you would be executing about 45 queries. Now you just execute about 15 queries!

Because of this, I have added one more column to the post_thanks table. The last step of the update process will update the table so it can be compatible with this update. It may take a few minutes for that process.

Also, I added a file edit that will cash the templates used so 1 query gets saved.

If anyone had problems with the settings, it should all be fixed now. Either run an uninstall and then install or just run the update.

I also added options to give reputation to users who got thanked or give a post count to users who give thanks.

I’ll try to gate some better pictures in a day or two.

Also, I’m going to try to release an add-on to CMPS portal that gives stats.

nexialys 05-09-2005 02:08 PM

hum.. would be better to have a list of forumid where the hack is activated, instead of the opposite... a site with 100 forums and only one or two to activate the tool will have pain to make the list...

Abe1 05-09-2005 02:14 PM

Quote:

Originally Posted by nexialys
hum.. would be better to have a list of forumid where the hack is activated, instead of the opposite... a site with 100 forums and only one or two to activate the tool will have pain to make the list...

I'll see what i can do for next version.

-=Sniper=- 05-09-2005 02:43 PM

I get this

PHP Code:

WarningInvalid argument supplied for foreach() in /includes/functions_showthread.php on line 209 


Paul M 05-09-2005 02:56 PM

Why is this a whole new thread - it's only an upgrade from 1.03 to 1.10 ?

Abe1 05-09-2005 03:01 PM

Quote:

Originally Posted by -=Sniper=-
I get this

PHP Code:

WarningInvalid argument supplied for foreach() in /includes/functions_showthread.php on line 209 


What happend if you find:
PHP Code:

foreach ($post_thanks_cash AS $thanks

and replace with
PHP Code:

@foreach ($post_thanks_cash AS $thanks


Abe1 05-09-2005 03:05 PM

Quote:

Originally Posted by Abe1
What happend if you find:
PHP Code:

foreach ($post_thanks_cash AS $thanks

and replace with
PHP Code:

@foreach ($post_thanks_cash AS $thanks


forget trying this. I'm going to give you some thing else to do.

-=Sniper=- 05-09-2005 03:06 PM

I get this

PHP Code:

parse errorunexpected T_FOREACH in /includes/functions_showthread.php on line 209 


Abe1 05-09-2005 03:08 PM

Find:
PHP Code:

    foreach ($post_thanks_cash AS $thanks)
    {
        if (
$thanks[userid] == $bbuserinfo[userid] AND $thanks[postid] == $post[postid])
        {
            
$post_thanks_already ++;
        }
    } 

and replace with this:
PHP Code:

    if ($post_thanks_cash)
    {
        foreach (
$post_thanks_cash AS $thanks)
        {
            if (
$thanks[userid] == $bbuserinfo[userid] AND $thanks[postid] == $post[postid])
            {
                
$post_thanks_already ++;
            }
        }
    } 

Let me know if you get the error in a later place and if you only get the error on pages that dont have any thanks.

-=Sniper=- 05-09-2005 03:16 PM

ok its working :) thanks

also during the upgrade process all my settings were reset :( had to redo them, could you avoide the problem in the future updates?

demo: http://www.hardwareforums.com/showthread.php?t=5319

thanks for the excellent hack.

Abe1 05-09-2005 03:25 PM

Quote:

Originally Posted by -=Sniper=-
ok its working :) thanks

also during the upgrade process all my settings were reset :( had to redo them, could you avoide the problem in the future updates?

demo: http://www.hardwareforums.com/showthread.php?t=5319

thanks for the excellent hack.

You only needed that correction for one spot? I'm not going to implement it unless I see others have the problem also. I don't know why you got the error.

I gave a warning when you first clicked 'upgrade' that the settigns are being reset and that you should remeber what they are. In the future, I 'hope' I wont have to reset them again.

I'm glad you like it :)

-=Sniper=- 05-09-2005 03:30 PM

yeh only one spot, as metioned above, one strange thing happening now is the template condition for when only one user has said "thanks" is not working.

on mine I have it it like this

PHP Code:

<if condition="$nb == 1"><phrase 1="User" 2="$post[username]">$vbphrase[post_thanks_users_say]</phrase>
<else /><
phrase 1="$post[post_thanks_amount] Users" 2="$post[username]">$vbphrase[post_thanks_users_say]</phrase></if> 

even with one thanks it says "1 users"

btw: did the upgrade have any effect on the templates? changes?

Abe1 05-09-2005 03:45 PM

Quote:

Originally Posted by -=Sniper=-
yeh only one spot, as metioned above, one strange thing happening now is the template condition for when only one user has said "thanks" is not working.

on mine I have it it like this

PHP Code:

<if condition="$nb == 1"><phrase 1="User" 2="$post[username]">$vbphrase[post_thanks_users_say]</phrase>
<else /><
phrase 1="$post[post_thanks_amount] Users" 2="$post[username]">$vbphrase[post_thanks_users_say]</phrase></if> 

even with one thanks it says "1 users"

btw: did the upgrade have any effect on the templates? changes?

in includes/functions_showthread.php
find all the times
PHP Code:

$number_rows 

and replace with
PHP Code:

$nb 

I'll update the zip download in a min. Also, anyone else who installed v1.10 alreadyshould do this.

Abe1 05-09-2005 03:49 PM

Zip updated. Anyone who downloaded and installed already, just follow the instructions in the previus post.

Watson 05-09-2005 04:01 PM

Thanks for this, will give it a shot when I got my forums back online, doing some maint, and upgrading

konstance 05-09-2005 04:06 PM

When I updated the functions_showthread.php, and then went to showthread.php page, I get the following error:

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

Please advise what to do about that.

thanks!

snake-boy 05-09-2005 04:24 PM

Tried to upgrade as instructed, and when posting a message I get "error in functions_showthread.php"

Now clicking on any post gives me:

Database error in vBulletin 3.0.7:

Invalid SQL: SELECT * FROM award AS award ORDER BY awardid ASC
mysql error: Unknown column 'awardid' in 'order clause'

mysql error number: 1054


Got no errors during the install process, made the file changes with no probems as directed by the installer.

Help?

-snake

Abe1 05-09-2005 04:28 PM

Quote:

Originally Posted by konstance
When I updated the functions_showthread.php, and then went to showthread.php page, I get the following error:


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

Please advise what to do about that.

thanks!

Find:
PHP Code:

    foreach ($post_thanks_cash AS $thanks)
    {
        if (
$thanks[userid] == $bbuserinfo[userid] AND $thanks[postid] == $post[postid])
        {
            
$post_thanks_already ++;
        }
    } 

and replace with this:
PHP Code:

    if ($post_thanks_cash)
    {
        foreach (
$post_thanks_cash AS $thanks)
        {
            if (
$thanks[userid] == $bbuserinfo[userid] AND $thanks[postid] == $post[postid])
            {
                
$post_thanks_already ++;
            }
        }
    } 


Abe1 05-09-2005 04:35 PM

I just updated the zip again with this last fix. Everything should work fine now (I hope).

konstance 05-09-2005 04:38 PM

Thanks Abe1, it works fine now.

Abe1 05-09-2005 04:39 PM

Quote:

Originally Posted by snake-boy
Tried to upgrade as instructed, and when posting a message I get "error in functions_showthread.php"

Now clicking on any post gives me:

Database error in vBulletin 3.0.7:

Invalid SQL: SELECT * FROM award AS award ORDER BY awardid ASC
mysql error: Unknown column 'awardid' in 'order clause'

mysql error number: 1054


Got no errors during the install process, made the file changes with no probems as directed by the installer.

Help?

-snake

You may have edited my hack over another hack. The table 'award' has nothing to do with this hack.

snake-boy 05-09-2005 06:11 PM

I have this hack installed as well:

hxxp://www.vbulletin.org/forum/showthread.php?t=61108

I don't understand how yours could be installed 'over' this one. I had both installed and working perfectly before this upgrade, now I'm stranded with a shut board. :(

I have tried uninstalling the Thank You hack and reinstalling it from scratch (with the fix you added above). Result stays the same. Clicking on any post gives the error above. Creating a new post, clicking on submit gives the error, but the post DOES appear in the forum if I refresh the forum page, but clicking on the post goes back to this error.

Could you please take a look at the details of the awards hacks and determine if your installer is destroying anything unintentionally. I can't be the only one with both these hacks installed, and it's bound to create a compatibility problem for others too.

Please assist me further.

thanks you

-snake

Abe1 05-09-2005 06:23 PM

Quote:

Originally Posted by snake-boy
I have this hack installed as well:

hxxp://www.vbulletin.org/forum/showthread.php?t=61108

I don't understand how yours could be installed 'over' this one. I had both installed and working perfectly before this upgrade, now I'm stranded with a shut board. :(

I have tried uninstalling the Thank You hack and reinstalling it from scratch (with the fix you added above). Result stays the same. Clicking on any post gives the error above. Creating a new post, clicking on submit gives the error, but the post DOES appear in the forum if I refresh the forum page, but clicking on the post goes back to this error.

Could you please take a look at the details of the awards hacks and determine if your installer is destroying anything unintentionally. I can't be the only one with both these hacks installed, and it's bound to create a compatibility problem for others too.

Please assist me further.

thanks you

-snake

I took a look. I think the best would be to get a fresh functions_showthread.php and do both of these hacks file edits. It seems that this error your getting is comming from the award not the thanks.

BigIke 05-09-2005 06:30 PM

Nice work Abe. My members love the addition.

Abe1 05-09-2005 06:34 PM

Quote:

Originally Posted by bringindaruckus
Nice work Abe. My members love the addition.

Glad to hear that. Just dont forget to click 'install'. Also, the best part about this update is the speed increase when viewing threads. On my forum, I cut the queries down from about 47 to about 15. The speed the page was created went down like 60-70%!

-=Sniper=- 05-09-2005 06:56 PM

Quote:

Originally Posted by Abe1
in includes/functions_showthread.php
find all the times
PHP Code:

$number_rows 

and replace with
PHP Code:

$nb 

I'll update the zip download in a min. Also, anyone else who installed v1.10 alreadyshould do this.

on doing so the thanked_postbit no longer shows, under the thanked post.

Abe1 05-09-2005 06:57 PM

Quote:

Originally Posted by -=Sniper=-
on doing so the thanked_postbit no longer shows, under the thanked post.

You have to edit in 3 spots. Make sure you did all 3.

snake-boy 05-09-2005 07:05 PM

Ok, I tried copying over a fresh copy and making the changes as specified, but it does not help at all, as I am still getting the same error each time.

I appreciate your help, but could you please suggest anything else I could try. I'm getting really despirate now :( I wish I had the php knowledge to be able to be of more help, but I don't know how to do much more than is specfied in the instructions.

Please help.

thank you

-snake

Abe1 05-09-2005 07:13 PM

Quote:

Originally Posted by snake-boy
Ok, I tried copying over a fresh copy and making the changes as specified, but it does not help at all, as I am still getting the same error each time.

I appreciate your help, but could you please suggest anything else I could try. I'm getting really despirate now :( I wish I had the php knowledge to be able to be of more help, but I don't know how to do much more than is specfied in the instructions.

Please help.

thank you

-snake

I hope this helps. Let me disect your error.

Invalid SQL: SELECT * FROM award AS award ORDER BY awardid ASC
mysql error: Unknown column 'awardid' in 'order clause'


Unknown column 'awardid' in 'order clause' can only mean that there is no column in the award table that is called awardid.

This seems to be a problem with the award system and you should try re-installing it or something like that. I'm sure if you remove the award hack code from the file you shouldn't get any errors. As you saw when you removed all of my hack you were still getting errors.

If you have phpmyadmin, I can look at your database at see what is missing fromt he award system. You'd have to send me a PM with the info on how to get in.

Other wise, there is nothing I can do.

-=Sniper=- 05-09-2005 08:40 PM

Quote:

Originally Posted by Abe1
You have to edit in 3 spots. Make sure you did all 3.

thanks

datainternet 05-09-2005 09:17 PM

Hi,

First of all: This is really a great hack.

I have only a small (template) problem and I hope you can help me.

I attached 2 screenshots so you can better see how the situation is.

https://vborg.vbsupport.ru/external/2005/05/16.jpg

This is the situation when a user thanked a Post of another user in the thread.

https://vborg.vbsupport.ru/external/2005/05/16.jpg

This is the situation when a user thanked a Post of another user in the end of the thread. This is the last post.

You see there is missing a border-line.

I have no idea how to solve this problem. Hope you have more ideas.


It would be really great when you could help me with this little problem and so make the hack perfect for me :).

MFG datainternet

Abe1 05-09-2005 09:25 PM

Quote:

Originally Posted by datainternet
Hi,

First of all: This is really a great hack.

I have only a small (template) problem and I hope you can help me.

I attached 2 screenshots so you can better see how the situation is.

https://vborg.vbsupport.ru/attachmen...id=26192&stc=1

This is the situation when a user thanked a Post of another user in the thread.

https://vborg.vbsupport.ru/attachmen...id=26193&stc=1

This is the situation when a user thanked a Post of another user in the end of the thread. This is the last post.

You see there is missing a border-line.

I have no idea how to solve this problem. Hope you have more ideas.


It would be really great when you could help me with this little problem and so make the hack perfect for me :).

MFG datainternet

Nothing to do with me. It seems to be a vB problem with legacy. Go look, if you dont have any thanks on the bottom, there is still something connected that shouldn't be.

eXtremeTim 05-09-2005 11:07 PM

Good to see this new version out. I will see about upgrading tonight.

TTG 05-09-2005 11:38 PM

Upgraded with no problems on 3.0.6 .. great hack :)

Watson 05-10-2005 07:28 AM

I still get no options whatsoever, done a fresh install on this, and my Admin options are empty :(

mgurain 05-10-2005 11:40 AM

Hello Abe1 ,,

Very nice hack !! I am interested in installation, but before that I would like to know :

1. What vb files will be changed by the hack ? because I am always saving a backup copy of the files which I depend on to do any modification required by a hack,

and by installing your hack without knowing the changed files I will loose consistency of my files !!

2. I need a psd of thanks button to change the text to my language :)

thanks in advance,,

Abe1 05-10-2005 12:38 PM

Quote:

Originally Posted by Watson
I still get no options whatsoever, done a fresh install on this, and my Admin options are empty :(

Sorry, I've got no clue. I'd have to see your database.

Abe1 05-10-2005 12:40 PM

Quote:

Originally Posted by mgurain
Hello Abe1 ,,

Very nice hack !! I am interested in installation, but before that I would like to know :

1. What vb files will be changed by the hack ? because I am always saving a backup copy of the files which I depend on to do any modification required by a hack,

and by installing your hack without knowing the changed files I will loose consistency of my files !!

2. I need a psd of thanks button to change the text to my language :)

thanks in advance,,

1) My installer doesn't actully change the files. You have to do it but it lets you know what to do. Anyways, the files are:
showthread.php
admincp/index.php
includes/functions_showthread.php

2) Sorry, I dont have one.

mgurain 05-10-2005 01:47 PM

thanks for your clarification.
I asked the question because I installed a hack that did change a file without me knowing, so I am now carefull of installers :)

I managed to create my own image,,

thanks,,

mgurain 05-10-2005 02:39 PM

hello,,
I installed the hack but errors occured when using it !
knowing that I am already installing (Yet Another Award System) if it causes the error as somebody said !

Every thing is ok even the thanks comes and my click on it counted, but :
when I click on it this error message appears :

There seems to have been a slight problem with the منتدى شبكة الجارودية الثقافية database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.


Database error in vBulletin 3.0.7:

Invalid SQL:
UPDATE user
SET reputation = + reputation
WHERE userid = 1

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '+ reputation
WHERE userid = 1' at line 2

mysql error number: 1064

Date: Tuesday 10th of May 2005 10:28:46 AM
Script: http://forum.aljarodiah.net/post_tha...thanks&p=79030
Referer: http://forum.aljarodiah.net/showthread.php?t=7019
Username: خادم لأهل البيت
IP Address: 212.138.47.21


any help please,,


All times are GMT. The time now is 12:49 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.01571 seconds
  • Memory Usage 1,890KB
  • 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
  • (17)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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