Topic-icon Updated after a long tim

Active Subscriptions:

None
9 years 3 months ago #50706 by amirhs
Hi,

I updated Sclogin from version 3.x after a long time. The module was working just fine, but I thought due to the importance of module, it would be necessary to update for security and other reasons.

So far, the installation has caused the following errors:
1. Once I login, I get a blank page with this error: Fatal error: Class 'JFBCFactory' not found in /home/epcme/public_html/modules/mod_sclogin/helper.php on line 381

Literally, no one can login right now.

Regards,
Amir
The topic has been locked.
Support Specialist
9 years 3 months ago #50707 by mel
Replied by mel on topic Updated after a long tim
Amir,

Please set the Logout View Settings > Enable Profile Picture to Joomla or Hide. The Social Network option will not be applicable since JFBConnect is not installed. This should clear the error up, but I will add an issue to our tracker to fix the fatal error.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 3 months ago - 9 years 3 months ago #50826 by amirhs
Replied by amirhs on topic Updated after a long tim
Melissa,

Thank you; the instruction got the job done!

I would like to manually add a link next to Login / Register links; please guide me to the file containing the code. Also, I would like to add a Sign out link in User Menu, but do not know the URL for it and there is no such option in menu option; please instruct me on how to find the URL to sign out.

Regards,
Amir
Last edit: 9 years 3 months ago by amirhs.
The topic has been locked.
Support Specialist
9 years 3 months ago #50831 by mel
Replied by mel on topic Updated after a long tim
There are two places that the Login / Register links could show up:

1. Links or buttons to launch the modal window. Create a template override for /modules/mod_sclogin/tmpl/login.php. Around lines 28-31, you will see the following lines for adding the links:
echo '<div class="sourcecoast sclogin-modal-links sclogin"><a ' . $loginClass . ' href="#login-modal" role="button" data-toggle="' . $modalName . '">' . JText::_('MOD_SCLOGIN_LOGIN') . '</a>';
if ($showRegisterLinkInModal)
   echo $spacer . '<a ' . $registerClass . ' href="' . $helper->registerLink . '">' . JText::_('MOD_SCLOGIN_REGISTER_FOR_THIS_SITE') . '</a>';
echo '</div>';

2. Within the modal window when it is launched. Create template overrides for /modules/mod_sclogin/tmpl/joomlaLogin_horiztonal.php or joomlaLogin_vertical.php (depending on what you've set your orientation to).

joomlaLogin_horizontal around ln 42-47
<div class="control-group pull-left" id="form-sclogin-submitcreate">
                    <button type="submit" name="Submit" class="btn btn-primary"><?php echo JText::_('MOD_SCLOGIN_LOGIN') ?></button>
                    <?php if ($showRegisterLinkInLogin) : ?>
                        <a class="btn" href="<?php echo $helper->registerLink; ?>"><?php echo JText::_('MOD_SCLOGIN_REGISTER_FOR_THIS_SITE'); ?></a>
                    <?php endif; ?>
                </div>

joomlaLogin_vertical around ln 46-49 you'll see a similar block
The topic has been locked.
Active Subscriptions:

None
9 years 3 months ago #50863 by amirhs
Replied by amirhs on topic Updated after a long tim
Hi Melissa,

Thank you for a thorough feedback.

The second question remains unanswered.

Regards,
Amir
The topic has been locked.
Support Specialist
9 years 3 months ago #50869 by mel
Replied by mel on topic Updated after a long tim

Also, I would like to add a Sign out link in User Menu, but do not know the URL for it and there is no such option in menu option


It's not just a URL. There is javascript that needs to be called to perform the logout. Here's some sample code, you will first have to set $logoutButtonId to an appropriate value. If you want to be directed to a different page than the homepage on logout, set the first line to the appropriate URL.
$logoutUrl = JURI::root();
$logoutUrl = base64_encode(JRoute::_($logoutUrl, false));
$buttonHtml = '<input type="submit" name="Submit" id="' . $logoutButtonId . '" class="button btn btn-primary" value="'
                    . JText::_('JLOGOUT') . "\" onclick=\"javascript:jfbc.login.logout('" . $logoutUrl . "')\" />";
The topic has been locked.