Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-03-11 10:42:13

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,942
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

Destry wrote #309884:

Wondering if I could break up long-form into ‘chapters’ — each chapter to its own textarea CF — and whether Textile endnotes would still work across them (i.e. between citation labels in each chapter box and endnotes list in a final CF?

Short answer: I’m not sure.

Long answer: Only the regular body and excerpt fields are pre-processed as textile by textpattern and its results are stashed under body_html and excerpt_html in the database. Any other textarea custom fields you’ll need to run through textile with smd_wrap or etc’s new escape attribute. That might give you the opportunity to first output multiple textareas, then pass them all through textile in one final go to process endnotes for them all together. You’d need to style any HTML markup between your blocks so that textile doesn’t ruin them when processing the whole block (notextile, or the space trick). If you want to use the body field in that series, you’d probably also need to disable textile processing for that field too so you can process it with the others. And finally, it would then be a good idea to use a caching plugin so that it doesn’t have to be textiled on the fly on every page load.

Two-three other ideas for long-form chapters:

  • What about using something like rah_replace or another plugin (there was a column one I’ve used in the past) to place break markers in your text that mark a new section. You then replace that marker with your chapter break markup. If that acts on the already textilised content, you may also avoid difficulties with textile mangling html tags.
  • Maybe a custom chapter break tag would serve this purpose too (in 4.6 days smd_macro or rah_beacon, in 4.7 etc has brought this facility into the core).
  • Jeff Soo had a plugin / collection of plugins designed for multi-part longform documents. See ipsedixit.com/txp.

One other thing to be aware of. Stef tells me that there is a maximum size for a database row (I’ve forgotten how much exactly), and that very liberal use of longform custom fields might end up reaching that. I’m not sure when that kicks in, though. The future plans for custom fields in the core will probably shift custom fields to a separate table and store them more efficiently by type removing that hurdle.


TXP Builders – finely-crafted code, design and txp

Offline

#12 2018-03-11 11:04:49

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,942
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

phiw13 wrote #309892:

Hmm. So the problem is that table-layout: fixed renders the table as a mess on small screens. See this screenshot. That is with Sandspace, but Hive would have the same issue.

Now, as far as I know, JQUI drag and drop does not work on iOS + Android.

I guess this requires more detailed investigation, or perhaps another (jquery?) solution instead of table: fixed. I know that sortable adds touch-related code, so I wasn’t aware that it didn’t work on iOS or android. Again, more investigation needed.

Disabled that, and the Preference panel is back to normal speed. Dunno what to do with the error check…

I’m not sure either. Ideas might be:

  • @devs Is it possible to only perform the check on saving preferences. If so, one could do that then and set a flag when okay so that it’s not checked on every prefs-load. It’s not ideal, because if someone moves or deletes the files, it doesn’t show an error.
  • Make a separate “check paths” button that only checks on demand.
  • Ditch the checking mechanism altogether. It’s certainly useful to ensure the plugin works. But we don’t have paths checking anywhere else in the prefs, only in diagnostics.
  • Return the custom fields preferences back to its own plugin preferences panel – which would be a pity.

TXP Builders – finely-crafted code, design and txp

Offline

#13 2018-03-11 11:22:41

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

Wow, Julian!

Thank you lot ;)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#14 2018-03-11 12:11:04

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

jakob wrote #309894:

Long answer…

Excellent feedback! Thank you. Those other plugins/possibilities you mention sound like something to investigate first.

I might even need to think about Stef’s epub plugin and distribute a couple history pieces that way for practicle reasons. Maybe even donation reasons.

Offline

#15 2018-03-11 18:05:34

etc
Developer
Registered: 2010-11-11
Posts: 3,940
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

A similar problem (common Body/Excerpt footnotes) was solved here, in the way suggested by jacob.

Offline

#16 2018-03-16 23:55:15

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 653
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

EDIT: Great news about the update, thank you!

I can’t test on on 4.7 dev currently, but i would like to make a plugin request.

Would it be possible to add individual classnames to individual custom fields for the v2 in 4.7, maybe just automatically by following the simple logic of cf-fieldname?

Last edited by jayrope (2018-03-16 23:58:08)


a hole turned upside down is a dome, when there’s also gravity.

Offline

#17 2018-03-16 23:57:28

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 653
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

Destry wrote #309899:

… Stef’s epub plugin …

Which one is that?


a hole turned upside down is a dome, when there’s also gravity.

Offline

#18 2018-03-17 00:37:29

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,942
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

jayrope wrote #310048:

Would it be possible to add individual classnames to individual custom fields for the v2 in 4.7, maybe just automatically by following the simple logic of cf-fieldname?

Yes, I did that already. It adds classes to the .txp-form-field containing div with classes glz-cf glz-custom-checkbox custom-# cf-field-name etc. So you can address each one individually, or each type.

And when a custom field is one with multiple sub-items like radio buttons or checkboxes, each one gets, say, txp-form-checkbox glz-cf-value-name so you could, for example organise your checkbox in two columns if you want.


TXP Builders – finely-crafted code, design and txp

Offline

#19 2018-03-17 09:30:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,786
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

jayrope wrote #310049:

Which [epub plugin] is that?

This one I think. Not tried it on 4.7 yet. Probably needs some visual love.


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

#20 2018-03-18 00:10:54

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 653
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

jakob wrote #310053:

Yes, I did that already. It adds classes to the .txp-form-field containing div with classes glz-cf glz-custom-checkbox custom-# cf-field-name etc. So you can address each one individually, or each type.

With that glz_cf version i love 4.7 already! Thank you!


a hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB