Acyd Burn's Statistics MOD with eXtreme Styles

Tutorials for <a href="http://www.phpbbstyles.com/viewtopic.php?t=356">eXtreme Styles mod</a> for phpBB 2.0.

Moderator: Moderators

Acyd Burn's Statistics MOD with eXtreme Styles

Postby pentapenguin on Wed Mar 30, 2005 6:29 am

Hello.
Unfortunately, Acyd Burn's Statistics MOD doesn't fully work with CyberAlien's eXtreme Styles MOD.
However, there's a simple fix.
Credit: partial credit goes to chadsmith from this post on phpBB.com.

1st, if you don't have a copy of the original includes/template.php, download a copy of phpBB and rename template.php to phpbb_template.php and upload it to your site.

2nd, follow these directions: (be sure to keep a backup all files just in case!)
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
common.php


#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/template.'.$phpEx);


#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($non_xs)
{
include($phpbb_root_path . 'includes/phpbb_template.'.$phpEx);
}

else
{
include($phpbb_root_path . 'includes/template.'.$phpEx);
}


#
#-----[ OPEN ]------------------------------------------
#
statistics.php


#
#-----[ FIND ]------------------------------------------
#
$phpbb_root_path = './';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$non_xs = 1;


#
#-----[ OPEN ]------------------------------------------
#
admin/admin_statistics.php


#
#-----[ FIND ]------------------------------------------
#
$phpbb_root_path = './';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$non_xs = 1;


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#EoM

Now the Statistics MOD should be working.
Enjoy!
User avatar
pentapenguin
Moderator
Moderator
 
Posts: 1466
Joined: Tue Sep 14, 2004 4:15 pm
Location: Georgia, USA

Postby kvfb97 on Wed Mar 30, 2005 10:16 am

I did this. Works fine. But i have php code in the overall_header and now when i goto that page it doesnt work :(
Tip: Don't argue with idiots, they'll drag you down to their level and beat you with experience.
User avatar
kvfb97
Registered User
Registered User
 
Posts: 1774
Joined: Mon Aug 02, 2004 8:18 am
Location: Northern Ireland, UK

Postby pentapenguin on Wed Mar 30, 2005 4:44 pm

Is the PHP very important?
If it's not, you could try this:
Code: Select all
<!-- BEGIN switch_xs_enabled -->
<?php
your PHP code here
?>
<!-- END switch_xs_enabled -->

Basically, that should hide your PHP code since the XS template.php isn't being used.

If your PHP code is important, let me know and we'll find a fix! :)
User avatar
pentapenguin
Moderator
Moderator
 
Posts: 1466
Joined: Tue Sep 14, 2004 4:15 pm
Location: Georgia, USA

Postby kvfb97 on Wed Mar 30, 2005 4:51 pm

Well it sorta is... it rotates the banner, gets radio stats and gets variables from a file...

they are in 2 files

1...

overall_header
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="Author" content="http://www.phpbbstyles.com" />
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/ca_aphrodite/style.css" type="text/css" />
<script language="javascript" type="text/javascript" src="templates/ca_aphrodite/scripts.js"></script>
{CA_INLINE_CSS}
<!-- IE conditional comments: http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp -->
<!--[if IE]>
<style type="text/css">
/* IE hack to emulate the :hover & :focus pseudo-classes
   Add the selectors below that required the extra attributes */
.row1h, .row1h-new { behavior: url("templates/ca_aphrodite/pseudo-hover.htc"); }
</style>
<![endif]-->

<SCRIPT LANGUAGE="Javascript">
var win = null;
function Gk_PopTart(mypage,myname,w,h,scroll)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
  win = window.open(mypage,myname,settings);
}
</SCRIPT>

<SCRIPT LANGUAGE="Javascript">
var win = null;
function Trophy_Popup(mypage,myname,w,h,scroll)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
  win = window.open(mypage,myname,settings);
}
</SCRIPT>

</head>
<body onload="PreloadFlag = true;">
<a name="top"></a>
<table cellspacing="0" width="100%" id="forum">
<tr>
   <td class="forum-header" align="left" colspan="2"><a href="{U_INDEX}" title="{L_INDEX}">
   
<?php
$codes = array(
    "<img src=templates/ca_aphrodite/images/logo.gif>",
    "<img src=templates/ca_aphrodite/images/logo1.jpg>",
    "<img src=templates/ca_aphrodite/images/logo2.jpg>",
    "<img src=templates/ca_aphrodite/images/logo3.jpg>"
);

shuffle($codes);

$number=1; while(list(, $code) = each($codes)) {
       if ($i>=$number) { break; }
       echo "$code";
       echo '<br>';
       $i++;
}
?>

   
   </a></td>
   <td align="center" class="forum-header header-search" valign="center">
      {VISIT_COUNTER}
   </td>
</tr>
<tr>
   <td colspan="3" class="forum-buttons" valign="middle">
            <!-- BEGIN switch_user_logged_out -->
            <a href="{U_REGISTER}">{L_REGISTER}</a> •
            <!-- END switch_user_logged_out -->
            <!-- BEGIN switch_user_logged_in -->
            <a href="{U_PROFILE}">{L_PROFILE}</a> •
            <a href="{U_PRIVATEMSGS}">{L_PRIVATEMSGS}</a> •
            <!-- END switch_user_logged_in -->
            <a href="{U_SEARCH}">{L_SEARCH}</a> •
            <a href="{U_FAQ}">{L_FAQ}</a> •
            <a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a> •
            <a href="{U_GROUP_CP}">{L_USERGROUPS}</a> •
            <a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a>
      </td>
</tr>


<?php
include('config_radio.php');
$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);
if(!$scfp) {
  $scsuccs=1;
echo''.$scdef.' is Offline';
}
if($scsuccs!=1){
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
}

$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS");
$y=0;
while($loop[$y]!=''){
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page);
  $scphp = strtolower($loop[$y]);
  $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
   $$scphp = urldecode($$scphp);

  $y++;
}

$pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
$songatime = explode("<SONG>", $pageed);
$r=1;
while($songatime[$r]!=""){
  $t=$r-1;
  $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
  $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
  $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
  $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
  $song[$t] = urldecode($song[$t]);
  $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
  $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}
//end song info

fclose($scfp);
}

//display stats
if($streamstatus == "1"){
//you may edit the html below, make sure to keep variable intact
echo'<tr>
<td colspan="3" class="forum-buttons4" valign="middle">
<font color="#FF1010">'.$servertitle.'</font> is now playing <font color="#FF1010">'.$song[0].'</font> on Loyalist Bears Radio
</td>
</tr>';
}
if($streamstatus == "0")
{
//you may edit the html below, make sure to keep variable intact
echo'';
}
?>

<tr>
   <td colspan="2" id="content" width="100%" valign="top">
   <!-- BEGIN switch_user_logged_in -->
   <div class="popup{PRIVMSG_IMG}"><a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a></div>
   <!-- END switch_user_logged_in -->


2

overall_footer

Code: Select all
</td>
   <td valign="top" id="content">
   

<table width="170" cellspacing="0" class="forumline">
<tr>
<td class="row-header"><span>Navagation</span></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="main.php">Home</a></td>
</tr>

<tr>
<th>Interactive</th>
</tr> 
<tr>
<td class="row1h row-forum" width="100%"> • <a href="index.php">Forums</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="chat.php">Chatroom</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="guestbook.php">Guestbook</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="toplist.php">Topsites</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="activity.php">Games Arcade</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="{U_KB}">{L_KB}</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="radio.php">LB Radio</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="shop.php">LB Shop</a></td>
</tr>

<tr>
<th>Miscellaneous</th>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="downloads.php">Downloads</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="wall.php">Graffiti Wall</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="links.php">Links</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="advert.php">Advertising</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="contact.php">Contact Us</a></td>
</tr>

<tr>
<th>Band Information</th>
</tr> 
<tr>
<td class="row1h row-forum" width="100%"> • <a href="flutenotes.php">Flute Notes</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="kb.php?mode=cat&cat=7">Parade/Concert Reports</a></td>
</tr>

<tr>
<th>Rangers</th>
</tr> 
<tr>
<td class="row1h row-forum" width="100%"> • <a href="disaster.php">The Ibrox Disaster</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="honnorsr.php">Honours List</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="kb.php?mode=cat&cat=6">Match Reports</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="table.php">SPL Table</a></td>
</tr>

