TinyPortal

Development => Block Codes => Topic started by: gerrymo on October 21, 2006, 01:12:02 PM

Title: Random Banners
Post by: gerrymo on October 21, 2006, 01:12:02 PM
This is not exactly a block code snippet, but can be used in a block. This zip will give you randomly selected banners from a text file. Everything needed is in the zip.
Title: Re: Random Banners
Post by: G6Cad on October 21, 2006, 02:26:07 PM
Great snippet gerrymo :)
Title: Re: Random Banners
Post by: akulion on October 21, 2006, 02:48:48 PM
Thanks gerry - hey I tried using this with the PHP include function earlier on my site but ran into some issues.

I am guessing it is directly related to myserver since the script uses Fopen URL's and my server dosent allow it :(

Title: Re: Random Banners
Post by: gerrymo on October 21, 2006, 04:39:00 PM
This works simpoly by using an iFrame to display the php file that runs it all. It couldn't be simpler.

I'm still trying to get it to display random html files, but no success yet.
Title: Re: Random Banners
Post by: akulion on October 21, 2006, 04:55:36 PM
I was looking at it and it should work with random html files as well

but u will have to put the ENTIRE code for the file in a single line in the txt file

the instructions said: this will display anything you put in it so you can use basic html as well.

however there amy be issues with the height and width of the frames :up:
Title: Re: Random Banners
Post by: rctxtreme on October 21, 2006, 09:29:26 PM
I'll be happily using Ad Management until I can think of some way that the block will appear on all pages...
Title: Re: Random Banners
Post by: gerrymo on October 21, 2006, 10:06:19 PM
Quote from: rctxtreme on October 21, 2006, 09:29:26 PM
I'll be happily using Ad Management until I can think of some way that the block will appear on all pages...

You can code it into your site files to show on all pages. I simply add the code into atricles where I want the ads to show. Pretty simple really.