<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Admin stuff in separate directory]]></title>
		<link>https://punbb.informer.com/forums/topic/8509/admin-stuff-in-separate-directory/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/8509/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Admin stuff in separate directory.]]></description>
		<lastBuildDate>Tue, 23 Aug 2005 18:50:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/50045/#p50045</link>
			<description><![CDATA[<div class="quotebox"><cite>someguy wrote:</cite><blockquote><p>Great.&nbsp; Thanks Tobi... but I still think it should be considered as part of the standard install for v1.3. <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></blockquote></div><p>Well, I also think it would be a good idea but then again it&#039;s not up to us to decide.. <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />For the time being just spend the 10 minutes and fix it manually.</p>]]></description>
			<author><![CDATA[null@example.com (Tobi)]]></author>
			<pubDate>Tue, 23 Aug 2005 18:50:01 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/50045/#p50045</guid>
		</item>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/50015/#p50015</link>
			<description><![CDATA[<p>As I was hacked 10 mn ago ... I think YES for an ADMIN DIR more protected <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Rod)]]></author>
			<pubDate>Tue, 23 Aug 2005 16:55:40 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/50015/#p50015</guid>
		</item>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/50007/#p50007</link>
			<description><![CDATA[<p>Great.&nbsp; Thanks Tobi... but I still think it should be considered as part of the standard install for v1.3. <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (someguy)]]></author>
			<pubDate>Tue, 23 Aug 2005 16:06:41 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/50007/#p50007</guid>
		</item>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/49999/#p49999</link>
			<description><![CDATA[<p>There&#039;s a lot of handwork involved. I found a lot of parts to change, hope that&#039;s all.<br />So, here we go:<br />1. create a directory &quot;admin&quot; in your pun root and move all file sthere that start with &quot;admin_&quot;<br />2. open function.php and replace the complete function confirm_referer() with<br /></p><div class="codebox"><pre><code>function confirm_referrer($script)
{
  global $pun_config, $lang_common;
## ADMIN DIR CHANGE 
  if(ereg(&quot;/admin/&quot;,$_SERVER[&#039;HTTP_REFERER&#039;])) {
    $ref_url = $pun_config[&#039;o_base_url&#039;].&#039;/admin&#039;;
    }
  else $ref_url = $pun_config[&#039;o_base_url&#039;];
  if (!preg_match(&#039;#^&#039;.preg_quote(str_replace(&#039;www.&#039;, &#039;&#039;, $ref_url).&quot;/&quot;.$script, &#039;#&#039;).&#039;#i&#039;, str_replace(&#039;www.&#039;, &#039;&#039;, (isset($_SERVER[&#039;HTTP_REFERER&#039;]) ? $_SERVER[&#039;HTTP_REFERER&#039;] : &#039;&#039;))))
    message($lang_common[&#039;Bad referrer&#039;]);
}</code></pre></div><p>3. still in function.php,<br />find the function generate_navlinks() (somewhere around line 230)<br />In this function, replace ALL occurences of<br /></p><div class="codebox"><pre><code>&lt;a href=&quot;</code></pre></div><p>with<br /></p><div class="codebox"><pre><code>&lt;a href=&quot;&#039; . PUN_ROOT . &#039;</code></pre></div><p>4. Around line 887 in function.php, replace<br /></p><div class="codebox"><pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style/&lt;?php echo $pun_user[&#039;style&#039;].&#039;.css&#039; ?&gt;&quot; /&gt;</code></pre></div><p>with</p><div class="codebox"><pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo PUN_ROOT ?&gt;style/&lt;?php echo $pun_user[&#039;style&#039;].&#039;.css&#039; ?&gt;&quot; /&gt;</code></pre></div><p>5. Open ALL admin_ files and replace everywhere<br /></p><div class="codebox"><pre><code>define(&#039;PUN_ROOT&#039;, &#039;./&#039;);</code></pre></div><p>with<br /></p><div class="codebox"><pre><code>define(&#039;PUN_ROOT&#039;, &#039;../&#039;);</code></pre></div><p>It&#039;s always on top of the scripts.</p><p>6. Open header.php and find around line 66<br /></p><div class="codebox"><pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style/&lt;?php echo $pun_user[&#039;style&#039;].&#039;.css&#039;</code></pre></div><p>replace it with<br /></p><div class="codebox"><pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo PUN_ROOT ?&gt;style/&lt;?php echo $pun_user[&#039;style&#039;].&#039;.css&#039;</code></pre></div><p>7. and around line 70, replace<br /></p><div class="codebox"><pre><code>    echo &#039;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style/imports/base_admin.css&quot; /&gt;&#039;.&quot;\n&quot;;</code></pre></div><p>with<br /></p><div class="codebox"><pre><code>    echo &#039;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#039;.PUN_ROOT.&#039;style/imports/base_admin.css&quot; /&gt;&#039;.&quot;\n&quot;;</code></pre></div><p>Let&#039;s hope that&#039;s it. If not let me know.<br />(It&#039;s basically about adding PUN_ROOT before most of the links...)</p>]]></description>
			<author><![CDATA[null@example.com (Tobi)]]></author>
			<pubDate>Tue, 23 Aug 2005 14:20:48 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/49999/#p49999</guid>
		</item>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/49998/#p49998</link>
			<description><![CDATA[<p>Completely forgot about it. I&#039;ll write it up soon.</p>]]></description>
			<author><![CDATA[null@example.com (Elzar)]]></author>
			<pubDate>Tue, 23 Aug 2005 14:16:43 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/49998/#p49998</guid>
		</item>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/49996/#p49996</link>
			<description><![CDATA[<p>You are right.<br />Elzar kept this secret so far.</p><p>I want to do the same so I&#039;ll try to find a solution myself and post it then.<br />I think it is at least an option for extra security and I agree it should be standard.<br />Not alone for the security reason but also because it makes the directory structure more readable.</p>]]></description>
			<author><![CDATA[null@example.com (Tobi)]]></author>
			<pubDate>Tue, 23 Aug 2005 13:36:02 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/49996/#p49996</guid>
		</item>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/49977/#p49977</link>
			<description><![CDATA[<div class="quotebox"><cite>Tobi wrote:</cite><blockquote><p>Try the search function.<br />Somebody has done and explained this somewhere here AFAIK</p></blockquote></div><p>I saw <a href="http://punbb.org/forums/viewtopic.php?id=8143">this thread</a> and posted a request for details three weeks ago, but AFAIK, the complete solution has not been posted.</p><p>I&#039;d be grateful if someone could fill in the missing details or point me to another more complete discussion.</p><p>However, even if a mod exists, I would still think this request has merit.&nbsp; Here are a couple of reasons I think it should be in the base distribution:</p><p>1) Doesn&#039;t require moding so upgrades of PunBB are easier<br />2) Makes it easier to more PunBB installations to be more secure... which makes PunBB more appealing</p><p>BTW, this is all predicated on the assumption that .htaccess password protection would improve security.&nbsp; If someone knowledgable were to tell me that it doesn&#039;t help, I&#039;ll be happy to shut up.</p>]]></description>
			<author><![CDATA[null@example.com (someguy)]]></author>
			<pubDate>Tue, 23 Aug 2005 11:14:47 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/49977/#p49977</guid>
		</item>
		<item>
			<title><![CDATA[Re: Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/49974/#p49974</link>
			<description><![CDATA[<p>Try the search function.<br />Somebody has done and explained this somewhere here AFAIK</p>]]></description>
			<author><![CDATA[null@example.com (Tobi)]]></author>
			<pubDate>Tue, 23 Aug 2005 10:50:35 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/49974/#p49974</guid>
		</item>
		<item>
			<title><![CDATA[Admin stuff in separate directory]]></title>
			<link>https://punbb.informer.com/forums/post/49970/#p49970</link>
			<description><![CDATA[<p>Thanks for the great software.&nbsp; I&#039;m wondering if it would be possible to place the admin pages in a separate directory.&nbsp; That way users could password protect the directory (via .htaccess file) as an extra precaution against having the forum compromised.&nbsp; I tried to do this mod myself but had problems with the links resolving correctly.&nbsp; Are there disadvantages to doing this that would prevent it from being part of the 1.3 release (other than the time required to do it)?</p>]]></description>
			<author><![CDATA[null@example.com (someguy)]]></author>
			<pubDate>Tue, 23 Aug 2005 10:25:46 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/49970/#p49970</guid>
		</item>
	</channel>
</rss>
