PDA

View Full Version : Statistics Modifications - Big vB-Statistic


Coroner
22 Apr 2008, 18:00
Created for vB 3.6.8 but tested in 3.7.0 Beta 4/RC1 and RC3.
The attached File is a RAR - renamed into ZIP.

Ok, what does this MOD do?
Simply - a Statistic for all *g
Don't know, what I can say - take a look at the Pictures (say more than words)

2 Languages supported (german / english).

How to install:
simply read the READ.ME_english or READ.ME_deutsch

TMS supported.

Regards
Coroner

P.S. deutschen Support gibt es auch bei your-vb

Coroner
22 Apr 2008, 18:03
Sorry, couln't upload the last Picture.

Here is No. 10

VeeDubZ
22 Apr 2008, 18:21
cant actualy see what any of the pictures are as they are too small

Reeve of shinra
22 Apr 2008, 18:23
I'm getting an error that the zip is corrupt. Out of curiosity, are larger pics included in the zip file? the ones attached are a bit to small to really make out the goodness. Thanks

marcossalazar
22 Apr 2008, 18:37
yep, can't even see any of the pics.

silver surfer
22 Apr 2008, 18:37
THANK YOU !

*clicks installed

Coroner
22 Apr 2008, 18:39
I'm getting an error that the zip is corrupt. Out of curiosity, are larger pics included in the zip file? the ones attached are a bit to small to really make out the goodness. Thanks

Just rename to RAR - and UnRAR it.
Sorry for the Pictures, Size is over 1800 (width).

Kaleem
22 Apr 2008, 18:39
I'm getting an error that the zip is corrupt. Out of curiosity, are larger pics included in the zip file? the ones attached are a bit to small to really make out the goodness. Thanks
Will open in RAR as he stated, he renamed it. It opened here.

Reeve of shinra
22 Apr 2008, 19:33
The new threads and posts by date look really good!

Any change of being able to see that by Forum? That would be really helpful for trending purposes.

*clicks install and nominates*

bxbigt
22 Apr 2008, 20:32
looks good but demo ??

cafenetland
22 Apr 2008, 21:04
u rock man.

i was waiting something like that..

and that looks amazing.

clicked installed

edit : hey man when i click on Daily Statistics then im getting a very wide page :D

is it me or everyone else have that problem ?

J98680Bxxxxx
22 Apr 2008, 21:59
Installed, works almost fine. :)

Feedback: Coroner:-

All menus (except "Daily Statistics" in the Advanced) and their content look good.

Must look closely at the display for the "Daily Statistics" (See attachment). Display problem at the level of "Max. Online-User", the bars on average (Side and Overall) are getting out of control. The values are actually 2976 (same as reported above). Thus, I expected the bars length to be similar to that indicated just below the "Max. Online-User" text.

Overall itīs an excellent mod. :up:

Jasem
22 Apr 2008, 23:05
Thank you very much

Barakat
22 Apr 2008, 23:30
yes works ...

but ther are more than one as the same code below in the file edit

specify the one to edit


foreach ($threadarray AS $threadid => $thread)
{
$countposts = $vbulletin->forumcache["$thread[forumid]"]['options'] & $vbulletin->bf_misc_forumoptions['countposts'];

Alfa1
22 Apr 2008, 23:33
Please post more pics so that we can get an idea on what this does.

Coroner
23 Apr 2008, 07:38
Installed, works almost fine. :)

Feedback: Coroner:-

All menus (except "Daily Statistics" in the Advanced) and their content look good.

Must look closely at the display for the "Daily Statistics" (See attachment). Display problem at the level of "Max. Online-User", the bars on average (Side and Overall) are getting out of control. The values are actually 2976 (same as reported above). Thus, I expected the bars length to be similar to that indicated just below the "Max. Online-User" text.

Overall itīs an excellent mod. :up:

I've test it with more than one Browser.
IE, Opera, Mozilla, Camino, Safari, iCab, OmniWeb
and I didn't got that prob :confused:

Coroner
23 Apr 2008, 07:44
looks good but demo ??

