FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


phpBB Session Integration





Possum
Hi

I have successfully integrated my website and forum. Now I need one further step to complete my vision for sites functionality.

I want my users to return to the website page that sent them to the forums when they click the forum logo.



Each of my website pages has this integration code. $newurl is the link of the page where the user click the link to the forum.

Code:
<?php
define('IN_PHPBB', true);
define('ROOT_PATH', "../forums/");
$forumurl = '../forums/';
$newurl = 'http://udopage.com/developers/education-economics-precious-metals.php';
if (!defined('IN_PHPBB') || !defined('ROOT_PATH')) {
    exit();
}
$phpEx = "php";
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
 ?>


The link code for the forums is site logo is found in the

styles/yourstyle/template/overall_header.html file

The code for the logo link is

Code:
<a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>


How can I replace the U_INDEX with the

Code:
$newurl = 'http://udopage.com/developers/education-economics-precious-metals.php';
or more precisely the variable $newurl so when the user clicks the forum logo they go back to the page that sent them to the forum..

Thank you..
sonam
Hmmm, I am not sure did I good understand your question. Your title is talking about session and you are wrote about variable. I think you need to create one session. This session must be created when user come first time on forum. The session must included on all your forum pages.
Code:
session_start();
if(empty($_SESSION['come_from'])) {
  $_SESSION['come_from'] = $newurl;
}

Now user can go around your forum and when he click on url (builded with php):

Code:
<a href="' . $_SESSION['come_from'] . '" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>


he/she will get redirection on page from where they come on forum.

Sonam
Possum
Sorry fro the Late Reply..

Thx fro your code tip., Also you have a great Website..
Related topics
phpbb
phpBB nasýl kurulur yardým lütfen
phpBB "integration"
Olympus website integration
phpBB 2.0.21 Released
phpBB header problem.
phpbb: Login-Session
phpBB 2.0.22 released!
Customize phpBB.
what's a good cms for this situation
.: User login systems for your site :. CHEAP AND EASY!
Log out OR mark all posts read...
PHPBB blog integration.
Outside phpBB Integration Functions
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.