News:

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

Main Menu

flatten out the smf joomla bridge login module work in progress

Started by mojito, January 19, 2006, 04:08:38 AM

Previous topic - Next topic

mojito

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 ";
SMF 1.1 RC2 bridge 1.4

tbiser

Cool! Let us know how it goes? Got a site up with this new login?

mojito

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!
SMF 1.1 RC2 bridge 1.4

Kindred

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...

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mojito

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.
SMF 1.1 RC2 bridge 1.4

Advertisement: