Page 1 of 1

Simple Machine Forum Integration?

PostPosted: April 21st, 2011, 1:52 am
by Axman1413
Hi Guys and Gals,

So as you may remember from my other post about the power of s2M to present to the rest of my team for our upcoming website, and all is well and we're a go for using the best Membership plugin service known to man and WP.

Now I have another tech question regarding our future forum. The team has decided to use the Simple Machine Forum for the site. Now much like your forum here, it is a separate animal from WP. There are some offered plugins that allow SMF to be "bridged" to the WP site for Member Registration. I have been playing with it on a different domain.

The process is a little tricky, and works for WP member registration. So before I went to far into the process, I wanted to know from you here if there is anything I should know considering that s2M controls the registration and member account information.

The idea is that when someone registers for the paid membership (not the free) their registration information "bridges" over to the forum seamlessly for a convenient experience.

Will s2M support this function with SMF? And if not, do you have any suggestions for forums that will work in this capacity?

p.s. Just so you know, I have informed the rest of the team that I can embed the forum on an iframe page of the theme templates, in which I can assign the proper s2M subscription setting for access to the iframe page. However, that is not as seamless as we would like it to be because the Members will still have to create 2 different login accounts.

Re: Simple Machine Forum Integration?

PostPosted: April 21st, 2011, 12:33 pm
by cassel
I was considering asking the same question, about the same SMF, so i will be following this thread. Thanks for bringing it up.

Re: Simple Machine Forum Integration?

PostPosted: April 21st, 2011, 1:36 pm
by Cristián Lávaque
Hi Axman. :)

So, what you want to integrate are the accounts, not the access restrictions to the forums?

Re: Simple Machine Forum Integration?

PostPosted: April 21st, 2011, 4:57 pm
by Axman1413
Yes I want the Account information shared. There is a plugin as I mentioned for that does do that with the WP default account info, but since s2M overrides that feature, will that plugin interfere with the proper functionality of s2M?

I did successfully embed an Iframe with the forum in it on my existing site. And as expected the gate feature of s2M worked fine to protect the page. BUT SMF is much like a website in itself with a separate directory on the domain. That is not visible through the iframe, but we don't want people to stumble upon it on the net outside of the membership site.

There is a subscription mod for SMF, but really we want it part of the membership site. And I'm sorry but BBPress just won't cut it for the functionality in a forum that we are looking for.

Johnny

Re: Simple Machine Forum Integration?

PostPosted: April 21st, 2011, 5:40 pm
by Cristián Lávaque
I agree, SMF is my favorite forum option too (I was in the team for some years when the project started).

The thing is that s2Member can only control access to content managed by WordPress. To let s2Member manage the contentn in SMF, you'll need some custom code added to SMF.

SMF's index.php would probably work well, since everything is served through it, or settings.php, require some WP files so s2Member has a foot inside the door. Maybe this:

Code: Select all
require('/path_to_wp/wp-load.php'); 


Then try to work with s2Member's URI restrictions. WP Admin -> s2Member -> General Options -> URI Restrictions

Let me know if that helps. :)

Re: Simple Machine Forum Integration?

PostPosted: April 21st, 2011, 5:55 pm
by cassel
I dont want to highjack the thread but i am following it attentively. Do you mean you CAN have the forum accessible "as if" it was a custom capability, and being accessible only by members who purchased a certain package? Yet requiring extra coding?

Re: Simple Machine Forum Integration?

PostPosted: April 21st, 2011, 7:11 pm
by Cristián Lávaque
Cassel, it'd be harder to make it work with custom capabilities. What I'm suggesting is to use the URI restriction, which ties with levels, not custom capabilities. But yeah, with some custom coding, either one could be made to work.

Re: Simple Machine Forum Integration?

PostPosted: April 22nd, 2011, 12:55 am
by Axman1413
Ok Cristian-

So if I'm understanding you correctly, I put in the above code snippet
Code: Select all
require('/path_to_wp/wp-load.php');
somewhere in the index.php of SFM

(any particular place that calls for the function appropriately?)

then I will go into the URI Restrictions and put the URI for the forum, and in my test case is as follows:

URL = www.testdomain.com/forum/index.php

URI = /forum/index.php

And in essence, s2Member adapts that URI (which corresponds to the live and separate URL) and protects it on the appropriate level I entered it into. If I am correct, then that is awesome and the exterior site can be protected in that fashion.

I'm still going to embed the forum into my themes Iframe option page, but that takes care of the independent SMF site.

Now I believe that there should probably be a similar function that I could put into the SMF index.php to call on the s2Member user account information. to synchronize it to the forum. If not, thats fine because I have noticed many quality forums, like this one are separate from the website with regards to registration.

But let me know if I'm on the right track with this. And thanks again for all your help.

**p.s. @ hijacker...LOL this is what a support forum is all about; creating a display of the issues for many to get involved in, so our support ticket systems don't get overrun. Please feel free to ask away, as I may learn more than I had hoped to.

Re: Simple Machine Forum Integration?

PostPosted: April 22nd, 2011, 1:42 am
by Axman1413
Just a quick follow up. I did try that snippet in the index.php It caused an index error on the line, when I went to view the page. Soooo, either I put it in the wrong place or it won't work like that.?

I have included an attachment of the SMF index.php file

Re: Simple Machine Forum Integration?

PostPosted: April 22nd, 2011, 1:55 am
by Cristián Lávaque
I searched your file for wp-load.php and couldn't find it. Also, the path I wrote for that file was only an example, you have to use your real path to it.

You can try including that near the beginning, where other things get included (e.g. Settings.php), see if that works.

There's a chance that a name collision for a function, or something like that, happens if the same one is used in both scripts, but it's unlikely. Just thought I'd warn you.

If you get an error(s), post it here so I can tell what's going on and try to solve it. If you have a developer, though, which you should if you're not sure how to do these things, he should be able to figure this out.

I remind you that this is a hack to achieve what you want, since it's normally not possible. That said, hopefully we may come up with a cleaner way to achieve this.

By the way, restricting forum in the URI restrictions should be enough, you don't need the full URI. You can be as broad or specific as you want, depending on what you're trying to achieve.

Re: Simple Machine Forum Integration?

PostPosted: April 22nd, 2011, 3:32 am
by Axman1413
Fatal error: Cannot redeclare is_admin() (previously declared in /home/xxxxx/public_html/xxxxx.com/wp-includes/load.php:583) in /home/xxxxx/public_html/xxxxx.com/forum/Sources/Security.php on line 839

That is the error i get. And my developer is on vacation...working on more personal connections.

You will find the snippet i entered in the "Load Settings" section

Here is the index with the code script in it. I'm not sure if I have included too much of the path. HTML, & .CSS are my strengths, .php I'm working on learning. I do understand the overall purpose of the .php, but am not quite comfortable enough to edit like I can the others.

So I do appreciate you patience. And if we can't get this to work, then so be it. But if it's something you are interested in figuring out too, then we all learn something. I am well aware that not all things are possible with technology, especially when it comes to the integration of one thing to another.

So whatever we figure out, it'll be ok.

Re: Simple Machine Forum Integration?

PostPosted: April 22nd, 2011, 9:22 am
by cassel
**p.s. @ hijacker...LOL this is what a support forum is all about; creating a display of the issues for many to get involved in, so our support ticket systems don't get overrun. Please feel free to ask away, as I may learn more than I had hoped to.


It is just that i have so littleknowledge, that Christian has had to hold me by the hand before, step by step to achieve something apparently simple, so i knew my questions would be 10 times more basic than yours! I will just link to this thread when i talk to my helper again! :) At least, i know what i dont know!

Re: Simple Machine Forum Integration?

PostPosted: April 22nd, 2011, 1:05 pm
by Cristián Lávaque
Axman1413 wrote:Fatal error: Cannot redeclare is_admin() (previously declared in /home/xxxxx/public_html/xxxxx.com/wp-includes/load.php:583) in /home/xxxxx/public_html/xxxxx.com/forum/Sources/Security.php on line 839


Yep, it's a conflict between them because they both have a function named is_admin, and you can't create two functions named the same: "Cannot redeclare is_admin()".

OK, I'll talk with Jason and see what we can come up with.

Re: Simple Machine Forum Integration?

PostPosted: May 17th, 2011, 2:01 pm
by rbranson
Hello,
Have you had a chance to look into this further?
RDB

Re: Simple Machine Forum Integration?

PostPosted: June 17th, 2011, 8:25 pm
by cassel
Anything new?

Re: Simple Machine Forum Integration?

PostPosted: June 18th, 2011, 12:24 am
by Cristián Lávaque
Actually, not yet. But this is a thing we're very interested in, so I hope we'll have something to share sometime soon.

Re: Simple Machine Forum Integration?

PostPosted: June 18th, 2011, 3:31 pm
by Axman1413
Well although I haven't been able to actually integrate it with my s2M, I have found a way to load in on my own website page, and just set the SFM registration settings so that every new user needs Admin Approval before they can join.

That way I can manually check the information at this time. That in itself was one of my biggest concerns. The forum is for paid members of my membership site. So now that I have that taken care of, waitinguntil you guys Iron out the details is no problem.

Thanks for your hard work on this, and I do look forward to the plugin or update that will enable this feature.

Re: Simple Machine Forum Integration?

PostPosted: July 10th, 2011, 11:15 am
by LarsW
Cristián Lávaque wrote:Actually, not yet. But this is a thing we're very interested in, so I hope we'll have something to share sometime soon.


Hi Christián,
Have you managed to get it into the plugin so that I just can install SMF now?
Regards / Lars

Re: Simple Machine Forum Integration?

PostPosted: July 10th, 2011, 10:20 pm
by Cristián Lávaque
No, not there yet.

Re: Simple Machine Forum Integration?

PostPosted: July 30th, 2011, 4:13 am
by LarsW
Axman1413 wrote:Well although I haven't been able to actually integrate it with my s2M, I have found a way to load in on my own website page, and just set the SFM registration settings so that every new user needs Admin Approval before they can join.

That way I can manually check the information at this time. That in itself was one of my biggest concerns. The forum is for paid members of my membership site. So now that I have that taken care of, waitinguntil you guys Iron out the details is no problem.

Thanks for your hard work on this, and I do look forward to the plugin or update that will enable this feature.



Hi Axman,
Should be great to know how you solved it. I should have it on one of my site but can't get it to work properly.

Regards / Lars

Re: Simple Machine Forum Integration?

PostPosted: August 2nd, 2011, 11:07 pm
by Axman1413
Well it all depends on what theme you are using. I use Weaver theme primarily, which allows you to place a full page Iframe on a page.

If you know any coding at all, then you can probably do the same with any theme by inserting the Iframe code in with the URL to your SMF forum. paying close attention to the iframe width and height to make sure it appears correctly. And you can then set the permissions on SMF to only allow members to join through activation of an admin, if you are concerned about non-members accessing your forum.