Social Media Page Plugin

The Social Media Page Wordpress plugin will add a list of links to your social media profiles on a page or post of your choice. This plugin also creates a widget that will display your social media profiles in the side bar of your site.

Rather than getting you to enter all of your social media profiles as URLs the plugin gets you to enter your username, and works out the rest. Some exceptions (like Facebook) require some extra information, which has been accounted for. There are over 100 different social media sites to select from so it should cover anything you happen to be a member of.

When the links are displayed on the page it will use a keyword of your choice as the text for the link.

I have set up a forum to for anyone to report any issues. Note that you need to be a member of the forum to add anything.

Instillation

To install the plugin just drop the folder social-media-page into your Wordpress plugins folder (located at wp-content/plugins/). Log into Wordpress and go to your Plugins section and activate the social media page plugin.

When the plugin is activated for the first time it checks to see if a table exists called wp_socialmediaprofiles. If it doesn’t then it creates it.

 

Usage

To use the plugin look for the option called SMP at the bottom of the left hand menu. Other plugins might appear below this, so be aware that it might not be the last item.

A major change from the 1.x to the 2.0 version of the plugin is to only display the social media plugins that have been filled in. The upshot of this is that it is now possible to add multiple profiles to the same site.

 

Embed The List Into A Page/Post

After setting up the needed fields in your administration section you can display the list on any page or post by using the following tag:

<!-- social-media-page -->

It is also possible to print out just a list of the profiles associated with a particular user. For example, to print out the list of profiles for the user with the id of 3 do the following:

<!-- social-media-page3 -->

Please note that this method currently does not work within widgets. It can only be used within the context of a page or post.

Comments?

If you notice any bugs or feel that this plugin can be improved in any way then let me know! Also, the list is far from complete, so if you feel that I have left any sites out then I will create an update and add those sites in.

Note that I have created this plugin in my own time so although I will try to fix any problems quickly, that might not always be the case.

Changes in version 2.0

  • Version 2.0 has undergone lots of changes, including a full rewrite of the code and a completely different way of storing the social media profiles. The profiles available will no longer be associated with the plugin and are loaded by a separate csv file.
  • Different users can create their own profiles.
  • A global keyword is still available, but this can be superseded by a keyword for each link.

Changes in version 1.3

  • Added a fix for a typo in the Friendfeed profile.
  • Added an option to add rel=”nofollow” to the links created by this plugin.
  • Tidied up widget code to incorporate widget options from theme.

Changes to Version 1.2

  • This plugin can now be used as a widget.
  • Plugin output tweaked to have normal output for pages and smaller output when printing widget.
  • Added option to allow blog admin to decide if credit should be given to plugin author.
  • Noticed bug when updating plugin causing no images to be displayed. This was due to file permissions. Added a function that sets file permissions properly at install.

Changes to Version 1.1

  • Fixed some incorrect information in some of the profile information.

Donate!

If you like this plugin then you can help with development through a donation.

Download the Social Media Page Plugin here.

Comments

Template/themes

What's the code for adding this to a page template?
philipnorton42's picture

You'll want to use the

You'll want to use the smp_print_list() function, with an optional parameter of the user ID if you want to force the function to print out the profiles for a particular user.

great work!

great work on the plugin, im new to php/wordpress....what I need to know is; how can I change the text of the links? do i need to make a change in the CSS file or the PHP file? where do I start? -david txsigma41 (at) gmail . com
philipnorton42's picture

Hi! Thanks for taking an

