How to fix UTW when it stops returning Tags
by MattUltimate Tag Warrior is an awesome plugin. If you don't have it, get it, NOW! *waiting...waiting*
Ok, now that everyone is back, let's discuss a problem I ran into and how to fix it. When you write a post and have the UTW plugin activated, you will notice a section below the post edit box that gets related tags for you. UTW sends your post to Yahoo's content api, and then Yahoo returns keywords based on the content...really cool stuff. You can see the Yahoo content API Here.
The API will only send 5,000 queries per application ID. So if you click on the "Get Keyword Suggestions From Yahoo" button and nothing happens UTW has probably reached it's limit of queries. Think about how many blogs UTW is installed on...it's a lot.
You can fix this by adding your own Yahoo API Application ID. I know it sounds hard but I don't think you have to even go to yahoo to change it.
The file to edit is in the UTW plugin folder. The file name is ultimate-tag-warrior-ajax.php
On line 95 you will see $appID = "wp-UltimateTagWarrior"; If your editor does not have line numbers, you can search for "wp-UltimateTagWarrior". Change the appID to whatever you want, but make it unique because if the appID is already in use by another large website you might just run into the same problem as before. I changed the appID to my credit card number: 4532-2344... J/k 
anyhow, once it is changed, re-upload the file and go check it on a post...it should work and return the tags based on the content of your post.
Here is another useful code snippet I use to return tags based on content
You can try the code out here: My Keyword Generator
Simply send it content and it returns the keywords, don't forget to change the appID in the snippet too.
-
function get_keywords($context)
-
{
-
// output=php means that the request will return serialized PHP
-
$request = 'http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction';
-
$ch = curl_init($request);
-
"context" => $context,
-
"appid" => 'your_App_ID',
-
"output" => 'php'
-
);
-
$sendheaders = array("User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",);
-
curl_setopt($ch, CURLOPT_POST, 1);
-
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
-
curl_setopt($ch, CURLOPT_NOBODY, 0); // set to 1 to eliminate body info from response
-
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); // use HTTP/1.0 instead of 1.1
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response. ###
-
curl_setopt($ch, CURLOPT_HTTPHEADER, $sendheaders);
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); // use HTTP POST to send form data
-
-
$resp = curl_exec($ch); //execute post and get results
-
curl_close ($ch);
-
//echo $resp;
-
-
if ($resp === false) {
-
}
-
-
return $phpobj;
-
}
Tags:bloggers Blogging Software Plugins Tech Developers Technology wordpress
Popularity: 9% [?]

