× Joomla Facebook Connect support forum

Topic-icon JFBC Like in smart template

Active Subscriptions:

None
13 years 3 weeks ago #9190 by flash1144
Hi Alex,

I`m using the smarty templates. I added your Like button code into template and it working ok.

But, on category layout I have one custom like button for each article, and when you click on any like button you will liking that category blog page, not the article page. I see that your automatically like button is working on category and sections page for each article.

I`m using this code for smarty: {ldelim}JFBCLike layout=button_count show_faces=false width=150 action=like font=verdana colorscheme=light{rdelim}

Thanks in advance!
The topic has been locked.
Support Specialist
13 years 3 weeks ago #9202 by alzander
Smarty or not, there's no difference in how you should implement the Like button. Hopefully the below explanation will get you on your way..

Since you're using the JFBCLike tag, you'll need to specify the specific URL of the page that is meant to be "Liked" when clicked. When that parameter isn't present, then the Like button will be for the 'current' page, which, if it's displayed in a blog view, will be the blog view layout page. To fix, when you add the tags to your article, simply add the final article-view destination URL of the article itself. We automatically do this in the Content plugin, but can't do it for the generic Like tag because that can be on any type of page (not just content), so we can't guess what the final canonical URL should be.
Example:
JFBCLike url=http://www.sourcecoast.com/extensions/jfbconnect/ layout=button_count show_faces=false width=150 action=like font=verdana colorscheme=light

The tag above, regardless of what page it's displayed on, will be a Like button for the JFBConnect product page.

Hope this helps, and good luck!
The topic has been locked.
Active Subscriptions:

None
13 years 3 weeks ago #9226 by flash1144
Thank you for your reply... I understand now how it works..

It`s not solution for me, I can`t do that everyway.

I will try another option to do it on that place where i need similar option.
I see that most sites are using the share button, do you know some share button or simple code to do it, which will work well with your system?

EDIT: I forget to mentioned, I have put your code inside smarty, like a call for the plugin, and then you dont have to write a code everytime when you have to publish some article. But...
The topic has been locked.
Support Specialist
13 years 3 weeks ago #9233 by alzander
You may want to look into using the JFBCContent plugin since it can automatically add the Comment or Like button to every article. JFBConnect will automatically generate the proper URL for the article, regardless of how it's displayed (article, blog, frontpage, etc).

Hopefully that works for you, but yes, if you're just adding the {JFBCLike ...} parameter to your template, you can run into the issues you mention where the URL is for the page it's displayed on, not the final article itself.

Hope this helps, and good luck!
The topic has been locked.
Active Subscriptions:

None
13 years 3 weeks ago #9237 by flash1144
I will send you a link to a page where i`m using smarty (via PM).

Please, check that page and tell me if there is any way to place your content like button like that?
The topic has been locked.
Support Specialist
13 years 3 weeks ago #9244 by alzander
If it's a normal Joomla Content article, try enabling the JFBCContent plugin, and configure where the Like button or Comment box should appear in the articles. That's the only automated way we offer to do that, and is our best suggestion. You can configure all of the JFBCContent plugin settings in the "Social" tab of the JFBConnect admin area.

Good luck!
The topic has been locked.
Active Subscriptions:

None
13 years 3 weeks ago #9254 by flash1144
Yes, it is normal Joomla aticle, but if I enable it for category layout, then I will have like buttons before and after my custom introtext. I wuold like to have it on a place where I have put like button with your custom code. :)

How can I tell to your plugin to show like button on a place where i want, in smarty custom field?
The topic has been locked.
Support Specialist
13 years 3 weeks ago #9268 by alzander
Right now, we don't have that ability. It's something we may add in the future with a placeholder on the page. For now though, the JFBCContent plugin can only automatically insert the Like/Comment button at the top or bottom of articles. You can also configure it to show, or not show, in article views, blog views, or front-page views.

Hopefully, you can find some options that work for you with what we offer.

Thanks, and good luck!
The topic has been locked.