Silviu
12-13-2009, 08:56 AM
Hello everyone,
Recently we've decided to implement Google Ads in our forums and, as a first step, we used this hack - https://vborg.vbsupport.ru/showthread.php?t=222389
Now, instead of [maxposts] == 1 we used 2, so the ad will always be displayed in the second reply on the page.
However, there's a "snag" with the Quote BBCode, as seen in attachment #1:
The problem is represented by the quote table width, which by default is 100%. If we were to change this to, say, 76%, the issue would be solved - see attachment #2.
The second "however" comes from the fact that we don't want to globally change the Quote BB Code, just for the second reply on every page.
To that end, we went to
Admin CP -> Styles & Templates -> Style Manager -> ? ? -> BB Code Layout Templates -> bbcode_quote
And tried to use the following conditional for the main table:
<if condition="$post['postcount'] % $vboptions['maxposts'] == 2">
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="76%">
<else />
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%">
</if>Unfortunately, the quote output is still always displayed with 100% width, which means that we haven't set the conditional correctly :(
So, the two main questions are:
1. Can vBulletin conditionals even be used in BB Code templates?
2. If so / not, is there any way to overcome this problem? :confused:
Recently we've decided to implement Google Ads in our forums and, as a first step, we used this hack - https://vborg.vbsupport.ru/showthread.php?t=222389
Now, instead of [maxposts] == 1 we used 2, so the ad will always be displayed in the second reply on the page.
However, there's a "snag" with the Quote BBCode, as seen in attachment #1:
The problem is represented by the quote table width, which by default is 100%. If we were to change this to, say, 76%, the issue would be solved - see attachment #2.
The second "however" comes from the fact that we don't want to globally change the Quote BB Code, just for the second reply on every page.
To that end, we went to
Admin CP -> Styles & Templates -> Style Manager -> ? ? -> BB Code Layout Templates -> bbcode_quote
And tried to use the following conditional for the main table:
<if condition="$post['postcount'] % $vboptions['maxposts'] == 2">
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="76%">
<else />
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%">
</if>Unfortunately, the quote output is still always displayed with 100% width, which means that we haven't set the conditional correctly :(
So, the two main questions are:
1. Can vBulletin conditionals even be used in BB Code templates?
2. If so / not, is there any way to overcome this problem? :confused: