nipun_jain wrote:
Well, here's my 2 cents.
What I would be looking from a CB SMF plugin is:
1. Ability to view CB profiles by following the link in the forum.
2. Forum posts tab in CB.
3. Ability to login to Joomla and SMF with one login module.
4. Ability to use CB avatar in forum.
5. Single PM support for CB and SMF.
Now I am very new with Joomla, CB and SMF, so don't expect me to know whether the above requests are valid for a plugin or not, these are just the features that I would like to have in a Joomla, CB and SMF combination.
Hello, Nipun. Your Wish List is actually a good one, and I'll address each one separately.
Items 1 and 3) Smeallum is correct - the Joomlahacks bridge already has this built in. Also, Joomlahacks is introducing more CB functionality into the next version of the bridge, and the team seems dedicated to making their bridge as CB-friendly as possible. I'll give you an in-depth discussion of Item 1 in just a bit.
Item 2) Done. I am going to add the Karma (and maybe a couple of other things), but I got this working.
Item 4) Done. My approach is to allow the member to decide whether to use their CB avatar. If the member chooses to use the CB avatar (s)he can simply select that option and click.
Item 5) Now, this is tricky for one main reason - namely, PMing is not a core feature of CB or Joomla. So, literally, there are several possible PM solutions that could be installed. I'm still wrestling with the right approach. Theoretically, I could patch SMF into CB and allow the forum's native PM system to be used (not sure how practical that is yet). Or, maybe there is a way I can reroute a member to a CB PM tab... again, gotta do some experimenting.
Now, back to Items 1 and 3...
If CB is crucial for you, and you need to not have to use a separate login module, you may want to use the Joomlahacks bridge. Unfortunately, login is at a module level, and really not something for a CB plugin. Again, that is why I choose the Joomlahacks solution. So, that's not something I can handle.
However, regarding the profile, if you're already married to the "official" SMF bridge, then you should be able to accomplish Item 1 at a template level. Here are the steps:
1) Either create a new template, or make a copy of an existing one you like. NEVER alter the DEFAULT SMF template, as this acts as the source for all other templates.
2) Find the INDEX.TEMPLATE.PHP file and open it. This file controls the top menu for all forum pages. This is where your main forum buttons/links are displayed (i.e., Home, Help, Seach, etc.).
3) To to around line 388. This is the section of code that generates your forum's main navigation buttons. The comment immediately preceeding the code is
[code:1]
// Show the menu up top. Something like [home] [help] [profile] [logout]...
[/code:1]
The code that controls the PM center is:
[code:1]
// Go to PM center... [pm]
if ($context && $context)
echo '<li><a' , $current_action == 'pm' ? ' class="active"' : '', ' href="', $scripturl, '?action=pm">' , $txt , '', $context > 0 ? '[<strong> '. $context['user'] . '</strong>]' : '' , '</a></li>';
[/code:1]
The code for Profile is:
[code:1]
// Edit Profile... [profile]
if ($context)
echo '<li><a' , $current_action == 'profile' ? ' class="active"' : '', ' href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
[/code:1]
See? These are merely links. That is part of what makes SMF great - it is very flexible and can be redirected fairly easily.
Now, regarding the Profile, below I've posted the code from the Joomlahacks bridge that reroutes SMF's native profile to CB (found in the functions.smf.php file for the Joomlahacks bridge):
[code:1]
array_push($search, $boardurl.'/index.php?action=profile"', $boardurl.'/index.php?action=profile;user='); //url's for a users profile were replaced from u=ID_MEMBER to user=id above
array_push($replace, $mosConfig_live_site.'/index.php?option=com_comprofiler"', $mosConfig_live_site.'/index.php?option=com_comprofiler&task=userProfile&user=');
[/code:1]
So, really, the Joomlahacks bridge simply redirects the SMF Profile link to CB. Using the same general approach, you should be able to accomplish the same thing by tweaking the right SMF template file. Of course, this is a "hard" fix (instead of Joomlahack's approach, which is to be able to select which Profile you want to use in the administrative backend), but hey, if it works...
Hope this makes sense.
Regards,
Brat.
Post edited by: Brat, at: 2006/08/07 03:06
Post edited by: Brat, at: 2006/08/07 03:07