Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2020-05-03 12:19:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,738
Website GitHub

Re: smd_textile_bar: Simple Textile insertion for the Write panel

phiw13 wrote #322801:

Does that select widget construct for forms need to be in a nested ui-controlgroup ?

Honestly I don’t know. To set up a related group of icons, I call some jquery ui combobox() function and it adds all the class junk to it. Maybe the extra HTML furniture is not required.

If we can get away without it, great. It would also fix those silly extra rounded corners too. More investigation will be conducted. Thanks for testing. Glad it’s at least a half step up.

Last edited by Bloke (2020-05-03 12:24:15)


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

#38 2020-05-21 12:58:58

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: smd_textile_bar: Simple Textile insertion for the Write panel

When you press the header or block quote, block code buttons, the curser jumps 2 lines further down after placing the textile code.

Not sure, why that is.

Offline

#39 2020-05-21 13:08:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,738
Website GitHub

Re: smd_textile_bar: Simple Textile insertion for the Write panel

marios2 wrote #323094:

When you press the header or block quote, block code buttons, the curser jumps 2 lines further down after placing the textile code.

I’ve noticed this. It only does it if you use it on its own line. If you go back and place the cursor on the line that already contains (e.g.) a header and click one of the buttons, the cursor stays where it should be.

Honestly can’t see a reason why it should jump and it was on my list of things to figure out in the JavaScript, along with finding a way of moving the cursor ‘between’ the markup symbols when you click bold, italic, superscript, etc and don’t have a selection already.

Last edited by Bloke (2020-05-21 13:09:31)


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

#40 2020-05-21 13:15:12

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Bloke wrote #323095:

I’ve noticed this. It only does it if you use it on its own line. If you go back and place the cursor on the line that already contains (e.g.) a header and click one of the buttons, the cursor stays where it should be.

Honestly can’t see a reason why it should jump and it was on my list of things to figure out in the JavaScript, along with finding a way of moving the cursor ‘between’ the markup symbols when you click bold, italic, superscript, etc and don’t have a selection already.

Oh, … I see, Javascript again.

Offline

#41 2020-06-04 18:35:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,738
Website GitHub

Re: smd_textile_bar: Simple Textile insertion for the Write panel

I’ve pushed a few commits recently including one for inserting shortcodes as containers. So now you can highlight some text and wrap your shortcode around it. Handy for situations where you want to use <txp:yield/> inside them to render user-defined content. Check the commit message for usage and current caveats.

If anybody has time to download the .php plugin code and give it a whirl, I’d be grateful for some more feedback before I make an official release out of it.

I suspect if anybody has really long shortcode names(!) the bar will do some horrible wrap thing, but I guess that’s an edge case since the whole point of them is to make them, well, short.

Still not sure how to handle the nested combo-box thing around the form selector either. If anybody has any ideas on how to successfully render such things and make them accessible, I’m all eyes. Thank you.


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

#42 2021-02-17 14:08:16

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: smd_textile_bar: Simple Textile insertion for the Write panel

The plugin works fine, if I view my own login, which is the highest user rights, but the textile bar does not show up for the second user, which is the second highest user rights,…

… any suggestions?
( Using TXP 4.8.1 )
rgrds, marios

Last edited by marios2 (2021-02-17 14:09:03)

Offline

#43 2021-02-18 15:26:37

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: smd_textile_bar: Simple Textile insertion for the Write panel

I tried to uninstall and install again from the second user account, with no success.

rgrds, marios

Offline

#44 2021-02-18 15:46:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,738
Website GitHub

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Weird. Works for me on my second test account with Freelancer privs. Check your database txp_prefs table. Does it show that:

  1. All the prefs with event smd_textile_bar.smd_textile_bar_features are set global (i.e. nothing in the ‘user_name’ column).
  2. All the prefs with event smd_textile_bar.smd_textile_bar_layout are set local (i.e. contain one set per user in the ‘user_name’ column).
  3. The pref smd_textile_bar_body for the user in question is set to 1 so it shows up.

Further, can you visit the prefs and alter the Textile bar settings for this new user?


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

#45 2021-02-18 16:15:33

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Hmmm, … I’ve looked and I can see that the name fields are all empty except for the

smd_textile_bar_body 

and

smd_textile_bar_excerpt 

name fields where it says admin.

And then further down, I have:

smd_textile_bar.smd_textile_bar_layout
yesnoradio
253
admin
smd_textile_bar.smd_textile_bar_layout
yesnoradio
254
admin
smd_textile_bar.smd_textile_bar_layout
yesnoradio
255
admin

What do I have to insert regarding your second question, a 1, and in which column ?

I was thinking first, that it maybe clashes with smd_user_manager, which I have disabled for now.

rgrds, marios

Last edited by marios2 (2021-02-18 16:31:40)

Offline

#46 2021-02-18 16:31:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,738
Website GitHub

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Hmm, well that’s the thing it should automatically add those per-user prefs when you visit the admin side. The fact it isn’t doing that for you is worrying.

You should have 5 per-user prefs:

name	val	type	event	html	position	user_name
smd_textile_bar_body	1	1	smd_textile_bar.smd_textile_bar_layout	yesnoradio	251	Stef
smd_textile_bar_excerpt	1	1	smd_textile_bar.smd_textile_bar_layout	yesnoradio	252	Stef
smd_textile_bar_icons	1	1	smd_textile_bar.smd_textile_bar_layout	yesnoradio	254	Stef
smd_textile_bar_buttons	1	1	smd_textile_bar.smd_textile_bar_layout	yesnoradio	253	Stef
smd_textile_bar_headings	1	1	smd_textile_bar.smd_textile_bar_layout	yesnoradio	255	Stef

Where of course you replace ‘Stef’ with each user (login) name.

But all those prefs should be exposed and manageable via the Admin>Preferences>Textile bar panel.


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

#47 2021-02-18 16:43:55

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Bloke wrote #328961:

But all those prefs should be exposed and manageable via the Admin>Preferences>Textile bar panel.

That is the funny thing also, because it only shows the user prefs for the bar items and the shortcode dropdown.

And then only for:

smd_um_sort_column
name
2
smd_um
0
Peter
smd_um_sort_dir
desc
2
smd_um
0
Peter

..I have Peter,who is the user with the managing Editor privileges.
btw. I am using TXP 4.8.1 PHP version 7.2

rgrds, marios

Last edited by marios2 (2021-02-18 16:57:34)

Offline

#48 2021-02-18 16:54:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,738
Website GitHub

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Ah hang on, bet you’re using the latest release 0.1.1 and not 0.1.2, which is still beta. I’ve fixed some prefs issues in 0.1.2. Let me just release that officially (beta because the buttons are done differently).


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