Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
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  Topic Next Topic  

Etymon
Advanced Member

United States
2383 Posts

Posted - 09 September 2020 :  09:01:12  Show Profile  Visit Etymon's Homepage  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.

https://www.vbforums.com/showthread.php?886491-Mswc-adrotator-does-not-create-object-With-iis10-in-classic-asp

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:

[INSERT]
CONFIG_NEW
(C_VARIABLE,C_VALUE)#('strARUploadPath','Adverts')
(C_VARIABLE,C_VALUE)#('strARAdvertHeight','468')
(C_VARIABLE,C_VALUE)#('strARAdvertWidth','60')
[END]
<-

SnitzBitz Advert Rotator MOD link is below:

http://www.snitzbitz.com/mods/details.asp?Version=All&mid=164

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 ... https://forum.snitz.com/classicforum/search.asp

Edited by - Etymon on 09 September 2020 10:42:14

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 02 November 2022 :  07:41:54  Show Profile  Reply with Quote
I didn't go that route, Ety. I wrote an entirely different advertising package for the modular forum. Here's the info from the admin's page:

Like the Site Integration mod, adds header, right/left borders and (potentially) a footer to the forum. Allows forum administrators to specify width (minimum 245) or height of frames and to specify content from provided options and/or insert their own: whether links, static text, or an iframe.

Note: Pages included here can, themselves, further include/call content from still other pages. However, to do so, you must make changes to the IntegMe function in "inc_func_common.asp". The RSS page incorporates code from feed.mikle.com. To add similar pages, use the same format as the RSS page (but using ElseIf). Using this method, you can then control location (left/right panel/frame) and placement by the form on "admin_site_includes.asp" without further code modification.

If strRIURL = "includes/inc_site_rss.asp" Then
%><!--#INCLUDE FILE="inc_site_rss.asp"--><%
[highlight]ElseIf strRIURL = "(your page)" Then
%><!--#INCLUDE FILE="(your page)"--><%[/highlight]

In addition, adds the ability for forum administrators to add advertisers, specifying URL, image height/width, telephone, etc. Individual advertisements can target specific groups (e.g. teens, teen males, teen females, adult males, adult females, all males, all females, seniors). In such cases, the advertisements will only be shown to members of such groups. The default is everyone. Administrators can designate banner(s) to be displayed in the header, or smaller advertisements in the left or right margins. Expiration dates for advertisements are also included. If an advertisement has expired, it will automatically be prevented from display.

If someone clicks an advertisement, the link will first collect their information (for advertisement interest tracking) before opening a new page to the advertisement URL. To ensure compliance with the new European Union (and those of California) privacy laws, if a member chooses to not allow personal information to be collected, he/she can "opt out" using the checkbox in the profile. In this case, only non-personally-identifiable information would be collected (e.g.. city/state/country, operating system).

If no advertisements are active and there is no other content in a frame, that frame will not be displayed (e.g., a banner ad in the header expires, the header disappears). Administrators can use this version exactly like "Site Integration", until an advertisement is active, no difference will be visible.
Go to Top of Page

Etymon
Advanced Member

United States
2383 Posts

Posted - 02 November 2022 :  19:38:01  Show Profile  Visit Etymon's Homepage  Reply with Quote
Wow! Very nice, Carefree! Good job! Is that mod with your coded forum version or at SnitzBitz or at ... ?
Go to Top of Page
   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.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07