<tr>
<th>Loyalist Information</th>
</tr> 
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalistinfo.php#1">UVF/YCV History</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalistinfo.php#2">UVF Roll Of Honour</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalistinfo.php#3">UDA/UFF History</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalistinfo.php#4">UDA Roll Of Honour</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalistinfo.php#5">LVF History</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalistinfo.php#6">OV History</a></td>
</tr>

<tr>
<th>Loyalist History</th>
</tr> 
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalisthistory.php#BOTB">Battle of the Boyne</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalisthistory.php#SOD">Siege of Derry</a></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%"> • <a href="loyalisthistory.php#BOTS">Battle of the Somme</a></td>
</tr>
</table>

<table width="170" cellspacing="0" class="forumline">
<tr>
<td class="row-header" colspan="5"><span>SPL Table</span></td>
</tr>

<?php
   
include 'variables.php';

?>

<tr>
<th>#</th>
<th>Team</th>
<th>P</th>
<th>GD</th>
<th>Pts</th>
</tr> 
<tr>
<td class="row1h row-forum" width="100%" align="center"><b>1</b></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub1; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub1p; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub1gd; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub1pts; ?></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%" align="center">2</td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub2; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub2p; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub2gd; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub2pts; ?></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%" align="center">3</td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub3; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub3p; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub3gd; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub3pts; ?></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%" align="center">4</td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub4; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub4p; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub4gd; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub4pts; ?></td>
</tr>
<tr>
<td class="row1h row-forum" width="100%" align="center">5</td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub5; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub5p; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub5gd; ?></td>
<td class="row1h row-forum" width="100%" align="center"><?php print $tableclub5pts; ?></td>
</tr>

<tr>
<th colspan="5"><a href="table.php">View Full Table<a/></th>
</tr>

</table>

<table width="170" cellspacing="0" class="forumline">
<tr>
<td class="row-header" colspan="5"><span>Last Match</span></td>
</tr>
<tr>
<th><?php print $date; ?></th>
</tr> 
<tr>
<td class="row1"><center><span class="copyright2"><?php print $competition; ?></span>
<br>
<?php print $hometeam; ?> <span class="pagination"><?php print $hometeamscore; ?></span>
<br>
<span class="pagination">V</span>
<br>
<?php print $awayteam; ?> <span class="pagination"><?php print $awayteamscore; ?></span>
</center>
</td>
</tr>
</table>


<table width="170" cellspacing="0" class="forumline">
<tr>
<td class="row-header" colspan="5"><span>Next Match</span></td>
</tr>
<tr>
<th><?php print $nextdate; ?></th>
</tr> 
<tr>
<td class="row1"><center><span class="copyright2"><?php print $nextcompetition; ?></span>
<br>
<?php print $nexthometeam; ?>
<br>
<span class="pagination">V</span>
<br>
<?php print $nextawayteam; ?>
</center>
</td>
</tr>
</table>

<table width="170" cellspacing="0" cellpadding="0">
<tr>
<td><br><center>
<a href="toplist.php">
<img src="../images/ad.gif" />
</a>
</center>
</td>
</tr>
</table>

   </td>
</tr>
<tr>
<td align="center" colspan="3" class="copyright2">{ADMIN_LINK}</td>
</tr>
<tr>
   <td colspan="3" id="copyright">
   <a target="_blank" href="http://www.loyalistbears.co.uk/phpbb13/mods/toplist_mod/dload.php?id=1"><img border="0" src="http://www.loyalistbears.co.uk/phpbb13/mods/toplist_mod/image.php?id=1"></a><br><br>
   Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> {PHPBB_VERSION} &copy; phpBB Group<br />
   Design by <a href="http://www.phpbbstyles.com" target="_blank">phpBBStyles.com</a> | <a href="http://www.stylesdb.com" target="_blank">StylesDB.com</a><br />
Content &copy; <a href="http://www.loyalistbears.co.uk" target="_blank">Loyalist Bears.co.uk</a><br/>
Implementation of and coding for extra modifications in this phpBB by &copy; <a href="http://www.kvfb.co.uk" target="_blank">KVFB97</a>
   </td>
</tr>
</table>
</body>
</html>
Tip: Don't argue with idiots, they'll drag you down to their level and beat you with experience.
User avatar
kvfb97
Registered User
Registered User
 
