Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Plugin: ajw_technorati_tags

#61 2006-02-09 16:15:07

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Plugin: ajw_technorati_tags

THESE CHANGES APPLY TO TEXTPATTERN v4.0.3 (~revision 1117)

In both cases it will append the linked Technorati tags to the end of your article body. There may be slight differences in line numbering between different revisions.

Make backups of your originals!

/textpattern/publish/atom.php

Find this line (line 120):

$e['category2'] = (trim($Category2) ? '<category term="'.htmlspecialchars($Category2).'" />' : '');

add this directly after:

bc.. $tags = ‘’;
if (!empty($Keywords))
{ $keywords = explode(’ ‘,$Keywords); foreach ($keywords as $keyword) { $keyword = trim($keyword); $tags .= ‘<a href=“http://technorati.com/tag/’.$keyword.’” rel=“tag”>’.$keyword.’</a> ‘; } $tags = (!empty($tags) ? “<p>[ tags: $tags ]</p>” : ‘’ );
}

then replace this (lines 132-136):

bc.. if (trim($Body)) $e[‘content’] = tag(n.$Body.n,‘content’,t_html);

if (trim($Excerpt)) $e[‘summary’] = tag(n.$Excerpt.n,‘summary’,t_html);

with this:

bc.. if (trim($Body)) $e[‘content’] = tag(n.$Body.fixup_for_feed($tags, permlinkurl($a)).n,‘content’,t_html);

if (trim($Excerpt)) $e[‘summary’] = tag(n.$Excerpt.fixup_for_feed($tags, permlinkurl($a)).n,‘summary’,t_html);

/textpattern/publish/rss.php

Find this (line 58):

$a['posted'] = $uPosted;

add this directly after:

$tags = '';
if (!empty($Keywords))
{
	$keywords = explode(' ',$Keywords);
	foreach ($keywords as $keyword)
	{
		$keyword = trim($keyword);
		$tags .= '<a href="http://technorati.com/tag/'.$keyword.'" rel="tag">'.$keyword.'</a> ';
	}
	$tags = (!empty($tags) 
		? "<p>[ tags: $tags ]</p>"
		: ''
	);
}

then replace this (line 64):

$Body = rss_safe_hed($Body);

with this:

$Body = rss_safe_hed($Body.$tags);

Fin.

Last edited by Andrew (2006-02-09 16:18:24)

Offline

#62 2006-02-09 16:34:12

papalozarou
Member
Registered: 2004-07-05
Posts: 43

Re: Plugin: ajw_technorati_tags

cheers. will try this now.

Offline

#63 2006-02-16 00:32:02

helena
New Member
Registered: 2006-02-11
Posts: 3

Re: Plugin: ajw_technorati_tags

Thanks! This works fine for me, in 4.0.3.

Offline

#64 2006-02-24 12:55:28

papalozarou
Member
Registered: 2004-07-05
Posts: 43

Re: Plugin: ajw_technorati_tags

it outputs the tags to the feed, but my posts don’t appear in technorati under those tags after I post, but do if you search for a word in my article under the normal search.

Weirdness happening now – it’s tagging some stuff, but not others. Really don’t understand how this works.

Last edited by papalozarou (2006-02-28 10:47:52)

Offline

#65 2006-03-23 17:27:31

gdtroiano
Archived Plugin Author
From: Highland Park, NJ
Registered: 2005-01-29
Posts: 59
Website

Re: Plugin: ajw_technorati_tags

Not sure if anyone else has a need for this, but I added a couple of lines to utilize Technorati’s “Blog Finder”:

1. Add this line to the array: ‘urlblog’ => ‘http://technorati.com/blogs/’

2. Add these lines: foreach ($keywords as $keyword) $list[] = tag(trim($keyword),‘a’, ‘ href=”’.$urlblog.trim($keyword).’” rel=“tag directory”’.$title);

after this line:
$list[] = tag(trim($keyword),‘a’, ‘ href=”’.$url.trim($keyword).’” rel=“tag”’.$title);

Obviously, each tag will be displayed twice, but I hide them anyway…

Last edited by gdtroiano (2006-03-23 18:55:45)

Offline

#66 2006-06-23 15:52:23

maland
Member
Registered: 2005-07-30
Posts: 19

Re: Plugin: ajw_technorati_tags

the plugin works great – one question though, my tags are lining up vertically (one on top of the other) and i’d like them to list horizontally – is there a way to do that?

thanks!
md

Offline

#67 2006-07-26 08:36:19

Boby Dimitrov
Member
From: Sofia, Bulgaria
Registered: 2004-09-27
Posts: 76
Website

Re: Plugin: ajw_technorati_tags

Heya,

I’m using tru_tags at my blog and I’m pretty happy with it (uses the keywords field also). Now I’d like to have the keywords/tags in my feeds as well, as I’ve read that is needed for proper Technorati pinging. Does the fix posted above work with other plugins than ajw_technorati_tags?

Offline

#68 2006-11-06 23:17:26

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: Plugin: ajw_technorati_tags

okay, ping newbie here, on 4.0.4.

does anyone have a clue, if this plug still works with 4.0.4, is there an update necessary etc?
and is there other plugin alternatives already tested for 4.0.4, which due the (technorati) ping?

muchas muchas gracias in advance.

Last edited by jayrope (2006-11-06 23:19:19)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#69 2006-12-18 22:18:33

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Plugin: ajw_technorati_tags

This plugin is now a part of ajw_technorati

Offline

  1. Index
  2. » Archives
  3. » Plugin: ajw_technorati_tags

Board footer

Powered by FluxBB