{"id":20729561,"url":"https://github.com/nicolasgraph/oui_flat","last_synced_at":"2026-03-10T13:04:31.218Z","repository":{"id":57034027,"uuid":"62944923","full_name":"NicolasGraph/oui_flat","owner":"NicolasGraph","description":"Flat theme management plugin for @Textpattern (from rah_flat by @gocom)","archived":false,"fork":false,"pushed_at":"2017-07-06T13:08:01.000Z","size":161,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T20:18:04.772Z","etag":null,"topics":["flat-files","templates","textpattern","textpattern-plugin","theme","themes"],"latest_commit_sha":null,"homepage":"http://forum.textpattern.com/viewtopic.php?id=47163","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicolasGraph.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":"CONTRIBUTING.textile","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-09T10:43:53.000Z","updated_at":"2023-12-19T20:18:54.000Z","dependencies_parsed_at":"2022-08-23T20:50:35.030Z","dependency_job_id":null,"html_url":"https://github.com/NicolasGraph/oui_flat","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasGraph%2Foui_flat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasGraph%2Foui_flat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasGraph%2Foui_flat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasGraph%2Foui_flat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicolasGraph","download_url":"https://codeload.github.com/NicolasGraph/oui_flat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250506147,"owners_count":21441723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flat-files","templates","textpattern","textpattern-plugin","theme","themes"],"created_at":"2024-11-17T04:43:28.164Z","updated_at":"2025-10-27T10:34:45.451Z","avatar_url":"https://github.com/NicolasGraph.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. oui_flat\n\n\"Download\":https://github.com/nicolasgraph/oui_flat/releases | \"Packagist\":https://packagist.org/packages/oui/oui_flat | \"Donate to the original author\":http://rahforum.biz/donate/oui_flat\n\nThis plugin makes your \"Textpattern CMS\":http://www.textpattern.com database more flat, manageable and editable. Edit templates, forms, pages, preferences and sections as flat files. Use any editor, work in teams and store your website's source under your favorite \"version control system\":http://en.wikipedia.org/wiki/Revision_control.\n\n*Warning: this plugin will permanently remove some of your current templates when activated.*\n\nh2. Installing\n\nUsing \"Composer\":https://getcomposer.org:\n\nbc. $ composer require oui/oui_flat:*\n\nOr \"download\":https://github.com/nicolasgraph/oui_flat/releases a plugin package.\n\nh2. Requirements\n\n* Textpattern 4.6.0 or newer.\n* PHP 5.3.6 or newer.\n\nh2. Basics\n\noui_flat imports normal, flat files from a specified directory to your Textpattern database. This, in essence, lets you to edit your database contents from any regular editor and store the source as flat files.\n\noui_flat comes with built-in support for a few essential content types: styles, forms, pages, preferences, sections and textpacks. It is also able to manage variables via plugin prefs. See the \"templates\":https://github.com/nicolasgraph/oui_flat/tree/master/templates directory on GitHub for an example how this all works.\n\nYour flat files are imported to the database:\n\n* Automatically on the background when the site is in the production status selected via the related plugin preference.\n* When the public callback hook URL is accessed. The URL can be used for deployment.\n\nIf you want to exclude a certain content type from importing, just don't create a directory for it. No directory, and oui_flat will leave the database alone when it comes to that content type.\n\nh2. Preferences\n\nThe plugin has set of preferences you can find on Textpattern's normal preferences panel.\n\nh3. Path to the templates directory\n\nSpecifies path to the root templates directory containing all the content-type specific directories. This path is relative to your 'textpattern' installation directory. For example, a path @../templates@ would point to a directory located in the same directory as your _textpattern_ directory and the main _index.php_ file.\n\nh3. Security key for the public callback\n\nSecurity key for the public callback hook URL. Importing is done when the URL is accessed. The URL follows the format of:\n\nbc. http://example.com/?oui_flat_key={yourKey}\n\nWhere @http://example.com/@ is your site's URL, and @{yourKey}@ is the security key you specified.\n\nh2. Templates folder example\n\nbc.. ┌ templates\n├── forms\n├── pages\n├── prefs\n├── sections\n├── styles\n├── textpacks\n└── variables\n\np. For most existing template subfolders, the related admin tab will be disable.\nThe _Admin \u003e Preferences_ tab will still be accessible, however saved preferences will be overriden by existing flat files while the @/prefs@ folder exists\nThe admin _Admin \u003e languages_ tab will still be accessible and usable while the @/pages@ folder exists.\n\nContained files can use whatever extension.\n\nh3. Forms\n\nForm types can be defined by filename prefixes or @/forms@ subfolder names.\n@misc@ type is used by default when no prefix is found in files stored directly in the @/form@ folder.\n\nbc.. ┌ templates\n├── forms\n├──── article.example_1.txp\n├──── example_2.txp\n├──── …\n├── …\n\np. or\n\nbc.. ┌ templates\n├── forms\n├──── article\n├────── example_1.txp\n├────── …\n├──── misc\n├────── example_2.txp\n├────── …\n├──── …\n├── …\n\nh3. Pages\n\nbc.. ├── …\n├── pages\n├──── example.txp\n├──── …\n├── …\n\nh3. Prefs\n\nPrefs files can contain a JSON tree or just the preference value as text.\n\nbc.. ├── …\n├── prefs\n├──── sitename.json\n├──── site_slogan.txt\n├──── …\n├── …\n\np. Available JSON field is:\n\n* @val@ (string): preference value;\n\n@sitename.txt@ would just contain the preference related value.\n\nh3. Sections\n\nSections files are managed via JSON files.\n\nbc.. ├── …\n├── sections\n├──── example.json\n├──── …\n├── …\n\np. Available JSON fields are:\n\n* @title@ (string): section title;\n* @description@ (string): section meta-description;\n* @page@ (string): page in use;\n* @css@ (string): styles in use;\n* @is_default@ (bool): @true@ makes it the default section;\n* @in_rss@ (bool): @true@ includes section articles in feeds;\n* @on_frontpage@ (bool): @true@ displays section articles on the frontpage;\n* @searchable@ (bool): @true@ includes section articles in search results.\n\nh3. Styles\n\nbc.. ├── …\n├── styles\n├──── default.css\n├──── …\n├── …\n\nh3. textpacks\n\nbc.. ├── …\n├── textpacks\n├──── example.textpack\n├──── …\n├── …\n\nh3. Variables\n\nVariables can be defined via JSON files as plugin prefs and used through the @\u003ctxp:variable /\u003e@ tag.\n\nbc.. ├── …\n├── variables\n├──── example.json\n├──── …\n\np. Available JSON fields are:\n\n* @value@ (string): variable value;\n* @html@ (string): name of the function to use in the admin (if the @/variables@ is removed). Natively available functions are: @text_input@, @pref_long_text@, @yesnoradio@.\n* @position@ (int): variable position.\n\nh2. Toolshed notice\n\nThis is a toolshed project. Experimental fork from \"rah_flat\":https://github.com/gocom/rah_flat which is not part of the main supported product line of \"Rah\":https://github.com/gocom. Not yet at least. Please use at your own risk.\n\nh2. Changelog\n\nh3. Version 0.7.0-beta (oui_flat from upcoming rah_flat-v0.4) - 2017/06/25\n\n* Changed: requires Textpatern 4.6+\n* Added: Do not delete pages or styles that are used by a section.\n* Changed: variables use @rah_flat_variables@ event only and are all visible or hidden as for other contents;\n* Changed: preferences stay always visible.\n* Improved: Uses original Textpacks format;\n\nh3. Version 0.6.0 (oui_flat) - 2017/03/14\n\n* Changed: Back to @oui_@ plugin author prefix.\n* Changed: Lighten compiled code by removing duplicated license infos.\n\nh3. Version 0.5.0 (oui_flat) - 2016/08/26\n\n* Changed: Forms are stored by types in subfolders and don't need prefixes anymore.\n* Added: Custom form types are changed to 'misc' when the plugin is disable to avoid an error in the Forms tab.\n* Changed: Preferences update affects values only.\n* Added: Prefs are hidden in the admin if set via flat files and get back to visible when the plugin is disabled.\n* Added: Custom prefs (in the variables folder) accept more paramters in .json files.\n* Changed: Custom prefs (in the variables folder) now have a oui_flat_var_ prefix added to their name.\n\nh3. Version 0.4.0 (oui_flat) - 2015/11/29\n\n* Added: Custom preferences can be created and use as Txp variables.\n* Changed: Forms naming convention is now @type.name.txp@.\n\nh3. Version 0.3.0 (rah_flat) - 2014/03/28\n\n* Added: Drop access to a admin-side panel only if the specific content-type is active and has a directory set up.\n* Added: Invokable @oui_flat.import@ callback event.\n* Added: Sections and preferences get their names from the filename.\n* Added: Preferences are always just updated, no strands are created.\n* Added: Preference fields that are not specified in a file are kept as-is in the database.\n* Added: French translation by \"Patrick Lefevre\":https://github.com/cara-tm.\n* Changed: Renamed confusing @Oui_Flat_Import_Template@ interface to @Oui_Flat_Import_ImportInterface@.\n\nh3. Version 0.2.0 (rah_flat) - 2014/03/19\n\n* Reworked.\n\nh3. Version 0.1.0 (rah_flat) - 2013/05/07\n\n* Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasgraph%2Foui_flat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolasgraph%2Foui_flat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasgraph%2Foui_flat/lists"}