Topic-icon Kunena integration - post level support

Active Subscriptions:

None
13 years 3 months ago #31039 by jomext
Hi Alex,
{JFBCLike} and {JFBCComment} are currently supporting page-level URLs. Can they also support post-level URLs (with anchors)?

I was thinking that if we can use the EasyTags in the way like "{JFBCComment}Post_ID{/JFBCComment}", we might be able to pass the Kunena post ID as a parameter to the backend JFBC functions so that we can have a final URL like: mysite.com/forum/board-1/8.html#Post_ID

In the Kunena template file "/components/com_kunena/template/blue_eagle/html/topic/default_message.php", I was able to print Post_ID by "$this->message->id;".
I was trying to modify the files "/plugins/system/jfbcsystem/jfbcsystem.php" and "/libraries/sourcecoast/easyTags.php" so that I could use the EasyTags in the way that I described above. However, with my limited Joomla dev experience, I still don't have a clear idea to start with.

Would this be possible in a new JFBC release in the near future or would you be able to provide me some direction for my hack?

Thank you!
The topic has been locked.
Support Specialist
13 years 3 months ago #31048 by alzander
I don't believe Facebook works properly with fragments in URLs. Fragments (the #123 ids) are only visible by browser to 'jump' to a section on a page.

I don't know Kunena's template file off the top of my head. What you should be able to do though, if you can find the full URL to the post, is something like:
{JFBCLike href=http://yoursite.com/forum/board-1/8.html#Post_ID}
That will generate a Like button for each post and *should* have a unique URL. We/you'd need to check the output HTML and make sure it's right, and then test that each Like button works how you want.

The things to note, and where I think things could go wrong:
* The post in a user's wall would use the title/description for the page itself, not the post. There's no way to specify a title/description per Like button.
* You would still hopefully have an individual Like count per post though.
* The link in a feed post back to your page may have the # encoded strangely, which would make it not 'jump' to the right post

Just some things to be aware of, but hopefully, you can get it going. If you have any questions, just let us know. If you get it going, please feel free to share the code you implemented, we'd love to take a look and possibly comment on it!

Thanks,
Alex
The topic has been locked.