Help - Search - Members - Calendar
Full Version: question with a code
Weborum Webmaster Forum > Web Page Design > PHP
_^KaI^_
hihi, im trying 2 modific a theme, and i have a question.

this is ok??



function themesidebox($title, $content) {
$left = blocks(left)
$right = blocks(right)

if($left) {
$tmpl_file = "themes/LTX_Skin/block-left.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
else

{$tmpl_file = "themes/LTX_Skin/block-right.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}


if isnt, can u help me??

this is a screen with "my work"

http://img41.echo.cx/my.php?image=adelanto0tq.gif

pd: i want 2 make diferents the blocks in the left and the blocks in the right like this http://img41.echo.cx/my.php?image=ltxlayout7rk.gif
pacmanjnr
hmmmmm look's ok to me from here but the again i would ask leo but i am posative i have seen that site u have put link's(well the pic's) before i think i sure it on a game site
Joe
$left = blocks(left);
$right = blocks(right);

... just a wild stab in the dark here.
_^KaI^_
thanks biggrin.gif

yeah its a game site of my clan xD i play soldat xD
_^KaI^_
i have this error

Parse error: parse error in c:\appserv\www\php-nuke\themes\DeepBlue\theme.php on line 203


CODE
function themesidebox($title, $content) {
       $left = "blocks(left)";
       $right = "blocks(right)";

   if($left) {
$tmpl_file = "themes/LTX_Skin/block-left.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
else

{$tmpl_file = "themes/LTX_Skin/block-right.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}


?>



?> is line 203

what its wrong?
Timo
You never close the function.

-Tim
_^KaI^_
how can i close it?
sjthomas
QUOTE(_^KaI^_ @ Apr 16 2005, 09:57 PM)
how can i close it?
[right][snapback]26855[/snapback][/right]


You need an extra "}". Your code should be like this:
PHP
<?php
function themesidebox($title, $content) {
       
$left = "blocks(left)";
       
$right = "blocks(right)";

   if(
$left) {
$tmpl_file = "themes/LTX_Skin/block-left.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."&#092;";";
eval($thefile);
print
$r_file;
}
else

{
$tmpl_file = "themes/LTX_Skin/block-right.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."&#092;";";
eval($thefile);
print
$r_file;
}
}

?>

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.