Hi! Thanks for taking an interest in the plugin. To alter the template of the output you need to go to the following files, depending on what you are doing: Page based output (ie using the page tags) /plugins/social-media-page/templates/page.tpl Widget based output /plugins/social-media-page/templates/widget.tpl Each template is split into two parts by an if statement, the first is used if the output style chosen is as a list of images. The second is the default (which you'll probably want to look at). I hope that helps. Let me know how you get on as I'll probably release a new version or write a tutorial.

Last.FM musician profile

Great plugin, using it for my band's site. One problem is the Last.FM profile is for a user. Would it be possible to add an option for a Last.FM band? The format is http://www.last.fm/music/ In my case - http://www.last.fm/music/Organical Hope you could add that in a future release. Cheers, Steve www.organical.net

Fatal Error upon install

Reads: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/m/a/i/mainemls/html/turnermainehomes/wp-content/plugins/social-media-page/SocialMediaPage.php on line 32 I've tried this on three different blogs after updating to the latest version. HELP! Great plugin -When it worked!
philipnorton42's picture

This error would suggest that

This error would suggest that you are using PHP4. I would urge you to upgrade your host as soon as you can. PHP4 was discontinued at the end of 2007, so I'm actually surprised to find web hosts still running it. WordPress itself will no longer support PHP4 by the end of the year, so you should contact your host to upgrade your site before that happens as things will probably start breaking within WordPress after that. See this post for more information. http://wordpress.org/news/2010/07/eol-for-php4-and-mysql4/ Of course, downgrading the plugin to the previous version will allow you to continue using it on your current host for the time being. Here is the link to the previous version: http://downloads.wordpress.org/plugin/social-media-page.1.7.zip

Sociable icon being displayed in a vertical line, not horizontal

Hi, I've been using this plugin for a while now with no problems, but lately I've been having a problem with the icons displaying in a vertical line instead of a horizontal line since going to WP3. It looks as though the sociable div is not being added to all posts/pages, and hence the display: inline; for .sociable li ul isn't taking effect. It doesn't happen on all pages, any idea why this would be? Any advice on what I can do to resolve this? Thanks in advance for any help, Mike.
philipnorton42's picture

Interesting, I'll have a look

Interesting, I'll have a look at that and get back to you.

The user comment is not

The user comment is not working for me.... when i add the user id
<!-- social-media-page3 -->
to the code, all the icons/links for all users still show up.
philipnorton42's picture

Everything looks right, I

Everything looks right, I will have to have another look and see if there is anything wrong.

Great plugin + MeetUp

Using your plugin on my site http://www.wow-scotland.co.uk - any chance you could add MeetUp.com to the list? Thanks! Gordon

hi there!

hi there, the social media plugin is very nice, thanks very much for the functionality, flexibility, and improvements in 2.0. i saw an earlier comment about the code to place the smp into a page template (using smp_print_list() ). unfortunately for some reason when i try to put this function into my .php files, it doesn't end up showing the icon list in the resultant page. i know that it works otherwise since the widget works and the use inside of pages/posts works with the social-media-page tag. granted: i'm a hack php programmer. what i do is this: <?php smp_print_list(); ?> if that code is right and should be inserted in a php file and output the same thing as the social-media-page tag, there's maybe an issue with wp's recent upgrade? if not, then can you help a php novice brotha' out? Thanks very much!

just an update: i've done a

just an update: i've done a bit of troubleshooting with this issue placing text markers to try to isolate the issue, and here's what i've found. i attempted to put the smp_print_list function into my header.php file. i confirmed that it is properly calling the function from social-media-page.php as i added some text (call it, "print list test") to the function and that text comes out. However, no images or links for my social profiles come out. With the modified smp_print_list function, i added the social-media-page tag to a page. the "print list test" text *and* the images and links came out. i tried to determine if maybe the issue had to do with user_id not being passed properly. i added an echo $user_id statement to both the header.php and within the smp_print_list function. both numbers came out as "zero". i also added an echo count($profiles) and echo $outputstyle to the page.tpl file and it spit out the correct number of profiles and output option as text, but again, the smp_print_list embedded in the header did not spit out the images and the one that used the tag did. i'm sure i'm missing *something*. any help would be appreciated. not urgent, it's just bugging me. Thanks! mendel at gmail.
philipnorton42's picture

Thanks for the work you have

Thanks for the work you have put in in tracking the issue down. As you can probably guess I'm snowed under with work at the moment, but I should have some spare time at the weekend to figure out what is wrong. In the meantime, patches are very welcome :)

*laugh* hack programmer i

*laugh* hack programmer i am, you don't want any patches from me. :) no worries, the issue isn't urgent. i've done a hack fix for now in any case. the theme i'm using (twetnyten) has two widget areas and i know the widget version works, so i just created two templates, one which only shows widget one and one that shows widget two, and i use widget two to display the social-media-page stuff and widget one to not. it's not pretty, but it works for now with my situation. i'll keep poking around every now and again; wish you well in your current ventures, and hope that you're finding some time to relax in the midst of your busy-ness. -M

Removing text at the end of the link

I love the social media page plugin, but my one gripe with it is the redundant text after the keyword. I'd like to remove the "at facebook/twitter/etc" from each of my social media links, since I think the icon & link are sufficient. I've looked into the widget.tpl, as you mentioned to another commenter, but my PHP skills are very limited. Could you tell me which lines I need to remove or edit to get rid of the "at facebook" that follows the keyword? I would greatly appreciate it!
philipnorton42's picture

You'll need to remove any

You'll need to remove any reference to $profile['site'] (and possibly the surrounding text) from the code in order to get the effect you want. In widget.tpl it would be line 16 and 30 and in page.tpl it would be on line 17 and 37.

LibraryThing and activation errors

LibraryThing was added in 1.7 but is missing in the current version. Do bring it back! :)

Also, there's some extra spaces after the } the core file of the plugin that's causing Wordpress 3.0.5 to not activate the plugin. I added this to the plugin's download page.

Thanks for the work!

LinkedIn coding

I have been trying to set up LinkedIn for this plugin, but the result with your programming is:

http://www.linkedin.com/in/my-name/a/651/b62

According to the profile setting on my LinkIn account, it should be:

http://www.linkedin.com/pub/liz-burr/a/651/b62

How do I replace with "in" with "pub"?

To answer your question Go to

To answer your question

Go to root/wp-content/plugins/social-media-page/profile.csv

And change the URL.

 

The Best Plugin of Its Kind!

This is great, once I found my way around to get it the way I want it to look.  However, I'm barely able to get around the code, though I can if I study it long enough, how do I put some padding between the inline icons?  They are all crammed together.