Topic-icon How do I configure the pop-u[

Active Subscriptions:

None
9 years 6 months ago #47965 by spikesantee
Alex,

I'm trying to set up my site so people either must register or login to read my articles. I updated to 6.2.2 today.

I have the articles set to Registered and a Register to read more link is displayed. If I click on that Register to read more link I go to the SCLogin page. The pop-up doesn't pop up.

If I click on the Login button in the SCLogin module then the pop-up pops up.

Can you help me out? Thanks in advance.

Spike
The topic has been locked.
Support Specialist
9 years 6 months ago #47978 by alzander
Spike,
Glad to hear form you again. I hope things are well.

As to your question.. well, hmm. That's a good one. There's an option I can recommend, but I honestly don't know how well it's going to work. We have plans to implement something similar to what you're asking for where the login/registration button can be popped up more easily from anywhere, not just our module.. but it's obviously not there yet.

To test/try something out, please:
* Have an instance of the SCLogin module on the page already set in the "Modal" view. If you don't already have this, you can set it on your site in a bottom module position and then use some CSS to hide the normal Login/Register buttons that would display.
* In that instance of the SCLogin module, set the Joomla Login Redirection to "Same Page"
* Edit the /layouts/joomla/content/readmore.php file. Around line 15, you'll see:
<a class="btn" href="<?php echo $displayData['link']; ?>" itemprop="url">
Change that to:
<?php if (!$params->get('access-view')) : ?>
          <a class="btn" href="#login-modal">
     <?php else : ?>
          <a class="btn" href="<?php echo $displayData['link']; ?>" itemprop="url">
     <?php endif; ?>
That *should* make the read more use the popup on pages that have restricted access. However, that's code I just wrote down and hopefully doesn't white-page your site.

Of course, let us know how it goes and/or what issues you run into, and best of luck!
Alex
The topic has been locked.