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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Placing an ad after the first post on a page
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 14 January 2006 :  14:30:45  Show Profile  Visit MarkJH's Homepage
I want to place an advert after the first post on a page and on each subsequent page, after the first reply.

Using the information provided here I've added the following code to topic.asp:

			if intI = 0 then
				CColor = strAltForumCellColor
			else
				CColor = strForumCellColor
				end if

				if iForum Mod 25 = 0 then
			if ShowAdOK=TRUE then
				Response.Write GetBanner2(Forum_ID)
			end if
				end if


and in inc_func_common.asp I've created the following function:

function GetBanner2(fID)
'## fID = Forum ID number
        dim strBanner2 :strBanner2 = ""
        select case fID
        		case 56
        				strBanner2 = strBanner2 & "<tr><td class=""profile"" align=""center"" bgcolor=""FFFFFF"" colspan=""" & sGetColspan(6,7) & """>TEST</td></tr>"
        		case else
                        strBanner2 = strBanner2 
         end select
         GetBanner2 = strBanner2
end function


Now, the TEST appears after the first post on the first page but on the second and subsequent pages, it appears before the first reply on that page. How would I make it appear after the first reply on subsequent pages?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 15 January 2006 :  11:00:39  Show Profile  Visit MarcelG's Homepage
Mark, the real first of a topic is retrieved with the GetFirst function, so, in fact, on the first page, the ad is also in front of the first 'reply'.
Move the entire piece of code to this spot:
			intI  = intI + 1
			if intI = 2 then 
				intI = 0
			end if
'HERE
				if iForum Mod 25 = 0 then
			if ShowAdOK=TRUE then
				Response.Write GetBanner2(Forum_ID)
			end if
				end if
		next

portfolio - linkshrinker - oxle - twitter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07