Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2008-10-16 15:21:40

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

This is fun Stef. :)

Anyway I’m not sure if I was misunderstanding something but if I had “Enter tags using” set to “Select list” then set the “Select/textarea rows” option to “1”. I was expecting to see a “drop-down” select list as I had 5 tags defined but all I get is a single-line box with no drop-down arrow like it were a single-line textarea. Then I check the source code and see that the “select” tag is set to “multiple”. Well that’s logical as we are supposed to be able to use multiple tags so really what I need to see is ALL the available tags. I’ve found that setting the “Select/textarea rows” to “0” automatically displays the full list of available tags. I mention this as I’m thinking that if you choose to use the select list option it might be handy if it were possible to auto-set the rows to zero and make that field non-editable or am I off-centre with something here??

Last edited by thebombsite (2008-10-16 15:22:13)


Stuart – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#12 2008-10-16 15:58:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

thebombsite wrote:

set the “Select/textarea rows” option to “1”. I was expecting to see a “drop-down” select list

That’s a good point. Hadn’t thought of that. I can certainly detect the single row situation and make the select list a “proper” (non-multiple) drop down in that case.

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?

setting the “Select/textarea rows” to “0” automatically displays the full list of available tags.

I didn’t know that; well found!

it might be handy if it were possible to auto-set the rows to zero and make that field non-editable

Well, that’d be fine until you have 400 tags to choose from, then your box becomes veeeery big :-)

My gut feeling is:

  • Set the Select/textarea rows to 0 shows all the tags with no scrollbar and you take the hit on how big it is
  • Set it to 1 and you get a classic, single-selection dropdown. In other words, effectively demote the plugin to ‘category3’
  • Set it to some other number and you get that many tags (rows) showing, plus a scrollbar

What do you think?


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

#13 2008-10-16 16:34:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

#14 2008-10-16 21:00:26

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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 – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#15 2008-10-16 23:03:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

#16 2008-10-17 07:42:09

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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 :)
  • 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

#17 2008-10-17 08:28:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

#18 2008-10-17 09:07:04

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

#19 2008-10-17 11:40:00

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,237
Website

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,

Offline

#20 2008-10-17 12:47:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

Board footer

Powered by FluxBB