Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Plugin: ajw_technorati_tags
I pulled up my code and compared it with Andrew’s and I think that functionally we’re doing the same thing, though his code is elegant and mine is … not. I thought I’d post my code for the sake of comparison, but every attempt I have ever made to post code here has gone awry. What’s the proper markup to post code?
-Alan
Offline
#47 2005-02-18 19:57:42
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Plugin: ajw_technorati_tags
<em>let’s see if this works… (describing in textile how I post code in textile sorta reminds me of Mcsweeney’s E-mail Addresses It Would Be Really Annoying to Give Out Over the Phone) </em>
the way i did that up there ^^ is sorta a hack from the [SPACE] bug/feature in textile. this is how i enter the code into the textarea:
NOTE – replace <code>[]</code> with <code>< ></code> and <code>[SPACE]</code> with an actual space (or spaces). The blockquote is optional, I just like it that way ;-)
<code>[blockquote]</code>
<code>[SPACE][pre]</code>
<code>[SPACE]echo “hello world”;</code>
<code>[SPACE][SPACE][SPACE][SPACE]echo “indented hello world”;</code>
<code>[SPACE][/pre]</code>
<code>[blockquote]</code>
Last edited by Andrew (2005-02-18 20:57:44)
Offline
Re: Plugin: ajw_technorati_tags
Yowza. Okay, here goes.
In atom.php, before the line <code>// encode and entify</code>, add this block:
<blockquote>
<pre>
$keywords = “”;
$keywords = $Keywords;
$tagout = “”;
if (!empty($keywords)) {
$keywords = explode(’ ‘,$keywords);
foreach ($keywords as $keyword) {
$keyword = trim($keyword);
$tagout = $tagout.”<a href=\“http://technorati.com/tag/”.$keyword.”\” rel=\“tag\”>”.$keyword.”</a> “;
}
$tagout = “<p>[ tags: “.$tagout.” ]</p>”;
$Body = $Body.$tagout;
}
</pre>
</blockquote>
In rss.php, before the line <code>$Body = htmlspecialchars($Body,ENT_NOQUOTES);</code>, add this block:
<blockquote>
<pre>
$keywords = “”;
$keywords = $Keywords;
$tagout = “”;
if (!empty($keywords)) {
$keywords = explode(’ ‘,$keywords);
foreach ($keywords as $keyword) {
$keyword = trim($keyword);
$tagout = $tagout.”<a href=\“http://technorati.com/tag/”.$keyword.”\” rel=\“tag\”>”.$keyword.”</a> “;
}
$tagout = “<p>[ tags: “.$tagout.” ]</p>”;
$Body = $Body.$tagout;
}
</pre>
</blockquote>
All of this is basically just moving the plugin code, and in my case I hardcoded a space as the delimiter (in the $keywords=explode... line). For all I know, the way this puts tags into the feed violates all sorts of treaty obligations, but I based it on the existing look of the feed and wrapped the tags in a paragraph. And it seems to work, too.
Edit: With some minor formatting tweaking, that seems to have worked. Thanks, Andrew (and I loved the McSweeny’s bit)!
Last edited by schussat (2005-02-18 20:57:14)
-Alan
Offline
#49 2005-02-18 20:59:15
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Plugin: ajw_technorati_tags
And that about wraps it up – I’d say this is about as complete a thread on adding Technorati tags to Txp as you could possibly have.
Offline
#50 2005-02-18 20:59:49
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Plugin: ajw_technorati_tags
(until an easier method comes about in future versions)
Offline
Re: Plugin: ajw_technorati_tags
I read the help info, but can’t seem to find the Txp tag to be included in my article form, that would make the tags show up on the page.
Offline
#52 2005-12-24 15:14:51
- papalozarou
- Member
- Registered: 2004-07-05
- Posts: 45
Re: Plugin: ajw_technorati_tags
anyone got this working with version 4? I can’t find any of the code to hack in the rss.php or atom.php in version 4.
Offline
Re: Plugin: ajw_technorati_tags
does this work in v4 at all?
arp laszlo
www.inkwire.net
Offline
#54 2006-01-09 16:36:37
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Plugin: ajw_technorati_tags
{reviewing & updating}
Offline
#55 2006-01-30 20:33:08
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Plugin: ajw_technorati_tags
small update to v0.7.1 (now uses doWrap())
Last edited by Andrew (2006-01-30 21:26:33)
Offline
#56 2006-01-31 07:11:44
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Plugin: ajw_technorati_tags
So I’ve been trying hard to get this thing integrated into a plugin for feeds, but I just don’t see it being possible with the current state of atom() & rss() and the pretext callback event. It’s just not feasible. So here’s an updated version of the feed fix for Technorati tags, which auto-appends any tags in a paragraph at the end of the article body of your feeds. Please update if you find bugs.
Offline
#57 2006-02-08 00:42:32
- papalozarou
- Member
- Registered: 2004-07-05
- Posts: 45
Re: Plugin: ajw_technorati_tags
that link goes to pastebin and then I am lost. Am i missing the big link to ‘updated version of feed fix for technorati tags’ on the paste bin page?
Offline
#58 2006-02-08 00:55:35
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Plugin: ajw_technorati_tags
crap. it expired. uh…
Offline
#59 2006-02-09 15:09:40
- papalozarou
- Member
- Registered: 2004-07-05
- Posts: 45
Re: Plugin: ajw_technorati_tags
any chance you still have a backup copy of the hacks needed?
Offline