<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gog&#039;s info &#187; vbulletin</title>
	<atom:link href="http://gogs.info/tag/vbulletin/feed/" rel="self" type="application/rss+xml" />
	<link>http://gogs.info</link>
	<description></description>
	<lastBuildDate>Wed, 27 Apr 2011 15:02:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Blank page after a quick reply (vBulletin)</title>
		<link>http://gogs.info/2010/03/blank-page-after-a-quick-reply-vbulletin/</link>
		<comments>http://gogs.info/2010/03/blank-page-after-a-quick-reply-vbulletin/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 19:02:00 +0000</pubDate>
		<dc:creator>Goran Jurić</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[vbulletin]]></category>

		<guid isPermaLink="false">http://gogs.info/?p=128</guid>
		<description><![CDATA[While launching the Google Adsense on Gameplay and its forum (vBulletin 3.8) we ran into a strange issue while posting quick reply messages to the forum with Firefox. After hitting submit the page turned blank although the comment was apparently posted. We have integrated our Adsense code into the postbit vBulletin template after the last [...]]]></description>
			<content:encoded><![CDATA[<p>While launching the Google Adsense on <a href="http://www.gameplay.hr/">Gameplay</a> and its forum (vBulletin 3.8) we ran into a strange issue while posting quick reply messages to the forum with Firefox. After hitting submit the page turned blank although the comment was apparently posted.</p>
<p>We have integrated our Adsense code into the postbit vBulletin template after the last post on the page using this syntax:</p>
<pre class="xml"><span class="sc3"><span class="re1">&lt;if</span> <span class="re0">condition</span>=<span class="st0">&quot;$post['islastshown']&quot;</span><span class="re2">&gt;</span></span>
     Adsense code here.
<span class="sc3"><span class="re1">&lt;/if<span class="re2">&gt;</span></span></span></pre>
<p>The problem happend because Quick Reply uses asynchronous javascript to submit the reply and render the new reply at the and of the page. Since we are embedding the Adsense code if the post is &#8220;last shown&#8221; this renderd the Google Adsense code twice and FF &#8220;broke&#8221;.</p>
<p>The fix is quite simple, you just have to check if the post is being sent as a response to the asynchronous request, so the new and working code looks like this:</p>
<pre class="xml">
<span class="sc3"><span class="re1">&lt;if</span> <span class="re0">condition</span>=<span class="st0">&quot;$post['islastshown'] AND !$GLOBALS['vbulletin']-&gt;</span></span>GPC['ajax']&quot;&gt;
    Adsense code here.
<span class="sc3"><span class="re1">&lt;/if<span class="re2">&gt;</span></span></span></pre>
<p>Of course this is not the only case which causes vBulletin forum to render a blank page. For a list of other possible reasons take a look at <a href="http://www.vbulletin.com/docs/html/blank_pages">this chapter in the  official documentation</a>.</p>
<p>If you are interested you can also take a look at this exhaustive <a href="http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html">list of conditionals</a> which you can use in your vBulletin templates.</p>
]]></content:encoded>
			<wfw:commentRss>http://gogs.info/2010/03/blank-page-after-a-quick-reply-vbulletin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

