You are not logged in.
After many false promises, over 6 months of rewrites / re-evaluations, and a few thousand lines of code, I’m sick of looking at it. So here is the official smd_tags for you all to break.
It started life as smd_unlimited_categories for all TXP data types, but in the process of writing it I figured it kind of bridged the gap between the excellent rss_unlimited_categories and tru_tags. Unlimited categories was too long to keep typing, so I chose tags instead :-)
Anyway, the features:
Still to do, err maybe, in no particular order:
I am indebted to the work of those who wrote amazing stuff before and have helped guide the development. Namely wilshire, truist, merz1, net-carver and uli, plus devs past. Thank you all.
Onto the few caveats:
Anyway, I’ll stop wiffling and let you play. Once the plugin is activated, visit Extensions->smd Tags and get stuck in. There are links to the plugin help file from the admin side in case you get stuck.
I hope it’s useful. Now go play in my tagging toolshed.
All available versions and changes are listed here. Each entry indexes the relevant post(s) in the threads to learn about the features.
statusattribute: (thanks johnstephens) ; smd_if_tag: now correctly works outside smd_tag_list context (thanks danwoodward)
pad_posto smd_tag_name ; tidied tag manager screen ; made warning messages blink
flavourto smd_tag_list for tree and tag cloud support; added
weightitems to smd_tag_info for building alphabetic tag groups and clouds ; changed table collation to utf8_general_ci and improved unicode support ; fixed bug in smd_if_tag (again!) when using non-eq tests ; added
styleto smd_tag_name and smd_tag_count
Last edited by Bloke (2011-10-11 19:33:57)
I’m getting a blank page when I try to install the admin plug-in (the client is OK) which suggests it’s too big. Do you have a zipped version Stef?
Do you have a zipped version Stef?
Yes, I made a zipped version but forgot to put it in the post. Haha, what was I saying about missing the obvious stuff ;-)
1st post updated, thanks for pointing that out.
Oooo! That works thanks.
It will probably take me a week to work all this out but once I get the “click”. I know you know what I mean. ;)
Yeah, I know what you mean! I kind of take the interface for granted because I’ve been staring at it for the past 6 months. Now I really need a tonne of fresh sets of eyes to find out where I’ve made crap assumptions :-)
Further to the first post, and just to clarify the position of this plugin a little, it is a hybrid of the two rss_uc and tru_tags plugins because with rss_uc the categories have to be pre-configured before they can be used whereas tru_tags — I believe — is freeformish via the keywords field.
I chose the structured approach of rss_uc and positioned the tag entry system under the categories to reflect this. My reasoning was:
But after I’d done that I found a select list too restrictive. So I went back and allowed you to choose between a select list (like rss_uc), a text area or a clickable list of tags that highglight on and off (akin to the tru_tags approach). So it has the feel of neither one nor the other. The text area allows you to type in arbitrary tags but they will not be saved, which is why the jQuery auto-complete plugin is a good idea for a) saving typing and b) validating that the tags are acceptable. Depending on how strict you want the auto-complete set up, unacceptable tags can either be outright rejected if they are not connected to the current type/category or allowed to be saved if they exist somewhere for that type.
At least, that’s the theory. I’m sure this will fall over at some point and I already know of a few problems with it (esp. when deleting categories or changing category assignments in the smd_tags pane).
If there’s enough outcry I may be able to find a way of saving arbitrarily typed tags while still maintaining the structure in the back end. That sort of decision can really only be driven from people using this in anger and becoming pissed off with it!
btw, I would love to give the option to hook the entry boxes wherever you like in the interface, but the back-end DOM is such a mess of IDs and classes that frankly it’s more hassle than it’s worth (believe me, I tried!). Not to mention that the Links tab works differently to the other three…
Anyway, hopefully that’s given a bit of insight into the way the thing operates and why it does stuff the way it does.
Last edited by Bloke (2008-10-15 22:59:59)
Well the first hurdle for me was to install the auto-complete plug-in which I’ve done but then your interface asks for the js and css folders relative to “textpattern”. By that do you mean the /textpattern/ directory or the root? Maybe an example in the interface would be useful for a future release?
I’m off to bed now as I have a job to go to in the morning and they are getting scarce apparently so I shall pick this up tomorrow. :)
interface asks for the js and css folders relative to “textpattern”. By that do you mean the /textpattern/ directory or the root?
Ah yes, *cough* confusingly it appears to be uhh, both. The help could do with sprucing up here a bit, methinx!
For some reason I thought it was always relative to the textpattern directory (hence the hint in the admin interface) but upon reflection it seems it’s not necessarily that. Humbug. I think I changed the way it worked and forgot to update the gTxt().
For example, my structure is:
site root |- css |- files |- images |- scripts |- textpattern
and I can specify the two directories as the absolute paths
/css respectively, upload the two files to those directories and the plugin will pick up the auto-complete tool then. But I could also specify the two directories as
../css (i.e. relative to the “textpattern” directory, as if you were ‘inside’ the dir to begin with) and it will also pick them up fine. It’s your call which you prefer, but some examples would certainly be of benefit in the help file. Will add those in, thanks for the catch.
One other thing to note that I forgot to mention in the help (one of those days…) is that the plugin looks for these filenames:
I think I intended to allow you to be able to specify the entire path + file name if you wanted but never got round to it. Perhaps next time I’ll allow you to override the file names as well if you wish, as some servers do have trouble with the .pack versions. If you get no joy with the .pack files you’ll have to edit the plugin code for now to change the file names (or cheat and rename the non-pack file with .pack in it!). Will put this on the ToDo list.
Last edited by Bloke (2008-10-15 23:46:58)
I get this when in the extension tab ( I have clicked a first time on “install tables”):
Tag tables NOT installed.
Not all table info available.
This is either a new installation or a different version
of the plugin to one you had before.
Click “Install tables” to add or update the tables
leaving all existing data untouched.
Now, if I click again on the Install table I get this errors :
Warning: Duplicate entry ‘1’ for key 1 INSERT INTO `txp_smd_tags` VALUES (1, ‘root’, ‘article’, ‘’, 1, 2, ‘root’) in /home/.navy/ampmultimedia/56tti.info/textpattern/lib/txplib_db.php on line 81
1. Duplicate entry ‘1’ for key 1
Warning: Duplicate entry ‘2’ for key 1 INSERT INTO `txp_smd_tags` VALUES (2, ‘root’, ‘link’, ‘’, 1, 2, ‘root’) in /home/…..info/textpattern/lib/txplib_db.php on line 81
2. Duplicate entry ‘2’ for key 1
Warning: Duplicate entry ‘3’ for key 1 INSERT INTO `txp_smd_tags` VALUES (3, ‘root’, ‘image’, ‘’, 1, 2, ‘root’) in /home/…….info/textpattern/lib/txplib_db.php on line 81
3. Duplicate entry ‘3’ for key 1
Warning: Duplicate entry ‘4’ for key 1 INSERT INTO `txp_smd_tags` VALUES (4, ‘root’, ‘file’, ‘’, 1, 2, ‘root’) in /home/………info/textpattern/lib/txplib_db.php on line 81
4. Duplicate entry ‘4’ for key 1
Hello, that is baffling. I did find a small bug in the remove tables procedure (I left a table behind) and that’s fixed now, but that shouldn’t affect the installation.
So you got no other error messages on screen? No SQL warnings? Did you try it with your site in debugging mode to see if it gave any errors that might help me track this down?
Run it and see what you get out. You should see:
++ TABLE smd_tags HAS 0 COLUMNS; REQUIRES 7 ++ ++ TABLE smd_tags_cat HAS 0 COLUMNS; REQUIRES 2 ++ ++ TABLE smd_tags_used HAS 0 COLUMNS; REQUIRES 3 ++
Then, instead of clicking Install tables, put this in your URL bar:
Run it and see what you get out. You should see a whole hunk of SQL commands and then:
++ TABLE smd_tags HAS 7 COLUMNS; REQUIRES 7 ++ ++ TABLE smd_tags_cat HAS 2 COLUMNS; REQUIRES 2 ++ ++ TABLE smd_tags_used HAS 3 COLUMNS; REQUIRES 3 ++
If it’s any different from any of that, can you post what you see please (or e-mail it to me)? Also please let me know what versions of PHP and MySQL you have, and the TXP SVN revision you have installed. And if you can log into your MySQL database (or use the rss_admin_db_manager plugin), would you please check that there are three extra tables in your Textpattern database:
I can’t make it fall over here, but then I’m using old PHP4 and MySQL4. Maybe things have changed in the v5 products and I need to track these subtle differences down. Thanks for your patience.
Last edited by Bloke (2008-10-16 08:50:31)
Many thanks to jpdupont who graciously gave me a login to test and fix what I’d done wrong.
And I had done wrong; I’d been inconsistently using the table prefix throughout the code and hadn’t spotted it because I don’t use a prefix. Tut tut, where do they get these rookie coders from? ;-)
Anyone who has downloaded admin v0.11 should go and grab the updated copy with the fixes in it (make sure you force refresh the link in case it’s been cached). Since I only half made a fix this morning I completed it now and re-issued it under the same name. Yeah I know, if I was doing it properly and using git I wouldn’t get away with it…
Apologies to anyone with prefixes on their tables who have been scratching their heads. That should get you going. I shall now humbly slink away and pretend I’m not crap.
Last edited by Bloke (2008-10-16 13:31:20)