Blog

Advantages of session integration

Posted by battye in Modifications with the tags , , on January 9th, 2009

As the world moves towards Web 2.0, it is becoming increasingly important to have a dynamic website – something which most people are using the PHP language to achieve. Unlike the use of HTML by itself to create a website, HTML and PHP together allow a website to be much more flexible, such as connecting to a database.

If you are running a bulletin board based on phpBB3, then it is worthwhile considering the benefits of integrating your main website into phpBB3.

Maintain a single login throughout your website

By using phpBB’s login system, you can quickly and easily allow only certain users to access pages (using the permissions system or otherwise) or restrict certain part of the website to registered users. This eliminates the need to set up password protected pages, and saves time for you and your users.

Use forum content to power your homepage

Nothing looks worse than a website that has not changed in weeks or months, or years in some cases. A website that doesn’t change looks dead, so you can ensure your website looks forever active by using forum content (which on an active forum is forever changing) and displaying it on the homepage. Some working examples of this are the p3net.net and CricketMX.com homepages where full posts from the news forums are displayed.

Keep your users informed

Following on from the point above, by having headlines on your homepage it allows visitors to quickly see what sort of events or discussions are taking place on your website and whether your site will interest them.

Give your website the look and feel of your forum

Many people want to keep continuity between the website and forum, because it makes the site look more professional to be using one theme throughout – you don’t want any users to think that they have gone to a completely different website when they switch from website to forum! Using the template system in phpBB3, it is very easy to make your website look like it is part of phpBB3. Additionally, if you ever want to make a small change (adding a message in the header about an upcoming event, for instance) then this alteration only needs to be made once. Any change you make to the phpBB3 template file (in this example, overall_header.html) will be visible on both your forum and your website, so your message is reaching more people.

iWisdom from the Support Team integrated his homepage, http://write.p3net.net/, into his phpBB3 installation and has this to say;

“Integrating my website with phpBB3 allowed me to not only attract visitors to my forum and make their experience more seemless, but also aided in quick, secure development on a well supported, documented system.”

To learn more about the technical side of website integration and phpBB3, there is a large discussion about this in the MOD Writers forum worth reading at http://www.phpbb.com/community/viewtopic.php?f=71&t=719055.

Tip: if you are finding that CSS or images are not loading correctly after you have integrated your website, it is most likely because of the directory structure you are using and relative paths are being used (which could be leading to the wrong place). To get around this, use the “base” html tag. To learn more about this, visit http://www.drostdesigns.com/base-href-tag/

You don’t have to be a programmer to achieve website integration though, there are many portals written for phpBB3 which will give the same result as a homepage you have written yourself, an example of which can be seen at Paul from the MOD Team’s website – http://www.my-bertie.com/. MarkTheDaemon, also from the MOD Team, summarises the benefits of a portal, “(Portals are) easy and fairly quick to setup rather than building an index page of your own.”

Brainy from the Moderator Team gives a good comparison of portals and custom written pages:

“In my opinion, portals and session integration are for two different things. For a web site that revolves around a forum, with few external pages with information, a portal is the way to go. It is easy to set up, fits in the forum design, and a breeze to manage. However, It is limited to one page. For example, if you want the title of the most recent topic, along with a link, available on every page of your site, it is not possible with a portal; you must use sessions integration. An almost unlimited amount of forum integration is possible when using the phpBB sessions across a site, but with the trade off of work, complexity, and stability. For someone with little php experience, sessions integration is definitely possible, especially with help from the MOD Author’s discussion forum – http://www.phpbb.com/community/viewforum.php?f=71 – but can quickly become more difficult depending on the complexity of what is envisioned. In the end, it really depends on what your site needs. Do your visitors need to be able to see the most recent posts, users online, etc, on one page, or do users need limited forum information, but across the entire site? A successful site is designed for the needs of it’s users, not the opinion of the owner.”

