×
Kunena 5.2.4 and Blue eagle 1.6.4 released (04 Apr 2021)

The Kunena team has announce the arrival of Kunena 5.2.4 [K 5.2.4] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.2 and issues discovered during the development stages of K 5.2.4

REQUIREMENTS
Blue Eagle 1.6.x requires Kunena 5.2.x to work with, this template isn't designed to works with Bootstrap 3 and Bootstrap 4.

× This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 1.7, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.

Question Facebook Like on threads

More
10 years 1 month ago - 10 years 1 month ago #1 by Sunburst WebConsult
Hi

I have programmed a Facebook Like feature for Kunena which displays in top of a thread:


You can do the same by following these instructions:

Find file:
components\com_kunena\template\[YOUR CHOSEN TEMPLATE]\view\view.php
Find line: 39 and make a new line

Insert code (don't replace):
<div style="margin: 10px">
	<script src="https://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo "https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];?>" show_faces="true" width="940" font="verdana"></fb:like>
</div>
You can modify many of the settings and change to your language.

See more at: developers.facebook.com/docs/reference/plugins/like/

Kind regards,
Jens
Attachments:
Last edit: 10 years 1 month ago by Sunburst WebConsult.
The following user(s) said Thank You: roland76, teratyke, zaruc, Kohhal

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #2 by Gentex
Replied by Gentex on topic Re: Facebook Like on threads
Its very good hack. How modificate this hack to work from evry one post not only in trads.
My idea is:
1 tread 10 posts
for evry 10 posts in this tread facebook like button
when i like post nomer 3 like aktivate only for post 3 not for all 10 post
Sory for my English

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #3 by Kohhal
Replied by Kohhal on topic Re: Facebook Like on threads
Excellent, will be using this soon!
The following user(s) said Thank You: roland76

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #4 by teratyke
Thanks for this.
I have been using, but the problem is that if a user is viewing a particular post then the URL reflects that post rather than the whole thread. You loose the 'like' count, also clicking the like button will have different actions depending on which post you are reading. Does that make sense?

I think that it would also be useful to have a like button for every post.

I have made this work by adapting the above solution, but my solution is not very elegant - can anyone help tidy this up?

Here is what I have done
in /components/com_kunena/template/default/view/messages.php on line approx. line 96 insert the following code...
<span>
  <script src="https://connect.facebook.net/en_US/all.js#xfbml=1"></script>
  <fb:like href="<?php echo "https://".$_SERVER["SERVER_NAME"]."/forum/".$this->catid."/".$this->thread."#".$this->id?>" layout="button_count" show_faces="false" width="100" font="tahoma"></fb:like>
</span>

I've done this on my site only - it may not work on other's so please exercise extreme care!

My problem is the way that the href link is formed - I have hardcoded the 'forum' part and the /'s. I'm sure there would be a much better way - also to use the full SEF URLs rather than just catid, thread, and the # postnumber.



I suppose another way that would work well would be to 'like' the whole thread and to strip out the post id from the url sent to facebook- I don't know what is the best solution. Any thoughts?
Attachments:
Last edit: 10 years 1 month ago by teratyke.

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #5 by teratyke
In the end I've settled on a better (for me) neater solution that is a bit more future proof in terms of upgrading kunena and the kunena template.

Install one of the social bookmarking modules on the JED - I used ITPShare. Configure and publish this to the kunena_msg_1 position. I copied the module and also published to the kunena_bottom position. The result is facebook buttons in each thread - they link to the whole thread and are consistent even when a user has visited the url to a particular post e.g #12345.




It would be nice if there was a module position under every post instead of having to publish a different module under every post, if that makes sense - imagine a position of kunena_msg_all, instead of 1, 2, 3 etc. Even so this works best for me.

Thanks
Rob
Attachments:
Last edit: 10 years 1 month ago by teratyke.
The following user(s) said Thank You: sorema, TopCop, alexwalker

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #6 by alexwalker
Teratyke, thanks for this post as someone on one of my forums asked for social buttons on threads. However do I have to create psotion kunena_msg_1 position and if so, how do I do that? Thanks

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #7 by TopCop
Replied by TopCop on topic Re: Facebook Like on threads
@alexwalker:
Just click into the position field and type kunen_msg_1 - that's it.


@teratyke:
Thanks for the info, this works ok, only problem I have is that the url is always the one of the start page and not the link to the thread. Did you do a certain trick?


TopCop
Last edit: 10 years 1 month ago by TopCop.
The following user(s) said Thank You: alexwalker

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #8 by alexwalker
I have been working with Joomla for over 5 years and I learnt something about creating module positions by just typing them in the picklist box. I did as suggested and it worked like a dream. Thank you TopCop and TeraTyke ! If the buttons could appear at the bottom of each individual posting that would be better still !

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #9 by teratyke
Hi
Sorry been away for the weekend and not on the computer so much!

alexwalker, you can add a button under each post by copying the module and for each copy use the position kunena_msg_1, kunena_msg_2, kunena_msg_3 - I have 20 posts per page, so it gets a bit messy, but I guess if you just had 5 or 10 it would be feasible to do that.

TopCop, I'm not using the twitter buttons so I can't confirm that problem, I'll test it when I get a chance. I suppose you could use a different module to provide the button, if you do try any others I'd be interested to hear what works best.

Right back to the mountain of email...

Thanks
Rob
Last edit: 10 years 1 month ago by teratyke.

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #10 by TopCop
Replied by TopCop on topic Re: Facebook Like on threads
Well, finally I found exactly what I was looking for.

I installed a plugin called flodjishare. This can be found here: Flodjishare Plugin

With that plugin installed and configured I can now put it into every single post. You just have to add {flodjishare} at the end of a post and you will get all the share buttons.

Of course you have to set the kunena configuration to support joomla plugin support.

For my needs this is just perfect. There are a lot of config options and you can also change the language in the plugin options.

Here is a screen shot of the plugin at the bottom of a kunena post:






TopCop
Attachments:
Last edit: 10 years 1 month ago by TopCop.

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 1.286 seconds