Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
kuo_theme: install easily front-end themes
With this experimental Textpattern plugin a Textpattern user with admin privileges can upload, install and uninstall certain front-end themes. If you’re familiar how WordPress does this, then the learning curve how to operate this is more like a horizontal line. This plugin creates automatically Pages, Forms and Styles for a theme. If theme is uninstalled, those before mentioned things are then removed.
Looking at the structure of a single theme:
themes/ + themes/test-theme/ ++ themes/test-theme/pages/ ++++ themes/test-theme/pages/test-page.txp ++ themes/test-theme/forms/ ++++ themes/test-theme/forms/article.test-form.txp ++++ themes/test-theme/forms/misc.another.txp ++++ themes/test-theme/forms/misc.third-test.txp ++++ themes/test-theme/forms/comments.yet_another_test.txp ++ themes/test-theme/styles/ ++++ themes/test-theme/styles/test.css ++ themes/test-theme/textpattern.txp ++ themes/test-theme/screenshot.png
Theme folder can have several Page, Form and Styles templates and other content like JavaScript and CSS files. Basically the only thing that’s required to make a valid theme is to have a folder and inside that a file called textpattern.txp
. That text file has just some theme information in this manner:
Theme name: Theme test
Theme author: Pete
Theme URL: http://kuopassa.net/txp/
Theme version: 1
Theme description: Testing this thing.
Theme logic: default_section=default;required_plugins=none
Currently this system doesn’t change the currently used default section of website, so that part must be done manually.
Last edited by kuopassa (2015-10-18 15:30:10)
Offline
Re: kuo_theme: install easily front-end themes
Hi, it seems nice to have different previews but you should maybe look at this. A theme structure is defined (kind of) for Txp 4.6 and hcg_themes already uses it. And for flat files lovers, rah_flat can do the trick.
Last edited by NicolasGraph (2015-10-15 15:04:51)
Offline
Re: kuo_theme: install easily front-end themes
Hey, Nicolas! Thanks for commenting and sharing those links. There’s so much to read about this topic. Pages and pages of content and trying to find what’s currently relevant and what not… :-)
Perhaps I’ll switch my theme system’s default folder from theme
to themes
so that at least that folder naming part isn’t split.
Offline
Re: kuo_theme: install easily front-end themes
kuopassa wrote #295814:
Hey, Nicolas! Thanks for commenting and sharing those links. There’s so much to read about this topic. Pages and pages of content and trying to find what’s currently relevant and what not… :-)
If you use something like this or like hcg_themes or rah_flat structure you should be not far from the Txp4.6 theme structure.
Offline
Re: kuo_theme: install easily front-end themes
kuopassa,
The Theme structure is how the 2-col-portfolio theme lays it out.
Form names are form type.form name.txp – that’s what the plugin expects for import.
I’m also using a js folder for any JavaScripts a theme may need.
Hope that helps.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: kuo_theme: install easily front-end themes
Thanks. :-) I’ll modify my plugin to be more in that direction. It’s going to detect content from folders pages
, forms
and styles
from files with txp
extension and similar type of naming files.
Offline
Re: kuo_theme: install easily front-end themes
kuopassa wrote #295821:
Thanks. :-) I’ll modify my plugin to be more in that direction. It’s going to detect content from folders
pages
,forms
andstyles
from files withtxp
extension and similar type of naming files.
I really like your plugins page, doing some nice things.
Quick question, on your MarkItUp! plugin, may I ask what you use duh! We’re debating WYSIWYG editors for Textpattern, maybe you’d like to join in the conversation.
Last edited by hcgtv (2015-10-15 21:32:27)
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: kuo_theme: install easily front-end themes
hcgtv wrote #295822:
I really like your plugins page, doing some nice things.
Quick question, on your MarkItUp! plugin,
may I ask what you useduh! We’re debating WYSIWYG editors for Textpattern, maybe you’d like to join in the conversation.
Thanks! I don’t actually use any such editors because most pieces of text are just paragraphs, headings, lists and links. All of them are easy to create with plain Textile. :-)
Offline