Some examples of portal software for phpBB3 are phpBB3 Portal (http://www.phpbb3portal.com/) and Stargate Portal (http://www.phpbbireland.com/)

Thanks to everyone who contributed to this article; iWisdom, Brainy, MarkTheDaemon and Paul

Important links:

Coding for phpBB3: http://www.phpbb.com/mods/documentation/phpbb-documentation/index.php

phpBB3 template system: http://www.phpbb.com/mods/documentation/phpbb-documentation/template/index.php

“Full Site Integration” discussion in the MOD Writers forum: http://www.phpbb.com/community/viewtopic.php?f=71&t=719055

19 Responses to “Advantages of session integration”

Posted by Jeffrey Rosen on January 9th, 2009 at 1:23 am:

This is awesome. How about going the other way though… Is it possible to make an account on my phpbb3 forum through a standard API? As much as I love my forums, they are not the central part of my website.

Posted by EXreaction on January 9th, 2009 at 2:58 am:

To add a user easily in 3.0.x you can use the user_add function in includes/functions_user.php

Posted by bobo on January 9th, 2009 at 1:33 pm:

From the end users point to whom are this application focusing?

Have a look on,
gallery2 with drupal bridge

joomla with phpbb3

vbulletin with drupal bridge
etc.

Why not point or focus on smth like drupal’s phpBBforum Integration module?
for the main cms out there instead of reinventing things over and over again?

[ edited by Highway of Life :: links removed ]

Posted by legohalflife2man on January 10th, 2009 at 4:36 pm:

I love using phpBB3′s sessions and templates on my website, and this article is great for users who are trying to do just that. phpBB3 saved me a lot of time on my latest website by allowing me to make my website and forum one using phpBB3′s session system. It’s funny because I was just thinking about this. :)

Posted by Martin Truckenbrodt on January 10th, 2009 at 6:55 pm:

Hello,

Use forum content to power your homepage

It’s a little strange to read this on a blog. ;)

In past I was thinking that phpBB should be possible to easily integrate into a website. Now I think different. But I’m not a friend of poratl systems. It’s only my personal taste!

But I’m missing some validated standard AddOns by now – e.g. like: Photo Gallery, Categorised Link Database, same to a Download database, …, …, …

Then nobody needs Joomla or others! ;)
Let the bulletin board be the master application! :)

Bye Martin

-bbcode + html — jm

Posted by Marius van Rijnsoever on January 19th, 2009 at 12:23 am:

phpBB3 is an amazing software due to the hooks that allow for the seamless integration of sessions and content into any software. A HUGE thank you to the developers of phpBB3 for doing such an amazing job.

For Joomla users you can use JFusion to do all the hard work of session integration and visual integration of phpBB3 into Joomla. This way you don’t have to know anything about PHP or programming, but still take advantage of phpBB3 awesome features.

Thanks, Marius

Posted by Dennis Leahy on January 21st, 2009 at 3:45 am:

Be advised that session integration means that your other pages must be php, not ASP, ASPX, etc. etc. So, if you are strating from scratch and want full site integration, build your entire site in php.

Unfortunately, php sessions (evidently) cannot be integrated with other types of sessions. For example, if you have an ASP website, and decide to add pbpBB3 as a site feature, you will not be integrating your site. (If someone knows that is wrong, please contact me – I’m all ears. I had to write a secondary and completely separate log-in for password protected ASP pages. I’d love to scrap it, if only I could get the php session variables written out to the ASP server.)

Posted by ssnobben on January 21st, 2009 at 9:50 am:

I think its better that phpBB concentrate on many things around its forum and integrate with Joomla content management system instead but as a stand alone products.

Make those two GPL script working seamlessly with user syncing focusing as now possible with integrators like Jfusion. http://www.jfusion.org

Why invent the wheel again when its so much power and user support behind Joomla?

Posted by Carlos on January 30th, 2009 at 4:03 pm:

Hi. Sorry about my bad English.

We implemented session integration with phpbb in our site ShertonEnglish.com and the experience was really wonderful. We manage now more than 100K users and we use the phpbb groups in order to give access to different kind of user to restricted areas. We are also using the multilanguage system for the entire site.

Recently, we do some mods over the mass mail system and now we are using it for sending English lessons in html to about 10K users daily.

Every day we discover new phpbb functionality that helps us improving our site.

Thank you all

Carlos

removed links- Darcie

Posted by Scorpiedawn2 on February 11th, 2009 at 6:58 am:

I saw this language learning website with Skype for people to practice languages using messengers. The whole website seems to be built with phpbb.

Posted by IceBrain on February 23rd, 2009 at 1:20 pm:

Hi, not to diss on you, I think PhpBB is great as a forum, but should it be used as a global auth system? Building a website user auth using PhpBB API would leave it completely dependent.
What if the user decides to close its forum or switch to another system? He would be forced to mantain a “closed” PhpBB installation just to keep its auth system.
I know this guide is helpfull to a lot of people, but try to warn them about the inevitable lock-in that this would cause.
Maybe you could separate your Auth API into a individual lib, which PhpBB would use, so the user would only need to mantain a simple php file and a couple of DB tables instead of a full install.

Posted by Alex on February 24th, 2009 at 4:19 pm:

Yes, session integration is a great advantage.

But what about existing sites that allready have user management? It would be a huge pain to change the user system to phpbb.

“Give your website the look and feel of your forum” No. It should be the other way arround: give your forum the look and feel of your website.
A forum is a secondary part to some sites, something aditional.

Thanks, Alex

Posted by wGEric on February 25th, 2009 at 8:34 pm:

You can use phpBB’s Authentication Plugins. I’ve used those on a number of sites to make it so phpBB uses the existing website’s sessions.

Posted by RedScourge on March 30th, 2009 at 4:58 pm:

Should be able to integrate session stuff between ASP and PHP via something fancy like XMLRPC. You’d need to make some sort of script that takes a login session in one and creates a matching session in the other. Not so impossible if your sessions are stored in the DB.

Posted by Theme Create on May 11th, 2009 at 2:09 am:

This is exactly what I was looking for. Joomla is a top notch CMS and this is a perfect example why.

Posted by Kipper on July 22nd, 2009 at 7:43 pm:

Part of what the author is talking about is a single sign-on to make the user experience better.

We’re using wordpress right now and need integrate phpBB into it as a single-sign-on service. How would one accomplish this?

Posted by Mac on August 4th, 2009 at 5:18 pm:

The phpBB team should hit Google with some searches about integration. There are many, many people trying to figure out how to build phpBB into ASP.NET-based sites. This should come as no surprise, it’s a common-enough question even in phpBB’s own forums.

Real-world requirements are rarely best-served by a site built around a forum. Typically the forum is there as an adjunct to some other purpose. Additionally, on a relative basis, PHP itself just isn’t that popular. In fact, I’d say PHP owes most of its success to phpBB. Unfortunately, I’d say the phpBB team’s expertise with PHP leads to the old problem of, “To a man with a hammer, every problem looks like a nail.”

Everyone seems to agree that phpBB is the best forum solution available. Opening it up to the bigger world outside of PHP would seem to be a logical next step.

I reluctantly had to pass on a phpBB installation recently for a very large ASP.NET project. I screwed around with some integration tricks but they were all fairly unsatisfying and I didn’t want to deal with the long-term implications of hoping they’d continue to work in new versions of ASP.NET, .NET, PHP, and phpBB. Too many hacks.

Give us non-PHP types an API. All you have to lose is your inaccessibility…

Posted by Maher on August 27th, 2010 at 8:15 am:

Me want to generate single login system throughout my website,its done,but the single issue arise,after login in phpbb3,page redirects after some time,not redirect directly to my main site,is there any solution

Posted by Anton on September 9th, 2010 at 8:02 am:

Hi all,

Excuse me if my technical descriptions aren’t up to scratch, but I’m not a web designer, and am trying to pick up things as I go along!

I’m running a PHPBB forum on my website, which works quite well.

The home page and all other pages of my site has been done in dreamweaver using header and footer templates.

I would like to eventually make my site such that it would be registration based …. free for users to browse through, until a certian point, then users must be registered to dig further in to information.

I want to use PHP to power this, as I have a good forum with over 3000 registered users and about 3000 posts. I don’t want users to have to re-register, and I don’t want to lose any of the forum content …. so this means changing the rest of my site to suit the forum. (The rest of the site has about 100 pages!)

Is this something that can be done??
Has anyone got any experience of doing something similar?

Cheers,
Anton

Commenting is disabled for this blog post