| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Tue Nov 21, 2006 6:09 am Post subject: How to use sessions for other pages of website. |
|
|
Hi, I have integrated phpbb forum on my website that already has many pages. Now I want to use phpbb forum sessions throughout my website, so that it is easier to navigate and I have a symitrical look.
I have gone thru this article Phpbb sessions across your site but few pages seem to work and few doesnt.
The variable | Code: | | $phpbb_root_path = '../phpBB2/'; | is also confusing. I had to remove "../" to make it work.
Is there any other way also to carry sessions across other pages of the website ? |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Tue Nov 21, 2006 8:17 am Post subject: Re: How to use sessions for other pages of website. |
|
|
The article is telling almost all of it.
You need to add this at the beginning of your php files :
| Code: | define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
// |
Where :
| Code: | | $phpbb_root_path = './'; |
must be the path to your phpBB installation.
So it should be :
| Code: | | $phpbb_root_path = './forum/'; |
for a php script located at the server's root level in your case.
Now if you want to go further into sharing sessions, you can use the blank template mod. It's a more detailed tutorial to fully integrate a new page in phpBB. The only difference with the code from the article is you'll be able to name each added pages that will show up in the viewonline page properly. With the above code, you'd always have forum index as a location in the viewonline list.
It's no big deal, and you cannot add too many blanck templates pages as it would add too much code in the viewonline script. But there is a turn around to add many pages and to still track them properly in the viewonline list. Using the Page Id extension mod.
Of course, you can stay with the above code, as I do on this site, you'll just miss the real location in the viewonline list for all added pages, which is no big deal at all
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Tue Nov 21, 2006 12:01 pm Post subject: Re: How to use sessions for other pages of website. |
|
|
| Sorry cudnt understand what is "viewonline" ? |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Wed Nov 22, 2006 7:47 am Post subject: Re: How to use sessions for other pages of website. |
|
|
I guess I hv lot to learn yet Thanks for your patience. |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |