Online advertising

Hebrew Site

 

Affiliate Marketing (R)Evolution

Job Offers

I Love to Rant!

Backpack: Get Organized and Collaborate

5 December 2005, 10:45 Tagging Textpattern

This blog is now officially uses Tags instead of categories. That’s right – I wrote the long-awaited TXP Tags plugin!

Tagging Textpattern

Throw your categories away! With this nifty plugin for TXP you can now start tagging your thoughts. Just install and start tagging away…

Want to add Tags to your TXP blog? Follow these instructions:

1) Download ran_txp_tags.txt to your desktop and install it on your TXP blog.

UPDATE: Some people reported problems with installing the plugin. If you find yourself facing the same problems, click here copy the plugin right from your browser.

2) Go to admin->preferences->advanced preferences and scroll down to custom fields section. Create a custom field named Tags and save your changes.

3) Edit the plugin to let it know which custom field you’re using. In the third line, you will see this line.
$tags_field = 'custom_1'; // <-- YOUR CUSTOM FIELD!
Change the $tags_field variable’s value to custom_1, custom_2, and so on…

4) Create a new section named “tag”. I that section’s page put the following tag:
<txp:ran_tags_list_tag />
This will automatically display either all tags or a list articles tagged with a specific tag, depending on the request.

5) In your forms that displays your articles, put this code:
<txp:ran_tags_if_exists>
<txp:ran_tags_list_single />
</txp:ran_tags_if_exists>

This will list the article’s tags.

6) Last but not least, wherever you want your list of tags to be displays, put this tag:
<txp:ran_tags_list_all />
NOTE: Place this code inside a DIV, and specify assign this DIV a the minimum font-size using CSS. The plugin will use this value to calculate the font-size of each tag depending of its weight.


That’s it! You’re done!

From now on, whenever you add or edit an article you will see a Tags textbox under ‘adcanced options’ on the left-hand side.

See a TXP Tags Screenshot!


agkw:blog, tags

{ tags:  code, textpattern, web2.0 }

 

[ advertisement ] The business of hosting services providers is booming nowadays. The web hosts not only attract their clients through cheap hosting plans but also offer low rates of domain registration to make their customers buy domain as well. People can also renew domains which have been expired for some while. Internet not only provides opportunity for home business but also offers different online training courses as well as online exams such as ccna, mcse and cisco exams.

 

Comments

gravatar RUDE / Dec 5, 08:15 PM

Ok mate, great job!

(but I can’t install it, are u sure the txt file is well formated?)

#

gravatar ThP / Dec 5, 10:41 PM

Same here,

can’t install the plugin by copy/paste.

Error thrown is:

“Notice: unserialize(): Error at offset 0 of 7293 bytes in /www/[...]/cms/textpattern/include/txp_plugin.php on line 152”

[...] is path stuff I deliberately erased from the path here.

Running TXP 4.0.2

#

gravatar Chris Casciano / Dec 5, 10:59 PM

Nice work.

Though I do like categories myself for organizing my own site. It has a way of keeping my posts focused and preventing me from rambling on about anything and everything.

#

gravatar Ran Aroussi / Dec 5, 11:05 PM

I just tried to install it again and it works. Try now and let me know of any more problems you run into.

Cheers!

#

gravatar Tom / Dec 6, 02:05 AM

Great plugin!

Only one issue here: the links to the tags only seem to work if textpattern is publishing to the site root, i.e. they don’t use the Textpattern Site URL.

#

gravatar Ran Aroussi / Dec 6, 07:43 AM

The site_root thing is fix now. Sorry for not thinking about it before :) (I’m so used to have TXP on my root)

#

gravatar The Human Museum / Dec 6, 07:45 AM

I have the same issue as above, which is a shame as this was EXACTLY what I’m looking for.

#

gravatar Ran Aroussi / Dec 6, 12:28 PM

Are you all using TXP 4.x? I’ve installed it on 3 blogs so far with no problems at all..

Please provide me with more info and I will fix this ASAP.

#

gravatar Rigel / Dec 6, 01:13 PM

I do not have problems with 4.02.

A question: the language of the months can be the same one used by textpattern?

Thanks for plugin!

#

gravatar alex / Dec 6, 01:25 PM

Nice plugin Ran… i had no problems installing it on 4.0.2 on a german txp site..though i did not add tags yet.

#

gravatar Ran Aroussi / Dec 6, 01:49 PM

Good question about the Localized months. I’ll look into it and post a new version.

Cheers!

#

gravatar Ramm / Dec 6, 04:58 PM

Hi,

I have installed the plugin without problems, but, i can’t make it work.

I have this error at the top of my first page:

Parse error: parse error in …../textpattern/lib/txplib_misc.php(455) : eval()’d code on line 5 This error has been caused by the plugin:ran_tags

And this in the page where i put the tag txp:ran_tags_list_tag:

tag_error txp:ran_tags_list_tag -> Textpattern Warning: unknown_tag

I think i don’t understand some parts of the instructions, and i don’t know if i have to put the tags one per custom field field or can i put the tags in the same field.

#

gravatar The Human Museum / Dec 6, 06:07 PM

Works perfectly with the root problem fixed, thanks!

#

gravatar ThP / Dec 6, 07:18 PM

Ok,

this is what happened and I’d venture to say it’s the same with the other two guys who mentioned they couldn’t install the plug-in:

I copied the complete .txt which caused the problem. I hadn’t noticed the mark where it told me to start copying from there.

Installed without a hitch, will check it out in a bit.

#

gravatar Ran Aroussi / Dec 6, 08:49 PM

Thanks ThP, for describing what was probably the problem :) I’ve removed everything from the file BUT the plugin to avoid this problem in the future.

Happy tagging everyone!

#

gravatar ThP / Dec 6, 08:56 PM

Totally excellent, Ran :^)

#

gravatar Ramm / Dec 6, 10:01 PM

So, anybody knows what happen in my case?

I still can’t make it work

Thanks

#

gravatar Ran Aroussi / Dec 6, 10:56 PM

Ramm,

What version of TXP are you using?

#

gravatar Ramm / Dec 6, 11:29 PM

Thanks for answer.

My txp is 4.0.2

#

gravatar Ramm / Dec 7, 03:03 AM

Now is working, but i still have a little problem:

In my http://www.domain.com/tag i have an error at the top of the page:

tag_error txp:ran_tags_list_tag / -> Warning: Missing argument 1 for ran_tags_field()

:(

how can i delete some test tags i make?

Thanks for your help.

#

gravatar Ran Aroussi / Dec 7, 07:39 AM

Ramm & everyone.

I have a theory as to why you get the Missing argument 1 for ran_tags_field() error.

Try reinstalling the new version and let me know.

With your help- it will be ready and finished within days for the whole world :)

#

gravatar Yura / Dec 8, 03:52 PM

Thanks so much!

Thats exactly what I (and many others I’m sure) was thinking about!

#

gravatar Mr Joel Dueck / Dec 8, 11:09 PM

This is kind of what the “keywords” field does – I’ve used it to group articles into “volumes” on my site since g1.19. The missing link has always been a font-weighted list of all tags. Good show,

-JD

#

gravatar Ramm / Dec 9, 06:24 PM

Hi

i have reinstalled, but still have that error.

In some cases, i have another errors, “Warning: division by zero”, “Warning: First argument should be an array”.

The strange thing is that the plugin seems to be working well.

#

gravatar Ran Aroussi / Dec 9, 08:56 PM

Well. Version 0.2 is online. Please try this version and report any bugs your find. I think/hope it will work better (or at all).

#

gravatar Rigel / Dec 9, 10:27 PM

Ran, download link for version 0.2?

#

gravatar Ran Aroussi / Dec 10, 11:36 AM

Same link as above – I just replaced the file…

#

gravatar Aigars / Dec 11, 12:46 AM

something doesnt seem to be right… tag_error -> Warning: min(): Array must contain atleast one element. Well – how should i separate tags? with , or ; ?

#

gravatar Ran Aroussi / Dec 11, 07:20 AM

Separate your tags using a space.

#

gravatar Aigars / Dec 11, 12:48 PM

yup…but there ir some problems with localization…, for example – it doesnt use utf-8 charset, because in latvian we are using lengthering marks, but in tabs they appear as question marks… :(

#

gravatar Mikkel Malmberg / Dec 12, 10:05 PM

Love it! Already implemented – works like a charm.

#

gravatar Mikkel Malmberg / Dec 13, 01:36 AM

How about making it use clean urls? Or is that nearly impossible? And how about some overview of already used tags near the “New article”-page.. To prevent doubles: app and apps, tag and tags etc.

Thanks again!

#

gravatar martin / Dec 18, 06:44 PM

i got a little problem with this plugin. while the complete tag list works like a charm, individual tags of a specific article do not show.

the error message is:

tag_error -> Warning: extract(): First argument should be an array

#

gravatar Adam Farnsworth / Dec 20, 02:50 AM

Hi-

Just installed the tags plugin (which I want to thank you for), but whenever I use the list_all tag I get this error:

tag_error txp:ran_tags_list_all / -> Warning: Division by zero

(sorry for the lack of < > tags above, textpattern wants to take them out, no matter what…)

I looked through the comments, but my error seems to be different than the other ones (mine doesn’t seem that difficult). Right now, I just don’t post my full tag list, and everything works fine, but I’d like to post that list. :-)

Thanks again!

#

gravatar martin / Dec 21, 11:11 AM

today it magically worked …

#

gravatar Justin / Dec 21, 04:15 PM

Great work! I have a couple of requests for improvements:

1. As mentioned before, clean urls would be very nice.

2. Adding a “wraptag” attribute so that tags can be placed in unordered lists, which would create more meaningful markup as well as provide a bit more styling flexibility

I will see if I can tackle either of these issues on my own, but I’m not super-fluent in php

Thanks again!

#

gravatar rob / Dec 31, 05:13 AM

The division by zero and array errors seem to come from there being only a single article being tagged (if you’re just testing, say).

other than that, this works great as near as i can tell, however i’m having one problem:

is ran_tags_list_tag supposed to output a list of articles which match the passed tag? the cloud appears but clicking doesn’t output an article list? am i missing something?

#

gravatar Kossatsch / Jan 2, 11:11 AM

Thanks for your great work. Works great with TXP 4.0.2. Please allow me to mention some suggestions and problems.

  1. Lists hidden articles, unfortunately.
  2. Add a kind of “see this tag at (my) del.icio.us, Simpy etc.”. I added this to my tag page, try there any tag.
  3. Allow to combine tags with a + (just like in many social bookmarking services).
  4. Append all tags to an article listed on a tag page (“also tagged with…”).

Thanks again for this plug-in.

#

gravatar Hiram / Jan 3, 02:42 PM

How are the tags used? Do they end up in the syndication feeds as well, allowing Technorati and other such services to harvest them?

#

gravatar MarkNumberM / Jan 4, 07:08 PM

This appears to be exactly what I’m looking for. (Thanks!)

But before I dissolve into fits of pleasure—or go to the effort of installing the plug in to test it out—could someone please clarify one quick question?

Does this use only one custom field?

This sentence led me to believe it might take several: “Change the *$tags_field* variable’s value to custom_1, custom_2, and so on…”

And I don’t have that many custom fields to spare.

Thanks!

#

gravatar Max / Jan 5, 10:53 AM

I’ve just installed this plugin and so far so good. It works great.

I just wanted to add a request if you continue to update this plugin. I’m pretty bad at keeping track of the tags I’ve been using, so I pretty much tag everything I think is vaguely relevant to an article. As such my Tag Cloud is full of tags that, while relevant, only appear once or twice through all entries.

I’d love you to include a function that would allow one to exclude tags that only appear a certain number of times or less (or at least tags that only appear once)?

Any chance that might happen?

#

gravatar shotoshi / Jan 5, 04:32 PM

MarkNumberM, I just visited this blog to ask Ran the exact same question: Does this use only one custom field?

I have a few custom fields spare and was hoping to use more than one as it would be good for subdividing the tags into ‘genres’ or types.

Also, are we limited to using one word tags? I guess so from the examples of your tag cloud.

Another good function would be to show the tags we commonly input in the admin section of the article page, so we could cut and paste them into the custom fields.

Any entered which are not in the list would be automatically added to the list.

Just some ideas.

#

gravatar Brandon Erik Bertelsen / Jan 5, 08:35 PM

Has anyone worked out some kick ass rewrite rules so this can be used with clean URL’s?

#

gravatar shotoshi / Jan 7, 09:38 PM

Hey Ran, any chance of addressing some of the comments here?

Cheers!

#

gravatar rob / Jan 7, 10:03 PM

Is there a chance this doesn’t work with “partly messy” URLs?

#

gravatar Ran Aroussi / Jan 8, 07:32 AM

Hey guys!

Thanks for your feedback (and compliments). I do intend to address some of the issues raised here, though I can’t make any promises regarding the deadline. All I really need is one free weekend, but from the looks of it, it could take a while.

Happy new year!

#

gravatar shotoshi / Jan 10, 11:50 AM

Ran, Happy New Year to you too!

Looking forward to you addressing these issues but perhaps a more comprehensive instructions document would alieviate the burden on you somewhat.

The main question I have, that I would like answered asap, is: can this be set up to use more than 1 custom field?

I am thinking of using a custom field for 1 set of criteria, let’s say city/town, then the other custom field for associated keywords for the article.

#

gravatar ThP / Jan 10, 09:14 PM

I installed the plugin on a txp 4.0.3 and got everything set except for the part covered under

4) Create a new section named “tag”. I that section’s page put the following tag (omitting pointy brackets):

txp:ran_tags_list_tag /

Where is the section’s page? I don’t know where to put the txp:ran_tags_list_tag /.

Can anybody please help me, it’s possibly a very easy solution since others here have the plugin running with no problems.

#

gravatar animoller / Jan 20, 08:42 PM

I get this error when trying to install:

Notice: unserialize(): Error at offset 0 of 28 bytes in /var/www/journal.animoller.com/htdocs/textpattern/include/txp_plugin.php on line 155

Badly formed or empty plugin code #

gravatar squiddle / Feb 13, 11:29 PM

i can’t get it working with messy urls

got it working with messy urls. every line containing the $url = stuff

there should be sth like

$url = ‘http://’ . $siteurl . $path_from_root ;

$url .= ($url_mode==1) ? ’?s=’ : ‘’;

$url .= ‘tag’;

//$url .= ($url_mode==1) ? ’/’ : ’?t=’;

$url .= ‘&t=’;

@ThP just create a new section “tag” and a new sitelayout “tag” which assign to the section and has just the one line from the instruction inside. after that you will get a basic site in the tag section showing a list of all articles in this tag. themeing is your work to be done :)

#

gravatar muyufan / Feb 17, 07:10 PM

ThP

that means if you want create a section page like ‘about’,’contact’ then you shoud put that tag on.

if you dont need a tags section,to ignore the 4 step

is that right?

#

gravatar jonas / Feb 18, 04:05 PM

is there any way to customize the way the article is outputed on the specific tag-page, i would like to use an other article-list-form so it shows the thumbnails instead of only the title.

#

gravatar Robert Hartl / Feb 19, 04:35 AM

rewrite-rules for clean urls wanted.

Can this made in the plugin code (there ist mode 1)?

#

gravatar Adam Massey / Feb 28, 09:59 PM

Great plugin, though like a lot of people, I’ve got a request. Would it be possible to limit a tag cloud to a particular section?

#

gravatar Nathan Arthur / Mar 5, 10:15 AM

I’ve created a plugin, originally based on ran_tags, that resolves most of the issues raised in the comments here. Learn more at my site.

#

gravatar SteveC / Mar 9, 11:57 PM

“tag_error -> Warning: Division by zero on line 157”

Hope that helps something

#

gravatar Michael / Mar 21, 12:03 PM

Works like charm here on Michael’s Remarks.

#

gravatar Gordon Brander / May 21, 12:05 AM

This is great Ran! It will be especially good, because I’ll be using tags and categories.

#

gravatar Michael / Jun 4, 11:01 AM

It’s a few months later and I removed the tags-plugin from my articles since the search is more consistent if you use the article itself as the tags

but

it makes very much sense to use tags when providing files, sounds or pictures – all being not descriptable media. And that’s what I am using it now for!

#

gravatar junkie / Jul 19, 12:16 PM

why i cant use unicode characters ? like ü,ğ,ş,ç ??
please help.

#

gravatar Google SEO Tips / Aug 23, 10:13 AM

Thanks for the useful plugin. I will also replace by categories by tags now.

#

gravatar Link Sizzler / Aug 31, 12:54 PM

Nice plug-in !!

#

gravatar Kevin / Sep 27, 09:54 PM

This would be perfect if it didn’t display hidden or future articles. Any chance of adding that feature soon?

#

gravatar 3dsl Eugen / Nov 28, 07:58 PM

plugin is super! testet witch 4.0.4 ! its great :)

#

gravatar Samanta / Dec 12, 10:53 PM

Awesome plugin, very useful. However, whenever I click a tag it doesn’t display the list of entries under that tag… see for yourself: http://www.lovevibe.net/aise/

Help, please?

#

gravatar Samanta / Dec 13, 04:36 AM

Never mind. Ignore.

#

gravatar Florian / Mar 8, 05:59 PM

