Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: rah_flat (template file extensions)
So jakob, dod you know enough php to change the routine that looks in the flat folders so that it works recursively?
That’s really all I want.
Offline
Re: rah_flat (template file extensions)
mrdale wrote #297728:
For now I use all forms as .misc because form types are functionally irrelevant.
Forms of type article still have relevance on the Write panel, but if you’re not using override forms then, yes, types are for organisation only.
jakob wrote #297733:
you could theoretically use anything if txp doesn’t mind.
Unfortunately Txp minds (at present). From 4.6.0 though, there’s a new function get_form_types() which responds to the event>step form.types>types so plugins can extend or alter them. The Forms panel doesn’t use it right now, but alterations to a couple of lines of code would probably change that. Been meaning to try that for ages so I shall test it prior to release.
As I’ve mentioned before I’ve flip-flopped so many times on allowing arbitrary Form types. It’s not technically difficult to do behind the scenes, it’s just making a usable interface that I always struggle with. Always ends up being clunky or unintuitive, or causes workflow inconsistencies due to the “essential” Forms and multi-edit tool. There are threads about my plight dotted around the forum if anyone wishes to put me out of my misery and suggest a way to do it.
But you would still have the problem of possible duplicate form names.
That’s the killer point. The database index is on the name only so they have to be unique across types. myform.misc and myform.section will break things. Any third party such as this plugin would need to enforce uniqueness.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: rah_flat (template file extensions)
mrdale wrote #297740:
do you know enough php to change the routine that looks in the flat folders so that it works recursively?
I’ll have a go – no guarantees though. I can’t code like Jukka and I can’t do it right away either, but I’m interested in the idea too…
TXP Builders – finely-crafted code, design and txp
Offline
Re: rah_flat (template file extensions)
I’m trying to wean myself off cnk_versioning and move to rah_flat.
The problem is, I can never get rah_flat to work. If my assigned template directory is empty, no errors. The moment I add my ‘default.txp’ file into templates/pages/, I get General error Textpattern Error: Table 'txp_page' was not locked with LOCK TABLES errors, both in admin and on the site.
This happens on a fresh install as well as installing rah_flat on an ex-cnk_versioning site.
Any suggestions?
Offline
Re: rah_flat (template file extensions)
giz wrote #298056:
I’m trying to wean myself off cnk_versioning and move to rah_flat.
The problem is, I can never get rah_flat to work. If my assigned template directory is empty, no errors. The moment I add my ‘default.txp’ file into templates/pages/, I get
General error Textpattern Error: Table 'txp_page' was not locked with LOCK TABLESerrors, both in admin and on the site.This happens on a fresh install as well as installing rah_flat on an ex-cnk_versioning site.
Any suggestions?
man this inability to have an elegant simple solution to flat files is soooo 2005
…. texted postive
Offline
Re: rah_flat (template file extensions)
bici wrote #298058:
man this inability to have an elegant simple solution to flat files is soooo 2005
It’s already in a branch awaiting Textpattern 4.7. Please be patient.
Offline
Re: rah_flat (template file extensions)
giz wrote #298056:
The moment I add my ‘default.txp’ file into templates/pages/, I get
General error Textpattern Error: Table 'txp_page' was not locked with LOCK TABLESerrors, both in admin and on the site.
I’ve never seen that before, so I’m not really sure why. Maybe something special with your mysql setup?
A long shot. Jukka’s last commit removed a lock tables command – see here. You might want to see if reinstating those two lines correct things for you. If you didn’t install with composer and are not sure where those are in the plugin code, click on the ‘concertina’ icons in the line numbers on github to reveal the preceding and following code.
Otherwise, I’ve found it does work as a more reliable replacement for cnk_versioning.
TXP Builders – finely-crafted code, design and txp
Offline
Re: rah_flat (template file extensions)
Offline
#24 2016-03-01 08:30:07
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 605
Offline
#25 2016-03-10 17:50:32
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: rah_flat (template file extensions)
mrdale wrote #297541:
I realized the other day that if rah_flat were to look recursively under the forms directory and not just one level deep we would have a killer organizational tool.
Just had “Override forms“ in mind and thought “Hope mrdale’s new feature doesn’t kill form overriding”.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: rah_flat (template file extensions)
Flat-file management
philwareham wrote #298060:
It’s already in a branch awaiting Textpattern 4.7. Please be patient.
Yow, what?! That sounds good.
And that should be a .com blog post ASAP, elaborating on how that will work and all. Marketing, baby, marketing.
Inquiring minds need to know details!
Offline
Re: rah_flat (template file extensions)
Yep… peeps want sweet deets.
Offline