Raised This Month: $51 Target: $400
 12% 

[L4D] Player Stats (Co-op) v1.1.1


Post New Thread Reply   
 
Thread Tools Display Modes
ApocalypseDan
Member
Join Date: Jan 2009
Old 01-30-2009 , 13:55   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #221

Just A question On Data Base Sould I create A New MySql Data Base Just For This Or Use The One That My website is On ?

I have Just Changed My Webhost To One That Allows External Connections And I Am About To Install This Plugin And Is There Any Thing Else I should Know That Has Not Been Mentioned In These Posts So I can Get It Right 1st Try

Many Thanks
Apoc D
__________________
ApocalypseDan is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 01-30-2009 , 15:41   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #222

Quote:
Originally Posted by ogre_x View Post
I think I found the problem for rank not showing!

When I remove the single quote character from the string the panel shows up:
The original template text is:

Can someone more fluent in sourcemod tell me it there is a problem with having a single quote here? Could it be a localization problem? Should the single quote be escaped in some way if used in a panel text?

My steam name used was

A bad combination of characters in the name and the single quote perhaps? Should all texts shown in a panel be escaped in some way perhaps? If a player has a quote in his/her name could mean a potential problem.
That is extremely weird, and I can only assume it has something to do with localization. What local language are you running L4D in? I will go ahead and escape out the quote mark, and add in an escape check to the player's name.

Quote:
Originally Posted by ApocalypseDan View Post
Just A question On Data Base Sould I create A New MySql Data Base Just For This Or Use The One That My website is On ?

I have Just Changed My Webhost To One That Allows External Connections And I Am About To Install This Plugin And Is There Any Thing Else I should Know That Has Not Been Mentioned In These Posts So I can Get It Right 1st Try
It doesn't matter what database you use, you an use an existing one if you would like.
__________________
msleeper is offline
KroleG
Junior Member
Join Date: Dec 2008
Old 01-31-2009 , 14:12   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #223

What about Versus mod ?
KroleG is offline
Icettiflow
Senior Member
Join Date: Jan 2009
Old 01-31-2009 , 14:36   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #224

...

He has already said NUMEROUS times. It will come out when it comes out. Please stop asking.
Icettiflow is offline
ogre_x
Member
Join Date: Dec 2008
Location: Sweden
Old 01-31-2009 , 17:05   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #225

Quote:
Originally Posted by msleeper View Post
That is extremely weird, and I can only assume it has something to do with localization. What local language are you running L4D in? I will go ahead and escape out the quote mark, and add in an escape check to the player's name.
I'm actually not using a localized version of steam. Have you tried if the combination with my username works for you? Great if you add some kind of escaping to the strings.
__________________
ogre_x is offline
Inker
SourceMod Donor
Join Date: Dec 2008
Old 01-31-2009 , 19:17   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #226

sweet man

Last edited by Inker; 01-31-2009 at 20:05.
Inker is offline
ApocalypseDan
Member
Join Date: Jan 2009
Old 02-01-2009 , 12:39   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #227

Hi Installed the plugin today followed the instructions i think
click on the stats in my module on web site and get these errrors any ideas please Many thanks

Apoc D



Warning: include(./common.php) [function.include]: failed to open stream: No such file or directory in /home/cdmcom/public_html/modules/Stats/index.php on line 13

Warning: include(./common.php) [function.include]: failed to open stream: No such file or directory in /home/cdmcom/public_html/modules/Stats/index.php on line 13

Warning: include() [function.include]: Failed opening './common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cdmcom/public_html/modules/Stats/index.php on line 13

Fatal error: Class 'Template' not found in /home/cdmcom/public_html/modules/Stats/index.php on line 16



this is my index.php :

<?php
/*
============================================= ===
LEFT 4 DEAD PLAYER RANK
Copyright (c) 2009 Mitchell Sleeper
Originally developed for WWW.F7LANS.COM
============================================= ===
Index / Players Online page - "index.php"
============================================= ===
*/

// Include the primary PHP functions file
include("./common.php");

// Load outer template
$tpl = new Template("./templates/layout.tpl");

