Joomla (JomSocial) - Banners and Signs Plus!

engineachooInternet και Εφαρμογές Web

4 Δεκ 2013 (πριν από 4 χρόνια και 7 μήνες)

102 εμφανίσεις

Joomla (JomSocial) and phpBB3 integration

Setup Instruction, v.1.3
Updated May 12, 2009

This instruction will help you to integrate Joomla (with JomSocial) and phpBB3 forum. It provides modi fications
(hacks) to phpBB3 files and basic description why a nd what is changed.

I modified files as described in this document on m y own sites. It works as expected and Im fully con tent with it.
However, you take full responsibility for using met hods provided below. I cannot guarantee that everyt hing works
fine on your site.


Obtain and install the products 3
Create Skype field in JomSocial 4
Automatic modification 5
Manual modification 6
File viewtopic.php 6
File \includes\functions_display.php 10
File \includes\functions_content.php 11
File\styles\prosilver\template\viewtopic_body.html 13
File \styles\prosilver\imageset\icon_contact_icq.gif 14

What it does?

Basically youll achieve several things by using mo difications provided below:

 Avatar syncing. Avatar from your Joomla user profil e is displayed on phpBB3 forum topics.
 Several fields syncing. City, website link, age and Skype icon from your Joomla user profile is displa yed
on phpBB3 forum topics.
 Profile linking. When user clicks on avatar or user name in the phpBB3 forum, the link takes him to th e
corresponding users Joomla profile page instead of taking to the phpBB3 profile.

Look at the image below to see how this looks in pr actice. Note that all fields are from Joomla.

NOTE: Skype is used instead of ICQ. If you want to use both, you have to modify the code further.

What you need?

You need the following components:

 Joomla (version 1.5.9 or newer)

 phpBB3 (version 3.0.4 or newer)

software for login synching:
o JFusion (version 1.1.2 RC or newer) or

o RokBridge (version RC5b3 or newer) ew

 JomSocial (version 1.1.145 or newer)

NOTE: instructions provided below as well as attach ed files are designed for indicated product version s. I assume
youre using software listed above and applying pro vided instructions on default installation. However, everything
should work fine with very little or no customizati ons on other product versions as well.

Should you need any help dont hesitate to write me to
. Ill do my best to solve your

Obtain and install the products

1. Install Joomla (if you havent already done so).

2. Install JomSocial.

3. Install phpBB3 and (optionally) Jfusion or RokBridg e. Its better to install phpBB3 into the same data base
as Joomla and within Joomla directory structure.

NOTE: I assume you installed phpBB3 into the same d atabase as Joomla. If not, youll have to change li nes in


$sql = "SELECT id FROM jos_users WHERE username='".$row['username']."'";

$sql = "SELECT id FROM
jos_users WHERE username='".$row['username']."'";

After successful installation you should have your Joomla site and phpBB3 forum up and running. Make s ure that
syncing works as expected, i.e. you should only nee d to login once (either on Joomla site or on phpBB3 forum)
and on other part the login process should go autom atically. Of course, this synching works only if yo u installed
and configured Jfusion or RokBridge.

NOTE: if you have user synching in place, its usua lly better to disable user registration in phpBB3 c ompletely.
You should instruct your users (e.g. in FAQ section ) to register through standard Joomla (JomSocial) i nterface, to
change avatar and other profile fields here.

To disable user registration in phpBB3 login to php BBs administrator control panel => General => User
registration settings and set Account activation to Disable.

Create Skype field in JomSocial

As it was mentioned before, we need avatar, city (l ocation), website, age and Skype fields syncing and profile

Firs of all, in the JomSocial custom profiles creat e a new field Skype. We need it for Skype data. Look at the
example bellow:

Integrating Joomla (JomSocial) with phpBB3

You need to modify several files in a phpBB3 instal lation folder:

 viewtopic.php
 includes\functions_display.php
 includes\functions_content.php
 styles\prosilver\template\viewtopic_body.html
 styles\prosilver\imageset\icon_contact_icq.gif

You can overwrite original files with the files pro vided in this package (
make a BACKUP first!
) or go step by step
and do all the customizations yourself.

NOTE: I assume you use prefix jos_ for Joomla dat abase tables. If not, change the code accordingly.

NOTE: usually its better to comment original code out so that it would be easier to revert changes ba ck if needed.

NOTE: modifications are noted by //Hacked by DS

Automatic modification

To overwrite the files simply unzip to yo ur phpBB3 root folder (by default this is /distribu tion but it
could also be /forum or something else). This will overwrite all 5 files mentioned previously.

Manual modification

Alternatively you can do everything yourself by fol lowing these steps.

File viewtopic.php

Most of the modifications take place in this file. This file displays topics with all the required fie lds (author name,
city, etc...). Basically we grab information of the appropriate user from the Joomla (JomSocial) datab ase and
output it in this file.

1. To fetch required fields from JomSocial database fi nd the code at around line 1054

and modify it as following

2. To display city (location) find the line

and change it to

3. To get the correct avatar change the whole line whi ch begins like this


4. To display website find the following fragment

and insert the code so that it looks like this

5. To display Skype sign and sync Skype info with JomS ocial find the code

and change it to

6. To display age change


File \includes\functions_display.php

We need to rewrite function get_user_avatar so that the correct avatar would be displayed in t he forum.

Find the function get_user_avatar and change it to match the source below. Keep back up copy of the original
function! I simply commented the original function out.

NOTE: if you want to display small avatars, comment the line 1239 (line numbers valid for the example above)
and uncomment the line 1238.
File \includes\functions_content.php

We need to change this file for proper profile link ing (user name and avatar should point to JomSocial profile).

1. Find the code

and insert the following code after it. The result should look like

2. Find the code

and change it appropriately

NOTE: this assumes you dont use SEF urls. With SEF turned ON, the URL will be different. Sometimes UR L is
different from this example even when SEF is OFF.
In any case, if your URL is wrong (when you click a n avatar it doesnt take you to the JomSocial profi le page of
the corresponding user), try to construct the url y ourself. Just login to your Joomla page, go to any users profile
and see what URL looks like. Then change the above two lines accordingly.


We need to change this file to display age correctl y and to show Skype name instead of ICQ.

1. It looks like some phpBB3 templates dont have a fi eld to show authors age (or at least I didnt find it). In
case you use prosilver template find

and add the following line after it:

2. If you decided to display Skype icon, change the te xt accordingly. Find the line with U_ICQ (around li ne
207) and put Skype in two places instead of ICQ :

NOTE: sometimes you have to clear \cache folder in order your changes to take effect immediately.

File \styles\prosilver\imageset\icon_contact_icq.gif

Overwrite this file with the file provided in this package to see Skype icon instead of ICQ.

Further Support

Thats it. Hopefully everything works fine. If you need further customizations or have special wishes, well be
glad to help you for little or no price.

If you dont want to set up your site yourself, we can do a complete Joomla+JomSocial (or Community
Builder)+RokBridge+phpBB3 site setup for you.

If you have questions or want to share your experie nce please write us to
or complete
a form at