• Home
  • Get help
  • Ask a question
Last post 9 hours 58 min ago
Posts last week 81
Average response time last week 4 hours 29 min
All time posts 67914
All time tickets 10497
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#914 – Viadeo Social Button

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 27 August 2015 08:42 UTC
pmarty
Hi Yannick :)

How can I add a specific social button to those existing in your plugin?
For example, I need to add the viadeo sharing button (http://us.viadeo.com/fr/widgets#/share/default)

I will use it on my page through the insert tag in articles

Thanks for your help
Phil
Thursday, 27 August 2015 09:58 UTC
wb_weeblr
Hi Philippe

So you may be able to do that with overriding the buttons JLayout.
To do that, you copy the file
/administrator/components/com_sh404sef/layouts/com_sh404sef/social/wrapper.php

to
/templates/your_template/html/layouts/com_sh404sef/social/wrapper.php


Then you add the Viadeo widget as follow:

// Security check to ensure this file is being included by a parent file.
if (!defined('_JEXEC'))
	die('Direct Access to this location is not allowed.');

if (!empty($displayData['buttons']))
{
	// we wrap buttons in unordered list
	$wrapperOpen = "<span class=\"%s\">\n";
	$wrapperClose = "\n</span>\n";
?>
<!-- sh404SEF social buttons -->
<div class="sh404sef-social-buttons">
	<?php
	foreach ($displayData['buttons'] as $buttonType => $buttonData) :
		$buttonHtml = ShlMvcLayout_Helper::render('com_sh404sef.social.' . $buttonType, $buttonData);
		if (!empty($buttonHtml))
		{
			echo sprintf($wrapperOpen, $buttonType) . $buttonHtml . $wrapperClose;
		}
	endforeach;
	?>

<div name="viadeo-widget" class="widget-share" 
data-share-url="<?php echo JURI::current(); ?>">
</div>

<script src="//www.viadeo.com/vws/widgets/init"></script>

</div>
<!-- End of sh404SEF social buttons -->
<?php
}


This is untested, but I think it should work.

Rgds
 
Thursday, 27 August 2015 10:08 UTC
wb_weeblr
Test message for notification
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.