Posts: 1774
Joined: Mon Aug 02, 2004 8:18 am
Location: Northern Ireland, UK

Postby pentapenguin on Wed Mar 30, 2005 5:04 pm

That's definately important. ;)
Have you seen this article about adding a banner to PHP?
It should give you a start.
I got to go now, but if you still need help, just say! :)
User avatar
pentapenguin
Moderator
Moderator
 
Posts: 1466
Joined: Tue Sep 14, 2004 4:15 pm
Location: Georgia, USA

Postby kvfb97 on Wed Mar 30, 2005 5:28 pm

[quote user="pentapenguin" post="26253"]That's definately important. ;)
Have you seen this article about adding a banner to PHP?
It should give you a start.
I got to go now, but if you still need help, just say! :)[/quote]

but it rotates 3 banners....
Tip: Don't argue with idiots, they'll drag you down to their level and beat you with experience.
User avatar
kvfb97
Registered User
Registered User
 
Posts: 1774
Joined: Mon Aug 02, 2004 8:18 am
Location: Northern Ireland, UK

Postby pentapenguin on Fri Apr 01, 2005 6:53 am

Give me the weekend and I'll see if I can fix XS instead.
I think it's a bug with the caching so we'll see. ;)
User avatar
pentapenguin
Moderator
Moderator
 
Posts: 1466
Joined: Tue Sep 14, 2004 4:15 pm
Location: Georgia, USA

Postby kvfb97 on Fri Apr 01, 2005 10:40 am

[quote user="pentapenguin" post="26452"]Give me the weekend and I'll see if I can fix XS instead.
I think it's a bug with the caching so we'll see. ;)[/quote]

Sim ply the BEST! :D 8)
Tip: Don't argue with idiots, they'll drag you down to their level and beat you with experience.
User avatar
kvfb97
Registered User
Registered User
 
Posts: 1774
Joined: Mon Aug 02, 2004 8:18 am
Location: Northern Ireland, UK

Postby vossen on Mon Jul 04, 2005 6:31 pm

i just upgrate from extreme style 1.01 to xsmod2.21, now i get in the acid burn stats following error:
Code: Select all
Warning: fopen(./modules/cache/explain/e5.html): failed to open stream: Permission denied in /home/mysite/public_html/area51/forum/statistics.php on line 238

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/area51/forum/statistics.php on line 239

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/area51/forum/statistics.php on line 241

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/area51/forum/statistics.php on line 242

i tryed the changes from this topic, but it dit not help, i got worsed, as i could not see the cp :)
any idea what went wrong?
regards
vossen
vossen
Registered User
Registered User
 
Posts: 9
Joined: Mon Jul 04, 2005 6:19 pm

Postby PostBot on Mon Jul 04, 2005 6:57 pm

chmod directory "modules/cache/explain/" to 777.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby vossen on Mon Jul 04, 2005 7:02 pm

it stands on 777, no need to do.
best regards
vossen
vossen
Registered User
Registered User
 
Posts: 9
Joined: Mon Jul 04, 2005 6:19 pm

Postby vossen on Mon Jul 04, 2005 7:08 pm

i changed permission now on e5.html what shows in the error and now the error msg all gone, but the stats bars are gone too.
means the Graph is now numbers and not Graph anymore.
regards
vossen
Registered User
Registered User
 
Posts: 9
Joined: Mon Jul 04, 2005 6:19 pm

Postby DooBDee on Mon Jul 04, 2005 7:12 pm

vossen, i read this problem somewhere else. I think i recal somebody typing 0777 . But there is only three groups, so that must be wrong.
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Postby vossen on Mon Jul 04, 2005 7:23 pm

yep, i do not see where i could typ 0777.
vossen
Registered User
Registered User
 
Posts: 9
Joined: Mon Jul 04, 2005 6:19 pm

Postby vossen on Mon Jul 04, 2005 7:35 pm

someone had the same prob :
http://www.phpbb.com/phpBB/viewtopic.ph ... &start=105
three lines down his solution been:
"delete the cache directory (within the Control Panel or physically). "
i dit this in cp but it dit not change, how do i delete in in file manager?
i delete anything under root/cache/ ?
regards
vossen
Registered User
Registered User
 
Posts: 9
Joined: Mon Jul 04, 2005 6:19 pm

Next

Return to eXtreme Styles mod tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron