×
Kunena 5.1.3 Released (19 Aug 2018)

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

× Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Solved K 3.0.3: Share topics with Facebook (found in K 3.0.6)

More
4 years 9 months ago - 3 years 11 months ago #1 by olimpo88
This is a modification that I made to share topics on facebook, I am using kunena 3.03, theme blue_eagle

Edit /components/com_kunena/template/blue_eagle/html/topic/default.php

Before:

<div class="kblock">
	<div class="kheader">
		<h2><span><?php echo JText::_('COM_KUNENA_TOPIC') ?> <?php echo $this->escape($this->topic->subject) ?></span></h2>


After:
<div class="kblock">
	<div class="kheader">
		<h2><span><?php echo JText::_('COM_KUNENA_TOPIC') ?> <?php echo $this->escape($this->topic->subject) ?></span><div id="facebook_share">
 
<!-- Agregado para facebook -->
<?php
function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}
?>
<a onclick="window.open('https://www.facebook.com/share.php?u=<?php  echo curPageURL(); ?>', '_blank', 'height=365,width=660'); return false;"href="https://www.facebook.com/share.php?u=<?php  echo curPageURL(); ?>” target="_blank" style="float: right; margin-top: -25px;"><img src="https://www.rcnmundo.com/img/comparte.jpg" title="Compartir"></a>
 
<div></h2>


first a PHP function to get the page (URL) of the message and then a javascript function that opens a popup window that leads to facebook and automatically passes the URL to share.






Attachments:
Last edit: 3 years 11 months ago by olimpo88.
The following user(s) said Thank You: Mariosgr

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

More
3 years 11 months ago #2 by olimpo88
I recommend this adaptation is very useful for the SMO and SMM.

Do not know if will be able to include it in future versions, I understand that is not pioridad in the development of kunena, but it would be nice to incorporate it as a free plugin.

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

More
3 years 8 months ago - 3 years 8 months ago #3 by specialworld
CodeLinSoft forum, of which I am a member of the team there are buttons to twitter and facebook. see screen:

Attachments:
Last edit: 3 years 8 months ago by specialworld.

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

More
3 years 6 months ago #4 by Gyatso
Good afternoon, how could add some buttons like that?

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

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