Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: smd_tags: unlimited article, image, file and link taxonomy
Just tried what I said and found it didn’t quite work as expected. Googled a bit and the plot thickens (see 3rd post). It does change to a single select if you choose 1 row, but if you choose 2 rows you can’t see the whole list in Firefox.
Also, if you choose 1 or 2 rows for the textarea, you get a bigger box than expected if autocomplete is on because the CSS that comes with the autocomplete plugin forces the box to a certain height. Looks like I’ll be making a note in the help that the Select/textarea row value is a guide only :-)
Last edited by Bloke (2008-10-16 16:34:58)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
Ahh. So a Firefox display problem comes into play does it?
To my mind it makes sense to force it to a single dropdown (hehe, less coding!); if someone’s going to the trouble of making the select list a single item, chances are you don’t want to be able to select multiple items. Right? Wrong?
Well that was my original thinking until I checked the source and saw that it was set to multiple, then I started “experimenting” and found the zero setting pheonomenon. So my thinking is if choosing the select list option, setting the lines to zero gives a full display with multiple tabs facility, setting to “1” gives a drop-down list with single tab facility though that sort of defeats the object methinks. Never-the-less some may want it. Setting to 3 or more should throw a scroll-bar.
If someone has a multitude of tabs then going down the textarea route with auto-complete in place is probably the better option for them though they also have the text list option.
How difficult would it be to bring the CSS into the Presentation tab?
EDIT – actually, hold that thought. If I were using Ruud’s rvm_css plug-in I could place it in the Presentation tab and save the static version to where ever I want it and add a bit of styling to the “clr” and “tog” buttons. I could also add the button styling to my “A Bit Blue” admin CSS for those that use it.
Last edited by thebombsite (2008-10-16 21:14:46)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
thebombsite wrote:
setting the lines to zero gives a full display with multiple tabs facility, setting to “1” gives a drop-down list with single tab facility… Setting to 3 or more should throw a scroll-bar.
Done in my dev version. I’ll wait for the dust to settle and any more feedback or any other bits and bobs that need changing before committing it to the next version. It’s only a two-line mod if you want to do it yourself in the meantime. Swap line 124 out (the one that begins out[] = '<select...
in function smd_multiTreeSelectInput
) for these two lines instead:
$rows = $pref['smd_tag_p_size']['val'];
$out[] = '<select id="'.$select_name.'" name="'.$select_name.'[]" class="list" size="'. $rows .'"' .(($rows==1) ? '' : ' multiple="multiple"'). '>';
How difficult would it be to bring the CSS into the Presentation tab?
I would like to do that. Having static CSS in the plugin feels dirty to me, even though I’ve tried to keep it to a minimum. You could certainly just copy out the CSS and put it in the Presentation tab the way you suggested, but don’t inline ‘on-page’ rules take precedence over ones loaded via traditional stylesheets? I forget whether load order affects specificity. I suppose you could always add !important
to the rules but relying on that seems more hacky than me getting it right in the first place!
If anyone has any pearls of wisdom on how to cleanly separate the CSS from the plugin without having to bundle it in a zip file and have people install it, blah blah, I’m all eyes.
And if you think the clr/tog/edit buttons should be prettier than simply being surrounded by square brackets and chucked on the page, I’m more than willing to change them for something else. Just send me what works better and I’ll shoehorn it in the plugin.
P.S. I had you in mind when I added the two prefs to change the mouseover and highlight tag colours; I remember reading somewhere how you preferred things A Bit Blue and I wouldn’t want to permanently inflict yellow on anyone :-)
Last edited by Bloke (2008-10-16 23:04:24)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
Some thoughts about css inside plugin – if you mean how2 seaprate css and plugin code (code that is avaible when clicking edit
link in admin) you can:
- output css to mysql
- if rvm_css is active and tuned (directory with
777
right sexists) css could be moved to file – it will save some time for mysql query :)
- if rvm_css is active and tuned (directory with
- base64encode and zip code and enter it in the end of plugin code – this will reduse size and the ability for human to read css :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
the_ghost wrote:
output css to mysql
That’s not a bad idea. During installation I could simply write a new Stylesheet called smd_tags (if it doesn’t already exist) to the database and then call it from the code. I suppose I could also detect if the rvm_css plugin is installed and use that as the load mechanism, though I don’t know what would happen if you forgot to visit the Stylesheet tab, view the smd_tag sheet and have it create the file in the directory. Perhaps if the file is not available, rvm_css will default to loading it the old way… I’ll check the code.
It’s certainly something to think about; thanks for the tip. I wonder if I could make it an optional tick box under the Install tables button… and perhaps a similar tick box when removing tables so you can choose whether to leave the stylesheet alone.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
You totally and even more understood what i meant :) I didn’t think over txp’s stylesheets – i thought over using some table\row in mysql for storing css, but using stylesheets tab is brilliant idea, how could i miss it? :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
Stef. What another amazing plugin!
How many did you still create?
Seems obvious you could become a Core Developper. Did you ever thought about this eventuality?
Cheers,
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
Pat64 wrote:
another amazing plugin!
Thanks. Hope it’s useful for you. If you spot anything odd or have some ideas to make it better, don’t hesitate to let me know.
How many did you still create?
15 so far (plus a couple of unreleased/unfinished ones) and I’m sure there are plenty more ideas that’ll come my way in future…
Seems obvious you could become a Core Developper. Did you ever thought about this eventuality?
Ha ha ha! Thanks for the vote of confidence but I don’t have the right mindset for it. I’m a self-taught hacker with only fractional knowledge of the inner workings of TXP, not a cool, calculated coding machine like wet, ruud, all the previous devs, and many other plugin authors who I stand in awe of (net-carver, jm, variaas, rloaderro, graeme, manfre, gocom, truist, wilshire, cbeyls, chriloi, pepebe, gerhard, trenc, igner, to name just a few). They’d all be in line ahead of me, imho.
To be a dev you need to have a vision of where the product is going, vision of what has gone before, know the reasons certain decisions have been made in the past, be awesome at coding and even better at testing. And, crucially, to be able to say ‘no’ when something doesn’t fit with the TXP ethos. I’m too much of a throw-it-together ‘yes man’ and just do things off the cuff because I can, and have this excellent CMS at my disposal.
I luckily (and randomly) dropped into the awesome TXP community, shook it about with some fortunate coding opportunities and have found my niche. Tentative patch submission is my current limit :-)
Last edited by Bloke (2008-10-17 12:49:46)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
Thanks Stef. Changes made to code and all seems to work as expected.
I’ll go and work on that CSS now.
I haven’t tried anything on the client-side yet due to the currently needed hack. I’ll get around to it eventually.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
thebombsite wrote:
Changes made to code and all seems to work as expected.
Ace.
I’ll go and work on that CSS now.
Ace ^2.
I haven’t tried anything on the client-side yet due to the currently needed hack.
OK, no probs. The hack is only for images. And in fact only if you want to run the smd_related_tags or smd_tag_list from_within_ an images form, which you currently can’t do due to lack of the $thisimage
context.
I put together another patch last night with a heavily reduced tag set (6 tags compared to, like 17 in the 1st submission!) and I’m running it through some testing to see if it allows all of the functionality people might require. Hopefully should be submitted for approval/further testing over the weekend if I get some time.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
OK. Let me know when it’s ready and I’ll give it a whirl. Forgot it only applied to certain image tags. :(
And when you have some spare time don’t forget to move that site of yours into a decent CMS. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: smd_tags: unlimited article, image, file and link taxonomy
Hey, while you’re at it… ;) how about a global category for all content types.
That would totally simplify the set up for the client section detailed here.
Seriously though… outstanding work, cholo.
Offline