$result = mysql_query("SELECT * FROM players WHERE lastontime >= '" . intval(time() - 300) . "' ORDER BY points DESC");
$playercount = number_format(mysql_num_rows($result));

$tpl->set("site_name", $site_name); // Site name
$tpl->set("title", "Players Online"); // Window title
$tpl->set("page_heading", "Players Online - " . $playercount); // Page header

if (mysql_error()) {
$output = "<p><b>MySQL Error:</b> " . mysql_error() . "</p>\n";

} else {
$arr_online = array();
$stats = & new Template('./templates/online.tpl');

$i = 1;
while ($row = mysql_fetch_array($result)) {
if ($row['lastontime'] > time()) $row['lastontime'] = time();

$line = ($i & 1) ? "<tr>" : "<tr class=\"alt\">";
$line .= "<td><a href=\"player.php?steamid=" . $row['steamid']. "\">" . htmlentities($row['name'], ENT_COMPAT, "UTF-8") . "</a></td>";
$line .= "<td>" . number_format($row['points']) . "</td><td>" . formatage($row['playtime'] * 60) . "</td></tr>\n";

$i++;
$arr_online[] = $line;
}

if (mysql_num_rows($result) == 0) $arr_online[] = "<tr><td colspan=\"3\" align=\"center\">There are no players online</td</tr>\n";

$stats->set("online", $arr_online);
$output = $stats->fetch("./templates/online.tpl");
}

$tpl->set('body', trim($output));

// Output the top 10
$tpl->set("top10", $top10);

// Print out the page!
echo $tpl->fetch("./templates/layout.tpl");
?>


This IS With the 1.1v of the plugin
__________________
ApocalypseDan is offline
ayuki
Member
Join Date: May 2008
Old 02-01-2009 , 13:47   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #228

Warning: Template::include(./templates/layout.tpl) [function.Template-include]: failed to open stream: Permission denied in /****/class_template.php on line 35

Warning: Template::include() [function.include]: Failed opening './templates/layout.tpl' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /****/l4d/class_template.php on line 35


if you have a solution?

__________________

ayuki is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 02-01-2009 , 16:45   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #229

Quote:
Originally Posted by ApocalypseDan View Post
Hi Installed the plugin today followed the instructions i think
click on the stats in my module on web site and get these errrors any ideas please Many thanks

Apoc D
What version of PHP are you running? It seems like it cannot open the common.php file, which is where a lot of the shared functions are kept. Also, see my below response.

Quote:
Originally Posted by ayuki View Post
Warning: Template::include(./templates/layout.tpl) [function.Template-include]: failed to open stream: Permission denied in /****/class_template.php on line 35

Warning: Template::include() [function.include]: Failed opening './templates/layout.tpl' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /****/l4d/class_template.php on line 35


if you have a solution?
Your file permissions are not set properly. Make sure that all of the files are set to 644, and that all of the directories are set to 755. Except for the file /templates/awards_cache.html which needs to be 777.
__________________
msleeper is offline
ApocalypseDan
Member
Join Date: Jan 2009
Old 02-01-2009 , 19:40   Re: [L4D] Player Stats (Co-op) v1.1
Reply With Quote #230

Quote:
Originally Posted by msleeper View Post
What version of PHP are you running? It seems like it cannot open the common.php file, which is where a lot of the shared functions are kept. Also, see my below response.

I am Running php Nuke Evolution Extreme

Your file permissions are not set properly. Make sure that all of the files are set to 644, and that all of the directories are set to 755. Except for the file /templates/awards_cache.html which needs to be 777.
I have these Permissions set as you ask and i have managed to reduce the errors down to

Warning: include(./common.php) [function.include]: failed to open stream: No such file or directory in /home/cdmcom/public_html/modules/Stats/index.php on line 13

Warning: include() [function.include]: Failed opening './common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cdmcom/public_html/modules/Stats/index.php on line 13

Fatal error: Class 'Template' not found in /home/cdmcom/public_html/modules/Stats/index.php on line 16
__________________
ApocalypseDan is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode