smf plugin

17 years 9 months ago #18307 by Brat
Replied by Brat on topic Re:Brat's Plugin
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... B)

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

Please Log in to join the conversation.

17 years 9 months ago #18310 by smeallum
Replied by smeallum on topic Re:Brat's Plugin
Man...you are doing some serious work here ;)

I hope it is multi-language friendly too(Joomfish)!!

BTW: When are you going to release it more or less? :whistle:

Cheers,
NiCo

Please Log in to join the conversation.

17 years 9 months ago #18311 by Brat
Replied by Brat on topic Re:Brat's Plugin
smeallum wrote:

Man...you are doing some serious work here ;)

I hope it is multi-language friendly too(Joomfish)!!

BTW: When are you going to release it more or less? :whistle:

Cheers,
NiCo


Considering that I'm doing this primarily to meet a need I have for a project, it'll be done sooner than later, guaranteed. :laugh:

By "multi-language friendly," the code for the plugins is really modified versions of the code from the actual SMF program. SMF as you know uses language files. Right now, I have some the phrases hard-coded in English as I finish development (as I have a lot of complicated code to deal with first). However, I can easily replace these with $txt[#] code from SMF's native language files. If needed, I can actually create a side language file with txt codes that you can replicate for the language(s) of your choice - just like SMF. Hopefully, this will make the plugin more friendly.

I'll keep this in mind as I wrap this up. I've already gotten a LOT of the major functionality done. I'm adding Karma to the profile (per request).

Also, I think I've worked out a very simple way to reroute PMs to something else (i.e., UDDEIM). Okay, for anyone who has bridged SMF, I now now that the following lines from the Joomlahacks bridge definitely are what allow SMF to reroute to CB links:

[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]

I just tested the following, and it worked in my lab.

[code:1]
array_push($search, $boardurl.'/index.php?action=pm;sa=send"'); //url for forum private messenger
array_push($replace, $mosConfig_live_site.'/index.php?option=com_uddeim&task=new"');
[/code:1]

Again, this has to be done at either a bridge level OR you can add it to the PM link section of your theme's main index template (as I explained in the previous push). On the bridge level it works regardless of what theme you use.

Okay, that's all I can think of for now. Just keep posting those ideas and thoughts - they sure help.

NOTE: Before I release this generally, I'd rather it be beta tested first. If you'd like to beta, please PM me with a good email addy and I will send the files to you. Again, this is JUST for beta testing. If all goes well, I'll then publicly release the beta. I should have a stable beta ready by the end of the week, if not sooner. Thanks again for all the comments.

Regards,
Brat.

Post edited by: Brat, at: 2006/08/07 06:29

Post edited by: Brat, at: 2006/08/07 06:31

Please Log in to join the conversation.

17 years 9 months ago #18329 by slamit93
Replied by slamit93 on topic Re:Brat's Plugin
I've got something...

Either I am missing something, or it is just something that nobody else has run into yet, but I need the ability in SMF to limit access to boards in SMF through user groups...

problem is, with the joomlahacks bridge set to use the CB profile, you can't access the SMF profiles to (I'm assuming) assign the users to their respective groups.

While typing this, I just realized that I can probably just change that setting in the bridge while assigning the users to groups and then change back, but it would be VERY nice if I didn't have to do that, and could just access the proper info through the CB profile.

I'm not sure if you had already included this functionality, but if not, it would be great if you could.

If what I am asking is not clear, please let me know, and I will try to clarify.

Please Log in to join the conversation.

17 years 9 months ago #18332 by Brat
Replied by Brat on topic Re:Brat's Plugin
slamit93 wrote:

I've got something...

Either I am missing something, or it is just something that nobody else has run into yet, but I need the ability in SMF to limit access to boards in SMF through user groups...

problem is, with the joomlahacks bridge set to use the CB profile, you can't access the SMF profiles to (I'm assuming) assign the users to their respective groups.

While typing this, I just realized that I can probably just change that setting in the bridge while assigning the users to groups and then change back, but it would be VERY nice if I didn't have to do that, and could just access the proper info through the CB profile.

I'm not sure if you had already included this functionality, but if not, it would be great if you could.

If what I am asking is not clear, please let me know, and I will try to clarify.


Yeah, I know exactly what you're talking about - I found it very annoying. Hopefully, this will be fixed in later versions.

To work around it, the SMF plugin rewrites the profile URL so that it points to the real forum profile. So, what you'd do is click PROFILE, which takes you to CB, then you'd go to the Forum Profile tab, and at the bottom is the "fixed" link. Thus far, it works exactly as it should.

Regards,
Brat.

Please Log in to join the conversation.

17 years 9 months ago #18348 by smeallum
Replied by smeallum on topic Re:Brat's Plugin
I might be a bit confused here, but i think you guys are a bit confused here :P

Restricting access to certain user groups to certain boards in SMF is done through SMF Administration page. You must obviously be logged as an administrator.

To manage user groups:

Administrator > Members > Membergroups > Edit Membergroups

and then to define which groups are allowed to read/post to each individual board:

Administrator > Forum > Boards > Modify boards


Isn't that what you are trying to do? If so, it doesn't matter how you have the Joomlahacks bridge to behave ;-)

Cheers,
NiCo

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.177 seconds

Facebook Twitter LinkedIn