Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-10-15 14:44:02

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 229
Website

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

#2 2015-10-15 15:03:17

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

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)


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

Offline

#3 2015-10-15 16:29:26

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 229
Website

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

#4 2015-10-15 16:51:07

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

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.


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

Offline

#5 2015-10-15 17:22:21

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

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.

Offline

#6 2015-10-15 17:35:46

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 229
Website

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

#7 2015-10-15 17:44:54

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

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 and styles from files with txp 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)

Offline

#8 2015-10-16 14:07:27

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 229
Website

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 use duh! 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

Board footer

Powered by FluxBB