News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Xoops Bridge Beta 2

Started by Orstio, May 27, 2007, 08:39:39 PM

Previous topic - Next topic

broham

santral, you edited your post, but just in case, I think the answer to your original question about the white screen is your configuration in the bridge's preferences.  The path needs to be correct, or it doesn't know where the forum is you want wrapped.  A correct path should be something like: /home/example/public_html/exampleSMFforum

To address your post as it is now, I am trying to work through those issues myself, too.  I am not the expert here, only a user; be aware that Orstio is the bridge's developer.

On my site, I have made my Xoops user menu invisible and offlimits.  I have some Xoops url's redirected at the moment until I figure out what code needs to be changed to point them to SMF. 
Quoteso how can we integrate the smf to xoops completelly???
I guess that's what we're working toward, right?  It sounds like Orstio will continue to add features to the bridge with newer versions, so time will tell how or when everything is integrated.  I personally would rather use SMF with limitations instead of the "out of the box" xoops forums.
SMF + Xoops dude, yeah!  Good stuff.

santral

ok..thanks broham ,)
and I think a bridge can't solve this problems...
we must edit xoops own files and some smf  files then we can install smf as a module ;)
I'm not the expert too..
but somebody could view xphpbbi and can integrate like this module....
so if somebody wants to analyse the xphpbbi ,and make a module like it for smf ,I can upload xphpbbi ....
thanks :)

broham

#22
Quote from: Orstio on June 10, 2007, 10:13:25 PM
You'll need to change the Xoops code to do that, or perhaps create alternative Xoops blocks to do it.

I would love to do whatever it takes, but I am working blindly on it.  I don't know what code should change or be added to what or where. 

EDIT - Sorry, forget this post for now folks.  I will try a few more things with template files and hopefully I'll figure out what the code should be to point clicks on xoops profile links to the smf profiles.

I'll be back with this topic more later on, I think.  I have other meshing I'd like to solve with xoops and smf, too, and I will surely raise more issues in the near future.
SMF + Xoops dude, yeah!  Good stuff.

seesoe

hello all i have been searching for solutions for my puzzle for a few weeks now, then it dawned on me that i can use this bridge to make things work out. let me explain my setup and what I'm doing.
we have 2 scripts
Xoops 2.0.16
and
RW:Scripts - download CMS 4.1

i run a movie website and my main script my whole site is run off of is xoops. however the download module (wf-downloads 3.2rc) is not exactly what I'm looking for for downloads pages. so i found (www.rwscripts.com) its a great script simple and loaded with features that are real handy for my application and all.

so i wanted to make my RW:Scripts CMS login run off of the xoops user db, but this doesn't work that easy. even though it has db login integration and writable plugins you can make, but i don't know how and i asked xoops professional site to make one and he said 800 bucks, so thats not an option to write a xoops plugin for Rw:scripts.

i found out that there was a smf plugin user login integrator for Rw:scripts and i have that now installed on there, so then i looked more and i found this thread and i was real happy, nice stuff.

so now i have
xoops trying to connect with smf and Rw;Scripts connections to smf thusly making xoops and Rw:scripts run off each other, in theory this should work.

my problem here is i can't get smf to run off of xoops user db, would this all work out? or will i have to have all the main users and registrations ran from the smf db?

I'm sorry for the long post but i really need help if anyone can

broham

#24
I upgraded to SMF 1.1.3, hoping the bridge would not be affected.  Unfortunately, the bridge only signs in users to the forum and not xoops with SMF 1.1.3.  I uinstalled, downgrading back to 1.1.2.

Is it just me?
SMF + Xoops dude, yeah!  Good stuff.

Orstio

The upgrade to SMF 1.1.3 shouldn't have affected anything for you, especially not the Xoops login...

broham

#26
That's not a good thing for me to hear, because the xoops login is the only thing affected.

With 1.1.3, logging in through the bridge only logs into the forum.  User is not signed into xoops side.  If I go ahead and log into the rest of the site with a xoops log in block... the SMF logout still works to log me out of the entire site.  It's just the login that does not work properly.

I go back to 1.1.2 and the bridge works great.
SMF + Xoops dude, yeah!  Good stuff.

seesoe

im useing 1.1.3 smf and i get the same effect talked about above

your saying if i use 1.1.2 it will work proper? if so how would i downgrade?

broham

I wouldn't recommend downgrading, of course.  I don't know how you would downgrade either.  I am able to downgrade, because the patch is uninstalled in the package manager, reverting to 1.1.2.
This is only a temporary fix for me, because I obviously want to be current with 1.1.3.
I have tried several times, but logging in does not work for xoops with the bridge and 1.1.3.

In fact, if I put my xoops in maintenance mode and sign in as admin... then use the bridge login block to be signed into the forum, it logs me out of xoops.  This should indicate something, right?  But, I don't know what.

All I am sure of is the bridge works fine with 1.1.2 but not 1.1.3, and if I have a unique problem, I am in trouble.
SMF + Xoops dude, yeah!  Good stuff.

santral

#29
are there big differences between smf and phpbb with codes (in databases)???......
I love nearly full integrated phpbb module...
couldn't  we  make smf ,like this phpbb module ????

seesoe

Quote from: broham on June 26, 2007, 12:14:15 PM
I wouldn't recommend downgrading, of course.  I don't know how you would downgrade either.  I am able to downgrade, because the patch is uninstalled in the package manager, reverting to 1.1.2.
This is only a temporary fix for me, because I obviously want to be current with 1.1.3.
I have tried several times, but logging in does not work for xoops with the bridge and 1.1.3.

In fact, if I put my xoops in maintenance mode and sign in as admin... then use the bridge login block to be signed into the forum, it logs me out of xoops.  This should indicate something, right?  But, I don't know what.

All I am sure of is the bridge works fine with 1.1.2 but not 1.1.3, and if I have a unique problem, I am in trouble.
no its not u i have same thing i get logged out xoops when u login with the bridge block.

as of now and as for good my smf is not going to be used by my site users, just the scripts so  i can bridge 3 scripts to make 2 work together.

so im going to install 1.1.2

Orstio

I can confirm this affects the Xoops sessions.  I'll see if I can make a work-around.

broham

Awesome, thanks.
Sittin' tight with SMF 1.1.2 in the meantime.
SMF + Xoops dude, yeah!  Good stuff.

broham

#33
The intention of this lengthy post is to share my little experience with SMF/Xoops, and I hope to help others with ideas as well as show that this integration can work.  I wish that more Xoopsers would use SMF and show enthusiasm so we may see continued help and support from such experts as Orstio, the bridge developer.
*I am using Xoops 2.0.16 and SMF 1.1.2, and I assume most or all of this will remain the same with the update to SMF 1.1.3 after Orstio resolves the sessions issue.
Of course, appropriate backups should be made of files, websites, and databases.
First, let's recap the basic procedures and settings that should apply to most of us when getting the bridge up and running.

• Upload the smf file to the modules folder.
• Go to Xoops admin, and install like any other module.
• Configure the modules preferences with the path to the smf directory, like /home/name/public_html/SMFdirectory - then,
choose to have the forum wrapped or not.
• In Xoops admin, configure your blocks.  Make the SMF login block visible, and the Xoops system login block invisible
(logging in MUST take place in the bridge login block to be signed into Xoops and SMF at the same time).
• In Xoops admin, configure groups permissions , making sure anonymous users have access to the SMF login block AND access
rights to the SMF module.  Do the same with registered users.  Admin should be fine by default, but double check.
• In Xoops admin, system general preferences, be sure you have custom sessions ON.

This should get you close to success, but now you need to check your SMF server settings.

Core Configuration
• Your forum url should be that of the SMF module
• Your path and Sources directory should be the actual stand alone forum

Feature Configuration
• Enable local storage of cookies - unchecked
• Use subdomain independent cookies - CHECKED
• Enable compressed output - unchecked
• Use database driven sessions - CHECKED

Now, with any luck, your bridge is functioning properly!  Test it out.  Create and register new accounts, and use them in the site.  Login, logout, change passwords, etc.

So, what about further integration?  I have modified a few things on my Xoops site and files to help mesh it all.  I do not advise you to do the same or claim any of it is necessary for YOU, but you might gain a few new ideas.
I do not have the Xoops User Menu visible, because those links do not point to SMF, and who wants multiple profiles for users?  The links in the User Menu can be changed, but I chose not to use it at all.
Also, I have redirected Xoops links that are no longer applicable, so users won't accidentally stumble upon them.  Here are my redirections:
/userinfo.php         -->  /modules/smf/index.php?action=profile
/user.php             -->  /modules/smf/index.php?action=register
/register.php         -->  /modules/smf/index.php?action=register
/viewpmsg.php         -->  /modules/smf/index.php?action=pm
/StandAloneDirectory  -->  /modules/smf
/StandAloneDirectory/ -->  /modules/smf
Might consider a redirection for /pmlite.php

Xoops comments include the poster's name and link to the profile, but the links point to the Xoops profile.  To fix this and have the link send you to the poster's SMF profile, I changed code in class/commentrenderer.php on line 340.
Replace:
$poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>';
With this:
$poster['uname'] = '<a href="'.XOOPS_URL.'/modules/smf/index.php?action=profile;u='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>';
*Important: this only works when users have the same Xoops uid # as SMF u #.  Due to some test accounts, my numbers were off, and I had to change a few users' numbers in the database.  To be sure the numbers are the same for new registrations, I created a new user, and changed the Xoops uid to match the SMF, and now the numbers are the same again for new registrations.  That being said, this solution might not work effectively for some webmasters if the id numbers are not in sync.  When correctly in sync, all is well.

Another issue to resolve or work around is the user avatar and post count, in Xoops comments.  I am sure there must be a way to get these from SMF, but I am not sure how the code should be, so I improvised by simply removing the avatars and post counts.  I did so by altering code in /class/commentrenderer.php.
I commented out or deleted:
$poster['avatar'] = $com_poster->getVar('user_avatar');
and:
$poster['postnum'] = $com_poster->getVar('posts');
That removes the information.  Then, in /modules/system/templates/system_comment.html the applicable code (pretty straight forward) should be removed so there are no empty spots where the avatar and post counts once existed.

For logging out, the SMF logout works to log users out of the entire site.  We don't want users to have to be in the forum to logout though, so SSI comes in handy.  I created a new block with this code:
require_once('/home/name/public_html/StandAloneForumDirectory/SSI.php');
global $context, $settings, $scripturl;

if ($context['user']['is_guest'])
{
ssi_login();

}


else
{
ssi_logout();
}

$_SESSION['logout_url'] = 'http://www.mywebsite.com' . $_SERVER['PHP_SELF'];

I am sure not all of that code is needed for it to work.  We can make this block available to registered users only, or anonymous users can see it and use it as another login location.  Alternatively, this code can be placed in the Xoops theme.html wherever desired.  Put the call for SSI.php in the beginning of the theme file, and place the functions wherever you want...
The SSI feature is obviously useful, as we can read elsewhere in this forum, to include recent posts, who's online, and a welcome message.

There are still a few things to work out, but it's a pretty sweet collaboration between SMF and Xoops if you ask me.
One thing I have played around with recently is the idea to have a wrapped AND unwrapped forum available for users to choose from when they visit.  I have succeeded with this in the form of an iframe, but users can navigate out of the forum in the iframe, so that won't do.  I don't know if cloning the module would work?

This concludes my rambling.  I hope it helps a few people that actually read it.  I also hope some people can give ME better suggestions.  Hopefully this big post doesn't just get in everyone's way.
SMF + Xoops dude, yeah!  Good stuff.

Orstio

Excellent!  Thanks for giving back to the community by sharing that, Broham.  :)

benbu75

#35
Hi, for reference to this issue, my site URL is hxxp:balancekt.com [nonactive] and SMF is located at hxxp:balancekt.com/forum [nonactive]

I am having some problems getting my bridge set up correctly.  I have the module settings configured, but when I go to the forum page, it seems like the background from the forums is there instead of the background from the Xoops theme.&nbsp;.&nbsp; The forum also seem to be off center in the frame.  Additionally, (and to be up front, I have absolutely no experience with PHP. My experience is limited to HTML, though I have dabbled in Microsoft SharePoint at work, which uses aspx.) I was not able to find the code that broham recommended modifying in class/contentrenderer.php.  Do I need a special editor for this, or will a simple text editor (notepad) suffice?

Thanks for the help though, the configuration advice that broham gave was very good, though I might suggest adding the site into the allowed list at Tools > Internet Options > "Privacy" tab > Sites if you are using Internet Explorer 7 and have your cookie settings set to anything but "Accept all cookies".  There may be a setting that makes this unnecessary, but I am new to both SMF and Xoops and was unable to find it.

Thanks in advance ;)

broham

@Orstio, my pleasure, wish I had more to offer.

@benbu75, at first glance, I think you need to edit your SMF style.css found in /SMFdirectory/Themes/default/style.css.  (make a backup)
It is probably css issues with either the smf theme css file, the xoops theme css file, or both.  Look at your margins or padding of smf.

How does it look if you use a different Xoops theme?
What version of Xoops are you using?  It says 2.0 in the footer.
SMF + Xoops dude, yeah!  Good stuff.

seesoe

when i turn on custom session and try to log into the site i log in, i takes me to login redirect (thanks for logging in) and then goes back to the home page, but when i turned debug on through sql editing, and i was back into the site

broham

Quotethanks for logging in
That indicates you are not logging in through the SMF login block.  You're logging in through Xoops.
The bridge is made to work for integrated login when users use the SMF login block only.
SMF + Xoops dude, yeah!  Good stuff.

seesoe

oops :D ya i have a static  login fields in my theme.html it should work after i update that code with the smf login block code

Advertisement: