php banners

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
harl
-


Joined: 23 Jan 2006
Posts: 62

PostPosted: Thu Mar 23, 2006 5:24 am    Post subject: php banners Reply with quote

i was woundering if anyone knows of a free way of having a banner rotation through php?


thank
_________________
www.Officialbass.com
A subdivision of Official Instrument

Selling products for bassist, by bassists

Chord Finders
Scale Finders
Basics
and more to come
www.officialbass.com
Back to top View user's profile Send private message Visit poster's website
soulm8sflyff
-


Joined: 18 Feb 2006
Posts: 52

PostPosted: Thu Mar 23, 2006 5:36 am    Post subject: Reply with quote

You mean like my problem before? The random banner everytime you refresh or changing every 5 secs or so?
_________________
"It is better to have only two ideas and one of them is wrong, than to have loads of right ideas but NONE OF THEM ARE YOURS!" - Soul
Back to top View user's profile Send private message Send e-mail Visit poster's website
harl
-


Joined: 23 Jan 2006
Posts: 62

PostPosted: Thu Mar 23, 2006 5:41 am    Post subject: Reply with quote

thats exactly what im talking about, like everytime you refresh, a different banner on the page shows up
_________________
www.Officialbass.com
A subdivision of Official Instrument

Selling products for bassist, by bassists

Chord Finders
Scale Finders
Basics
and more to come
www.officialbass.com
Back to top View user's profile Send private message Visit poster's website
soulm8sflyff
-


Joined: 18 Feb 2006
Posts: 52

PostPosted: Thu Mar 23, 2006 6:08 am    Post subject: Reply with quote

OK, I made a tutorial about that here. Hope it helps. Cheers! :)
_________________
"It is better to have only two ideas and one of them is wrong, than to have loads of right ideas but NONE OF THEM ARE YOURS!" - Soul
Back to top View user's profile Send private message Send e-mail Visit poster's website
jibbajabba
-


Joined: 06 Sep 2005
Posts: 241
Location: England, Doncaster

PostPosted: Thu Mar 23, 2006 2:07 pm    Post subject: Reply with quote

i use a javascript version of a banner rotator. code below if anyone uses it.

Code:

<script language="Javascript">
<!--
// original content taken from Nic's JavaScript Page with permission
// lack of these three lines will result in copyright infringment
// made by: Nic's JavaScript Page - http://www.javascript-page.com

var currentdate = 0;
var core = 0;

function initArray() {

this.length = initArray.arguments.length;
  for (var i = 0; i < this.length; i++) {
  this[i] = initArray.arguments[i];
  }
}

link = new initArray(
"http://www.sitename.com/",
"http://www.sitename.com/",
"http://www.sitename.com/",
"http://www.sitename.com/",
"http://www.sitename.com/",
"http://www.sitename.com/"
);

image = new initArray(
"http://www.sitename.com/banners/image1.gif",
"http://www.sitename.com/banners/image2.jpg",
"http://www.sitename.com/banners/image3.gif",
"http://www.sitename.com/banners/image4.gif",
"http://www.sitename.com/banners/image5.jpg",
"http://www.sitename.com/banners/image6.gif"
);

text = new initArray(
"Some text goes here",
"Example.. a site about php",
"sitename.com",
"free avatars for forums",
"quality webhosting for 5.50",
"php tutorials"
);

var currentdate = new Date();
var core = currentdate.getSeconds() % image.length;
var ranlink  = link[core];
var ranimage = image[core];
var rantext  = text[core];

document.write('<a href=\"' +ranlink+ '\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');

//-->
</SCRIPT>


Note: add or remove as many lines as you want but make sure on the last line dont include this >>> ,

You can also get a php banner rotator if you searched around :)
_________________
http://www.jibba-jabba.net | http://www.mosthauntedforum.com
Back to top View user's profile Send private message Visit poster's website
harl
-


Joined: 23 Jan 2006
Posts: 62

PostPosted: Thu Mar 23, 2006 4:44 pm    Post subject: Reply with quote

soulm8sflyff wrote:
OK, I made a tutorial about that here. Hope it helps. Cheers! :)


ok, i like that, but its now working :(

and is there a way to put in .swf or .mov, because i made flash movies that i would rather use
_________________
www.Officialbass.com
A subdivision of Official Instrument

Selling products for bassist, by bassists

Chord Finders
Scale Finders
Basics
and more to come
www.officialbass.com
Back to top View user's profile Send private message Visit poster's website
soulm8sflyff
-


Joined: 18 Feb 2006
Posts: 52

PostPosted: Thu Mar 23, 2006 8:43 pm    Post subject: Reply with quote

Dude then use the .swf code. If image code is

Code:
<a href="buyme.php"><img src="/pics/banner1_advert.gif" border="0"></a>
<a href="buyme.php"><img src="/pics/banner2_advert" border="0"></a>


Try this for the .swf:

Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="200">
                        <param name="movie" value="pics/banner1_advert.swf">
                        <param name="quality" value="high">
                        <embed src="pics/banner1_advert.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="200"></embed>
                  </object>


Or something like that. Depends on your .swf. I think there's a different code for every .swf file. Not so sure. And, check the path/source of your .swf. But then, I dunno how to make a link with a .swf where in you can click it to link to a page. I know there's a way. Just dont know how.
_________________
"It is better to have only two ideas and one of them is wrong, than to have loads of right ideas but NONE OF THEM ARE YOURS!" - Soul
Back to top View user's profile Send private message Send e-mail Visit poster's website
harl
-


Joined: 23 Jan 2006
Posts: 62

PostPosted: Fri Mar 24, 2006 1:17 am    Post subject: Reply with quote

i chose to do it for a .mov file, so this is what i got, and its not working...

(note: all of the files are in my root folder, not in a folder within)

this is in the random.txt files
Code:

<a href="http://www.officialbass.com/downloadbasschordfinder.htm"><embed src="chordfinderad.mov" width="120" height="600"></embed></a>


this is in the random.php file
Code:

<?php

$random = "random.txt";

$fp = file($random);
srand((double)microtime()*1000000);
$rl = $fp[array_rand($fp)];
echo $rl;
?>


and this is what i put into my html file to get to the random.php (does it matter if its in a layer?)
Code:

<?php include("http://www.officialbass.com/random.php"); ?>



that what it say'd to do in your tutorial thing, so what about my stuff is wrong?
_________________
www.Officialbass.com
A subdivision of Official Instrument

Selling products for bassist, by bassists

Chord Finders
Scale Finders
Basics
and more to come
www.officialbass.com
Back to top View user's profile Send private message Visit poster's website
soulm8sflyff
-


Joined: 18 Feb 2006
Posts: 52

PostPosted: Fri Mar 24, 2006 1:43 am    Post subject: Reply with quote

What type is your page? html or php?

Oh right, you're using htm right? Try using php. I think it wont work if you're using htm, (I think)

Well I tried using different files from mov to swf, from mpeg to 3gp and it works fine for me. Try using php for all of your pages. I use php and not html. It's easy to change just open your html with notepad and save it as php. i.e. open index.html with notepad and save it as index.php. I'm sure you know that. Just making it clear.
_________________
"It is better to have only two ideas and one of them is wrong, than to have loads of right ideas but NONE OF THEM ARE YOURS!" - Soul
Back to top View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group