Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
Forgot Password?
Navigation

PANEL SNIPPIT:: Some Site Stats Panel

Last updated on 8 years ago
Posted 13 years ago
that shows number of media also, but still said:
WARNING: An error occurred while parsing the page. Please see PHPFusion's error log for more details.
C
CraigFusioneer
Posted 13 years ago
Hi,

Can you tell me, in the error log these details say about it?

Kind Regards
Craig
Posted 13 years ago
Undefined index: stat019
C
CraigFusioneer
Posted 13 years ago
Hi,

That's nothing to do with the Kroax that is because the locale text is not defined in the top see all the text there is no 19 you need to add it....

$locale['stat019'] = " Your Text";


Kind Regards
Craig
Posted 13 years ago
ok craig thats fixed it, i had to delete echo </span>\n"; on that line

Merged on Feb 24 2013 at 17:13:13:
i want a line break and the theme bullet now
Edited by outlaw16151 on 24-02-2013 23:13, 13 years ago
C
CraigFusioneer
Posted 13 years ago
Hi there,

Here is a basic example this will do a line break then the bullet...

Line break...



Theme Bullet..

THEME_BULLET


What you might want to achieve...

echo "<br />".THEME_BULLET." something here";


Kind Regards
Craig
Posted 13 years ago
oh HELL yeah!!! now we smoking, go look bud
C
CraigFusioneer
Posted 13 years ago
Hi,

Yes it is looking good now man.

Oh, It is missing the stats image at the left though.

Good work

Kind Regards
Craig
Posted 13 years ago
now i want to add the rest of the stuff on the site, im glad i found this thread

Merged on Feb 24 2013 at 17:31:38:
what stats image? dang i was happy to get this working, thanks to your help lol
Edited by outlaw16151 on 24-02-2013 23:31, 13 years ago
C
CraigFusioneer
Posted 13 years ago
Hi,

You can just upload this image to your images folder. root/images/

www.phpfusionmods.co.uk/images/stats2.png


Kind Regards
Craig
Posted 13 years ago
now, the games? what code would you suggest Craig?

here is what im using but dont work

$games = dbcount("varcade_id)", $db_prefix."varcade_games");

says this above it: Unknown column 'varcade_games_id' in 'field list'
C
CraigFusioneer
Posted 13 years ago
Hi,

See where you have varcade_id change that to lid

Kind Regards
Craig
Posted 13 years ago
shows 204 games in the arcade, but the error came back

Undefined index: stat021 Line: 49


+++++FIXED++++++

Merged on Feb 24 2013 at 20:39:02:
ok here is my whole code:
$locale['stat001'] = "Member";
$locale['stat002'] = "Members";
$locale['stat003'] = "OutlawsGameroom Stats";
$locale['stat004'] = "Stats";
$locale['stat005'] = "There has been ";
$locale['stat006'] = " and ";
$locale['stat007'] = " Registered Members since";
$locale['stat008'] = " logged in today and ";
$locale['stat009'] = " new ";
$locale['stat010'] = " registered today. ";
$locale['stat011'] = "We have ";
$locale['stat012'] = " Downloads, ";
$locale['stat013'] = " forum threads and ";
$locale['stat014'] = " forum posts.";
$locale['stat015'] = "There are ";
$locale['stat016'] = " comments";
$locale['stat017'] = " shouts posted.";
$locale['stat018'] = " We have ";
$locale['stat019'] = " And we have ";



$members_registered = dbcount("(user_id)", DB_USERS, "user_status<='1' OR user_status='3' OR user_status='5'");
$members_today = number_format(dbcount("(user_id)", DB_USERS, "user_status<='1' AND user_lastvisit > UNIX_TIMESTAMP(CURDATE())"));
$new_members_today = number_format(dbcount("(user_id)", DB_USERS, "user_status<='1' AND user_joined > UNIX_TIMESTAMP(CURDATE())"));
$downloads = dbcount("(download_id)", DB_DOWNLOADS) ;
$counter = number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['global_170'] : $locale['global_171']."");
$threads = dbcount("(thread_id)", DB_THREADS);
$posts = dbcount("(post_id)", DB_POSTS);
$comments = dbcount("(comment_id)", DB_COMMENTS);
include_once INFUSIONS."shoutbox_panel/infusion_db.php";
$shouts = dbcount("(shout_id)", DB_SHOUTBOX);
$site_opened = dbarray(dbquery("SELECT user_id, user_joined FROM ".DB_USERS." WHERE user_id='1'"));
global $db_prefix;
$media = dbcount("(kroax_id)", $db_prefix."kroax");
global $db_prefix;
$games = dbcount("(lid)", $db_prefix."varcade_games");


opentable($locale['stat003']);

echo"<div class='tbl-border center' style='margin-top:5px; margin-bottom: 5px;'>\n";
echo"<div style='float: left; margin-top: 27px; margin-bottom:0px; padding-left: 10px; '><img style='vertical-align:middle; border: 0px; text-align: center; ' src='".IMAGES."stats2.png' alt='".$locale['stat004']."' /></div>\n";
echo "<div class='tbl1' style='margin-top: 1px; margin-bottom: 0px; padding-left: 42px;'>".THEME_BULLET." <span class='small'>".$locale['stat005'].$counter.$locale['stat006'].$members_registered.$locale['stat007']." ".showdate("longdate", $site_opened['user_joined'])."</span>
<br />".THEME_BULLET." <span class='small'>".$members_today." ".($members_today == 1 ? $locale['stat001'] : $locale['stat002']."").$locale['stat008'].$new_members_today.$locale['stat009'].($new_members_today == 1 ? $locale['stat001'] : $locale['stat002']."").$locale['stat010']."</span></div>\n";
echo"<div class='tbl2' style='margin-bottom: 1px; padding-left: 42px;'>\n";
echo THEME_BULLET." <span class='small'> ".$locale['stat011'].$downloads.$locale['stat012']." </span>\n";
echo" <span class='small'> ".$threads.$locale['stat013'].$posts.$locale['stat014']."</span><br />\n";
echo THEME_BULLET." <span class='small'>".$locale['stat015'].$comments.$locale['stat016']."</span>\n";
echo"<span class='small'>".$locale['stat006'].$shouts.$locale['stat017']."</span>\n";
echo "<br />".THEME_BULLET."<span class='small'>".$locale['stat018'].$media.$locale['stat019] = " Items in the Media section";
echo "<br />".THEME_BULLET."<span class='small'>".$locale['stat019'].$games.$locale['stat020'] = " games in the Arcade";
echo"</div></div>\n";

closetable();

it was working a few minutes ago, even had the custom pages working too

but its giving this error:
Parse error: syntax error, unexpected T_STRING, expecting ']' in /------/-----/------/themes/templates/panels.php(74) : eval()'d code on line 52

Merged on Feb 24 2013 at 22:15:14:
nevermind, i found the problem,

i found this ['stat019]
when it suppose to be ['stat019']
Edited by outlaw16151 on 25-02-2013 04:15, 13 years ago
C
CraigFusioneer
Posted 13 years ago
Morning,

That's great you got it all resolved now, I am happy to of helped.

Anything else give me a shout.

Kind Regards
Craig
Posted 8 years ago
i know this is an old thread, but im back. craig, are you around?
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
You cannot set up a bounty in this discussion thread.
Moderator: Support Team
Users who participated in discussion: Craig, behrooz, jikaka, razin, Jompsa, outlaw16151