|
Additional Info icons with Community Builder 11 Months, 3 Weeks ago
|
|
Working procedures have now been uploaded. See post below:
www.bestofjoomla.com/component/option,co...d,68/id,22689/#22689
When I first started coming to the Fireboard forums and playing with the forums some on my own site, I noticed that here there were additional icons under each person post information (under the Online Notification box). These icons show things such as gender, birthday, AIM, ICQ, skype. Well, I started to get interested in how to get these linked to Community Builder because it looked like they would only work with the internal FireBoard profile.
Well, after looking at the code for a while, I think I am close to a working solution. I will be modifying the admin.comprofiler.html.php file inside of the administrator/components/com_fireboard folder. This will allow the user to specify the field that would link back for things such as gender and birthday. A screen capture of a first draft working example is below. Also, there is some error handling going on so you won't have an issue if you enter the wrong field name or something.
The other file that will be modified is the view.php file which resides in the Default template, or if you have a custom one under your custom template. A working example of it in action can be seen at the following site.
www.staticsm.com/index.php?option=com_fi...catid=2&id=19#19
Now, I know not much can be seen from this, but it is truly pulling this information from my Community Builder Field section. As soon as I have more information I will post it. Right now I am pretty busy, so this maybe something I can't get to and completely verify before posting until this weekend.
If there is any interest in this, please post here and let me know. Thanks.
|
|
|
Logged
|
|
|
Last Edit: 2007/09/14 18:03 By rockandchelle.
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 3 Weeks ago
|
|
|
I am absolutely interested in this. Keep us updatet!
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 3 Weeks ago
|
|
Hello,
I#m very very very very interested in this!!!!
Good work!!
Greetings, Roland
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 2 Weeks ago
|
|
As promised, here is the working version. Now, I think I have everything included, but if you run into any problems...please contact me. You must read the following instructions before continuing.
- First things first, this is just a modification by someone in the community that wants to make this better. There is not guarantees that this will work, although it works fine for me.
- Backup all files before editing
- The language file I am using is for English only, but you can mod it as you need for other languages
- Did I already say to backup all files??
- If you have any code changes or suggestions, let me know.
- If I didn't say it already -- BACKUP!!!
Ok, the way this mod works is that it allows the user to define the field names in the Fireboard Configuration panel that link to the applicable fields created in Community Builder. The code will then see if those fields are valid and if anything is there, and if so will overwrite that additional info field. The procedure is broken up into 4 sections as defined below.
SECTION 1: Setup Community Builder new Tab
- Login to the Administrator Panel Backend
- Select Components >> Community Builder >> Tab Management
- Select the New Tab Option (this only needs to be done if you want to add the fields to a new tab, which is what I recommend)
- Set the Title to whatever you want (I recommend something like Personal Info)
- Set Publish to Yes
- Set Position to Main Area (Below left/middle/right)
- Set Display Type to Tabbed Pane
- Set everything else as desired
See the image below for more details:
SECTION 2: Setup Community Builder Fields
- Select Components >> Community Builder >> Field Management
- Add the following fields with the following parameters

