| If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below. | |
|
 |
04-08-2004, 02:51 PM
|
#1
|
|
Junior Member
Join Date: Apr 2004
Location: London, UK
Posts: 5
|
Ad rotation question - but it's NOT a banner!
Hi, folks.
While my website uses asp, at the moment really, it's used only to include a couple of columns and header/footer sections.
The calls on each page for the sections in the includes are:
Code:
<!--#include file="includes/header.asp" -->
<!--#include file="includes/affiliate.asp" -->
<!--#include file="includes/footer.asp" -->
Now, here's the problem. In order to rotate the 'affiliate' sales bit on the right column, I'm currently having to re-code the include itself manually. This is obviously time consuming, and limited. It also only presents visitors with one possibility of recommendation, where I could be suggesting several, over all the pages in the site. A rotation of affiliate columns is therefore desireable.
Now, having seen adrotator components for rotating banner adverts, I wondered if something similar can be done for section/include rotation. However, searching (google) has come up blank. All that I could find were references to banner rotation, not include rotation, which is a bit of a let-down.
Bear in mind I'm a coding clutz, and cutting and pasting the coding is about all I'm capable of, has anyone got any ideas?
|
|
|
04-08-2004, 05:24 PM
|
#2
|
|
Junior Member
Join Date: Oct 2002
Location: USA, Fla
Posts: 55
|
Re: Ad rotation question - but it's NOT a banner!
[QUOTE
Now, having seen adrotator components for rotating banner adverts, I wondered if something similar can be done for section/include rotation. However, searching (google) has come up blank. All that I could find were references to banner rotation, not include rotation, which is a bit of a let-down.
[/QUOTE]
adrotator that rotates include files instead of pictures or links. Cool ideal. At this site [url]http://www.w3schools.com/asp/asp_adrotator.asp[/url] they have a nice tutorial on adrotators. There may be something there that you can change or peace together, or there are some good coder that visit this web board one of them may have done something like this before. Anyway good luck and hope you can find a work around.
|
|
|
04-08-2004, 08:07 PM
|
#3
|
|
Junior Member
Join Date: Apr 2004
Location: London, UK
Posts: 5
|
This is the thing, mate: I'm *not* a programmer - looking at anything other than HTML and CSS makes me think I'm looking at Egyptian Hyroglyphics, and gives me a massive headache!
So, on balance, I think I'll wait to be... ahem... spoon fed a little!
Thanks, even so, for the pointer!
|
|
|
04-09-2004, 01:14 AM
|
#4
|
|
Junior Member
Join Date: Apr 2004
Location: London, UK
Posts: 5
|
Whoa! Found it!
Result:
See [url]http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20930359.html[/url]
The search terms that finally drew the result on Google, by the way, were "asp rotate" (sans quotes).
Hope this helps someone else in the same boat!
|
|
|
04-09-2004, 02:14 AM
|
#5
|
|
Junior Member
Join Date: Apr 2004
Location: London, UK
Posts: 5
|
Forget what I just said above.
Ye Gods, this is going to be soooo easy. ASP comes with a component (that I didn't know about) called Content Rotator.
Here's a link with a damned good example: [url]http://builder.com.com/5100-31-5076708.html[/url]
Now to implement it. I'll let you know how I get on!
|
|
|
04-09-2004, 01:46 PM
|
#6
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
Right. Found my original logon details, so I'm back to Redcap again (Moderator - can you delete the "Roger Stenning" account, please?).
Anyhow, back on topic.
I appear to have hit a major problem. The test page hangs. Here are the links. I suggeest you right click and save as, in order to review them!
[url]http://www.practicalairsoft.co.uk/test.asp[/url]
Judging by a previous error with the original script (above post), the error seems to be on line 18 of test.asp.
The text file is at: [url]http://www.practicalairsoft.co.uk/includes/affiliatetest.txt[/url]
All help would be greatfully received.
Reference work link: [url]http://www.w3schools.com/asp/asp_contentrotator.asp[/url]
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
|
|
|
04-10-2004, 02:43 AM
|
#7
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
Hmm. Looks like I've found out why this ain't working: Content Rotator may *not* be loaded on the server. I'm getting onto my hosting provider now by e-mail, to confirm this, and, if true, to get the content rotator component loaded as a matter of urgency.
Not the first time I've found that their 'engineers' have crippled ASPv2 for the sake of an easy life on their part. 
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
|
|
|
04-10-2004, 03:20 PM
|
#8
|
|
Senior Member
Join Date: Sep 2003
Location: Brownsville Texas
Posts: 201
|
Something is not right as it takes forever to load. I have cable so if it takes longer than 2 seconds I'm gone. The other links you posted worked well. People want things yesterday  not having to wait for a page to load even if I click on your signature Roger the load time is looong. Plus the only one came back {the document contains no data}
__________________
Don't let the bigdawg bite!!!
Last edited by bigdawg; 04-10-2004 at 08:39 PM..
|
|
|
04-10-2004, 03:50 PM
|
#9
|
|
Administrator
Join Date: Oct 2002
Location: Canada
Posts: 1,196
|
Roger you old pirate, good to have you back, mate. We could use a little blam blam around here once in a while. And you still owe me a pint, if I remember.
DE
__________________
David Elliott
Ask a better question - get a better answer!
|
|
|
04-10-2004, 04:16 PM
|
#10
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
Quote:
Originally posted by bigdawg
Something is not right as it takes forever to load. I have cable so if it takes longer than 2 seconds I'm gone. The other links you posted worked well. People want things yesterday not having to wait for a page to load even if I click on your signature Roger the load time is looong.
|
Like I said, the bloody thing hangs.
Had it confirmed today from my hosting agent that Content Rotator is *not* loaded. Something to do with the engineers saying it causes server lag, which IMHO is a bunch of hooey. he's getting that fixed, but it doesn't impress me at all. It should have been there ALREADY. I'm seriously thinking about changing hosts, already.
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
|
|
|
04-10-2004, 04:24 PM
|
#11
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
Quote:
Originally posted by DCElliott
Roger you old pirate, good to have you back, mate. We could use a little blam blam around here once in a while. And you still owe me a pint, if I remember.
DE
|
Hiya, mate - nice to be back (now I've remembered my bloody login details, lol)!
Yup: You're ever in the UK, you let me know: The offer's still there!
Currently I'm s.e. London, but this *should* change to Blackpool (Lancashire), hopefully sooner than later, within the next few months (getting hacked off working to exist, rather than working to live, due to London being the most expensive city in Europe).
Anyhooo, back on topic. Here's the idea on rotation, in case anyone's got any ideas on doing without Content Rotator.
I want all pages on the site to alternate the affiliate bar (recommended Amazon links) between four or five choices. I need the code to be tidy, preferably utilising basic ASP commands, rather than relying on the idiot engineers to have done their jobs right in the first place. Remember that I'm a programming dunce, and need this to be easily spoon-fed/implemented, by the way!
Hint: I'm currently using basic ASP include calls to load the header, affiliate, and footer sections of each page; these are called from a folder called (imaginatively) "/includes".
If you want the code for the test pages posted, remember that they'll be damned long, but I CAN do that, if asked.
Ta muchly in advance!
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
|
|
|
04-10-2004, 07:21 PM
|
#12
|
|
Administrator
Join Date: Oct 2002
Location: Canada
Posts: 1,196
|
Trust you to try to come up with a half-ASP solution. Do you want the rotation to be random, or have one in rotation for a period of time (like a session, day, week or whatever)?
Anyhow, check out this link since it may have what you need: [url]http://quadcomm.com/tips/randomfile.asp[/url].
And by the way, the CSS in Airsoft looks a tiny bit buggered up to me - I'll have a bit more of a look when I get the time. Also - I've learned me a few tricks since we last tackled that baby.
DE
__________________
David Elliott
Ask a better question - get a better answer!
|
|
|
04-10-2004, 08:41 PM
|
#13
|
|
Senior Member
Join Date: Sep 2003
Location: Brownsville Texas
Posts: 201
|
Wow I just got the one below your signature to come in so your server must have been down earlier!!! I like it the greens mix well together, the green is nice, lends itself to a military feel but yet is nice for reading. The page is styled for easy and pleasant reading.
__________________
Don't let the bigdawg bite!!!
|
|
|
04-11-2004, 02:12 AM
|
#14
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
DC - Hmm. Looks OK from here, but I'll wait to see what you find out - thanks!
What I'm looking for on the affiliate bar is for each of the four (or however many I eventually get) choices to appear with an equal chance, so that each ad doesn't appear more than once in a row for each different page view. Tricky, huh?
bigdawg - yeah, the server is playing silly buggers every so often: Another reason to look at other hosting providers. Glad you like the format: we spent a LONG time getting it to look right!
EDIT: DC - just looked at the link you provided. Interesting. Not quite sure if it's work right, though, as it seems primarily intended for short banner-like ads; the amount of code I'd be asking it to include might cause problems. Thoughts?
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
Last edited by Redcap; 04-11-2004 at 02:16 AM..
|
|
|
04-11-2004, 02:39 AM
|
#15
|
|
Senior Member
Join Date: Sep 2003
Location: Brownsville Texas
Posts: 201
|
I would definatly look for a new server one that guarentees you 99.5 percent uptime. That could be a pain in the *** if your site is not up. I like how the paragraphs have a margin on both sides that are in this #CECF9C but there is not a margin in#9CCF9C on the right side which would look better if the text did not run up against your adds on the right side. I would also increase your margins a tad.
__________________
Don't let the bigdawg bite!!!
|
|
|
04-11-2004, 06:22 AM
|
#16
|
|
Administrator
Join Date: Oct 2002
Location: Canada
Posts: 1,196
|
Well, from what I understand, the code just takes one file and writes it to another which in turn is brought in in your #include. This workaround is necessary because #includes are executed BEFORE any other code, so you can't pass a variable filename to an #include. What you can do is make a fixed filename have variable content.
I'd be tempted to have the actual randomization be something that runs on a daily basis. You set up the various affiliate #includes by a script that checks for a daily global variable flag that is reset at midnight. The first hit after midnight reinitializes the randomization and writes the necessary files. By doing that just once, there is no performance hit for another 24 hours.
I warn you I have never done ASP although I am familiar with SSI which is a poor cousin. So what I am saying here is based on general programming principles, not any first-hand knowledge.
"Free advice is worth what you pay for it."
DE
__________________
David Elliott
Ask a better question - get a better answer!
|
|
|
04-11-2004, 09:56 AM
|
#17
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
OK, well now have a look over [url=http://www.practicalairsoft.co.uk/]the site[/url] - I was over at my Brother-In-law's today for Easter lunch, and mentioned this problem to him, expecting some sage advice, or pointers of what I could do - instead, he set to, and solved it for me!
He's a Programmer, and worked this out for me in under an hour, including the time it took for him to understand my convoluted explanation of what I needed!
Here's the code, which is a random chance set-up, complete with a cache killer, to make sure that the randomisation isn't lost:
Code:
<%
'For browsers (set expiration date some time well in the past)
Response.Expires = -1000
'For HTTP/1.1 based proxy servers
Response.CacheControl = "no-cache"
'For HTTP/1.0 based proxy servers
Response.AddHeader "Pragma", "no-cache"
Function RandomNumber(intHighestNumber)
Randomize
RandomNumber = Int(Rnd * intHighestNumber) + 1
End Function
dim RandomContentSelector
RandomContentSelector = RandomNumber(4)
Select Case RandomContentSelector
Case 1
%> <!--#include file="Affiliate_1.asp"--> <%
Case 2
%> <!--#include file="Affiliate_2.asp"--> <%
Case 3
%> <!--#include file="Affiliate_3.asp"--> <%
Case 4
%> <!--#include file="Affiliate_4.asp"--> <%
End Select
%>
Granted by his admission that he'd not done *any* VB Script in around a year, so found something close using a google search, then adapted it for me!
EDIT: Forgot to mention: It nests includes, thus reducing the size of the files that have to be interpreted by the ASP server, which is even better for me!
Woo-Hoo! 
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
Last edited by Redcap; 04-11-2004 at 11:40 AM..
|
|
|
04-11-2004, 10:02 AM
|
#18
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
Quote:
Originally posted by bigdawg
I would definatly look for a new server one that guarentees you 99.5 percent uptime. That could be a pain in the *** if your site is not up. I like how the paragraphs have a margin on both sides that are in this #CECF9C but there is not a margin in#9CCF9C on the right side which would look better if the text did not run up against your adds on the right side. I would also increase your margins a tad.
|
Agreed. I'm looking at 1and1.co.uk at the moment; their prices are reasonable, and SLAs look good. Won't happen until after I've moved, and got a broadband line installed, but it'll happen.
I'l look into the borders problem; it's something that's been bugging me for a while. Just haven't found the time (or mental effort required) for a some time, is all.
I'll also look at the margins issue (easy to retify).
Thanks for the advice!
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
|
|
|
04-14-2004, 09:50 PM
|
#19
|
|
Senior Member
Join Date: Feb 2003
Location: London, UK
Posts: 185
|
Quote:
Originally posted by bigdawg
I would definatly look for a new server one that guarentees you 99.5 percent uptime. That could be a pain in the *** if your site is not up. I like how the paragraphs have a margin on both sides that are in this #CECF9C but there is not a margin in#9CCF9C on the right side which would look better if the text did not run up against your adds on the right side. I would also increase your margins a tad.
|
Hmm. OK, well I've been looking at the margins this morning.
Following your advice, I've increased margin-left to 15px, and margin-right to 20px. I can see no discernable changes, in that the text still seems to be running awfully close to the right edge of the amazon/affiliate bar. Thoughts?
Also: I'm getting a wierd black line within the lower two boxes (most noticably in the Amazon iframe, the middle of the three floating boxes), and having examined the code again, cannot see where this thrice-be-damned line is coming from.
The CSS sheet is at [url]http://www.practicalairsoft.co.uk/style-sheets/beta.css[/url], and any help on that one would be appreciated.
Note: The Amazon bar is called by includes; folder structure is
Any help would be gratefully received!
__________________
Best Regards,
Roger Stenning
redcap@practicalairsoft.co.uk
BLAM-BLAM-BLAM-BLAM-BLAM!
"STOP!"
BLAM-BLAM-BLAM-BLAM-BLAM!
"MILITARY POLICE!"
click
"oh****"
Last edited by Redcap; 04-14-2004 at 10:02 PM..
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 08:45 AM.
Powered by vBulletin® Version 3.8.6 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

© Evrsoft.com. All Rights Reserved.
|
|
|