Advanced search  

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]

Pages: [1]   Go Down

Author Topic: HELP!!!! I'm trying to ad a button in the site and I get an error  (Read 2424 times)

0 Members and 1 Guest are viewing this topic.

gummiro

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
HELP!!!! I'm trying to ad a button in the site and I get an error
« 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
« Last Edit: September 04, 2004, 12:21:07 am by gummiro »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: HELP!!!! I'm trying to ad a button in the site and I get an error
« Reply #1 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.
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: HELP!!!! I'm trying to ad a button in the site and I get an error
« Reply #2 on: September 04, 2004, 11:07:00 am »

If you're trying to add just a link, why don't you just find
Code: [Select]
// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
in theme.php and add after it
Code: [Select]
<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
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 15 queries.