<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[PunBB Forums - PunBB 1.3 - Defining $forum_user['prev_url'] from outside the forum]]></title>
		<link>http://punbb.informer.com/forums/topic/19727/punbb-13-defining-forumuserprevurl-from-outside-the-forum/</link>
		<description><![CDATA[The most recent posts in PunBB 1.3 - Defining $forum_user['prev_url'] from outside the forum.]]></description>
		<lastBuildDate>Wed, 03 Sep 2008 20:30:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: PunBB 1.3 - Defining $forum_user['prev_url'] from outside the forum]]></title>
			<link>http://punbb.informer.com/forums/post/117516/#p117516</link>
			<description><![CDATA[<p>Okies, solved. To get the prev_url to work properly also forum footer.php is required. After adding this, you can use for instance a direct login link in your own custom pages that leads to PunBB login page and you&#039;ll get redirected to that custom page after login. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /><br /></p><div class="codebox"><pre><code>require FORUM_ROOT.&#039;footer.php&#039;;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Spewed)]]></author>
			<pubDate>Wed, 03 Sep 2008 20:30:08 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/117516/#p117516</guid>
		</item>
		<item>
			<title><![CDATA[Re: PunBB 1.3 - Defining $forum_user['prev_url'] from outside the forum]]></title>
			<link>http://punbb.informer.com/forums/post/117471/#p117471</link>
			<description><![CDATA[<p><a href="http://punbb.informer.com/forums/topic/18785/using-requesturi-safely/">This post</a> lead me to the right track, still not getting this to work. I believe set_default_user() is the answer but why I can&#039;t get it to update the prev_url column on the online table when I call it from my custom pages? <img src="http://punbb.informer.com/forums/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p><p>It does update the $forum_user[&#039;prev_url&#039;] array but doesn&#039;t update the online table in the database, what am I missing here?</p><p>My site structure is the following if it makes a difference:<br />/forum/ (here&#039;s PunBB)<br />/section1/ (here&#039;s a custom page that queries PunBB db located in the forum dir)<br />/section2/ (here&#039;s another custom page that queries PunBB db located in the forum dir)<br />etc.</p><div class="quotebox"><blockquote><p>Using set_default_user() I got the prev_url variable to update correctly outside the forum too but as soon as I go to login the variable is replaced and after login I get redirected to forum index again.</p></blockquote></div><p>Have to correct that, the issue is that only the array gets updated as descriped above, not the online table in the db so after I locate to the login.php the hidden redirect_url is fetched from the db table which has the old referer/prev_url.</p><p>Edit: The code I&#039;m using on the custom pages is here:<br /></p><div class="codebox"><pre><code>// Integrate PunBB
define(&#039;FORUM_ROOT&#039;, &#039;../forum/&#039;);
require FORUM_ROOT.&#039;include/common.php&#039;;

// Set prev url for redirecting properly after logging in
set_default_user();</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Spewed)]]></author>
			<pubDate>Mon, 01 Sep 2008 23:35:09 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/117471/#p117471</guid>
		</item>
		<item>
			<title><![CDATA[Re: PunBB 1.3 - Defining $forum_user['prev_url'] from outside the forum]]></title>
			<link>http://punbb.informer.com/forums/post/117444/#p117444</link>
			<description><![CDATA[<p>Thanks for the reply, nerdtopia, but that&#039;s not what I&#039;m asking for. I&#039;m talking about the PunBB user variable that holds the previous page URL where the user is redirected to after logging in.</p><p>I have pages &quot;outside&quot; the PunBB forum that uses PunBB data thru integration. I want user to get redirected back to the custom page where the user clicked login link (login link redirects to PunBB login page) when a user browses these custom pages, the same way as the user is redirected back to the topic/post after logging in at PunBB forum area.</p><p>The issue is currently that when a user comes to the login page from a custom page, the user gets redirected to forum index instead of the custom page where the user came from in real.</p><p>Edit: Just realized I posted this to a wrong forum, <a href="http://punbb.informer.com/forums/forum/52/integration/">Integration</a> would have been the correct place for this. A kindly moderator will move this there, will ya? <img src="http://punbb.informer.com/forums/img/smilies/cool.png" width="15" height="15" alt="cool" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Spewed)]]></author>
			<pubDate>Sun, 31 Aug 2008 20:26:27 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/117444/#p117444</guid>
		</item>
		<item>
			<title><![CDATA[Re: PunBB 1.3 - Defining $forum_user['prev_url'] from outside the forum]]></title>
			<link>http://punbb.informer.com/forums/post/117443/#p117443</link>
			<description><![CDATA[<p>I&#039;m not sure exactly what you&#039;re asking, but if you&#039;re just asking to go back a page, you can do that in JavaScript:<br />&lt;a href=&quot;javascript: history.go(-1)&quot;&gt;Back&lt;/a&gt;</p>]]></description>
			<author><![CDATA[dummy@example.com (nerdtopia)]]></author>
			<pubDate>Sun, 31 Aug 2008 18:52:29 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/117443/#p117443</guid>
		</item>
		<item>
			<title><![CDATA[PunBB 1.3 - Defining $forum_user['prev_url'] from outside the forum]]></title>
			<link>http://punbb.informer.com/forums/post/117439/#p117439</link>
			<description><![CDATA[<p>How to define $forum_user[&#039;prev_url&#039;] properly from outside the forum? What I&#039;m after is to redirect the user back to the page that is outside the forum (but still in the same domain of course) where the user was before logging in.</p><p>Is there a dedicated method/function to do that already or does it require a hack? Tried everything and nothing worked. Using set_default_user() I got the prev_url variable to update correctly outside the forum too but as soon as I go to login the variable is replaced and after login I get redirected to forum index again.</p>]]></description>
			<author><![CDATA[dummy@example.com (Spewed)]]></author>
			<pubDate>Sun, 31 Aug 2008 11:51:52 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/117439/#p117439</guid>
		</item>
	</channel>
</rss>
