Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

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
15 years 2 months ago - 15 years 2 months ago #86781 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:
Code:
components\com_kunena\template\[YOUR CHOSEN TEMPLATE]\view\view.php
Find line: 39 and make a new line

Insert code (don't replace):
Code:
<div style="margin: 10px"> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo "http://".$_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
Last edit: 15 years 2 months 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
15 years 2 months ago #86784 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
15 years 2 months ago #86799 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
15 years 1 month ago - 15 years 1 month ago #87600 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...
Code:
<span> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like href="<?php echo "http://".$_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?
Last edit: 15 years 1 month ago by teratyke.

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

More
15 years 1 month ago - 15 years 1 month ago #88356 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
Last edit: 15 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
15 years 1 month ago #88860 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.

Time to create page: 0.278 seconds