View Full Version : banner script required
Can anyone suggest a script, cgi,php or perl which is not mysql.
To run on a windows or linux.
What i want is a script i can place banners or pictures with discriptive text underneath.
To see what kind of script i need please view here
www.uk-shop-and-buy.co.uk
It has to be similar to how site is now, but i do not require any payments from it, so a smple script is all that is required
I thank you all in antisipation of responce
Janet
mysticlighthouse
11-25-2003, 05:15 PM
I may be confused on this (most likely)... but the links are not coming out of a database, so you just want to have a list of them someplace (in another file) and include them on your page?
If that is it, then you could use server side includes.
http://www.sitepronews.com/archives/2003/aug/4.html
httpman
11-25-2003, 06:07 PM
Janet
This could be done with a few simple JavaScript lines, if I understand well what you want to do.
Do you want to have a single file containing the images URLs and associated texts, and then display one or more random banner(s) from this list on as many pages or websites as required ?
By changing the content of this single file, all the sites would then be updated at the same time. Is it your purpose ?
JavaScript runs on the client (the browser), thus avoiding server side includes which are not always turned on.
Jean-Pierre
Hi to both of you and thanks for the reply.
I basically want a shopping cart script, but without the payment part attached to the script.
This would display a number of banners + links 1 under the other, with decriptive text able to be placed under the banner.
Maybe the banners can be seperated by being included in their own boxed section.
At present i have to put a banner to an advertiser on my page and write the text underneath,then i have to add another banner under this one and so on.
When i have finished the page i have to upload it to my site.
Each of my pages would be different banners and text etc.
so if i could find a simple script to be able to add the above in real time from my desktop.
Hope this is a bit clearer.
Once again thank you for your time
Janet
mysticlighthouse
11-26-2003, 01:28 PM
You're basically wanting a content management service. Where you can pick and choose from the banners and "attach" them to each page.
I would suggest going with Macromedia's Contribute 2
http://www.macromedia.com/software/contribute/
It's only like $99 and if you don't know anything about scripting languages, etc than this would probably be the easiest for you because if you just get a script and don't know how to modify it to your exact needs than it just becomes a nusance.
Thanks Mysticlightouse
I have looked at the product from the link you suggested and i will download the trial demo to check it out.
Basically this is exactly what iam looking for, i hope so anyway.
Thanks
Janet
cyanide
11-26-2003, 04:53 PM
Contribute is a good page editor, but
If you really want to manage your banners,
you may want to look for a banner script, www.hotscripts.com
The one I recommend is http://phpadsnew.com (it's free)
Bit of a learning curve, but tons of features and will pretty much track everything
httpman
11-26-2003, 05:06 PM
Janet,
I don't know your level of skill with javaScript, if you know a bit of JavaScript and want to try something for free here is a solution. Don't be afraid by the length if my post : I put a lot of comments here, but the way to use this JavaScript system is very simple.
1- create a script file containing ALL your banners' images, links and text. Here is that script (you have to customize it by adding real URLs, links and texts), and save this script on your web server in a file called, let's say, 'banner_script.js' :
// ---- begining
function display_banners(pageid) {
for(var i in banner) {
if(banner[i].id==pageid) {
document.write(
(banner[i].link ? '<a href="' + banner[i].link + '" target="advert">' : '')
+ '' + banner[i].image + ''
+ (banner[i].link ? '</a>' : '')
+ (banner[i].text ? '
' + banner[i].text + '</p>' : '')
);
}
}
}
function _banner(a,b,c,d) {
this.id=a;
this.image=b;
this.link=c;
this.text=d;
}
var banner=new Array(),c=0;
banner[c++]= new _banner("page_id","image_url","link","text to put under the image");
// ------ end
To fit you needs, you have to put your own banner's parameters in the last line, the one starting with 'banner[c++]=..., where :
page_id is the page where the banner should appear (see below)
image_url is the URL of the banner's image, here it can be an absolute URL starting with 'http://www' etc..., or a relative address to the web page which will display the banner
link is an optionnal target page for the image. If it exists, clicking on the image will open a new window with the target page inside
text to put under the image is an optionnal text to display under the image.
Well, this is your central script, it must include ALL your banners. Easy to maintain : to add new banners in this file, just add new 'banner[c++]= ...' lines. To delete a banner, delete the line. When you make a change to this unique file, all the pages using this system are automatically updated.
2- put those lines on each page where some banners should appear :
<script language="javascript" src="XXXXXX"></script>
<script language="javascript">display_banners("ZZZZ")</script>
where XXXXXX is the URL of the above central script containing all the banners, and ZZZZ is your page ID.
The page ID : to know which banner have to display on which page, each page using this system must have a unique "page id", what means : a unique name, or identifier, as you prefer. Let's say you decide to give one your pages the name 'page1', then above lines to add on this page would be :
<script language="javascript" src="XXXXXX"></script>
<script language="javascript">display_banners("page1")</script>
This will display each banner of the central script where the page_id parameter is set to 'page1', for instance :
banner[c++]= new _banner("page1","image1.gif","http://www.net-createurs.com","What a wonderfull french website");
--------------------
OK ? This script is actually quite simple, if you want to add the same banner on many pages you have to create as many "banner[c++]=..." lines, but before thinking to modify it let's see if it meets your requirements.
I wrote it on the fly, and if it isn't what you are looking for just forget it !... The advantage of JavaScript over others PHP, CGI or Java scripts is that you can easily test it offline, on any PC with a browser.
JP
prateeksha
12-02-2003, 03:24 AM
Hello...
With so many replies, i fail to understand the real problem. but from what i gather, you need a Quotes Script that really displays different quotes from different people.
The quotes are in a text file, and open and random used and displayed in the html. You can do the same for banner. your text file may contain something like that
filename;message
filename;message
NO MYSQL needed
i have created the script in php, you can do the same. if you want the script, please mention i will develop one for you and send it to you.
thanking you
sumeet