Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Social Connections Side Panel Code

Asked Modified Viewed 4,204 times
H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
  • Started this discussions
asked
Veteran Member

This is a simple unstyled side panel which will display a Tweet button, Follow (twitter) button, Google+1 button and a Like button.
You will need to change "my_twitter_name" to yours for the follow button to work.
You may need to style it to fit in your theme, but it should work np

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]
if (!function_exists("fetch_url"wink) {
function fetch_url() {
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
return $url;
}
}
add_to_footer("<script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script>"wink;

openside("Social"wink;

// Tweet/ Follow
echo "<a href='http://twitter.com/share' class='twitter-share-button' data-count='horizontal'>Tweet</a>\n<br />\n<br />\n";
echo "<a href='http://twitter.com/my_twitter_name' class='twitter-follow-button' data-show-count='true'>Follow</a>\n<br />\n";
echo "<script type='text/javascript' src='http://platform.twitter.com/widgets.js'></script>\n";
echo "<br />\n";
// Google +1
echo "<div class='g-plusone' data-size='medium' data-count='true'></div>\n";
echo "<br /><br />\n";
// Like
echo "<iframe src='https://www.facebook.com/plugins/like.php?href=".$url."' scrolling='no' frameborder='0' style='border:none; width:450px; height:80px'></iframe>\n";

closeside();[/syntaxhighlighter]
Edited by HobbyMan on 04-07-2011 11:04,
HobbyMan attached the following file:
side_soc_conns.png [No information available / 72 Downloads]
0 replies

8 posts

M
MarcusG
M
Ex Senior Dev.
  • Member, joined since
  • Contributed 182 posts on the community forums.
  • Started 5 threads in the forums
answered
Member

Nice :) Thanks Phil.
Edited by MarcusG on 04-07-2011 11:05,
0 replies
H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
  • Started this discussions
answered
Veteran Member

Damn Smileys getting in the way ;)
0 replies
J
jikaka
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums
answered
Veteran Member

@philip, great man!
nice work!
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

I take it it's XHTML VALID?
0 replies
H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
  • Started this discussions
answered
Veteran Member

I doubt it B)

It's just a bares bones panel for others to style and alter as needed.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

I submitted this to the addons db and it got rejected coz of html errors.

http://www.fangree.co.uk/downloads.php?download_id=54

Can you investigate for me as the code is from Google so???
0 replies
H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
  • Started this discussions
answered
Veteran Member

Your downloads are not public, can't find my logins. Just post the validation warnings.
0 replies
B
behrooz
B
  • Member, joined since
  • Contributed 122 posts on the community forums.
  • Started 29 threads in the forums
answered
Member

nice , thanks
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 8 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
H
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
  • Started this discussions
B
B
  • Member, joined since
  • Contributed 122 posts on the community forums.
  • Started 29 threads in the forums
J
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums
M
M
Ex Senior Dev.
  • Member, joined since
  • Contributed 182 posts on the community forums.
  • Started 5 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet