Template error

Support for PhpBB3.
Post here to get help with any phpBB3 related issue
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
If not your topic may be ignored or locked!

Template error

Post by Fire-Fox »

Can anybody tell me what whent wrong (can't remember what i last did)
Parse error: syntax error, unexpected '}' in /var/www/phpbb3addons.com/cache/tpl_se-pro_ucp_agreement.html.php on line 41

Code: Select all

<?php if (!defined('IN_PHPBB')) exit; $this->_tpl_include('overall_header.html'); if ($this->_rootref['S_SHOW_COPPA'] || $this->_rootref['S_REGISTRATION']) {  ?>


	<div class="clear"></div>

<?php } ?>


	<form method="post" action="<?php echo (isset($this->_rootref['S_UCP_ACTION'])) ? $this->_rootref['S_UCP_ACTION'] : ''; ?>" id="agreement">

	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
		<div class="content">
			<h2><?php echo (isset($this->_rootref['SITENAME'])) ? $this->_rootref['SITENAME'] : ''; ?> - <?php echo ((isset($this->_rootref['L_REGISTRATION'])) ? $this->_rootref['L_REGISTRATION'] : ((isset($user->lang['REGISTRATION'])) ? $user->lang['REGISTRATION'] : '{ REGISTRATION }')); ?></h2>
			<p><?php if ($this->_rootref['S_SHOW_COPPA']) {  echo ((isset($this->_rootref['L_COPPA_BIRTHDAY'])) ? $this->_rootref['L_COPPA_BIRTHDAY'] : ((isset($user->lang['COPPA_BIRTHDAY'])) ? $user->lang['COPPA_BIRTHDAY'] : '{ COPPA_BIRTHDAY }')); } else { echo ((isset($this->_rootref['L_TERMS_OF_USE'])) ? $this->_rootref['L_TERMS_OF_USE'] : ((isset($user->lang['TERMS_OF_USE'])) ? $user->lang['TERMS_OF_USE'] : '{ TERMS_OF_USE }')); } ?></p>
		</div>
		<span class="corners-bottom"><span></span></span></div>
	</div>

	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
		<fieldset class="submit-buttons">
			<?php if ($this->_rootref['S_SHOW_COPPA']) {  ?>

			<strong><a href="<?php echo (isset($this->_rootref['U_COPPA_NO'])) ? $this->_rootref['U_COPPA_NO'] : ''; ?>" class="button1"><?php echo ((isset($this->_rootref['L_COPPA_NO'])) ? $this->_rootref['L_COPPA_NO'] : ((isset($user->lang['COPPA_NO'])) ? $user->lang['COPPA_NO'] : '{ COPPA_NO }')); ?></a></strong>&nbsp; <a href="<?php echo (isset($this->_rootref['U_COPPA_YES'])) ? $this->_rootref['U_COPPA_YES'] : ''; ?>" class="button2"><?php echo ((isset($this->_rootref['L_COPPA_YES'])) ? $this->_rootref['L_COPPA_YES'] : ((isset($user->lang['COPPA_YES'])) ? $user->lang['COPPA_YES'] : '{ COPPA_YES }')); ?></a>
			<?php } else { ?>

			<input type="submit" name="agreed" id="agreed" value="<?php echo ((isset($this->_rootref['L_AGREE'])) ? $this->_rootref['L_AGREE'] : ((isset($user->lang['AGREE'])) ? $user->lang['AGREE'] : '{ AGREE }')); ?>" class="button1" />&nbsp;
			<input type="submit" name="not_agreed" value="<?php echo ((isset($this->_rootref['L_NOT_AGREE'])) ? $this->_rootref['L_NOT_AGREE'] : ((isset($user->lang['NOT_AGREE'])) ? $user->lang['NOT_AGREE'] : '{ NOT_AGREE }')); ?>" class="button2" />
			<?php } ?>

			<?php echo (isset($this->_rootref['S_HIDDEN_FIELDS'])) ? $this->_rootref['S_HIDDEN_FIELDS'] : ''; ?>

			<?php echo (isset($this->_rootref['S_FORM_TOKEN'])) ? $this->_rootref['S_FORM_TOKEN'] : ''; ?>

		</fieldset>
		<span class="corners-bottom"><span></span></span></div>
	</div>
	</form>

<?php } else if ($this->_rootref['S_AGREEMENT']) {  ?>


	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
		<div class="content">
			<h2><?php echo (isset($this->_rootref['SITENAME'])) ? $this->_rootref['SITENAME'] : ''; ?> - <?php echo (isset($this->_rootref['AGREEMENT_TITLE'])) ? $this->_rootref['AGREEMENT_TITLE'] : ''; ?></h2>
			<p><?php echo (isset($this->_rootref['AGREEMENT_TEXT'])) ? $this->_rootref['AGREEMENT_TEXT'] : ''; ?></p>
			<hr class="dashed" />
			<p><a href="<?php echo (isset($this->_rootref['U_BACK'])) ? $this->_rootref['U_BACK'] : ''; ?>" class="button2"><?php echo ((isset($this->_rootref['L_BACK'])) ? $this->_rootref['L_BACK'] : ((isset($user->lang['BACK'])) ? $user->lang['BACK'] : '{ BACK }')); ?></a></p>
		</div>
		<span class="corners-bottom"><span></span></span></div>
	</div>

<?php } $this->_tpl_include('overall_footer.html'); ?>

Re: Template error

Post by Stoker »

You are looking in the wrong file.
Look at ucp_agreement.html
Its a small file so just compare it to a fresh ucp_agreement.html file.

Re: Template error

Post by Fire-Fox »

Yes i know. but i postet the "cache" file to show what it adds to the bottom on the file....

If i change from :

Code: Select all

<?php } else if ($this->_rootref['S_AGREEMENT']) {  ?>


	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
		<div class="content">
			<h2><?php echo (isset($this->_rootref['SITENAME'])) ? $this->_rootref['SITENAME'] : ''; ?> - <?php echo (isset($this->_rootref['AGREEMENT_TITLE'])) ? $this->_rootref['AGREEMENT_TITLE'] : ''; ?></h2>
			<p><?php echo (isset($this->_rootref['AGREEMENT_TEXT'])) ? $this->_rootref['AGREEMENT_TEXT'] : ''; ?></p>
			<hr class="dashed" />
			<p><a href="<?php echo (isset($this->_rootref['U_BACK'])) ? $this->_rootref['U_BACK'] : ''; ?>" class="button2"><?php echo ((isset($this->_rootref['L_BACK'])) ? $this->_rootref['L_BACK'] : ((isset($user->lang['BACK'])) ? $user->lang['BACK'] : '{ BACK }')); ?></a></p>
		</div>
		<span class="corners-bottom"><span></span></span></div>
	</div>

<?php } $this->_tpl_include('overall_footer.html'); ?>
To this:

Code: Select all

<?php ($this->_rootref['S_AGREEMENT'])  ?>
<?php $this->_tpl_include('overall_footer.html'); ?>
The site is working until next purge cache

and the error follows all templates
Last edited by Fire-Fox on 27 Apr 2010, 19:34, edited 1 time in total.

Re: Template error

Post by Stoker »

I will kill the next user that talks about editing cache files!!!

Any particular reason for not following my advice?

Re: Template error

Post by Fire-Fox »

I did follow what you said :) i even uploaded a fresh copy of the file, an nothing happend :( same error

[edit]It's when i press "register" Parse error: syntax error, unexpected '}' in /var/www/phpbb3addons.com/includes/template.php(230) : eval()'d code on line 41[/edit]
Last edited by Fire-Fox on 27 Apr 2010, 19:53, edited 2 times in total.

Re: Template error

Post by Stoker »

Did you refresh the template and purge cache after uploading the fresh file?

Re: Template error

Post by Fire-Fox »

Yes i did
[edit]I'll just start from scratch tomorrow. thats life :)[/edit]

Re: Template error

Post by cisco007 »

if you uploaded a new file and still get that error, and you purged the cache! i suggest trying to delete all the files in the cache file except the index and .htacces files!

And i think Fire-Fox you have been hanging out with Oliver if you are trying to modify cache files! :lol:

Re: Template error

Post by Fire-Fox »

Got it working again :)