Topic-icon Show like buttons AFTER read more

Active Subscriptions:

None
11 years 9 months ago #25237 by fb_548860032
Is it possible to change the placement of the like buttons so that they appear after the read more button? Currently mine show after the article but before the read more button, I've looked at the template for the blog layout and it appear the like buttons are built as part of the item->introtext; ?> so I can't see how I can modify it.

Any way I can do this ?

I look forward to your reply

thanks
Huw

.
The topic has been locked.
Support Specialist
11 years 9 months ago #25240 by alzander
Nope, unfortunately you can't. Ideally, the Read More button would be a content plugin so that you could re-order things there. Joomla has it hard-coded into the article layout that the Read More button appears after all plugins have fired though, so there's no way to get around that that we're aware of.

Sorry for the not so great answer...

Alex
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #25241 by fb_548860032
Hi,

Thanks for the reply. I've also tried hard coding the tags into the category layout but unfortunately it picks up the page url rather than the category item url, is there a way to do it more along these lines? I understand what you say about the more button being hard coded after the plugins have fired but is there some way I can hard code the buttons in instead to the template system?

Looking forward to a positive reply!
The topic has been locked.
Support Specialist
11 years 9 months ago #25244 by alzander
What file are you editing for the category layout view? I can take a look and see, but it may be difficult depending on how the loop is done to display each article. I think it should be pretty do-able if you're willing to make changes there though.. just not as easy/possible for us to do it in an automated way through our plugin.

Oh yeah.. please make sure you're doing a template override, or your change will be overwritten by Joomla in the future :)

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

None
11 years 9 months ago #25248 by fb_548860032
Yes I'm using template overrides. The list is created by com_content/category/blog.php and blog_item.php
The topic has been locked.
Support Specialist
11 years 9 months ago #25260 by alzander
I haven't tested, but it looks like in the blog_item.php file, you should be able to add the following tag, which will force the proper link to the destination article:
{JFBCLike href=http://your-url.com<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>}
I'd highly recommend opening the HTML to make sure the URL set in the Like button is correct, especially the domain portion and that a '/' isn't needed after the .com.

Let us know how that goes, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #25269 by fb_548860032
Thanks for your help, I'm afraid that didn't work.

I think I had my stupid head on! The more button links to the full article. So the code you need to use to get the like button to appear with the correct link is
{JFBCLike href=http://www.yourdomain.com}

Simple really when I actually thought about it!

It's a shame there is a tag that inserts all the like buttons that are enabled in the category / article views something like
{JFBsocial layout=category href=http://www.yourdomain.com}

that would be extremely useful!


Thanks again!
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #25270 by fb_548860032
I've just realised something, the post i received as an email isn't what you've actually posted, so yours may well work, infact it looks to me as if it will. When I tried to put my alternative up it's stripping the php code from it.

it was supposed to say {JFBCLike href=http://www.yourdomain.co.uk}
The topic has been locked.
Support Specialist
11 years 9 months ago #25272 by alzander
Looks like the code may still be stripped. Our security stuff can be a bit over-aggressive sometimes. You may want to try just doing [?php instead of using the < to make sure it gets through.

I'm a little unsure what you mean with:

It's a shame there is a tag that inserts all the like buttons that are enabled in the category / article views something like

Can you explain more about what that mode would do?

Anyways, hopefully you got it going, but if you still have questions or issues, just let us know!
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #25273 by fb_548860032
In the settings I have google, facebook like, twotter and linkedin set to show like button in a category layout. To add those buttons manually I'd have to add them one by one.

It would be great if there was a tag that inserted all of them the same as the settings selected for category in one go. Make sense?
The topic has been locked.