Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
Hi,
I’m working on an upcoming release of this plugin making it cloth to the dev version of rah_flat. Indeed Jukka added most of my fork features, and, as I already said, often in a better/more maintenable way. There will be some differences with the last oui_flat version but I think that it is for the good.
For now there are two things I’d like to keep different from Jukk’as version:
- I already included the plugin pref I introduced previously and which allow to choose the production status you want to use for automatic templates upload;
- I also want to keep a way to choose the widget to use for variables when displayed in the admin as preferences.
For the second point there are two solutions in my mind:
- keep variables management via .json
files with the html
field and others like position
;
- uses whatever file type (.txt
for example) with the value only in it, as Jukka made it, and add an optional extension to the filename if a custom widget is needed: example.yesnoradio.txt
(See the related GitHub issue/commits).
In the second case I’m not sure we could also keep the position
available: 10.example.yesnoradio.txt
would probably be overstate, isn’t it? What do you think? We shouldn’t need the other fields.
Last edited by NicolasGraph (2017-06-22 09:10:55)
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
philwareham wrote #305971:
Sure, I can wait, thanks!
Phil, I tried my best to publish a new release from last rah_flat
changes.
I didn’t have time to test the Composer install and to update the help file, but for this second point you can take a look at the templates
folder.
Forms files can be stored in folders by types or/and prefixed with it.
I will be busy next week but feel free to come back to me if needed.
Ah, yes; I kept variables as JSON files.
Edit: ✓ Composer install tested.
Last edited by NicolasGraph (2017-06-26 07:05:14)
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
Thanks Nicholas. Just successfully installed 0.7.0-beta via Composer.
Only issue I see so far is in the prefs (in Textpattern 4.7.0dev) – there are two fields for ‘Production status for the systematic upload’ (one a text field, the other a select field). Looking at the prefs database table I see these two rows: oui_flat_status
and oui_flat_upload_levels
which both have debug, testing
– could this be causing the issue?
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
philwareham wrote #306082:
Looking at the prefs database table I see these two rows:
oui_flat_status
andoui_flat_upload_levels
which both havedebug, testing
– could this be causing the issue?
My guess is that you had a previous version of the plugin installed. I renamed oui_flat_upload_levels
to oui_flat_status
in the last release without removing the usless pref on update. Removing the plugin to proceed to a brand new install should fix this issue.
I just published v0.7.0-beta2 with a freshly updated help file.
Last edited by NicolasGraph (2017-06-26 12:58:34)
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
Thanks. Deleting the oui_flat_upload_levels
row from my pdfs table also fixed the double field issue.
You might want to turn on the GitHub issues feature for that repo to prevent his forum thread form getting too diluted.
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
philwareham wrote #306085:
You might want to turn on the GitHub issues feature for that repo to prevent his forum thread form getting too diluted.
Good catch, it was probably disabled because the repo was firstly created as a fork and then dissociated from rah_flat. I turned it on.
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
Can’t for the life of me get the variables to display in the prefs area with the new beta… what gives?
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
mrdale wrote #306723:
Can’t for the life of me get the variables to display in the prefs area with the new beta… what gives?
Did you try to remove the variables folder from your theme directory?
In the last version, which includes some Jukka’s code enhancements, variables/prefs works like other templates; while the folder exists they are imported/edited via flat files. Then, if you want them to be edited via the admin, just removes the folder.
If it does not work, I’ll give it a deeper look.
Offline
Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files
NicolasGraph wrote #306726:
Did you try to remove the variables folder from your theme directory?
Doh! That was it. Works a treat.
Offline
Offline