I have the same problem like Smanta! The plugin creates a link to ”.../tag?t=tag” ... but the adress doesn’t exist :-(

#

gravatar Kykyn / Apr 26, 10:40 PM

Great! But after the redesign, I want to delete all my old tags. How can I do it?

#

gravatar untitledds / Apr 28, 11:47 AM

Hi! God work. Can г tell me how i can separate tag fields, and lead out it ins separate (Costum_1, costum_2, costum_3)?

#

gravatar Michael / May 15, 08:40 PM

Hi! What happens to the data (the tags) when I decide to delete the plugin? Does it stay somewhere in the database or is it removed, too? (Or how, if it’s stored as a custom field-entry, can I remove it in a batch?)

#

gravatar push / Jul 8, 02:24 PM

I install plugin normally but on site I view a error mesages –
tag_error -> Textpattern Warning: Unknown column ‘Tags’ in ‘field list’
select Tags from t_textpattern where ID=’10’ AND Tags ‘’ on line 70

tag_error -> Notice: Undefined index: Tags on line 108

tag_error -> Notice: Undefined variable: capitalize on line 118

tag_error -> Textpattern Warning: Unknown column ‘Tags’ in ‘field list’
select Tags from t_textpattern where ID=’9’ AND Tags ‘’ on line 70

tag_error -> Notice: Undefined index: Tags on line 108

tag_error -> Notice: Undefined variable: capitalize on line 118

tag_error -> Textpattern Warning: Unknown column ‘Tags’ in ‘field list’
select Tags from t_textpattern where ID=’1’ AND Tags ‘’ on line 70

tag_error -> Notice: Undefined index: Tags on line 108

tag_error -> Notice: Undefined variable: capitalize on line 118

tag_error -> Textpattern Warning: Unknown column ‘Tags’ in ‘field list’
select Tags from t_textpattern where ID=’5’ AND Tags ‘’ on line 70

tag_error -> Notice: Undefined index: Tags on line 108

tag_error -> Notice: Undefined variable: capitalize on line 118

tag_error -> Textpattern Warning: Unknown column ‘Tags’ in ‘field list’
select Tags from t_textpattern where ID=’6’ AND Tags ‘’ on line 70

tag_error -> Notice: Undefined index: Tags on line 108

tag_error -> Notice: Undefined variable: capitalize on line 118

How fix this?

#

gravatar guo / May 14, 05:54 AM

美容整形 ダイビング 沖縄旅行 不動産担保ローン 通信制高校 求人情報 アルバイト 求人情報 出会い系 アルバイト クレジットカード 現金化 格安航空券 競馬ウェディング 競馬予想 中高年 転職 転職悩み 相談 医院開業 システムキッチン 美容院クレジットカード 現金化 パイプカット インテリア 雑貨包茎 包茎手術 婚約指輪 クレジットカード 現金化 為替 ショッピング枠 現金化 現金化 出会い系 ショッピング枠 現金化 競馬予想 結婚式 ウェディング インプラント システムキッチン FX 外為 ショッピング枠 現金化 結婚式外国為替 為替服飾 学校 資格 看護

#

gravatar ليبيا / Jun 15, 10:18 PM

The subject of a very wonderful and distinct
I thank you for continuing excellence
Thank you

=====================================================================

#

gravatar برامج / Jun 15, 11:08 PM

thank you

very nic

#

gravatar DGGH / Jun 25, 03:54 AM

広島 不動産
不動産 広島
出会い系
出会いサイト
出会い
出会い系サイト
三井ダイレクト
盲導犬
募金
障害者
治験
広島 不動産
チューリッヒ
派遣
スニーカー
水虫
ゼネラリ
フランチャイズ
人材派遣
派遣会社
派遣会社
不動産投資
不動産

#

gravatar 不動産 / Jun 25, 03:57 AM

不動産投資 群馬 ハウスメーカー 埼玉 ハウスメーカー 高知 不動産 徳島 不動産 松山市 不動産 香川県 不動産 高松 不動産 不動産 広島 広島 不動産 岡山 不動産 賃貸 群馬 不動産 アスクル 不動産 東京 浮気調査 埼玉 不動産

#

gravatar フランチャイズ / Jun 26, 03:39 AM

セルライト

タイ古式マッサージ
”>ソニー損保
婚約指輪
結婚指輪 #

gravatar KC / Jun 26, 08:05 PM

網頁設計公司 – 面膜 – C.L面膜紙 – MaybleSally面膜紙 – Ki Kycehuaugn iackuen面膜紙 – Joseristine面膜紙 – Beauty Life面膜紙 – paper mask – 泰拳 – Thai Boxing

#

gravatar KC / Jun 26, 08:06 PM

網頁設計公司 – 面膜 – C.L面膜紙 – MaybleSally面膜紙 – Ki Kycehuaugn iackuen面膜紙 – Joseristine面膜紙 – Beauty Life面膜紙 – paper mask – 泰拳 – Thai Boxing

#

gravatar Candice / Jun 28, 08:39 PM

works like a charm.
however, would be perfect if it didn’t display hidden or future articles.

Link Text

#

gravatar Candice / Jun 28, 08:42 PM

works like a charm.
however, would be perfect if it didn’t display hidden or future articles.

Locum tenes job

#

Post your comments:

Basic Textile Help is enabled:
*bold* · _italic_ · "Link Text":http://foo.com

Name:

Email:

HTTP://:


me

 

Tip! Get a GRAVATAR and have a personalized avatar displayed next to your comment(s).

 

 

Entries by Tag:

advertising, apache, apple, apps, bidmini, blog, blogish, browsers, bsd, business, code, copywriting, danielle, del.icio.us, ebay, elsewhere, emma, family, firefox, funny, gmail, google, gravatars, greetings, hlola, ipod, israel, opera, osx, personal, photoshop, php, politics, projects, rants, safari, textpattern, todo, tools, trackback, tricks, unix, video, web2.0, widgets, windows