Topic-icon How to place login button within a text field

Support Specialist
3 years 6 months ago #66776 by alzander

It couldn't explain the problem as my development site is made from a backup of the live site so all the same settings. I have made the listing live but it still does not show the tags. What else could be the problem? Is it safe to provide you backend access details here?

There's definitely something different between the live site and the dev site if it works in one and not the other. Something is different, but I don't know what offhand. I'd recommend trying to narrow it down as follows:
* Add the same tag to a Joomla article somewhere. See if the buttons show up there. If so, it means that the tags work, but JReviews or something else is stripping them out.
* Disable any caching or 'accelerator' extensions meant to speed your site up
Hopefully, the above will help you narrow down what's different. If not, we can take a look, but you know your site much better than we do. It's not always easy to understand how a site is configured when we get into the admin area, so that's not a surefire way to solve the issue quickly without some understanding of where the problem may be coming from first.

For the email activation text change, I meant the text in the email, not the text saying the email has been sent.

The language files defines the email content as well.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
3 years 6 months ago #66777 by petgal
It's really odd because the development site is actually restored from a backup of the live site. So all of the same settings apply. Anyway it's not so crucial that I get that working now as the SCLogin pop up works.

Question though: I have created a link to login, but if someone is already logged in there is no feedback message, saying you're already logged in. See: d.pr/v/JaSNWs
Ideally it would be great to only display that "CLICK HERE TO LOGIN!" only if a user is not logged in. Is that possible?

Thanks
Peter
The topic has been locked.
Support Specialist
3 years 6 months ago #66784 by mel
This is a custom behavior and outside the scope of what we provide with SCLogin / JFBConnect. You'd want to create a custom PHP module (there are other modules/extensions out there for this). Here's a stub of code you'd use with one of those modules, but you'd have to complete the rest to get what you're looking for.
use Joomla\CMS\Factory;
if(Factory::getUser()->guest)
{
{JFBCLogin}
// display guest message
}
else
{
// Do whatever you want for a logged in user.
}

-Melissa
The topic has been locked.
Active Subscriptions:

None
3 years 6 months ago #66786 by petgal
Thanks.
The topic has been locked.
Support Specialist
3 years 6 months ago #66794 by alzander
Just a followup to above... Modules can be set to viewable to Guests, Public, Registered, etc. You may also be able to accomplish what you're looking for using modules by creating:
* A 'Guest'-visible Custom HTML module that has the text "Click here to login" along with the {JFBCLogin} tag
* A 'Registered'-visible Custom HTML module that has the text "We see you're already logged in, would like you to connect your account to a social network" along with the {JFBCLogin} tag.

Then, place both modules in the same module position and the proper one will show up whether the user is authenticated or not.

Other ways to enhance this:
* Use the loadposition plugin (comes with Joomla) to load a module into an article
* Use the Sourcerer plugin (3rd party) to add any PHP code you may want to the Custom HTML module for even more flexibility.

Hope that helps!
Alex
The topic has been locked.
Active Subscriptions:

None
3 years 5 months ago #66818 by petgal
Dear Alex and Mel,
I never did solve why the tags didn't work on my site, but there is some stuff that appeared in this thread that I need to better understand for the following .

I need to find the best way to have a guest "click here to enter" and get to a jReviews submit listing page, and get logged in on the way.

If I can't do this we would have to instruct them as follows:

1. Login to the site. FB login is quickest.
2. Select "Submit Listing" under the Login button.
3. Select "Photos or videos"
4. Fill out the fields and submit.Upload your image.

This is a clumsy process that requires them to remember what to click next.

What would be better is
1. they click the "Click here to enter" button.
2. They are presented with the login page, which says "you must be logged in to submit your entry"
3. They login using FB.
4. They are then presented with the right submit listing form.

In this case, all they have to do to get to the submit listing pages is click the login with FB button. Is this possible? How hard would this be?

From above, I know we cannot use two instances of the SCLogin module. Could we use the Joomla Login page and insert a JFBC login tag on that page? I know that menu item has a redirect option and we could use that to forward them to the correct submit listing page.

In case I'm not clear here's a screencast explaining what I'm trying to get done. d.pr/v/MRkF8r

Please let me know what you think. And thanks for your time.
The topic has been locked.
Support Specialist
3 years 5 months ago #66847 by alzander
The general method to implement the flow you're looking for is usually straight-forward, but it depends on some other components behaving well.

What has to happen is that if a user clicks "Submit Listing", they should be redirected to the Login page. That should have a parameter in the URL for 'redirect' which, if the user actually logs in, will redirect the user back to the Submit Listing page. That needs to be implemented correctly by JReviews, but most extensions that check if a user is authenticated will redirect them to login properly like that.

In that case, if you have JFBConnect's New User and Returning User Login set to same page, then they should be redirected to the Submit Listing page. That's something you'll have to test, but JFBConnect will respect the redirection the user took to get to the login page.

I hope that helps explain,
Alex
The topic has been locked.
Active Subscriptions:

None
3 years 5 months ago #66858 by petgal
Thanks Alex. I'm not clear if the JFBconnect New User and Returning User redirect can be different for different URLs. For example after login I may want them to be sent/redirected to different submit listing pages. I'm implementin contest entries and depending on the contest I'll need them to go to a different submit listing page after login. Is that possible?
The topic has been locked.
Support Specialist
3 years 5 months ago #66864 by alzander
There is a setting in the JFBConnect -> Configuration area for "New User Redirect" and another for "Returning User Redirect". They both can be set to different places, but they also should respect a 'return' parameter in the URL if another extension sent them to the login page to authenticate. That way, you can have the user redirect to a specific page if they weren't directed to the login, but if they were directed to login, they should be returned to where they came from.

I hope that helps!
Alex
The topic has been locked.