http://www.icyphoenix.com/viewtopic.php?f=35&t=3755
-----------------------------------
Xusqui
Wed 05 Mar, 2008 22:41

OT: Activity Mod.
-----------------------------------
Hi, neighbours and friends...

Today I gived a try to activity mod with the premodded files that generously MG released with latest version of IP...

I also know ther is no support for activity mod as it is not part from IP, but I wanna know if someone else have tried it and have had the same error.

When creating the cache files, there is one called "tpl_mg_themes.amod.activity_online_body.php" that has a mistake and I get this error when I try to go to the main activity page (activity.php). I get this error:
[code]Parse error: syntax error, unexpected '}' in /home/katet/public_html/portal2.0/cache/tpl_mg_themes.amod.activity_online_body.php on line 78[/code]

You can try it if you click [url=http://www.ka-tet-corp.com/portal2.0/activity.php]here and login with:

User: Tester
pass: test

So... I've checked the template file which has the following content:

[code]<?php

// eXtreme Styles mod cache. Generated on Wed, 05 Mar 2008 17:29:56 +0100 (time=1204734596)

?><?php

$playing_games_count = ( isset($this->_tpldata['playing_games.']) ) ?  sizeof($this->_tpldata['playing_games.']) : 0;
for ($playing_games_i = 0; $playing_games_i < $playing_games_count; $playing_games_i++)
{
 $playing_games_item = &$this->_tpldata['playing_games.'][$playing_games_i];
 $playing_games_item['S_ROW_COUNT'] = $playing_games_i;
 $playing_games_item['S_NUM_ROWS'] = $playing_games_count;

?>
<div id="online_games_h" style="display: none;">
<?php echo isset($this->vars['IMG_THL']) ? $this->vars['IMG_THL'] : $this->lang('IMG_THL'); ?><?php echo isset($this->vars['IMG_THC']) ? $this->vars['IMG_THC'] : $this->lang('IMG_THC'); ?><img style="padding-top:3px;float:right;cursor:pointer;" src="<?php echo isset($this->vars['IMG_MAXIMISE']) ? $this->vars['IMG_MAXIMISE'] : $this->lang('IMG_MAXIMISE'); ?>" onclick="javascript:ShowHide('online_games','online_games_h','online_games');" alt="<?php echo isset($this->vars['L_SHOW']) ? $this->vars['L_SHOW'] : $this->lang('L_SHOW'); ?>" /><span class="forumlink"><?php echo isset($playing_games_item['ONLINE_TITLE']) ? $playing_games_item['ONLINE_TITLE'] : ''; ?></span><?php echo isset($this->vars['IMG_THR_ALT']) ? $this->vars['IMG_THR_ALT'] : $this->lang('IMG_THR_ALT'); ?><table class="forumlinenb" width="100%" cellspacing="0" cellpadding="0">
<tr><td>&nbsp;</td></tr>
</table><?php echo isset($this->vars['IMG_TFL']) ? $this->vars['IMG_TFL'] : $this->lang('IMG_TFL'); ?><?php echo isset($this->vars['IMG_TFC']) ? $this->vars['IMG_TFC'] : $this->lang('IMG_TFC'); ?><?php echo isset($this->vars['IMG_TFR']) ? $this->vars['IMG_TFR'] : $this->lang('IMG_TFR'); ?>
</div>
<div id="online_games">
<script type="text/javascript">
<!--
tmp = 'online_games';
if(GetCookie(tmp) == '2')
{
	ShowHide('online_games', 'online_games_h', 'online_games');
}
//-->
</script>
<?php echo isset($this->vars['IMG_THL']) ? $this->vars['IMG_THL'] : $this->lang('IMG_THL'); ?><?php echo isset($this->vars['IMG_THC']) ? $this->vars['IMG_THC'] : $this->lang('IMG_THC'); ?><img style="padding-top:3px;float:right;cursor:pointer;" src="<?php echo isset($this->vars['IMG_MINIMISE']) ? $this->vars['IMG_MINIMISE'] : $this->lang('IMG_MINIMISE'); ?>" onclick="javascript:ShowHide('online_games','online_games_h','online_games');" alt="<?php echo isset($this->vars['L_HIDE']) ? $this->vars['L_HIDE'] : $this->lang('L_HIDE'); ?>" /><span class="forumlink"><?php echo isset($playing_games_item['ONLINE_TITLE']) ? $playing_games_item['ONLINE_TITLE'] : ''; ?></span><?php echo isset($this->vars['IMG_THR']) ? $this->vars['IMG_THR'] : $this->lang('IMG_THR'); ?><table class="forumlinenb" width="100%" cellspacing="0" cellpadding="0">
<tr><td class="row1" colspan="2"><span class="gensmall"><?php echo isset($playing_games_item['CURRENTLY_PLAYING1']) ? $playing_games_item['CURRENTLY_PLAYING1'] : ''; ?><?php echo isset($playing_games_item['TOTAL_M_PLAYING']) ? $playing_games_item['TOTAL_M_PLAYING'] : ''; ?><?php echo isset($playing_games_item['CURRENTLY_PLAYING2']) ? $playing_games_item['CURRENTLY_PLAYING2'] : ''; ?><br /><?php echo isset($playing_games_item['CURRENTLY_PLAYING5']) ? $playing_games_item['CURRENTLY_PLAYING5'] : ''; ?><br /><?php echo isset($playing_games_item['CURRENTLY_PLAYING3']) ? $playing_games_item['CURRENTLY_PLAYING3'] : ''; ?><?php echo isset($playing_games_item['TOTAL_G_PLAYING']) ? $playing_games_item['TOTAL_G_PLAYING'] : ''; ?><?php echo isset($playing_games_item['CURRENTLY_PLAYING4']) ? $playing_games_item['CURRENTLY_PLAYING4'] : ''; ?><br /><?php echo isset($playing_games_item['MAIN_COLOR1']) ? $playing_games_item['MAIN_COLOR1'] : ''; ?><?php echo isset($playing_games_item['MAIN_SEPERATOR']) ? $playing_games_item['MAIN_SEPERATOR'] : ''; ?><?php echo isset($playing_games_item['MAIN_COLOR2']) ? $playing_games_item['MAIN_COLOR2'] : ''; ?><br /></span></td></tr>
<?php

} // END playing_games

if(isset($playing_games_item)) { unset($playing_games_item); } 

?>
<?php

$playing_count = ( isset($this->_tpldata['playing.']) ) ?  sizeof($this->_tpldata['playing.']) : 0;
for ($playing_i = 0; $playing_i < $playing_count; $playing_i++)
{
 $playing_item = &$this->_tpldata['playing.'][$playing_i];
 $playing_item['S_ROW_COUNT'] = $playing_i;
 $playing_item['S_NUM_ROWS'] = $playing_count;

?>
<tr><td class="row1" colspan="2"><span class="gensmall"><?php echo isset($playing_item['USER_NUMBER']) ? $playing_item['USER_NUMBER'] : ''; ?><?php echo isset($playing_item['USERNAME']) ? $playing_item['USERNAME'] : ''; ?><?php echo isset($playing_item['MAIN_SEPERATOR']) ? $playing_item['MAIN_SEPERATOR'] : ''; ?>
<?php

} // END playing

if(isset($playing_item)) { unset($playing_item); } 

?>
<?php

$playing_games_count = ( isset($this->_tpldata['playing_games.']) ) ?  sizeof($this->_tpldata['playing_games.']) : 0;
for ($playing_games_i = 0; $playing_games_i < $playing_games_count; $playing_games_i++)
{
 $playing_games_item = &$this->_tpldata['playing_games.'][$playing_games_i];
 $playing_games_item['S_ROW_COUNT'] = $playing_games_i;
 $playing_games_item['S_NUM_ROWS'] = $playing_games_count;

?>
</span></td></tr>
<?php

} // END playing_games

if(isset($playing_games_item)) { unset($playing_games_item); } 

?>
</div>
<?php

} // END playing_games

