Coinbase

Author Topic: How to add custom Html/php script  (Read 2960 times)

0 Members and 1 Guest are viewing this topic.

Offline nackgr

  • Newbie
  • *
  • Posts: 1
    • Email
How to add custom Html/php script
« on: May 11, 2009, 02:09:23 am »
I want to add at the bottom of the page this this type of ad

when i add  it  above the freefotos banner at forumakias.gr the outline template crash  crash  ... wtf? :/

smf 1.1.8
theme  outline template
site forumakias.gr


I want to add one of those scripts  so i can have more than one banners to the same spot and to be sawn randomly  after refresh
Code: [Select]
<SCRIPT>

<!-- written by The Omega

//   http://members.xoom.com/the_omega/

//   the_omega@geocities.com

// You must leave these comments in to use the script

//  (hey, I wrote it. Let me have a little credit!)



// put info for randomly selected banners here, as in the examples

gfx0="http://www.forumakias.gr/img/banner03.jpg";

lnk0="www.forumakias.gr";

alt0="Alt code 1";

txt0="";

gfx1="http://freefotos.gr/images/tmkx7sxngw1brun93fp.gif";

lnk1="http://freefotos.gr";

alt1="Alt code 2";

txt1="";

gfx2="http://www.forumakias.gr/img/adw.gif";

lnk2="http://www.adworksprime.gr";

alt2="Alt code 3";

txt2="";

len=3;  // change to equal number of banners



today=new Date();

today=Math.round(today.getTime()/10);

rnd=today%len;

document.writeln('<A HREF="'+eval("lnk"+rnd)+'"><IMG SRC="'+eval("gfx"+rnd)+'" ALT="'+eval("alt"+rnd)+'"><BR>'+eval("txt"+rnd)+'</A>');

//-->

</SCRIPT>



I found  a php too but i dont know how to put it

Code: [Select]
<?php
$num 
rand(1,9);
if(
$num == 1){
$src "pics/logo1.jpg";
alt "Logo1";
$href "main.php";
}elseif(
$num == 2){
$src "pics/logo2.jpg";
alt "Logo2";
$href "index.php";
}elseif(
$num == 3){
$src "pics/logo3.jpg";
alt "Logo3";
$href "products.php";
}elseif(
$num == 4){
$src "pics/logo4.jpg";
alt "Logo4";
$href "contact.php";}
?>





κώδικας:

<?php
echo "<a href=\"$href\"><img src=\"$src\" alt=\"$alt\" width="73" height="113" /></a>"
?>
« Last Edit: May 11, 2009, 02:11:18 am by nackgr »

Offline PureThree

  • Newbie
  • *
  • Posts: 1
    • Email
Re: How to add custom Html/php script
« Reply #1 on: June 01, 2009, 02:26:23 am »
I think this code will be a big help in my work .,I am so glad that I read this thread.,



_________________
affordable SEO companies | thatcom



SMF Ads Support Forum

Re: How to add custom Html/php script
« Reply #1 on: June 01, 2009, 02:26:23 am »
.

 

.