coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: gummiro on September 04, 2004, 12:15:34 AM

Title: HELP!!!! I'm trying to ad a button in the site and I get an error
Post by: gummiro on September 04, 2004, 12:15:34 AM
When I ad this in theme.php at the top :
21.   $template_linkur_forum = <<<EOT
22.  
23.    if (!$_SERVER['HTTP_HOST']} {
24.     $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
25.   } else {
26.     $cpg_host=$_SERVER['HTTP_HOST'];
27.   }
28.   $cpg_path='/va';
29.
30.      <a href="http://".$cpg_host.$cpg_path><img src="themes/classic/images/forum.gif" alt="" border="0" /><br /></a>

I get this error :
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

pointing to line 23

Can anyone help me plz
Title: Re: HELP!!!! I'm trying to ad a button in the site and I get an error
Post by: kegobeer on September 04, 2004, 02:30:37 AM
You can't put any php statements inside of the <<EOT.  It's a template that will be evaluated as html.  Look at the rest of the template statements - see the stuff in the curly brackets {AAAA}?  Those are variable placeholders where php variables will be put.  If you look thru the classic.php file you will see those variables set inside of a huge array.  You need to do all the php stuff somewhere else, then put the variables inside of the array.

If you study the code for a while you should figure it out.
Title: Re: HELP!!!! I'm trying to ad a button in the site and I get an error
Post by: Joachim Müller on September 04, 2004, 11:07:00 AM
If you're trying to add just a link, why don't you just find// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
in theme.php and add after it<a href="yourpage.htm" title="your tooltip"><img src="yourimage.gif" border="0" alt="" /></a>
What is the code you're trying to insert meant to do?

Joachim