The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
thanks pal
i found out the same way yesterday night, after reading a book about mysql functions.... |
#12
|
||||
|
||||
haha cool... so that is all it takes logician?
- miSt |
#13
|
||||
|
||||
Quote:
|
#14
|
||||
|
||||
does it add any extra queries on any of the pages??
- miSt |
#15
|
||||
|
||||
Quote:
If you add the hack to global.php, the variable will be accessible in the entire vb scripts and 1 extra query will be added to all vb pages. On the other hand you might want to consider adding the line to the relevant script if you only want to use it in a particular place like getinfo template(= User Info Page). Then 1 query will be added only when that particular page is loaded.. Your call.. |
#16
|
||||
|
||||
yes i'll probably use it in member.php
Thanks a lot Logician - miSt |
#17
|
|||
|
|||
Quote:
I did my search here, but I found only old topics regarding my need. I need counting of characters for each post in one specific forum, but solution that you wrote, is not applicable to present version of vBulletin (3.6.x). I tried to look for mentioned lines in file functions.php, but without success (which is not surprise after 5 years of modifications of vB). So could you please provide to me solution for actual version of vB? I just need that posts in one specific forum would have information about number of characters included in them. Nothing more :-). |
#18
|
||||
|
||||
Quote:
Currently I'm running into this db error: Code:
Database error in vBulletin 3.7.0 Release Candidate 1: Invalid SQL: SELECT SUM(LENGTH(pagetext)) as char FROM `post` WHERE userid=''; 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 'char FROM `post` WHERE userid=''' at line 1 Error Number : 1064 Date : Saturday, March 22nd 2008 @ 01:46:55 PM Script : http://www.letsgather.net/demo/ Referrer : IP Address : 62.166.43.206 Username : Taragon Classname : vB_Database MySQL Version : 4.1.22-standard |
#19
|
||||
|
||||
Wow.. A bump after 6 years!
Code for 3.6-3.7 must be: $charcount=$db->query_first("SELECT SUM(LENGTH(pagetext)) as char FROM `post` WHERE userid='".$vbulletin->userinfo[userid]."'"); $vbulletin->userinfo['charcount'] = $charcount['char']; However this adds 1 query to each page load and I don't suggest using it in a heavy traffic/busy board or forum with a lot of posts. It is neither optimized, nor a clean hack! |
#20
|
||||
|
||||
Thanks! And sorry again for the bump.
I was looking for something, and this was the only similar thing I could find. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|