Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Joomla Bridge Support => Topic started by: mojito on January 19, 2006, 04:08:38 AM

Title: flatten out the smf joomla bridge login module work in progress
Post by: mojito on January 19, 2006, 04:08:38 AM
Dear guys interested in having a thinner login and welcome message.

I have built one which works, but had to hard code a "2" (for my system anyway) for the variable $params->get('logout')

and this otherwise makes this logout link break!

heres my code using joomla $my to check login status
if($my->username){
echo $my->username." is logged in ";
//logout link-doesnt work-takes me to wrong place, params wrong..
//echo "params->get('logout')  = " .$params->get('logout');
if ($params->get('logout')=="2")
$_SESSION['return'] = sefReltoAbs(basename($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING']);

echo '
<a href="', sefReltoAbs($scripturl . 'action=logout&amp;returnurl=2'.$params->get('logout').'&amp;sesc='. $context['session_id']), '">', $smf_logout_button ? '<img src="' . (!empty($smf_logout_button_image) && $smf_logout_button_image!="" ? $smf_logout_button_image : $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif').'" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108], '</a>';


}
else{
//echo "Welcome Guest ";
Title: Re: flatten out the smf joomla bridge login module work in progress
Post by: tbiser on January 22, 2006, 02:21:17 PM
Cool! Let us know how it goes? Got a site up with this new login?
Title: Re: flatten out the smf joomla bridge login module work in progress
Post by: mojito on January 23, 2006, 03:38:57 AM
Not yet; The module code works now, but I see from the parameters available on the module_smf_login, a lot of the stuff can be hidden.

Get this -I didnt even know a module could have parameters! I only recently saw this, click on the relevant module checkbox then edit!

maybee you dont need mine? Theres a bit of code at the bottom which was needed (and I REM'd) which keeps it all wrapped!
Title: Re: flatten out the smf joomla bridge login module work in progress
Post by: Kindred on January 23, 2006, 08:39:18 AM
mojito...  this is what Orstio has been trying to tell you.  The module parameters are controlled from the module's XML file.   That XML file must be loaded and the module saved, at least once for paramters to take effect...  THAT has been the cause of your " $params->get('logout')" doesn't work...

Title: Re: flatten out the smf joomla bridge login module work in progress
Post by: mojito on January 23, 2006, 09:28:18 AM
Yes thanks to all for clearing that one up. If anyones interested in the final code they can get it from www.mycambs.com-register then email me at [email protected]

I'm trying to get members! desperate times, then I'll give it to ya...it looks like yahoo.com at the top.