Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Advert Rotator
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Advanced Member

United States
2360 Posts

Posted - 09 September 2020 :  09:01:12  Show Profile  Reply with Quote
I came across an interesting workaround for the Advert Rotator for at least part of restored functionality for rotating ads in the Advert Rotator MOD.

The GetAdvertisement functionality was a part of the MSWC.Rotator that was part of that earlier version of IIS. When the MSWC.Rotator was no longer offered via Microsoft, then the GetAdvertisment functionality ceased to function.

The partial work around in the link below doesn't fix reading and acting upon the first four lines in the ad_schedule.txt file in the Advert Rotator MOD because that is what the GetAdvertisement section was designed to read (I think).

So this person created a function for it instead and called it:

Function getAdvertisement(af)

In the link below, in the code, change:

<% Response.Write(getAdvertisement("ads.txt")) %>

to ...

<% Response.Write(getAdvertisement("ad_schedule.txt")) %>

Then when naming the file containing the new code itself, you could call it whatever you want. It could be the same as the old inc_adrotator.asp or something new.

If you want to blend the code from both files (the old inc_adrotator.asp and this new code in whatever file you choose to name it), then you could do that as well.

The original code pulls a function called AdvertList(af) from inc_func_advert.asp within a subroutine found in ad_rotator.asp called DisplayAdvert().

The query from function AdvertList() loops through the records of existing advertisers.

I don't think the Advert Rotator MOD has an actual way of benchmarking the frequency section as it does not have code to record such a thing. Perhaps the original MSWC.Rotator did that.

Code is found in the second reply down in the thread.

Also of significant note:

In the download for the Advert Rotator MOD found on SnitzBitz ... in the dbs file ... at the end of that code ... there is an additional space that you can't see.

It'll throw your MOD Setup (Admin section) into a tailspin with it ending in a time out. Make sure you delete that trailing space in the code.

I've included the offending part of the code below where the <- points to the hidden space:


SnitzBitz Advert Rotator MOD link is below:

Lastly ...

The Advert Rotator MOD does not give complete instructions such as adding permissions to the folder you choose in the Advert Configuration's Upload Path: such as the recommended "Adverts" as is in the dbs file.

As mentioned above about the Rotator from IIS not working, the other Advert Configuration features do not work either.

Advert Height:
Advert Width:
Advert Border:

The file ad_schedule.txt is not automatically created either. You have to create that yourself.

There are other oddities you'll need to look for here at Snitz.

Do a search in the Archives for the Advert Rotator MOD here at Snitz. I still prefer using the classic forum here at Snitz, so here is the link to the classic search ...

Edited by - Etymon on 09 September 2020 10:42:14
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07