Hey guys i could do with some help. As you can see from this site http://www.champlegals.co.uk What im trying to setup is ads that refresh across from my banner. I found a script and it works manually but the php includes doenst seem to be coming up. Also i dont want it centered how can i get it across from my logo, ive entered the include there. this is the script: <?php srand ((double) microtime( )*1000000); $numbanners = 2; $banner = rand(0,$numbanners); echo "<table align=center class=maincats bgcolor=white width=468><tr><td>"; include ("./banners/$banner.html"); echo "</td></tr></table>"; ?> Code (markup): and this the php include: <?php include("http://www.champlegals.co.uk/revolver/banners.php"); ?> If you go to the link you'll see it works although it is centered which i dont wnat. Anyhelp is appreciated
<?php srand ((double) microtime( )*1000000); $numbanners = 2; $banner = rand(0,$numbanners); echo "<table class=maincats bgcolor=white width=468><tr><td>"; include ("./banners/$banner.html"); echo "</td></tr></table>"; ?> PHP: It should work that way since when I got to www. champlegals.co.uk/revolver/banners.php I can see the banner
Yeah lik i say when you go to the address you say it works fine. But it doesnt seem to otherwise, any ideas man?
try this. <?php srand ((double) microtime( )*1000000); $numbanners = 2; $banner = rand(0,$numbanners); echo "<table class=maincats bgcolor=white align=right width=468><tr><td>"; include ("http://www.champlegals.co.uk/revolver/banners.php"); echo "</td></tr></table>"; ?> PHP: edited the url
sorry, for posting useless code. Use this code in your banners file <?php srand ((double) microtime( )*1000000); $numbanners = 2; $banner = rand(0,$numbanners); echo "<table class=maincats bgcolor=white align=right width=468><tr><td>"; include ("./banners/$banner.html"); echo "</td></tr></table>"; ?> PHP: include this file using the correct path like: if you want to include on main page, use this code: <?php include("revolver/banners.php"); ?> and if you want to put banner on other file like on some sub directory, use this <?php include("../revolver/banners.php"); ?>
hey mate sadly its still not working with those updated additions. My source code can be checked and im using the php include and ive updated the banner file. This is confusing. Appreciate your time again thanks.
i caught your error mate, you're trying to include this thing in some other extension file, like something .tpl or etc.. thats why it is not working. You should add this on some .php page. Php code cannot be seen in source code. EDITED: check this link, it will help you on how to do it. LINK
But i need it across from the banner so will this not work? And if so where could i find a workable script that i can add any javascript, image code etc.
Just seen your link nice one man thanks. So do i just add the php include to make a plugin? Cheers again
If i had any money id be willing to pay someone to show me how to make the plugin that matches my script. I just tried but cant make head nor tail of it.
I added the banner script in the previous post Now you don't have to make a include you just have the request the script in a image tag. The bannerscript acts like he is a image
Will that work with some javascript ads, and normal image ads? EDIT: I dont think that script will work as it has no place to put the ad links or the javascript ads, thanks anyway. Still looking for some help creating a plugin for my script.
it the best you can get atm. The only way to get it working now is to modify it. since you can't use PHP in the templates.
I have no php knowledge or i would thanks anyway. Im sure how to make a plugin to match my script is very simple but again have no knowledge.
<?php $ran = rand(1, 5); $link = yourpagehere.$ran; $img = images\yourbannerhere.$ran; echo "<html><head></head><body><a href=\"$link\"><img src=\"$img\" boder=\"0\"></a></body></html>"; ?> there ya go bro