The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I'm interested in finding out how i can automate a snipit of code to pop in-between every so many posts for ad space.
Any help would be appreciated.
Thank
tony
<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" />
Any help would be appreciated.
Thank
tony
<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" />
Last edited by Shaggy on 04 September 2009, 04:48
Posted
Have you tried putting inside of a div tag? You could do something like <div align="center">Your Content</div>
Posted
Originally posted by leatherlips
Have you tried putting inside of a div tag? You could do something like <div align="center">Your Content</div>
yea, it didn't seem to work...
Posted
Have you tried putting a simple align tag in:
if ( iForum Mod 3 = 0 ) then
Response.Write "<tr>" & VbCrLf & _
" <td bgcolor=""" & CColor & """ align=""center"" valign=""top"" width=""" & strTopicWidthLeft & """ colspan=""3"">" & VbCrLf %>
<!--#INCLUDE FILE="midpost.html"--><%
Response.Write " </td>" & VbCrLf & _
"</tr>"
end if
if ( iForum Mod 3 = 0 ) then
Response.Write "<tr>" & VbCrLf & _
" <td bgcolor=""" & CColor & """ align=""center"" valign=""top"" width=""" & strTopicWidthLeft & """ colspan=""3"">" & VbCrLf %>
<!--#INCLUDE FILE="midpost.html"--><%
Response.Write " </td>" & VbCrLf & _
"</tr>"
end if
Cheers,
David Greening
David Greening
Posted
the proper css rule if using a div is
.googleads { width: 100%; text-align: center; }
you can easily add this into your midpost.html file.
the problem you had when inserting the Google Code in your code is the breakin's, you have to break each line in VBScript, the include file is always the best way to go as it turns your script much more accessible for later updates.
.googleads { width: 100%; text-align: center; }
you can easily add this into your midpost.html file.
the problem you had when inserting the Google Code in your code is the breakin's, you have to break each line in VBScript, the include file is always the best way to go as it turns your script much more accessible for later updates.
Bruno Alexandre
(Strøby, DANMARK)
"a Portuguese in Danmark"
MOD's contribution to Snitz community * Facebook Module *
RSS Snitz Multiple Feed *
Online videos (Youtube, Google video, Flash, Quicktime, etc) *
Add avatar with image crop (on the fly) *
Show last messages in the forum *
Show how many messages since yours IN PAGE TITLE *
Updated version of Gender MOD *
Fly to the top instead of jumping *
an idea: iPhone version of Snitz
<mySnitzForum>GAPE</mySnitzForum>
(Strøby, DANMARK)
"a Portuguese in Danmark"
MOD's contribution to Snitz community * Facebook Module *
RSS Snitz Multiple Feed *
Online videos (Youtube, Google video, Flash, Quicktime, etc) *
Add avatar with image crop (on the fly) *
Show last messages in the forum *
Show how many messages since yours IN PAGE TITLE *
Updated version of Gender MOD *
Fly to the top instead of jumping *
an idea: iPhone version of Snitz
<mySnitzForum>GAPE</mySnitzForum>
Posted
hi.. Good day to all.... :)
how can u make ads appear only once or twice?... and if a forum topic reaches 2 or 4 pages, how can u make ads appear once or twice per page?... coz what i remember with Google adsence TOS, u can only have maximum of 3 ads displayed in a page.
how can u make ads appear only once or twice?... and if a forum topic reaches 2 or 4 pages, how can u make ads appear once or twice per page?... coz what i remember with Google adsence TOS, u can only have maximum of 3 ads displayed in a page.
Posted
easy, instead of
if ( iForum mod 2 = 0 ) ... witch says: every time 2nd time use:
if ( iForum mod cInt( (iReplyCount + 1) / (ads2show + 1) ) = 0 ) ...
witch will say something like:
divide the number of posts by the ads to show plus 1, plus 1 so we put the ad in the middle and not at the end.
remember to add, if using the variable,
dim ads2show in the config.asp file
work:
4 replies to a post, and we want to add 2 ads:
5 / 3 = 1.666 (cInt will convert to 2 - so, every 2)
1 - post
2 - 1st reply
------------------ AD
3 - 2nd reply
4 - 3rd reply
------------------ AD
5 - 4th reply
if ( iForum mod 2 = 0 ) ... witch says: every time 2nd time use:
if ( iForum mod cInt( (iReplyCount + 1) / (ads2show + 1) ) = 0 ) ...
witch will say something like:
divide the number of posts by the ads to show plus 1, plus 1 so we put the ad in the middle and not at the end.
remember to add, if using the variable,
dim ads2show in the config.asp file
work:
4 replies to a post, and we want to add 2 ads:
5 / 3 = 1.666 (cInt will convert to 2 - so, every 2)
1 - post
2 - 1st reply
------------------ AD
3 - 2nd reply
4 - 3rd reply
------------------ AD
5 - 4th reply
Bruno Alexandre
(Strøby, DANMARK)
"a Portuguese in Danmark"
MOD's contribution to Snitz community * Facebook Module *
RSS Snitz Multiple Feed *
Online videos (Youtube, Google video, Flash, Quicktime, etc) *
Add avatar with image crop (on the fly) *
Show last messages in the forum *
Show how many messages since yours IN PAGE TITLE *
Updated version of Gender MOD *
Fly to the top instead of jumping *
an idea: iPhone version of Snitz
<mySnitzForum>GAPE</mySnitzForum>
(Strøby, DANMARK)
"a Portuguese in Danmark"
MOD's contribution to Snitz community * Facebook Module *
RSS Snitz Multiple Feed *
Online videos (Youtube, Google video, Flash, Quicktime, etc) *
Add avatar with image crop (on the fly) *
Show last messages in the forum *
Show how many messages since yours IN PAGE TITLE *
Updated version of Gender MOD *
Fly to the top instead of jumping *
an idea: iPhone version of Snitz
<mySnitzForum>GAPE</mySnitzForum>
Last edited by balexandre on 05 September 2009, 21:22
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...