* At the bottom of the screen, after selecting Drop Down (Single), Press the Add a Value button until two fields are available. Enter the two values listed.
** At the bottom of the screen, after selecting Web Address is a type box, Select the Value listed in the Type Box
- c. At the Field Management screen Set the Required, Profile, Registration, Published and Ordering as desired.
SECTION 3: Modify the view.php code in Fireboard
- Located the following: components/com_fireboard/template/default/view.php
- Backup up your view.php file before editing
- Download and Open up components/com_fireboard/template/default/view.php in a text editor
- Locate the following code at or around line 522:
| Code: |
$database->setQuery("SELECT a.*,b.name,b.username,b.gid FROM #__fb_users as a LEFT JOIN #__users as b on b.id=a.userid where a.userid='$fmessage->userid'"«»);
$database->loadObject($userinfo);
|
- Immediately following this code, put this code in place:
| Code: |
// Start Mod by rockandchelle to add community builder additional info
if ($fbConfig['fb_profile'] =="cb" && $fbConfig['cb_profile'] && $fmessage->userid > 0)
{
unset($cbinfo);
$database->setQuery("SELECT * FROM #__comprofiler where user_id='$fmessage->userid'"«»);
$database->loadObject($cbinfo);
if ($cbinfo->$fbConfig['cb_gender_field'] != '') {
$gender = $cbinfo->$fbConfig['cb_gender_field'];
if (strcasecmp($gender,"male")==0) {
$userinfo->gender = 1;
}
if (strcasecmp($gender,"female")==0) {
$userinfo->gender = 2;
}
}
if ($cbinfo->$fbConfig['cb_personaltext_field'] != '') {
$userinfo->personalText = $cbinfo->$fbConfig['cb_personaltext_field'];
}
if ($cbinfo->$fbConfig['cb_icq_field'] != '') {
$userinfo->ICQ = $cbinfo->$fbConfig['cb_icq_field'];
}
if ($cbinfo->$fbConfig['cb_location_field'] != '') {
$userinfo->location = $cbinfo->$fbConfig['cb_location_field'];
}
if ($cbinfo->$fbConfig['cb_birthday_field'] != '') {
$userinfo->birthdate = $cbinfo->$fbConfig['cb_birthday_field'];
if (strcasecmp($cbinfo->$fbConfig['cb_showage_field'],"no") == 0 ) {
$userinfo->birthdate = substr($cbinfo->$fbConfig['cb_birthday_field'],5,5);
}
}
if ($cbinfo->$fbConfig['cb_aim_field'] != '') {
$userinfo->AIM = $cbinfo->$fbConfig['cb_aim_field'];
}
if ($cbinfo->$fbConfig['cb_msn_field'] != '') {
$userinfo->MSN = $cbinfo->$fbConfig['cb_msn_field'];
}
if ($cbinfo->$fbConfig['cb_yim_field'] != '') {
$userinfo->YIM = $cbinfo->$fbConfig['cb_yim_field'];
}
if ($cbinfo->$fbConfig['cb_skype_field'] != '') {
$userinfo->SKYPE = $cbinfo->$fbConfig['cb_skype_field'];
}
if ($cbinfo->$fbConfig['cb_gtalk_field'] != '') {
$userinfo->GTALK = $cbinfo->$fbConfig['cb_gtalk_field'];
}
if ($cbinfo->$fbConfig['cb_websiteurl_field'] != '') {
$userinfo->websiteurl = $cbinfo->$fbConfig['cb_websiteurl_field'];
}
if ($cbinfo->$fbConfig['cb_websitename_field'] != '') {
$userinfo->websitename = $cbinfo->$fbConfig['cb_websitename_field'];
}
}
// End Mod
|
- Save the file and reupload to: components/com_fireboard/template/default/view.php
SECTION 4: Modify the admin.fireboard.html.php code in Fireboard
- Located the following: administrator/components/com_fireboard/admin.fireboard.html.php
- Backup up your admin.fireboard.html.php file before editing
- Download and Open up administrator/components/com_fireboard/admin.fireboard.html.php in a text editor
- Locate the following code at or around line 1837 (note I had to use brackets so it would show up correctly, so dont' search for exactly what I have here...search on something like _COM_A_COMBUILDER):
| Code: |
[tr align = "center" valign = "middle"]
[td align = "left" valign = "top" width="25%"][?php echo _COM_A_COMBUILDER ?]
[/td]
[td align = "left" valign = "top" width="25%"][?php echo $lists['cb_profile']; ?]
[/td]
[td align = "left" valign = "top"][?php echo _COM_A_COMBUILDER_DESC ?]
[/td]
[/tr]
|
- Immediately following this code, the code found in the following file in place.
SECTION 5: Modify the english.php language file code in Fireboard
- Located the following: administrator/components/com_fireboard/language/english.php
- Backup up your english.php file before editing
- Download and Open up administrator/components/com_fireboard/language/english.php in a text editor
- Somewhere in the file add the following code (I added it at the beginning right after the Don't allow direct linking code line
| Code: |
// CB Additional Info
DEFINE('_CB_MYPROFILE_BIRTHDAY', 'Birthday Field');
DEFINE('_CB_MYPROFILE_BIRTHDAY_DESC', 'This is the birthday field as defined in Community Builder. Typically this is something like cb_birthday, and should setup in CB as a Date type.');
DEFINE('_CB_MYPROFILE_SHOWAGE', 'Show Age Field');
DEFINE('_CB_MYPROFILE_SHOWAGE_DESC', 'This is the show age/year field as defined in Community Builder. Typically this is something like cb_showage, and should setup in CB as a Drop Down (Single Select) with the two values being Yes and No.');
DEFINE('_CB_MYPROFILE_GENDER', 'Gender Field');
DEFINE('_CB_MYPROFILE_GENDER_DESC', 'This is the gender field as defined in Community Builder. Typically this is something like cb_gender, and should setup in CB as a Drop Down (Single Select) with the two values being Male and Female.');
DEFINE('_CB_MYPROFILE_LOCATION', 'Location Field');
DEFINE('_CB_MYPROFILE_LOCATION_DESC', 'This is the Location field as defined in Community Builder. Typically this is something like cb_location, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_PERSONALTEXT', 'Personal Text Field');
DEFINE('_CB_MYPROFILE_PERSONALTEXT_DESC', 'This is the Personal Text field as defined in Community Builder. Typically this is something like cb_personaltext, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_ICQ', 'ICQ Field');
DEFINE('_CB_MYPROFILE_ICQ_DESC', 'This is the ICQ field as defined in Community Builder. Typically this is something like cb_icq, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_AIM', 'AIM Field');
DEFINE('_CB_MYPROFILE_AIM_DESC', 'This is the AIM field as defined in Community Builder. Typically this is something like cb_aim, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_MSN', 'MSN Field');
DEFINE('_CB_MYPROFILE_MSN_DESC', 'This is the MSN field as defined in Community Builder. Typically this is something like cb_msn, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_YIM', 'YIM Field');
DEFINE('_CB_MYPROFILE_YIM_DESC', 'This is the YIM (Yahoo Instant Messenger) field as defined in Community Builder. Typically this is something like cb_yim, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_SKYPE', 'SKYPE Field');
DEFINE('_CB_MYPROFILE_SKYPE_DESC', 'This is the Skype field as defined in Community Builder. Typically this is something like cb_skype, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_GTALK', 'GTalk Field');
DEFINE('_CB_MYPROFILE_GTALK_DESC', 'This is the GTalk (Google Talk!) field as defined in Community Builder. Typically this is something like cb_gtalk, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_WEBSITE_NAME', 'Website Name Field');
DEFINE('_CB_MYPROFILE_WEBSITE_NAME_DESC', 'This is the Website Name field as defined in Community Builder. Typically this is something like cb_websitename, and should setup in CB as a Text field.');
DEFINE('_CB_MYPROFILE_WEBSITE_URL', 'Website URL Field');
DEFINE('_CB_MYPROFILE_WEBSITE_URL_DESC', 'This is the Website URL field as defined in Community Builder. Typically this is something like cb_websiteurl, and should setup in CB as a Text field.');
|
SECTION 6: Setup the Fireboard Backend Configuration
- Login to the Administrator Panel Backend
- Select Components >> Fireboard Forum
- Select the Fireboard Configuration Button
- Scroll down to the integration section and enter the appropriate fields as setup in Step 2 (see below for example)

I have attached a link to a zip file with the three files that need to be changed (Section 3, 4, 5). These files can just be directly uploaded if no other changes have been made to these files in the past.
FireboardCBExtraInfoMod.zip
After this is all complete, the user can then fill in the fields in their profile that they would like to be visible.
Again, if you find any mistakes or have any questions feel free to ask.
|
|
|
Logged
|
|
|
Last Edit: 2007/09/14 18:05 By rockandchelle.
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 2 Weeks ago
|
|
|
Cool just testing now. I'll send solutions to bugs if I find any.
|
|
|
Logged
|
|
|
Last Edit: 2007/09/14 18:06 By jabberwock.
|
|
|
We are what we repeatedly do. Excellence, then, is not an act, but a habit - Aristotle
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 2 Weeks ago
|
|
|
It is completely working, there was just so much there that it took me a while to fill in the post completely..but now it is complete and ready to try.
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 2 Weeks ago
|
|
It works!!!
Thanks thanks and thanks...
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 2 Weeks ago
|
|
|
That is great, I would love to see this rolled into the next version or something.
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 2 Weeks ago
|
|
Works perfect. Thank you so much for your work. Staff: please include this in further Versions 
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Additional Info icons with Community Builder 11 Months, 2 Weeks ago
|
|
Hello,
I have the CB Profile Flag Plugin on my site.
Here you can select your country in a CB-dropdownfield. After this a flag was shown in CB-Profil and in a special Login-Module.
Do you know a way to integrate this in Fireboard... I think this works on the same way as the gender-symbol...
Greetings,
Roland
|
|
|
Logged
|
|
|
Last Edit: 2007/09/15 07:20 By roland76.
|
|
|
The administrator has disabled public write access.
|
|
|