See my Signature. There will be a LINK to my Statistic (guests can see it).

mblb
23 Apr 2008, 08:36
Umm, I only read english. That doesn't help much. :(

Coroner
23 Apr 2008, 08:45
What do you mean ? Choose the English Language

Hornstar
23 Apr 2008, 08:52
this is really great. There are just a few small things that need to be fixed up. Take another look at your demo and you will see certain things that need fixing. This is something that I might install in the future. thanks for sharing it tho.

kushal
23 Apr 2008, 09:08
Hello,
Can you help me resolve this error while viewing the stats:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of array_multisort(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/httpd/httpdocs/forum/statistic.php(800) : eval()'d code on line 1

M-Tuning
23 Apr 2008, 14:59
Is it possible to make it only accessible for admins and mods?

J98680Bxxxxx
23 Apr 2008, 15:29
Is it possible to make it only accessible for admins and mods?

:)Yes, itīs in the usergroups settings.

meissenation
24 Apr 2008, 00:06
Does this work on 3.6.x? I saw you said that it was written for that but then tested on 3.7.

Coroner
24 Apr 2008, 10:47
1st time I've test ist on 3.6.8 (it was written for).
After upgrading on the other version, tested on 3.7.x

budatalk
24 Apr 2008, 13:58
No need for renaming, just right-click > open with winrar. Works fine so far..

Konstantinos
25 Apr 2008, 07:37
counting BYTES from Messages
counting Threads from User
counting PM's
counting most importend Smilies

Fatal error: Maximum execution time of 30 seconds exceeded in /home/***/public_html/forum/includes/ip_statsdetect.php on line 269

Leica.Robbiani
25 Apr 2008, 08:43
counting BYTES from Messages
counting Threads from User
counting PM's
counting most importend Smilies

Fatal error: Maximum execution time of 30 seconds exceeded in /home/***/public_html/forum/includes/ip_statsdetect.php on line 269
The same for me. Is it possible that some forums are too large for this hack? We have atcually about 165.000 postings, 8.000 threads and 9.800 registered users ...

Otherwise ist looks really good and anyway it seems to work. Thanks a lot for your work.

Coroner
25 Apr 2008, 11:25
Hmm - maybe. I haven't got so many Posts *g

jpbryan
01 May 2008, 22:08
I get a file corruption error in the file down load. I Can not open (extract) the file!!

Help??

Coroner
02 May 2008, 07:05
Right-Click - open with WinRAR

jpbryan
02 May 2008, 16:53
Got it.. WinRAH worked beautifully..

Thanks

peterle1
06 May 2008, 17:13
Can we restrict this, that only special usergroups can see it?

gtcompscientist
08 May 2008, 18:42
Great mod... Installed!

^^ peterle1 - That functionality is in the "Usergroup Manager" already. Just scroll to the very bottom. It's automatically off for all groups. I only enabled mine for Admins.

Amm0
09 May 2008, 20:52
For a newb, does it matter where the files are uploaded?

Do I have the upload the files to the individual folders on my FTP? eg, put the xml files in the 'Includes' folder?

Or can I just create a new folder and put it all into that?

sethdeblade
01 Jun 2008, 18:22
counting BYTES from Messages
counting Threads from User
counting PM's
counting most importend Smilies

Fatal error: Maximum execution time of 30 seconds exceeded in /www/htdocs/XXXXXX/includes/ip_statsdetect.php on line 281

i get this error as well having >220.000 posts

i deleted the simily counting part from count_statistic.php and it worked :D

esperone
01 Jun 2008, 22:42
Great mod and works 100%.

Managor
23 Jun 2008, 18:04
In the "vB-Stats - Insert PM" is an security issue:

If there is an user with a ' in the name (like A'dala) and you want to write a Private Message to him you get an error message:

Invalid SQL:
SELECT `userid` FROM `user` WHERE `username`='A'dala';

Probably this can be used for an SQL-Injection. I don't know if there are more plugins containing security issues.

Coroner
23 Jun 2008, 19:16
Thanks a lot. It's fixed now. Simply overwrite the Produkt.

Managor
23 Jun 2008, 19:24
Thank you very much :)

f r e z N Y
24 Jun 2008, 17:21
Installed. Love it.

Is there a future upgrade planned that will give a date range?

I would like to see trends over time, if possible.

Coroner
24 Jun 2008, 17:37
yes, but define "future" *smile*. Time's money. I haven't both

parks
25 Jun 2008, 11:15
looks great thank you

mA|tRiX
02 Jul 2008, 06:17
Thank you. :)

Can you insert a option, where i can see where the user come from?

Guest A --> www.google.de

Guest B --> www.yahoo.de

Guest C --> www.IDONTKNOW.de

mA|tRiX
09 Jul 2008, 11:14
Thank you. :)

Can you insert a option, where i can see where the user come from?

Guest A --> www.google.de

Guest B --> www.yahoo.de

Guest C --> www.IDONTKNOW.de

Hello?

Coroner
10 Jul 2008, 06:41
will do it in a further version.

mA|tRiX
12 Jul 2008, 10:28
thx for the info :)

Mutt
16 Aug 2008, 18:21
counting BYTES from Messages
counting Threads from User
counting PM's
counting most importend Smilies

Fatal error: Maximum execution time of 30 seconds exceeded in /home/***/public_html/forum/includes/ip_statsdetect.php on line 269

same error here and it's just my test board. hardly any posts at all.




also, edits of inlinemod.php aren't 100% clear.

there are two incidences of
if ($vbulletin->GPC['threadid'] == $post['threadid'] AND $post['postid'] == $post['firstpostid'])
{ // we've deleted the thread that we activated this action from so we can only return to the forum
$gotothread = false;
}


and three incidences of
foreach ($threadarray AS $threadid => $thread)
{
$countposts = $vbulletin->forumcache["$thread[forumid]"]['options'] & $vbulletin->bf_misc_forumoptions['countposts'];


do we do replacements on them all?

Coroner
17 Aug 2008, 08:03
change the 2nd one of:
$db->query ("UPDATE `" . TABLE_PREFIX . "user` SET `threadcount`=`threadcount`-'1' WHERE `userid`='" . $post['postuserid'] . "'");
and here the 2nd one, too:
foreach ($threadarray AS $threadid => $thread)
{
$countposts = $vbulletin->forumcache["$thread[forumid]"]['options'] & $vbulletin->bf_misc_forumoptions['countposts'];

Regards

Jason UK
18 Aug 2008, 03:57
Any chance of adding how many posts and threads in a month? That is the main statistic I want to see.

Coroner
18 Aug 2008, 04:13
at the moment ... no, sorry

Jezlad
26 Aug 2008, 16:12
Wanted to install but looks a little dodgy.

Jaxel
14 Sep 2008, 18:03
I noticed that this mod only calculates from the day it was installed... is there any way to get this to calculate the entire database? Basically for daily stats?

Coroner
14 Sep 2008, 18:37
The only way was befofe installing the Mod.
count_statistic.php counts all PM's, threads ...

there's no chance to get the statistics from the beginning of the forum

Jaxel
14 Sep 2008, 23:57
Why would it be impossible to get the Daily Stats section to fill out since the beginning? All posts and threads are dated, as well as account creation dates. Couldn't a script be written that calculates the New Threads, New Posts and Registrations by date?

Since I've installed the script, what would happen if I ran count_statistic.php again?

Coroner
15 Sep 2008, 04:02
It will only count the smilies, posts, threads and PM's again

Jaxel
15 Sep 2008, 11:27
hmm... I've got a good question...

What sort of impact on performance does this mode have? I noticed a large number of added queries on each page... Would this mod be the culprit?

*EDIT*... it adds 11 queries on EVERY page.

Oh yes... also... formatting problem...
http://www.8wayrun.com/statistic.php?submenue=1&menue=4

Cocko
20 Oct 2008, 18:28
After install I got these lines a full 19" screen on each page before forums appear :confused:

query ("UPDATE `" . TABLE_PREFIX . "user` SET `lastip`='" . $iponline . "' WHERE `userid`='" . $vbulletin->userinfo['userid'] . "'"); $vbip_count_file = "vbcount.txt"; // path zum countfile $vbip_file = "vbip.txt"; // path zum ipfile $vbip_userip = getenv ('REMOTE_ADDR'); // Achtung! F2S User! "REMOTE_ADDR" durch "HTTP_X_FORWARDED_FOR" ersetzen! if (file_exists ($vbip_count_file)) $vbip_count_temp = file ($vbip_count_file); if (file_exists ($vbip_file)) $vbip_temp = file ($vbip_file); $vbip_detail = explode ("|", $vbip_count_temp[0]); $vbip_t = getdate (time ()); $vbip_day = $vbip_t['mday']; if ($vbip_detail[0] == $vbip_day) { $vbip_detail[1]++; $vbip_detail[2]++; $vbip_count = count ($vbip_temp); $vbip_check = 1; $ip_array = explode ('\n', $vbip_temp[0]); if (count ($ip_array)) { foreach ($ip_array as $key => $val) { if ($val == $vbip_userip) $vbip_check = 0; } } if ($vbip_check == 1) { $vbip_detail[3]++; $vbip_detail[4]++; $vbip_fp = fopen ($vbip_file, 'a'); @flock ($vbip_fp, 3); @fputs ($vbip_fp, $vbip_userip . '\n'); @fclose ($vbip_fp); } } else { $vbip_detail[0] = $vbip_day; $vbip_detail[1] = 1; $vbip_detail[3] = 1; $vbip_detail[2]++; $vbip_detail[4]++; $vbip_fp = @fopen ($vbip_file, 'w'); @flock ($vbip_fp, 3); @fputs ($vbip_fp, $vbip_userip . '\n'); @fclose ($vbip_fp); } $db->query ("UPDATE `" . TABLE_PREFIX . "user` SET `seitencounter`=`seitencounter`+'1' WHERE `userid`='" . $vbulletin->userinfo['userid'] . "'"); $vbip_new = implode ('|', $vbip_detail); $vbip_fp = @fopen ($vbip_count_file, 'w'); @flock ($vbip_fp, 3); @fputs ($vbip_fp, $vbip_new); @fclose ($vbip_fp); $language = ''; $curtime = time (); $date_today = getdate ($curtime); $time_today = mktime (0, 0, 0, $date_today['mon'], $date_today['mday'], $date_today['year']); $currentstat = $db->query_first ("SELECT * FROM `" . TABLE_PREFIX . "vbstat` WHERE `time`='" . $time_today . "'"); if (!$currentstat['time']) $db->query ("INSERT INTO `" . TABLE_PREFIX . "vbstat` (`time`) VALUES ('" . $time_today . "')"); if ($vbulletin->userinfo['userid']) { $schonda = $db->query_first ("SELECT * FROM `" . TABLE_PREFIX . "vbsessions_day` WHERE `userid`='" . $vbulletin->userinfo['userid'] . "'"); if (!$schonda['userid']) $db->query ("UPDATE `" . TABLE_PREFIX . "vbstat` SET `memberson`=`memberson`+'1' WHERE `time`='" . $time_today . "'"); } $user = $db->query_first ("SELECT COUNT(*) AS anzahl FROM `" . TABLE_PREFIX . "session` WHERE `lastactivity`>='" . (TIMENOW - $vbulletin->options['cookietimeout']) . "'"); if ($user['anzahl'] > $currentstat['maxuseron']) $db->query ("UPDATE `" . TABLE_PREFIX . "vbstat` SET `maxuseron`='" . $user['anzahl'] . "', `maxuserontime`='" . $curtime . "' WHERE `time`='" . $time_today . "'"); $res1 = $db->query ("DELETE FROM `" . TABLE_PREFIX . "vbsessions_day` WHERE `time`<'" . $time_today . "'"); if ($vbulletin->userinfo['userid']) { $row = $db->query_first ("SELECT * FROM `" . TABLE_PREFIX . "vbsessions_day` WHERE `userid`='" . $vbulletin->userinfo['userid'] . "'"); if (!$row['userid']) $db->query ("INSERT INTO `" . TABLE_PREFIX . "vbsessions_day` VALUES ('" . $vbulletin->userinfo['userid'] . "','" . $curtime . "')"); } $aktuelldate = date ("Ymd"); $db->query ("DELETE FROM `" . TABLE_PREFIX . "vbgastonline` WHERE `gastdate`<>'" . $aktuelldate . "'"); $datenbank = $db->query_first ("SELECT `lastip` FROM `" . TABLE_PREFIX . "user` WHERE `userid`='" . $vbulletin->userinfo['userid'] . "'" ); if ($datenbank['lastip'] == $_SERVER['REMOTE_ADDR']) { if ($vbulletin->userinfo['userid'] > 0) $Fragab = 0; } else { if ($vbulletin->userinfo['userid'] > 0) $Fragab = 1; } $datenbank = $db->query_first ("SELECT * FROM `" . TABLE_PREFIX . "vbgastonline` WHERE `ip`='" . $_SERVER['REMOTE_ADDR'] . "'" ); if ($datenbank['ip'] == $_SERVER['REMOTE_ADDR']) { if ($vbulletin->userinfo['userid'] == 0) $Fragab = 0; } else { if ($vbulletin->userinfo['userid'] == 0) $Fragab = 1; } unset ($BROWSER_AGENT); unset ($SPIDER_CRAWLER); unset ($BROWSER_PLATFORM); $bagent = $HTTP_SERVER_VARS['HTTP_USER_AGENT']; $blang = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE']; if ($bagent == '') $bagent = $_SERVER['HTTP_USER_AGENT']; if ($blang == '') $blang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; if ($Fragab == 1) { require_once (DIR . '/includes/class_xml.php'); if (ereg ('MSIE', $bagent)) { if (strstr ($bagent, 'MSIE 5.0')) $BROWSER_AGENT = 'IE5'; else if (strstr ($bagent, 'MSIE 5.5')) $BROWSER_AGENT = 'IE55'; else if (strstr ($bagent, 'MSIE 6.0')) $BROWSER_AGENT = 'IE6'; else if (strstr ($bagent, 'MSIE 7.0')) $BROWSER_AGENT = 'IE7'; else $BROWSER_AGENT = 'IE'; } else if (ereg ('Lynx', $bagent)) $BROWSER_AGENT = 'Lynx'; else if (ereg ('iCab', $bagent)) $BROWSER_AGENT = 'iCab'; else if (ereg ('OmniWeb', $bagent)) $BROWSER_AGENT = 'OmniWeb'; else if (ereg ('Konqueror', $bagent)) $BROWSER_AGENT = 'Konqueror'; else if (ereg ('Opera', $bagent)) $BROWSER_AGENT = 'Opera'; else if (ereg ('Safari', $bagent)) $BROWSER_AGENT = 'Safari'; else if (ereg ('Camino', $bagent)) $BROWSER_AGENT = 'Camino'; else if (ereg ('Mozilla/([0-9].[0-9]{1,2})', $bagent)) $BROWSER_AGENT = 'Mozilla'; else $BROWSER_AGENT = 'Other'; // log all the Spiders we've got in "statistic_spiders.xml" $spider_obj = new vB_XML_Parser (false, DIR . '/includes/xml/statistic_spiders.xml'); $spider_data = $spider_obj->parse (); if (is_array ($spider_data['spider'])) { foreach ($spider_data['spider'] as $key => $val) { if (eregi ($val['ident'], $bagent)) $SPIDER_CRAWLER = $val['name']; } } if ($SPIDER_CRAWLER != '') { $spider_chk = $db->query_first ("SELECT `id` FROM `" . TABLE_PREFIX ."vbstats_new` WHERE `artcount`='3' AND `title`='" . $SPIDER_CRAWLER . "'"); if ($spider_chk['id']) $db->query ("UPDATE `" . TABLE_PREFIX . "vbstats_new` SET `counter`=`counter`+'1' WHERE `artcount`='3' AND `title`='" . $SPIDER_CRAWLER . "'"); else { $db->query ("INSERT INTO `" . TABLE_PREFIX . "vbstats_new` (`artcount`,`title`, `counter`,`icon`) VALUES ('3', '" . addslashes ($SPIDER_CRAWLER) . "','1', 'spiders.gif') "); } } if (eregi ('linux', $bagent)) $BROWSER_PLATFORM = 'Linux'; else if (eregi ('win32', $bagent)) $BROWSER_PLATFORM = 'Windows'; else if (eregi ('Win 9x 4.90', $bagent)) $BROWSER_PLATFORM = 'Windows ME'; else if (eregi ('Windows2000', $bagent)) $BROWSER_PLATFORM = 'Windows 2000'; else if (eregi ('NT 5.0', $bagent)) $BROWSER_PLATFORM = 'Windows 2000'; else if (eregi ('NT 5.1', $bagent)) $BROWSER_PLATFORM = 'Windows XP'; else if (eregi ('mac', $bagent)) $BROWSER_PLATFORM = 'Macintosh'; else if (eregi ('NT 4.0', $bagent)) $BROWSER_PLATFORM = 'Windows NT'; else if (eregi ('sunos', $bagent)) $BROWSER_PLATFORM = 'SunOS'; else if (eregi ('irix', $bagent)) $BROWSER_PLATFORM = 'IRIX'; else if (eregi ('os/2', $bagent)) $BROWSER_PLATFORM = 'OS/2'; else if (eregi ('unix', $bagent)) $BROWSER_PLATFORM = 'Unix'; else if (eregi ('hp-ux', $bagent)) $BROWSER_PLATFORM = 'Unix'; else if (eregi ('X11', $bagent)) $BROWSER_PLATFORM = 'Unix'; else if (eregi ('Windows 95', $bagent)) $BROWSER_PLATFORM = 'Windows 95'; else if (eregi ('Windows 98', $bagent)) $BROWSER_PLATFORM = 'Windows 98'; else if (eregi ('NT 6.0', $bagent)) $BROWSER_PLATFORM = 'Windows Vista'; else if (eregi ('beos', $bagent)) $BROWSER_PLATFORM = 'BeOs'; else if (eregi ('freebsd', $bagent)) $BROWSER_PLATFORM = 'FreeBSD'; else $BROWSER_PLATFORM = 'Other'; $havel = 0; $language = substr (strtolower ($blang), 0, 2); if ($language == 'ja') $language = 'jp'; if ($language == 'dk') $language = 'da'; if ($language == 'us') $language = 'en'; $blangs = array ('aa','ab','af','am','ar','as','ay','az', 'ba','be','bg','bh','bi','bn','bo','br', 'ca','co','cs','cy', 'da','de','dz', 'el','en','eo','es','et','eu', 'fa','fi','fj','fo','fr','fy', 'ga','gd','gl','gn','gu', 'ha','he','hi','hr','hu','hy', 'ia','id','ie','ik','is','it','iu', 'jp','jw', 'ka','kk','kl','km','kn','ko','ks','ku','ky', 'la','ln','lo','lt','lv', 'mg','mi','mk','ml','mn','mo','mr','ms','mt','my', 'na','ne','nl','no', 'oc','om','or', 'pa','pl','ps','pt', 'qu', 'rm','rn','ro','ru','rw', 'sa','sd','sg','si','sk','sl','sm','sn','so','sq','sr','ss','st','su','sv','sw', 'ta','te','tg','th','ti','tk','tl','tn','to','tr','ts','tt','tw', 'uk','ur','uz', 'vi','vo', 'wo', 'xh', 'yi', 'za','zh'); foreach ($blangs as $la => $lu) { if ($language == $lu) $havel = 1; } if ($language == '') { $htt = explode (';', $bagent); foreach ($htt as $la => $lu) { foreach ($blangs as $le => $li) { if (substr (trim ($lu), 0, 2) == $li) $havel = 1; } } } if (!$havel) $language = 'other'; } if ($BROWSER_PLATFORM != '') $db->query ("UPDATE `" . TABLE_PREFIX . "vbstats_new` SET `counter`=`counter`+'1' WHERE `artcount`='0' AND `title`='" . $BROWSER_PLATFORM . "'"); if ($BROWSER_AGENT != '') $db->query ("UPDATE `" . TABLE_PREFIX . "vbstats_new` SET `counter`=`counter`+'1' WHERE `artcount`='1' AND `title`='" . $BROWSER_AGENT . "'"); if ($language != '') $db->query ("UPDATE `" . TABLE_PREFIX . "vbstats_new` SET `counter`=`counter`+'1' WHERE `artcount`='2' AND `title`='" . $language . "'"); $gastdata = $db->query_first ("SELECT * FROM `" . TABLE_PREFIX . "vbgastonline` WHERE `ip`='" . $_SERVER['REMOTE_ADDR'] . "'"); if (!$gastdata['ip']) $db->query ("INSERT INTO `" . TABLE_PREFIX . "vbgastonline` VALUES ('" . $_SERVER['REMOTE_ADDR'] . "','" . $aktuelldate . "')"); function ip_getsmilies () { global $db; $count = 0; $result = $db->query ("SELECT smilieid as smilieid, smiliepath as path, smilietext as text FROM `" . TABLE_PREFIX . "smilie`"); while ($row = $db->fetch_array ($result)) { $count++; $smiliecache[$count] = $row; } return $smiliecache; } function ip_smiliescount ($out) { global $db, $smiliecache, $vbulletin; if (!count ($smiliecache)) $smiliecache = ip_getsmilies (); for ($i = 0; $i < count ($smiliecache); $i++) { if ($smiliecache[$i]['text']) { if (stristr ($out, $smiliecache[$i]['text'])) { $outarray = explode ($smiliecache[$i]['text'], $out); $plus = count ($outarray) - 1; $smilieid = $smiliecache[$i]['smilieid']; $result = $db->query_first ("SELECT `smiliesint` FROM `" . TABLE_PREFIX . "smilie` WHERE `smilieid`='" . $smilieid . "'"); $smiliesintarray = $result['smiliesint']; $smiliesint = $smiliesintarray + $plus; $db->query ("UPDATE `" . TABLE_PREFIX . "smilie` SET `smiliesint`='" . $smiliesint . "' WHERE `smilieid`='" . $smilieid . "'"); } } } } function ip_smiliesdecount ($out) { global $db, $smiliecache; if (!count ($smiliecache)) $smiliecache = ip_getsmilies (); for ($i = 0; $i < count($smiliecache); $i++) { if (stristr ($out, $smiliecache[$i]['text'])) { $outarray = explode ($smiliecache[$i]['text'], $out); $plus = count($outarray) - 1; $smilieid = $smiliecache[$i]['smilieid']; $result = $db->query_first ("SELECT `smiliesint` FROM `" . TABLE_PREFIX . "smilie` WHERE `smilieid`='" . $smilieid . "'"); $smiliesintarray = $result['smiliesint']; $smiliesint = $smiliesintarray + $plus; $db->query ("UPDATE `" . TABLE_PREFIX . "smilie` SET `smiliesint`='" . $smiliesint . "' WHERE `smilieid`='" . $smilieid . "'"); } } } ?>

---
Edit: fixed by adding the missing "php" at file beginnings of every attached .php
<?php

Cocko
20 Oct 2008, 20:02
Next step I'd like to integrate vB-Statistic with vBadvanced CMPS.

Using THIS_SCRIPT statistic I get following errors:
- in cmps - blank page
- calling statistic.php directly - system message

Deleting THIS_SCRIPT entry in vBadvanced options the statistic runs
fine again.

Did somebody successfully integrate vB Statistic in vBadvanced?

Devanand
12 Aug 2009, 09:48
Does it work on 3.8 version?