if(isset($playing_games_item)) { unset($playing_games_item); } 

?>
</table><?php echo isset($this->vars['IMG_TFL']) ? $this->vars['IMG_TFL'] : $this->lang('IMG_TFL'); ?><?php echo isset($this->vars['IMG_TFC']) ? $this->vars['IMG_TFC'] : $this->lang('IMG_TFC'); ?><?php echo isset($this->vars['IMG_TFR']) ? $this->vars['IMG_TFR'] : $this->lang('IMG_TFR'); ?>
</div>[/code]

Checked with a php editor (phpDesigner 2008), it says that line 78 has a systax error: Unexpected "}". So if I comment that line and reupload the file to de cache folder it works fine, but whe the cache is renewed, it fails again...

Anyone has the same problem?

Thanks in advance!


-----------------------------------
Xusqui
Thu 06 Mar, 2008 14:07

Re: OT: Activity Mod.
-----------------------------------
As we say in spanish [spoiler]Yo me soy Don Juan Palomo... Yo me lo guiso, yo me lo como[/spoiler]

Here's the solution.

Open IP_ROOT/templates/ANY_TEMPLATE/amod/activity_online_body

FIND (end of the file)  [code]<!-- BEGIN playing -->
<tr><td class="row1" colspan="2"><span class="gensmall">{playing.USER_NUMBER}{playing.USERNAME}{playing.MAIN_SEPERATOR}
<!-- END playing -->
<!-- BEGIN playing_games -->
</span></td></tr>
<!-- END playing_games -->
</div>
<!-- END playing_games -->
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
</div>[/code]

REPLACE WITH [code]<!-- BEGIN playing -->
<tr><td class="row1" colspan="2"><span class="gensmall">{playing.USER_NUMBER}{playing.USERNAME}{playing.MAIN_SEPERATOR}
<!-- END playing -->
<!-- BEGIN playing_games -->
</span></td></tr>
<!-- END playing_games -->
</div>
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
</div>[/code]

Now it works... I think the original template is wrong, as it has en extra <!-- END playing_games--> tag that is the one givin' problems...

Yoohoo!!! I got it!!


-----------------------------------
xmenfile
Thu 06 Mar, 2008 14:24

Re: OT: Activity Mod.
-----------------------------------
I did not get this error at all. my works fine :mryellow:


-----------------------------------
KasLimon
Thu 06 Mar, 2008 17:44

Re: OT: Activity Mod.
-----------------------------------
Maybe it would be faster to clean cache :lol: 

Greetings!


-----------------------------------
ThE KuKa
Thu 06 Mar, 2008 19:15

Re: OT: Activity Mod.
-----------------------------------
Edit to SOLVED thanks Xusqui :wink:


-----------------------------------
Xusqui
Thu 06 Mar, 2008 21:20

Re: SOLVED - OT: Activity Mod.
-----------------------------------
Maybe if you have checked for the cache system to fix template error you don't have this error... Could it be xmenfile?

Greetz!


