Keyword

Add this button share the category not the item

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 6 months ago #111584 by stavroch
I use the default addthis share tool that k2 provide and when I share one item to facebook, it doesn't share the item but the category.

The shared link is xxx.com/category and not the xxx.com/category/item

How can I fix this?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111585 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
Hello Stavros,

This is a bug from the share this tool. I dont think you add parameters to it, if I am not mistaken it only has some appearance settings.

If you are trying to adjust the social buttons just add <?php echo $item->link; ?> to it's data-href attribute.

Regards.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 6 months ago - 11 years 6 months ago #111586 by stavroch
in which file i have to edit and change with this code?
The code that I have on the parameter on share tools of k2 is

<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="www.addthis.com/bookmark.php?v=300&pubid=xxxx">text
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xxxxx"></script>
<!-- AddThis Button END -->

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111587 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
I dont think you can edit this code, as I told you, you can only change the code for the facebook like button, the +1 button and the tweet this button.

Btw. are you using the latest version of K2?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 6 months ago #111588 by stavroch
Yes I use the latest version of k2.

where is this code of facebook like button?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111589 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
it's inside the item.php just search for facebook or fb

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 6 months ago #111590 by stavroch
This is the code of facebook
<?php if($this->item->params->get('itemFacebookButton',1)): ?>
		<!-- Facebook Button -->
		<div class="itemFacebookButton">
			<div id="fb-root"></div>
			<script type="text/javascript">
				(function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				  if (d.getElementById(id)) return;
				  js = d.createElement(s); js.id = id;
				  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
				  fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));
			</script>
			<div class="fb-like" data-send="false" data-width="300" data-show-faces="true"></div>
		</div>
		<?php endif; ?>

I can't see any href tag.

Where I have to put the <?php echo $item->link; ?> as you told me?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111591 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
<div class="fb-like" data-href=" insert code here... "

With some googling you will figure out how to parameter your twitter and +1 button as well

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 6 months ago #111592 by stavroch
I use this code
		<?php if($this->item->params->get('itemFacebookButton',1)): ?>
		<!-- Facebook Button -->
		<div class="itemFacebookButton">
			<div id="fb-root"></div>
			<script type="text/javascript">
				(function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				  if (d.getElementById(id)) return;
				  js = d.createElement(s); js.id = id;
				  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
				  fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));
			</script>
			<div class="fb-like data-href="<?php echo $item->link; ?>"  data-send="false" data-width="300" data-show-faces="true"></div>
		</div>
		<?php endif; ?>

but it doesn't share the item.
It share again the category.

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 6 months ago #111593 by stavroch
Any news?

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


Powered by Kunena Forum