Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2017-03-21 16:28:45

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

mrdale wrote #304964:

If am concerned that the return of sir jukka and a feature merge will remove some of this functionality. Which would force me to use an old unsupported version of switch to oui-flat.

As you can see on Github, Jukka already added some of the features you are talking about.
If there are some good reasons to keep oui_flat alive, I’ll update it.

Request: On this last item I would like the ability to trigger imports in live mode as well.

It should work by customizing the upload_levels function somewhere in the code:

function upload_levels($name, $val)
{
     $vals = array(
         'debug'                => gTxt('production_debug'),
         'testing'              => gTxt('production_test'),
         'debug, testing'       => gTxt('production_debug').', '.lcfirst(gTxt('production_test')),
+        'live'                 => gTxt('production_live'),
+        'debug, testing, live' => gTxt('all'),
    );
    return selectInput($name, $vals, $val, true, '', $name);
}

Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#77 2017-05-14 02:13:23

murrah
New Member
From: Blue Mountains west of Sydney
Registered: 2017-05-14
Posts: 4

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

Thanks for this! :-)

For a TXP newbie like me, wanting to use my trusty Sublime Text editor, struggling to get my head around the underlying TXP architecture, it would be useful if your Readme included a line that you need to export your data from the database first before you can use your plugin. eg via the jcr_export_txp_templates

Thanks again,
Murray

Offline

#78 2017-05-15 06:48:17

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

murrah wrote #305682:

[…] it would be useful if your Readme included a line that you need to export your data from the database first before you can use your plugin. eg via the jcr_export_txp_templates

@murrah, thanks for the feedback, while I don’t use jcr_export_txp_templates, I’ll write something about data export.

Also everyone, I’m still watching rah_flat changes as @Gocom added some (most?) of my changes, sometimes in a better way I did. To be honest, I hope we’ll be able to go back to only one plugin in the next weeks or months, otherwise I’ll throw an update.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#79 2017-06-12 12:17:17

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

Hi Nicolas,

Can you please release an update of your plugin with the Composer support commits you made? I’d like to use this plugin on the Textpattern.com site (I am unsure what the current situation is with rah_flat but since Jukka hasn’t visited the forums since March and didn’t release an updated rah_flat version with his extra commits I’m unable to use that plugin).

Thanks in advance!

Offline

#80 2017-06-13 00:16:48

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,254
Website Mastodon

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

Yes, Please lets keep such an important plugin up-to-date and easily findable ….


…. texted postive

Offline

#81 2017-06-14 13:29:01

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

Hi, Sorry for the delay; I threw a new pre-release available via Composer. I’ll be back at home next week to see what should be updated from rah_flat.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#82 2017-06-14 13:49:04

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

Hi,

Thanks but your textpattern-lock definition is incorrect, causing the Composer install to fail. If this plugin indeed works with Textpattern 4.5 onwards then you need to change:

"textpattern/lock": "4.5.*,4.6.*",

To

textpattern/lock": ">=4.5.0",

Offline

#83 2017-06-15 07:09:42

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

philwareham wrote #305965:

Thanks but your textpattern-lock definition is incorrect […]

Ok, sorry, If you can wait untill next week I’ll perform more tests and do something tidy.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#84 2017-06-15 08:04:24

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

Re: oui_flat (rah_flat fork) - Manage templates and prefs as flat files

Sure, I can wait, thanks!

Offline

#85 2017-06-22 08:40:40

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#86 2017-06-23 17:03:27

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#87 2017-06-26 10:57:24

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

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

#88 2017-06-26 12:58:11

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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 and oui_flat_upload_levels which both have debug, 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)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#89 2017-06-26 13:04:39

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

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

#90 2017-06-26 13:16:51

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB