Jump to content

How to add php banner to home page or block?


Recommended Posts

Hi,
I have a html/php page:

<html>
   <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    
   </head><body>
<?php
   $nameOfSlideshowToDisplay = "z";
   $URLofyoursite = "...";
   $AbsoluteServerPathofyoursite = "...";
   include_once($AbsoluteServerPathofyoursite.".../z.php");
?>
</body></html>

The "..." is working path.
If I start it in IE, the page is working, but i do not how to insert the code in home.tpl or other .tpl. I try in header.php, but then it is visible on every page.
Please help me to adding this banner.

Link to comment
Share on other sites

You can use a module to add the code..
If i add the code in module, do not see anything. I try with:
AddHeader v0.1.0
Home text editor v1.5
Block advertising v0.1
HOME Free block v1.1

I wont to try "{if $page_name == ‘index’} {/if}", but I do not know how. Maybe i should put the code between} {, or somewhere.. The result is
Fatal error: Smarty error: [in /...header.tpl line 15]: syntax error: unidentified token '�index�' (Smarty_Compiler.class.php, line 1410) in...


Plese if not your problem, write me all of the code to put in .tpl

Thanks.

Link to comment
Share on other sites

No sorry, the banner is not displayed.
I try many combinations, if the code is inside php tag, no errors, but and not displayed. If i purposely wrong.. just text displayed.

Where i wrong?

{if $page_name == 'index'}{php}
   $nameOfSlideshowToDisplay = "z";
   $URLofyoursite = "...";
   $AbsoluteServerPathofyoursite = "/...";
   include_once($AbsoluteServerPathofyoursite."/...");
{/php}{/if}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...