Topic-icon SCLogin with Kunena

Active Subscriptions:

None
11 years 5 months ago #50058 by horseguards
Hello,

I am migrating to Kunena, and there's something in this forum I would like to change
if possible with your help.

When you are reading a post while not logged in, at the bottom of each post you can
read: "Please log in to post a reply"

I think it would be much more effective to place a "REPLY NOW" button, and when
clicked could trigger the SCLogin popup inviting the visitor to either register or login.

Is this possible??

Thanks and I wish you all a happy and successfull 2015.
The topic has been locked.
Support Specialist
11 years 5 months ago #50060 by mel
Replied by mel on topic SCLogin with Kunena
If you take a look at our Common Support Questions, there is an item in that list 'How can i open the SCLogin Modal Popup with a regular link?' that describes how to launch the SCLogin modal window via a a text link: www.sourcecoast.com/sclogin/documentatio...n-support-questions/

When you are reading a post while not logged in, at the bottom of each post you can read: "Please log in to post a reply"

I cannot tell from this description if this is something you would like to add or something that is already present in Kunena, as I am unable to find that text in my installed version of the Kunena component. However, you should be able to create a template override for whatever view that Kunena uses to display the post (which you will have to figure out which PHP file to override), and then display the link based on if the user is a guest or not.

For instance (this is not tested code at all):
<?php 
if(JFactory::getUser()->guest) {
   echo '<a class="btn btn-primary" href="#login-modal" data-toggle="sc-modal">Reply Now</a>';
} 
else {
   // Do whatever code Kunena was doing before
}
?>

and add the CSS code from the common support questions to your template CSS.

This should get you started, but let us know if you run into issues.

-Melissa
The topic has been locked.