View Full Version : Statistics Modifications - Big vB-Statistic
Coroner
04-21-2008, 10:00 PM
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
04-22-2008, 05:03 PM
Sorry, couln't upload the last Picture.
Here is No. 10
VeeDubZ
04-22-2008, 05:21 PM
cant actualy see what any of the pictures are as they are too small
Reeve of shinra
04-22-2008, 05:23 PM
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
04-22-2008, 05:37 PM
yep, can't even see any of the pics.
silver surfer
04-22-2008, 05:37 PM
THANK YOU !
*clicks installed
Coroner
04-22-2008, 05:39 PM
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
04-22-2008, 05:39 PM
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
04-22-2008, 06:33 PM
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
04-22-2008, 07:32 PM
looks good but demo ??
cafenetland
04-22-2008, 08:04 PM
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
04-22-2008, 08:59 PM
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
04-22-2008, 10:05 PM
Thank you very much
Barakat
04-22-2008, 10:30 PM
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
04-22-2008, 10:33 PM
Please post more pics so that we can get an idea on what this does.
Coroner
04-23-2008, 06:38 AM
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
04-23-2008, 06:44 AM
looks good but demo ??
See my Signature. There will be a LINK to my Statistic (guests can see it).
Umm, I only read english. That doesn't help much. :(
Coroner
04-23-2008, 07:45 AM
What do you mean ? Choose the English Language
Hornstar
04-23-2008, 07:52 AM
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
04-23-2008, 08:08 AM
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
04-23-2008, 01:59 PM
Is it possible to make it only accessible for admins and mods?
J98680Bxxxxx
04-23-2008, 02:29 PM
Is it possible to make it only accessible for admins and mods?
:)Yes, it?s in the usergroups settings.
meissenation
04-23-2008, 11:06 PM
Does this work on 3.6.x? I saw you said that it was written for that but then tested on 3.7.
Coroner
04-24-2008, 09:47 AM
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
04-24-2008, 12:58 PM
No need for renaming, just right-click > open with winrar. Works fine so far..
Konstantinos
04-25-2008, 06:37 AM
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
04-25-2008, 07:43 AM
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
04-25-2008, 10:25 AM
Hmm - maybe. I haven't got so many Posts *g
jpbryan
05-01-2008, 09:08 PM
I get a file corruption error in the file down load. I Can not open (extract) the file!!
Help??
Coroner
05-02-2008, 06:05 AM
Right-Click - open with WinRAR
jpbryan
05-02-2008, 03:53 PM
Got it.. WinRAH worked beautifully..
Thanks
peterle1
05-06-2008, 04:13 PM
Can we restrict this, that only special usergroups can see it?
gtcompscientist
05-08-2008, 05:42 PM
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.
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
06-01-2008, 05:22 PM
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
06-01-2008, 09:42 PM
Great mod and works 100%.
Managor
06-23-2008, 05:04 PM
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
06-23-2008, 06:16 PM
Thanks a lot. It's fixed now. Simply overwrite the Produkt.
Managor
06-23-2008, 06:24 PM
Thank you very much :)
f r e z N Y
06-24-2008, 04:21 PM
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
06-24-2008, 04:37 PM
yes, but define "future" *smile*. Time's money. I haven't both
parks
06-25-2008, 10:15 AM
looks great thank you
mA|tRiX
07-02-2008, 05:17 AM
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
07-09-2008, 10:14 AM
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
07-10-2008, 05:41 AM
will do it in a further version.
mA|tRiX
07-12-2008, 09:28 AM
thx for the info :)
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
08-17-2008, 07:03 AM
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
08-18-2008, 02:57 AM
Any chance of adding how many posts and threads in a month? That is the main statistic I want to see.
Coroner
08-18-2008, 03:13 AM
at the moment ... no, sorry
Jezlad
08-26-2008, 03:12 PM
Wanted to install but looks a little dodgy.
Jaxel
09-14-2008, 05:03 PM
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
09-14-2008, 05:37 PM
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
09-14-2008, 10:57 PM
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
09-15-2008, 03:02 AM
It will only count the smilies, posts, threads and PM's again
Jaxel
09-15-2008, 10:27 AM
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
10-20-2008, 05:28 PM
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
10-20-2008, 07:02 PM
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
08-12-2009, 08:48 AM
Does it work on 3.8 version?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.