Pending Review
Last Updated: 27 Oct 2015 10:45 by ADMIN
ADMIN
Marin Bratanov
Created on: 27 Oct 2015 10:34
Category: SocialShare
Type: Feature Request
1
ADD the ability to have a custom button in the RadSocialShare
Sometimes there are local less world known share websites that are not supported out of the box by the RadSocialShare.

An empty template similar to the one for a Styled button can be added where you can place your own button's markup so that a more uniform look can be achieved while keeping the desired functionality.

In the meantime, the approach from the following code library project can be used so you can add custom buttons: http://www.telerik.com/support/code-library/add-pinterest---pin-it-button-to-radsocialshare

Another approach you can take is to use the control's API (http://docs.telerik.com/devtools/aspnet-ajax/controls/socialshare/client-side-programming/radsocialshare-object) and events (http://docs.telerik.com/devtools/aspnet-ajax/controls/socialshare/client-side-programming/events/onsocialbuttonclicking) and a social network you will not be using as a custom button. For example, Digg:

			<telerik:RadSocialShare runat="server" ID="RadSocialShare1" OnSocialButtonClicking="OnSocialButtonClicking" UrlToShare="somePage.aspx" TitleToShare="some title">
				<MainButtons>
					<telerik:RadSocialButton SocialNetType="Digg" />
				</MainButtons>
			</telerik:RadSocialShare>
			<script>
				function OnSocialButtonClicking(sender, args) {
					if (args.get_socialNetType() == "Digg") {
						args.set_cancel(true);
						window.open(
							"someSocialNetworkSharingUrl.html?url=" + sender.get_urlToShare() +
							"&title=" + sender.get_titleToShare());
							//use the URL according to your social network and escape strings as needed
					}
				}
			</script>
			<style>
				div.RadSocialShare .sshDigg,
				div.RadSocialShare .sshDigg:hover
				{
					background-image: url('images/icon_16x16.png');
					background-position: 0 0;
				}
			</style>
0 comments