<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - Guest access]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/20241/"/>
	<updated>2008-11-16T15:17:48Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/20241/guest-access/</id>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119413/#p119413"/>
			<content type="html"><![CDATA[<p>Sorry, I don&#039;t know of any links, BUT I learned extension coding with a blank extension template because it&#039;s self-explaining. Here you go:<br /></p><div class="codebox"><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!DOCTYPE extension SYSTEM &quot;ext-1.0.dtd&quot;&gt;

&lt;extension engine=&quot;1.0&quot;&gt;
    &lt;id&gt;Same as folder&#039;s name I.e.: pun_pm&lt;/id&gt;
    &lt;title&gt;Extension name&lt;/title&gt;
    &lt;version&gt;Extension version&lt;/version&gt;
    &lt;description&gt;Extension description&lt;/description&gt;
    &lt;author&gt;Your name&lt;/author&gt;
    
    &lt;minversion&gt;1.3&lt;/minversion&gt;
    &lt;maxtestedon&gt;1.3&lt;/maxtestedon&gt;
    
    &lt;install&gt;
        &lt;![CDATA[
//Code to run when installing
        ]]&gt;
    &lt;/install&gt;
    
    &lt;uninstall&gt;
        &lt;![CDATA[
//Code to run when uninstalling
        ]]&gt;
    &lt;/uninstall&gt;
    
    &lt;hooks&gt;
        &lt;hook id=&quot;hook_name&quot;&gt;
            &lt;![CDATA[
//Code to run when forum script reaches hook
            ]]&gt;
        &lt;/hook&gt;
    &lt;/hooks&gt;
&lt;/extension&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Garciat]]></name>
				<uri>http://punbb.informer.com/forums/user/12481/</uri>
			</author>
			<updated>2008-11-16T15:17:48Z</updated>
			<id>http://punbb.informer.com/forums/post/119413/#p119413</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119411/#p119411"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Garciat wrote:</cite><blockquote><p>I could make an extension (with turn on/off), or you could just add this to <strong>Line 23</strong> on &#039;<strong>header.php</strong>&#039;:<br /></p><div class="codebox"><pre><code>if($forum_user[&#039;is_guest&#039;]) header(&quot;Location: &quot;.forum_link($forum_url[&#039;login&#039;]));</code></pre></div></blockquote></div><p>Thanks for this, I think i&#039;ll add this code line into the header.php file.&nbsp; I may see if I can write an extension or this as it would be good practice.&nbsp; Do you know of any threads etc that could help me write an extension ?</p><p>Bach.</p>]]></content>
			<author>
				<name><![CDATA[bach]]></name>
				<uri>http://punbb.informer.com/forums/user/8533/</uri>
			</author>
			<updated>2008-11-16T14:58:21Z</updated>
			<id>http://punbb.informer.com/forums/post/119411/#p119411</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119406/#p119406"/>
			<content type="html"><![CDATA[<p>I could make an extension (with turn on/off), or you could just add this to <strong>Line 23</strong> on &#039;<strong>header.php</strong>&#039;:<br /></p><div class="codebox"><pre><code>if($forum_user[&#039;is_guest&#039;]) header(&quot;Location: &quot;.forum_link($forum_url[&#039;login&#039;]));</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Garciat]]></name>
				<uri>http://punbb.informer.com/forums/user/12481/</uri>
			</author>
			<updated>2008-11-16T14:48:59Z</updated>
			<id>http://punbb.informer.com/forums/post/119406/#p119406</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119402/#p119402"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Garciat wrote:</cite><blockquote><p>So, you want to force all guests to login or register?</p></blockquote></div><p>Yeah,<br />First thing I want people to see is login or register.&nbsp; I was looking for some information on the coding just so I can understand it.</p><p>Cheers</p>]]></content>
			<author>
				<name><![CDATA[bach]]></name>
				<uri>http://punbb.informer.com/forums/user/8533/</uri>
			</author>
			<updated>2008-11-16T13:09:36Z</updated>
			<id>http://punbb.informer.com/forums/post/119402/#p119402</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119377/#p119377"/>
			<content type="html"><![CDATA[<p>So, you want to force all guests to login or register?</p>]]></content>
			<author>
				<name><![CDATA[Garciat]]></name>
				<uri>http://punbb.informer.com/forums/user/12481/</uri>
			</author>
			<updated>2008-11-15T18:55:02Z</updated>
			<id>http://punbb.informer.com/forums/post/119377/#p119377</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119368/#p119368"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Garciat wrote:</cite><blockquote><div class="quotebox"><cite>bach wrote:</cite><blockquote><p>Thanks, how do you go about installing this add-on</p><p>Do you just upload them to the server, or is there a process I should follow.&nbsp; couldn&#039;t see anything on the extension forum.</p></blockquote></div><ol class="decimal"><li><p>Download the file</p></li><li><p>Unzip the file into your extensions folder (you should see the extension&#039;s folder there)</p></li><li><p>Go to <strong>Administration &gt; Extensions</strong></p></li><li><p>Install the extension</p></li><li><p>Enjoy <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></li></ol></blockquote></div><p>I have installed the extension and it works <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>What I was thinking is rather than having this for the login page can this be on the index page, so a user needs to login or register ?</p>]]></content>
			<author>
				<name><![CDATA[bach]]></name>
				<uri>http://punbb.informer.com/forums/user/8533/</uri>
			</author>
			<updated>2008-11-15T16:29:35Z</updated>
			<id>http://punbb.informer.com/forums/post/119368/#p119368</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119322/#p119322"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Garciat wrote:</cite><blockquote><p>I just tried enabling/disabling it and it works <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></blockquote></div><p>Ah, yes. It must work.<br />Sorry, I&#039;ve a hard day <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Was I right when I told about permissons for writting a file? <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Parpalak]]></name>
				<uri>http://punbb.informer.com/forums/user/13581/</uri>
			</author>
			<updated>2008-11-14T17:04:45Z</updated>
			<id>http://punbb.informer.com/forums/post/119322/#p119322</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119317/#p119317"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>bach wrote:</cite><blockquote><p>Thanks, how do you go about installing this add-on</p><p>Do you just upload them to the server, or is there a process I should follow.&nbsp; couldn&#039;t see anything on the extension forum.</p></blockquote></div><ol class="decimal"><li><p>Download the file</p></li><li><p>Unzip the file into your extensions folder (you should see the extension&#039;s folder there)</p></li><li><p>Go to <strong>Administration &gt; Extensions</strong></p></li><li><p>Install the extension</p></li><li><p>Enjoy <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></li></ol>]]></content>
			<author>
				<name><![CDATA[Garciat]]></name>
				<uri>http://punbb.informer.com/forums/user/12481/</uri>
			</author>
			<updated>2008-11-14T15:49:45Z</updated>
			<id>http://punbb.informer.com/forums/post/119317/#p119317</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119316/#p119316"/>
			<content type="html"><![CDATA[<p>I just tried enabling/disabling it and it works <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Garciat]]></name>
				<uri>http://punbb.informer.com/forums/user/12481/</uri>
			</author>
			<updated>2008-11-14T15:47:12Z</updated>
			<id>http://punbb.informer.com/forums/post/119316/#p119316</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119315/#p119315"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>bach wrote:</cite><blockquote><p>Thanks, how do you go about installing this add-on</p><p>Do you just upload them to the server, or is there a process I should follow.&nbsp; couldn&#039;t see anything on the extension forum.</p></blockquote></div><p>See instructions: <a href="http://punbb.informer.com/wiki/1.3_usage#installing_an_extension_for_punbb_1.3">http://punbb.informer.com/wiki/1.3_usag &#133; _punbb_1.3</a></p>]]></content>
			<author>
				<name><![CDATA[Parpalak]]></name>
				<uri>http://punbb.informer.com/forums/user/13581/</uri>
			</author>
			<updated>2008-11-14T15:41:56Z</updated>
			<id>http://punbb.informer.com/forums/post/119315/#p119315</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119314/#p119314"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Garciat wrote:</cite><blockquote><p>Install this extension: <a href="http://garciat.us.to/code/punbb/extensions/small_login.zip">http://garciat.us.to/code/punbb/extensi &#133; _login.zip</a></p></blockquote></div><p>Nice <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>But I would make it in another way.<br />No install and uninstall section, only &#039;hd_template_loaded&#039; hook:</p><div class="codebox"><pre><code>if (FORUM_PAGE == &#039;login&#039;)
    $tpl_main =
&#039;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;!-- forum_local --&gt;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;!-- forum_head --&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;brd-wrap&quot; class=&quot;brd&quot;&gt;
&lt;div &lt;!-- forum_page --&gt;&gt;

&lt;div class=&quot;hr&quot;&gt;&lt;hr /&gt;&lt;/div&gt;

&lt;div id=&quot;brd-main&quot;&gt;
    &lt;!-- forum_main --&gt;
&lt;/div&gt;

&lt;div class=&quot;hr&quot;&gt;&lt;hr /&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
&#039;;</code></pre></div><p>We avoid writting files and some other problems when extension is disabled (see <a href="http://fluxbb.org/wiki/developing_extensions#extensions_must_be_able_to_be_disabled">http://fluxbb.org/wiki/developing_exten &#133; e_disabled</a>).</p><p>I don&#039;t know whether it will work or not, but looking at your code I think it should <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Parpalak]]></name>
				<uri>http://punbb.informer.com/forums/user/13581/</uri>
			</author>
			<updated>2008-11-14T15:37:39Z</updated>
			<id>http://punbb.informer.com/forums/post/119314/#p119314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119261/#p119261"/>
			<content type="html"><![CDATA[<p>Thanks, how do you go about installing this add-on</p><p>Do you just upload them to the server, or is there a process I should follow.&nbsp; couldn&#039;t see anything on the extension forum.</p>]]></content>
			<author>
				<name><![CDATA[bach]]></name>
				<uri>http://punbb.informer.com/forums/user/8533/</uri>
			</author>
			<updated>2008-11-13T12:38:20Z</updated>
			<id>http://punbb.informer.com/forums/post/119261/#p119261</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119260/#p119260"/>
			<content type="html"><![CDATA[<p>Install this extension: <a href="http://garciat.us.to/code/punbb/small_login.zip">http://garciat.us.to/code/punbb/small_login.zip</a></p>]]></content>
			<author>
				<name><![CDATA[Garciat]]></name>
				<uri>http://punbb.informer.com/forums/user/12481/</uri>
			</author>
			<updated>2008-11-13T12:31:49Z</updated>
			<id>http://punbb.informer.com/forums/post/119260/#p119260</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119250/#p119250"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Garciat wrote:</cite><blockquote><p>This is as far as I could go with only making a &#039;login.tpl&#039;:</p><p><a href="http://garciat.us.to/punbb/login.php">http://garciat.us.to/punbb/login.php</a></p><p>If you want your forum to look that way, let me know.</p></blockquote></div><p>That great, how does one go about greating that?</p><p>With regard to the Guest login, I do not want any guest to be able to login/access the forum.&nbsp; This is one reason for the restricted first page. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Regards</p>]]></content>
			<author>
				<name><![CDATA[bach]]></name>
				<uri>http://punbb.informer.com/forums/user/8533/</uri>
			</author>
			<updated>2008-11-13T09:07:11Z</updated>
			<id>http://punbb.informer.com/forums/post/119250/#p119250</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guest access]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/119238/#p119238"/>
			<content type="html"><![CDATA[<p>I have also managed to create an extension that forces guests to log in.</p><p>If you&#039;re interested, let me know.</p>]]></content>
			<author>
				<name><![CDATA[Garciat]]></name>
				<uri>http://punbb.informer.com/forums/user/12481/</uri>
			</author>
			<updated>2008-11-13T03:56:38Z</updated>
			<id>http://punbb.informer.com/forums/post/119238/#p119238</id>
		</entry>
</feed>
