Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 3rd, 1999, 04:37 PM
Marcello
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I need to have a CGI (possibly free) that will be able to simply rotate banners (scheduled through a simple text file) but with the ability to have links too.

All the ones I have found are only Banners (not cliccable) or require SSI includes. I don't want to have pages called shtml.

Any suggestion for a file to look for ?

Thanks

Reply With Quote
  #2  
Old August 3rd, 1999, 11:09 PM
rycamor
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I don't have a CGI solution for you, but if you have access to the server config files, you can edit them to make .HTML files server-parseable.

A less elegant solution that I once used myself is a Javascript function that rotates or randomly selects images from a list. It would be a little more trouble to update your list than a simple text file, but if you use an external .js file, it could be a fairly workable situation.

Reply With Quote
  #3  
Old August 4th, 1999, 12:36 PM
Marcello
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Thanks for ansering.

I don't know if I have access to config file. It could be but I think the answer is no. In any case I don't know how to do it.

What I rewally need is something wich LIVE creates HTML page (sometimes banners would be mine, other by ad companies)

Thanks anyway.

Can you email me JS source if ready) just to look at ?

Reply With Quote
  #4  
Old August 6th, 1999, 04:56 AM
dahamsta
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
This is one of the better banner ad solutions around, although it has become a litle bloated in recent times:

www.awsd.com/script/webadverts

You can call banners through SSI or Non-SSI with this script, and you can add/edit/remove banners through an administration panel. A manky looking admin panel, but it's free/share, so how bad.

adam

[This message has been edited by dahamsta (edited 08-06-99).]

Reply With Quote
  #5  
Old August 6th, 1999, 11:53 AM
rycamor
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Marcello,

The JS source to the banner ad rotation script is:

<script language="javascript">

<!-- Image Selector
// Cameron Gregory - cameron@bloke.com
// http://www.bloke.com/
// http://www.bloke.com/javascript/Random/
// http://www.bloke.com/javascript/Random/link.html
// This line and about must remain .. then you can use it for free...
//
// ChangeLog
//
//
// Sat Sep 21 16:36:47 EDT 1996
// Added associate URL list.
//
// Fri Sep 13 18:36:20 EDT 1996
// Created from the base of Selector()
//
// Usage:
// RandomImage(images)
// RandomImageLong(images,iparams)
// RandomImageLink(images,urls)
// RandomImageLinkLong(images,urls,iparams)
// images is space or comma separated file list
// urls is space or comma separated list of url's
// iparams params to add to <img>

function RandomImageLong(images,iparams)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
si = 0;
ci=0;
cc=0;
imageSet = new Array();
ei = images.length;
for (i=1;i<ei;i++) {
if (images.charAt(i) == ' ' | | images.charAt(i) == ',') {
imageSet[cc] = images.substring(si,i);
cc++;
si=i+1;
}
}
ind = Math.floor(Math.random() *cc);
document.writeln("<img "+iparams+" src="+imageSet[ind]+" alt=""+imageSet[ind]+"">");
}

function RandomImage(images)
{
RandomImageLong(images," ");
}

function RandomImageLinkLong(images,urls,iparams)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
imageSet = new Array();
urlSet = new Array();
si = 0;
ci=0;
cc=0;
ei = images.length;
for (i=1;i<ei;i++) {
if (images.charAt(i) == ' ' | | images.charAt(i) == ',') {
imageSet[cc] = images.substring(si,i);
cc++;
si=i+1;
}
}
ind = Math.floor(Math.random() *cc);
si = 0;
ci=0;
cc=0;
ei = urls.length;
for (i=1;i<ei && cc <=ind ;i++) {
if (urls.charAt(i) == ' ' | | urls.charAt(i) == ',') {
urlSet[cc] = urls.substring(si,i);
cc++;
si=i+1;
}
}

//document.writeln("<img "+iparams+" src="+imageSet[ind]+" alt=""+imageSet[ind]+"">");
document.writeln("<a href=""+urlSet[ind]+""><img "+iparams+" src="+imageSet[ind]+" alt=""+imageSet[ind]+""></a>");
}

function RandomImageLink(images,urls)
{
RandomImageLinkLong(images,urls,"border=0");
}

// End Script -->

</script>

You then reference it in your HTML by:

<script language="javascript">
RandomImageLink("banner1.gif banner2.gif banner3.gif ","http://www.link1.com http://www.link2.com http://www.link3.com ");
</script>

(adding as many banners and links as you want)

Reply With Quote
  #6  
Old August 6th, 1999, 12:30 PM
Marcello
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Thank you very much both

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Suggestion for CGI for banners no SSI


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway