HELP!!!! I'm trying to ad a button in the site and I get an error HELP!!!! I'm trying to ad a button in the site and I get an error
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

HELP!!!! I'm trying to ad a button in the site and I get an error

Started by gummiro, September 04, 2004, 12:15:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gummiro

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

kegobeer

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.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

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