<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - Announcements for guests only]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/21506/"/>
	<updated>2009-04-18T08:23:03Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/21506/announcements-for-guests-only/</id>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126927/#p126927"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Tieguy wrote:</cite><blockquote><p>Didn&#039;t think the absence of the else would effect anything.</p></blockquote></div><p>To be honest, in general, it doesn&#039;t cause too much of a problem. It&#039;s just that Opera does tend to punish one for any minor mistakes. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> The &#039;&lt;pun_guest_message&gt;&#039; would have been left in the page source when the page was created and a user was logged in. It technically became a start tag with no closing tag.</p><p>The reason I have an overly keen eye for these things is that I run all of my code in XHTML1.1 mode, which is served as XML rather than HTML. Hence, anything like that will just prevent the page rendering completely in XML compliant browsers. As you can probably guess, I have to be rather paranoid about making sure every piece of output is perfect. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> Even something as minor as a missing double quote will prevent the page from rendering.</p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2009-04-18T08:23:03Z</updated>
			<id>http://punbb.informer.com/forums/post/126927/#p126927</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126887/#p126887"/>
			<content type="html"><![CDATA[<p>Sorry for missing that bit. <img src="http://punbb.informer.com/forums/img/smilies/tongue.png" width="15" height="15" alt="tongue" />&nbsp; Didn&#039;t think the absence of the else would effect anything.</p>]]></content>
			<author>
				<name><![CDATA[Tieguy]]></name>
				<uri>http://punbb.informer.com/forums/user/12667/</uri>
			</author>
			<updated>2009-04-16T23:25:17Z</updated>
			<id>http://punbb.informer.com/forums/post/126887/#p126887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126884/#p126884"/>
			<content type="html"><![CDATA[<p>Glad to hear that sorted it. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2009-04-16T22:40:50Z</updated>
			<id>http://punbb.informer.com/forums/post/126884/#p126884</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126875/#p126875"/>
			<content type="html"><![CDATA[<p>Ah, perfect!&nbsp; Thank you so much!&nbsp; <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></content>
			<author>
				<name><![CDATA[Ottens]]></name>
				<uri>http://punbb.informer.com/forums/user/12307/</uri>
			</author>
			<updated>2009-04-16T18:30:34Z</updated>
			<id>http://punbb.informer.com/forums/post/126875/#p126875</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126874/#p126874"/>
			<content type="html"><![CDATA[<p>Bugger. Just looked at that code above again. I&#039;ve got ballbearings for eyes today. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> Change the end of that code from:</p><div class="codebox"><pre><code>&lt;?php
    
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace(&#039;&lt;pun_guest_message&gt;&#039;, $tpl_temp, $tpl_main);
    ob_end_clean();
}</code></pre></div><p>to:</p><div class="codebox"><pre><code>&lt;?php
    
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace(&#039;&lt;pun_guest_message&gt;&#039;, $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
{
    $tpl_main = str_replace(&#039;&lt;pun_guest_message&gt;&#039;, &#039;&#039;, $tpl_main);
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2009-04-16T18:28:11Z</updated>
			<id>http://punbb.informer.com/forums/post/126874/#p126874</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126873/#p126873"/>
			<content type="html"><![CDATA[<p><a href="http://www.ottens.co.uk/lounge">http://www.ottens.co.uk/lounge</a> </p><p>The stylesheet is at <a href="http://www.ottens.co.uk/lounge/style/Gatehouse.css">http://www.ottens.co.uk/lounge/style/Gatehouse.css</a></p>]]></content>
			<author>
				<name><![CDATA[Ottens]]></name>
				<uri>http://punbb.informer.com/forums/user/12307/</uri>
			</author>
			<updated>2009-04-16T18:24:55Z</updated>
			<id>http://punbb.informer.com/forums/post/126873/#p126873</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126872/#p126872"/>
			<content type="html"><![CDATA[<p>The link to your site?</p><p>Edit: Scrub that. Managed to see it in the screenshot. Enable the guest message again if you could.</p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2009-04-16T18:21:44Z</updated>
			<id>http://punbb.informer.com/forums/post/126872/#p126872</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126870/#p126870"/>
			<content type="html"><![CDATA[<p>Hmm... doesn&#039;t seem to work..</p>]]></content>
			<author>
				<name><![CDATA[Ottens]]></name>
				<uri>http://punbb.informer.com/forums/user/12307/</uri>
			</author>
			<updated>2009-04-16T18:18:53Z</updated>
			<id>http://punbb.informer.com/forums/post/126870/#p126870</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126869/#p126869"/>
			<content type="html"><![CDATA[<p>Not guaranteed to be the cause, but try adding a clear to the bottom of that block, like so:</p><div class="codebox"><pre><code>&lt;div class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Guest Announcement&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div class=&quot;inbox&quot;&gt;
            &lt;div&gt;Message here.&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;</code></pre></div><br /><p>Opera can be a right pain in the arse for layout issues. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2009-04-16T18:13:14Z</updated>
			<id>http://punbb.informer.com/forums/post/126869/#p126869</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126867/#p126867"/>
			<content type="html"><![CDATA[<p>Just a little problem, only in &quot;Opera&quot;. For some reason, the guest message in pushing the forums down when people <em>are</em> logged in. </p><p>Looks like this:</p><p><span class="postimg"><img src="http://i15.photobucket.com/albums/a371/Childfromthewest/Untitled-2.jpg" alt="http://i15.photobucket.com/albums/a371/Childfromthewest/Untitled-2.jpg" /></span></p><p>How come?</p><p>(I&#039;ve temporarily removed the guest message so that my &quot;Opera&quot; members can see everything all right.)</p>]]></content>
			<author>
				<name><![CDATA[Ottens]]></name>
				<uri>http://punbb.informer.com/forums/user/12307/</uri>
			</author>
			<updated>2009-04-16T17:46:43Z</updated>
			<id>http://punbb.informer.com/forums/post/126867/#p126867</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126829/#p126829"/>
			<content type="html"><![CDATA[<p>Why, it works perfectly! Thank you very much, sir!</p>]]></content>
			<author>
				<name><![CDATA[Ottens]]></name>
				<uri>http://punbb.informer.com/forums/user/12307/</uri>
			</author>
			<updated>2009-04-15T16:21:05Z</updated>
			<id>http://punbb.informer.com/forums/post/126829/#p126829</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126828/#p126828"/>
			<content type="html"><![CDATA[<p>Put this in header.php right under // END SUBST - &lt;pun_announcement&gt;</p><div class="codebox"><pre><code>// START SUBST - &lt;pun_guest_message&gt;
if ($pun_user[&#039;g_id&#039;] == PUN_GUEST)
{
    ob_start();

?&gt;
&lt;div class=&quot;block&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Guest Announcement&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div class=&quot;inbox&quot;&gt;
            &lt;div&gt;Message here.&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;?php
    
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace(&#039;&lt;pun_guest_message&gt;&#039;, $tpl_temp, $tpl_main);
    ob_end_clean();
}
// END SUBST - &lt;pun_guest_message&gt;</code></pre></div><p>Then, in include/template/main.tpl add:</p><div class="codebox"><pre><code>&lt;pun_guest_message&gt;</code></pre></div><p>Where you want it to show up.</p>]]></content>
			<author>
				<name><![CDATA[Tieguy]]></name>
				<uri>http://punbb.informer.com/forums/user/12667/</uri>
			</author>
			<updated>2009-04-15T16:05:55Z</updated>
			<id>http://punbb.informer.com/forums/post/126828/#p126828</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Announcements for guests only]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/126824/#p126824"/>
			<content type="html"><![CDATA[<p>Hello all,</p><p>I&#039;ve done some searching but I don&#039;t believe this has come up before.&nbsp; What I&#039;d like to do is place a message atop my <a href="http://www.ottens.co.uk/lounge/">forums</a> that&#039;s visible only to guests.</p><p>I&#039;ve tried copying the footer.php file, called it welcome.php, and inserted that into the template using &lt;pun_welcome&gt;. That works, it shows two footers, but when I place it above &lt;pun_main&gt; it doesn&#039;t show up anymore. I&#039;m probably going to have to change some things in the new welcome.php file but I&#039;m not quite that dexterous yet. Any suggestions?</p>]]></content>
			<author>
				<name><![CDATA[Ottens]]></name>
				<uri>http://punbb.informer.com/forums/user/12307/</uri>
			</author>
			<updated>2009-04-15T15:51:35Z</updated>
			<id>http://punbb.informer.com/forums/post/126824/#p126824</id>
		</entry>
</feed>
