Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated README, edited the list to add, and implemented the shortcode…

… functions for most
  • Loading branch information...
commit e3f662b447e0ec54934354e209620ea5352339d0 1 parent 174edd6
Michael Beckwith authored
20 README
... ... @@ -1 +1,21 @@
1 1 A basic Wordpress Plugin that creates shortcodes for profile links to various social media websites. I'll work on my readme more later.
  2 +
  3 +Example 1:
  4 +
  5 +[twitter name="JoeSomeone" text="some text you want the link to appear as"]
  6 +
  7 +results in:
  8 +
  9 +<a href="http://www.twitter.com/JoeSomeone" title="JoeSomeone's Twitter profile\">some text you want the link to appear as</a>
  10 +
  11 +on your post/page
  12 +
  13 +Example 2:
  14 +
  15 +[twitter name="JoeSomeone"]
  16 +
  17 +results in:
  18 +
  19 +<a href="http://www.twitter.com/JoeSomeone" title="JoeSomeone's Twitter profile\">JoeSomeone (Twitter)</a>
  20 +
  21 +on your post/page.
30 SM_sites_add.txt
... ... @@ -1,34 +1,4 @@
1   -/****Already Added****/
2   -twitter
3   -identica
4   -facebook
5   -reddit
6   -linkedin
7   -stumbleupon
8   -myspace
9   -
10   -/****Add Me****/
11   -digg digg.com/user
12 1 deviantart user.deviantart.com
13   -foursquare foursquare.com/user
14   -scvngr
15   -delicious delicious.com/user
16   -youtube youtube.com/user
17 2 tumblr user.tumblr.com
18   -gowalla gowalla.com/users/user
19   -stumbleupon stumbleupon.com/stumbler/user
20 3 newsvine user.newsvine.com
21   -flickr flickr.com/photos/user
22   -vimeo vimeo.com/user
23   -stickam stickam.com/user
24   -scribd scribd.com/user
25   -slideshare slideshare.net/user
26 4 posterous user.posterous.com/
27   -daily booth dailybooth.com/user
28   -codesnipp.it codesnipp.it/user
29   -forrst forrst.com/people/user
30   -dribbble dribbble.com/user
31   -last.fm last.fm/user/user
32   -favstar.fm favstar.fm/users/user
33   -okcupid okcupid.com/profile/user
34   -
2  ideas.txt
... ... @@ -1 +1,3 @@
1 1 As the plugin grows and adds more social media sites for the shortcode, create an options page listing them all with toggle switches. Not everyone is going to need each one enabled by default.
  2 +
  3 +for those sites that have user.url.com, put in an array and check? right now, url.com/user is slightly hardcoded. Put the check in the social_link_sc() function
83 social_media_shortcode_plugin.php
@@ -21,25 +21,76 @@ function social_link_sc($service, $link, $atts){
21 21 }
22 22 //First is the service name, then the profile url sans user ID. Gets passed to social_link_sc and has the actual link returned.
23 23 function twitter_sc($atts){
24   - return social_link_sc('twitter', 'http://twitter.com', $atts);
  24 + return social_link_sc('Twitter', 'http://twitter.com', $atts);
25 25 }
26 26 function identica_sc($atts){
27   - return social_link_sc('identica', 'http://identi.ca', $atts);
  27 + return social_link_sc('Identica', 'http://identi.ca', $atts);
28 28 }
29 29 function facebook_sc($atts){
30   - return social_link_sc('facebook', 'http://www.facebook.com', $atts);
  30 + return social_link_sc('Facebook', 'http://www.facebook.com', $atts);
31 31 }
32 32 function reddit_sc($atts){
33   - return social_link_sc('reddit', 'http://www.reddit.com/user', $atts);
  33 + return social_link_sc('Reddit', 'http://www.reddit.com/user', $atts);
34 34 }
35 35 function linkedin_sc($atts){
36   - return social_link_sc('linkedin', 'http://www.linkedin.com/in', $atts);
  36 + return social_link_sc('Linkedin', 'http://www.linkedin.com/in', $atts);
37 37 }
38 38 function stumbleupon_sc($atts){
39   - return social_link_sc('stumbleupon', 'http://www.stumbleupon.com/stumbler', $atts);
  39 + return social_link_sc('StumbleUpon', 'http://www.stumbleupon.com/stumbler', $atts);
40 40 }
41 41 function myspace_sc($atts){
42   - return social_link_sc('myspace', 'http://www.myspace.com', $atts);
  42 + return social_link_sc('Myspace', 'http://www.myspace.com', $atts);
  43 +}
  44 +function digg_sc($atts){
  45 + return social_link_sc('Digg', 'http://www.digg.com', $atts);
  46 +}
  47 +function foursquare_sc($atts){
  48 + return social_link_sc('Foursquare', 'http://foursquare.com', $atts);
  49 +}
  50 +function delicious_sc($atts){
  51 + return social_link_sc('Delicious', 'http://www.delicious.com', $atts);
  52 +}
  53 +function youtube_sc($atts){
  54 + return social_link_sc('Youtube', 'http://www.youtube.com', $atts);
  55 +}
  56 +function gowalla_sc($atts){
  57 + return social_link_sc('Gowalla', 'http://www.gowalla.com/users', $atts);
  58 +}
  59 +function flickr_sc($atts){
  60 + return social_link_sc('Flickr', 'http://www.flickr.com/photos', $atts);
  61 +}
  62 +function vimeo_sc($atts){
  63 + return social_link_sc('Vimeo', 'http://www.vimeo.com', $atts);
  64 +}
  65 +function stickam_sc($atts){
  66 + return social_link_sc('Stickam', 'http://www.stickam.com', $atts);
  67 +}
  68 +function scribd_sc($atts){
  69 + return social_link_sc('Scribd', 'http://www.scribd.com', $atts);
  70 +}
  71 +function slideshare_sc($atts){
  72 + return social_link_sc('Slideshare', 'http://www.slideshare.net', $atts);
  73 +}
  74 +function dailybooth_sc($atts){
  75 + return social_link_sc('Daily Booth', 'http://www.dailybooth.com', $atts);
  76 +}
  77 +function codesnippit_sc($atts){
  78 + return social_link_sc('Codesnipp.it', 'http://www.codesnipp.it', $atts);
  79 +}
  80 +function forrst_sc($atts){
  81 + return social_link_sc('Forrst', 'http://www.forrst.com/people', $atts);
  82 +}
  83 +function dribbble_sc($atts){
  84 + return social_link_sc('Dribbble', 'http://www.dribbble.com', $atts);
  85 +}
  86 +function lastfm_sc($atts){
  87 + return social_link_sc('Last.fm', 'http://www.last.fm/user', $atts);
  88 +}
  89 +function favstarfm_sc($atts){
  90 + return social_link_sc('Favstar.fm', 'http://www.favstar.fm/users', $atts);
  91 +}
  92 +function okcupid_sc($atts){
  93 + return social_link_sc('Okcupid', 'http://www.okcupid.com/profile', $atts);
43 94 }
44 95
45 96 add_shortcode('twitter', 'twitter_sc');
@@ -49,4 +100,22 @@ function myspace_sc($atts){
49 100 add_shortcode('linkedin', 'linkedin_sc');
50 101 add_shortcode('stumbleupon', 'stumbleupon_sc');
51 102 add_shortcode('myspace', 'myspace_sc');
  103 +add_shortcode('digg', 'digg_sc');
  104 +add_shortcode('foursquare', 'foursquare_sc');
  105 +add_shortcode('delicious', 'delicious_sc');
  106 +add_shortcode('youtube', 'youtube_sc');
  107 +add_shortcode('gowalla', 'gowalla_sc');
  108 +add_shortcode('flickr', 'flickr_sc');
  109 +add_shortcode('vimeo', 'vimeo_sc');
  110 +add_shortcode('stickam', 'stickam_sc');
  111 +add_shortcode('scribd', 'scribd_sc');
  112 +add_shortcode('slideshare', 'slideshare_sc');
  113 +add_shortcode('dailybooth', 'dailybooth_sc');
  114 +add_shortcode('codesnippit', 'codesnippit_sc');
  115 +add_shortcode('forrst', 'forrst_sc');
  116 +add_shortcode('dribbble', 'dribbble_sc');
  117 +add_shortcode('lastfm', 'lastfm_sc');
  118 +add_shortcode('favstarfm', 'favstarfm_sc');
  119 +add_shortcode('okcupid', 'okcupid_sc');
  120 +
52 121 ?>

0 comments on commit e3f662b

Please sign in to comment.
Something went wrong with that request. Please try again.