Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2016-08-31 02:22:28

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,404
Website

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

hcgtv wrote #300888:

PHP in templates, give me a break ;)

ok


…. texted postive

Offline

#22 2016-08-31 07:49:33

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,103
Website

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

Nicolas,

Is there anything to be aware of if already using the original rah_flat? Or is it just a simple update of the old plugin with oui_rah_flat?

What about the product key? Does that change?


The text persuades, the *notes prove。

Offline

#23 2016-08-31 08:18:58

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

Destry wrote #300890:

Nicolas,

Is there anything to be aware of if already using the original rah_flat? Or is it just a simple update of the old plugin with oui_rah_flat?

What about the product key? Does that change?

Hi,

If you’re talking about the rah_flat_key which forces the theme upload in a different production status than the one(s) selected for the auto upload, nothing changes.

As written on the release page, here are the major changes:
  • auto templates upload on selected production status (stop pollute the Test runtime if set on Debug only);
  • hides prefs set via flat files (to avoid changes on the admin side);
  • forms stored by types in subfolders (you can also add custom form types);
  • custom form types changed to misc when the plugin is
    disabled/deleted (to avoid errors on the admin side);
  • adds support for custom prefs as variables and for textpacks;
  • avoid templates reload on plugin delete.

I asked GitHub to dissociate my fork and to turn it into a normal repo but I keep rah_flat as the name, for now at least. I also asked Andy to change the repo link for rah_flat to my repo in his awesome-textpattern repo.


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

Offline

#24 2016-08-31 10:42:50

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,103
Website

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

Yeah, I looked at the ReadMe file. I was just wanting to see a confirmation line like: “If you already use the original (orphaned) rah_flat, just update the plugin with this code, all will be fine.” ;)


The text persuades, the *notes prove。

Offline

#25 2016-08-31 13:06:13

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

Destry wrote #300894:

Yeah, I looked at the ReadMe file. I was just wanting to see a confirmation line like: “If you already use the original (orphaned) rah_flat, just update the plugin with this code, all will be fine.” ;)

All should be fine as far as you adopt the new structure by moving Txp forms in subfolders (and removing useless form types in form names).


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

Offline

#26 2016-08-31 15:55:32

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,202
Website

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

I’ve been beta testing the new rah_flat on some real projects. I reacted thusly.

  • Forms stored by types in subfolders Makes organizing editing projects with lots of forms in Sublime Text a snap.
  • Support for custom prefs as variables… adi variables was an awesome way to let users contribute variables though admin, but the form gets overwritten each time aflat file import happens. Now you can have your rah_flat and let your customers edit variables through prefs.
  • …and for textpacks No more hacking labels and ui elements though jquery.

Offline

#27 2016-09-02 07:20:08

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 #300903:

I’ve been beta testing the new rah_flat on some real projects. I reacted thusly…

Thanks for your encouragements and suggestions while testing mrdale!


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

Offline

#28 2016-09-07 06:11:35

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,404
Website

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

what does this WARNING actually mean?
Warning: this plugin will permanently remove your current templates when a valid path will be saved under the plugin prefs..

Makes me leery of trying this solution to editable flat files, as it seems to make permanent changes to the default settings. or am i over worrying the issue.

I have been using Mounee with EE.


…. texted postive

Offline

#29 2016-09-07 06:33:55

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,298
Website

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

Hi bici. The warning is important and you should not ignore it.

The explanation is not so mysterious, though: think of rah_flat as a replacement of the Presentation > Forms and Presentation > Pages (and > Styles if you want) panes. Those panes are switched off and from now on, you edit those as files using the code editor of your choice. It’s an either/or situation.

rah_flat imports page and form templates from files on your file system and invisibly populates the form and page areas in textpattern with them. Any pages and forms already in there are cleared out. That is what the warning is about.

If you want to export your existing pages and forms first, try this exporter plugin (installer files here). You only need this once. But see the note for Destry below for an additional note.

Nicolas has extended rah_flat to enable you to add new prefs settings and variables (like adi_variables) but in the Admin > Preferences pane and not in a form. You don’t need to use those features at all if you don’t want to. Those don’t overwrite the settings but allow you to store settings you need for your site or site template with your file repository.

Destry wrote #300894:

“If you already use the original (orphaned) rah_flat, just update the plugin with this code, all will be fine.” ;)

I think the answer is not-quite, although I haven’t checked the most recent version. I think Nicolas changed the naming convention of the forms to match how phil does it which is different to how it was in the past. The new form naming convention is:

{form-type}.{form-name}.txp

The form name and form-type were previously the other way around. It’s not a big deal: you just need to rename your form files. In my form exporter, you can edit the plugin code to use the desired output format (see the Settings infos).

Since then Nicolas has introduced the ability to nest your txp_form files in subfolders for better organisation. I’ve not tested that yet.


TXP Builders – finely-crafted code, design and txp

Offline

#30 2016-09-07 08:40:07

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

jakob wrote #301136:

Any pages and forms already in there are cleared out. That is what the warning is about.

Exactly.

I think the answer is not-quite, although I haven’t checked the most recent version. I think Nicolas changed the naming convention…

You’re right, that’s what I meant but you don’t need any form type in form file names at all now; the form type is defined by the subfolder where the form file is. See Structure in the help file or take a look at the templates folder example.

Edited for corrections and clarity.

Last edited by NicolasGraph (2016-09-07 09:18:38)


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

Offline

Board footer

Powered by FluxBB