Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
Maclain
Regular
Regular



Joined: Feb 25, 2006
Posts: 60
Location: England

PostPosted: Mon May 12, 2008 1:42 pm Reply with quote

Ok, me again Smile

A site I work on currently has an advertising block which displays one of the clients adverts randomly.

We have all the adverts in one folder, and they are all hosted locally.

We have new clients wanting to advertise, but a lot of our new clients want to be able to see their advert on every page load.

What I am looking at doing, is having a block that will display display all our banners in a column, which are all clickable, but re order them on every page load which should eliminate any "I want to be at the top" arguments.

I understand all the usual, maximum exposure for single ads, pushing the length of the page down and so on, but our sponsors are putting pressure on us to display adverts in this way.

Question is, can a nuke block re order a load of images and keep the hyper links intact?

If so, does anyone know of a block? Or would anyone create one or aid me in doing so?

Any help is greatly appreciated as always!

_________________
Insert funky message here: 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue May 13, 2008 6:22 am Reply with quote

Just to be clear, are you saying that you need a block like my Recommended Sites block on my home page but you simply need to randomly change the order?
 
View user's profile Send private message
Maclain







PostPosted: Tue May 13, 2008 8:41 am Reply with quote

Thats the one raven,

I don't need the scrolling, as I intend on having all banners lined up one under the other.

I just need the order they are displayed in being random on each page load.

P.S. Is the recommended sites block available for download? Or does it come in the RN distro?

Thanks for the reply!
 
Maclain







PostPosted: Wed May 14, 2008 1:18 am Reply with quote

If it makes things any easier on this, I don't need the block to fetch all the images from a specific folder.

I have written a crude block to display all the images with hyperlinks, and I dont have a problem in adding in more to the code as and when they sponsor the site.

It;s just the random bit thats beyond me Smile

Code:


<?php

if (eregi('block-adverts.php', $_SERVER['PHP_SELF'])) {
    Header('Location: index.php');
    die();
}


$content  = "<center>";
$content .= "<p><a href=\"http://yorkshirekoi.co.uk/_launch.php?id=170\" target=\"_blank\"><img src=\"/images/advertising/mholmesmain11-07.jpg\"></a></p>";
$content .= "<br>";
$content .= "<p><a href=\"http://www.selectivekoisales.co.uk/\" target=\"_blank\"><img src=\"/images/advertising/SELECTIVEKOI11-07.jpg\"></a></p>";
$content .= "<br>";
$content .= "<p><a href=\"http://www.absolute-koi.com\" target=\"_blank\"><img src=\"/images/0308.gif\"></a></p>";
$content .= "<br>";
$content .= "<p><a href=\"http://bkksys.co.uk\" target=\"_blank\"><img src=\"/images/koimastersbanner.jpg\"></a></p>";
$content .= "<br>";
$content .= "<p><a href=\"http://www.koiplus.com\" target=\"_blank\"><img src=\"/images/koiplus140408.JPG\"></a></p>";
$content .= "</center>";
$content .= "<br>";
$content .= "<p><font size=\"10\"> Interested in becoming a sponsor? click <a href=\"http://bkksys.co.uk/modules.php?name=Advertising\">HERE</a>.</p></font>";


?>


can be viewed at www.bkksys.co.uk


And I know it looks shocking, but that's how the owners want it :-s
 
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Wed May 14, 2008 5:58 am Reply with quote

I think you will need a bit of javascript, or use PHP to do it.

I found this links which may help: http://codingforums.com/archive/index.php?t-90082.html
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©