Tag Archives: field

WP-Twitter-ID Social Profiles Integration

A few days ago I wrote a post about a wordpress plugin that will add a twitter id field to the comments form and I was reporint two problems with it. One was solved in that post and for the second one I'm going to show you a solution in this post.

The Problem

The second problem was that the twitter id field was show assigned to a comment when a registered user was commenting.

Basically I needed a way to specify the twitter id of a registered user in the profile and then just make the WP-twitip-id plugin use that value form the profile. I could have done this by implementing the necessary code to show the field on the profile page and save it's value when the profile was saved but I was lazy and I wanted a quicker solution.

The Quick Solution

The quick solution was to install the Social Profiles plugin, set my twitter id in my profile and then do a simple modification to wp-twitip-id.

To make the modification just open wp-twitip-id.php in any editor, look for "function addtwitterfieldmeta($comment_data){" and right after that line insert the following code:

  1. span style="color: #ff0000;">'atf_twitter_id''atf_twitter_id''cyc2_twitter');
  2. }

That's it. Simple don't you think ? Now next time you post a comment as a registered user you should see your twitter id in the comment header.

Download

Here's the zip file with all modifications including the one in the previous post.

[download#1]