Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2007-03-19 19:28:11

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Theme mechanism for TxP 4.0.X

Wow, Bert, that was all pretty quick… Well done.

Offline

#17 2007-03-19 20:07:31

NeilA
Member
From: Blue Mountains, Australia
Registered: 2004-08-15
Posts: 316
Website

Re: Theme mechanism for TxP 4.0.X

Great work Bert – following it with much interest…


Neil – Blue Mountains, Australia

http://westserve.org
http://ministrygrounds.net.au

Offline

#18 2007-03-21 17:19:41

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

Re: Theme mechanism for TxP 4.0.X

Things to keep in mind for a future templating system:

  • The error_default page and search_results form are hardcoded.
  • The forms tab needs to include only the template you’re working with, for now I’ve removed the sorting by type in txp_form.php and just sort by form name, easier to work with, especially when you have the defaults plus two templates installed.
  • The comments system needs a thinking over, there’s three forms for commenting, can get a bit confusing. One thing that may help users is to include all commenting styling elements in the default.css, less view source, more copy pasting.
  • There is no way to tell if you’re on the Home page, no matter what txp:if tag I used. So for custom titles, breadcrumb lines, etc., you’re searching forum posts for answers and installing a plugin.
  • Plugins are powerful but the basics should be handled by the core, I’d rather distribute a plugin with a template for added functionality rather from necessity.

I’m almost done with a new template, all in all, I really like the txp:tag mechanism, it’s very powerful. I’ve worked with many systems in the past, TxP is hands down is the best I’ve worked with.

I’ve updated my templates wiki page with the above finds, at least it’s somewhere to write down my thoughts.

Last edited by hcgtv (2009-08-29 04:47:21)

Offline

#19 2007-03-22 05:51:56

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

Re: Theme mechanism for TxP 4.0.X

More finds at the end of the road:

  • The error_default page must link to specific style, n=“style name”
  • Was able to get around the search_results form by using the searchform attribute of the article tag.
  • The popup_comments tag calls by default the popup_comments form which calls comments_display, hard coded.

Relevant forum threads:

I believe that’s it, not a huge hurdle to overcome.

The template is finished, installs in 5 minutes time – FileZilla taking the bulk ;)

Offline

#20 2007-03-22 22:27:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Theme mechanism for TxP 4.0.X

…search_results form are hardcoded.

No it isn’t.

Offline

#21 2007-03-22 22:56:21

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

Re: Theme mechanism for TxP 4.0.X

Mary wrote:

No it isn’t.

Post right above yours:

hcgtv wrote:

  • Was able to get around the search_results form by using the searchform attribute of the article tag.

Offline

#22 2007-03-23 09:56:53

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

Re: Theme mechanism for TxP 4.0.X

Necessity is the mother of all inventions…

TxP IDE comes to life.

Last edited by hcgtv (2009-08-29 04:58:58)

Offline

#23 2007-03-26 12:35:35

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,475
Website

Re: Theme mechanism for TxP 4.0.X

You are putting a lot of work in, Bert! It will be tremendous if templates can be put in place in just a few minutes! Some of you TXP folk are geniuses!

Re naming conventions, I will be happy to use whatever formula gets agreed upon. But here are my preferences, for what they are worth. I don’t like the idea of adding new extensions. To me, it just seems to add to confusion and overload. I also like things alphabetical for easy scanning and finding. Perhaps this does not matter if template installation is to be automated, but anyway here is my suggestion:

kubk1_forma_somearticleform.txt
kubk1_formm_somemiscform.txt
kubk1_formc_comment_form.txt
kubk1_image_fancy.jpg
kubk1_page_default.txt
kubk1_page_archive.txt
kubk1_plugin_zem_contact.txt
kubk1_style_default.txt
kubk1_style_fancy.txt
kubk1_write_urltitle1.txt
kubk1_write_urltitle2.txt

and maybe
kubk1_section_all.txt
kubk1_cata_name1.txt
kubk1_cati_name1.txt

kubk1 is a unique 5 character abbreviation for the template. With templates don’t most people put their name or link in the footer anyway, so I don’t see a need for author. 5 characters keeps it short.

forma_somearticleform.txt means it is a form, type article, with the name ‘somearticleform’. Same can be done with the others if needed.

write_urltitle1 means create a new article with a url-only title of title1.

section_all is there cos I used it with the Texty template. If it can be automated, perhaps using a convention within the txt file, fantastic!

cata_name1 means it is category article and called name1
cati_name1 means it is category image and called name1
That’s if the automator can create the category just from the name. If not then perhaps:
kubk1_cat_all.txt with a convention within the txt file.

This scheme means extra folders can be eliminated. Also remember that many, if not most, people wanting templates will not be technically inclined, so I think naming conventions should be as near to plain language as possible, so that’s why I’ve just used underscores and not hyphens or dots as well.

I’ve only created one template and may not create any more, so that is just the suggestion of a template newbie. But perhaps it will help.


Dozy P My attempt at music

Offline

#24 2007-03-26 16:28:34

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Theme mechanism for TxP 4.0.X

Bert, This is some really excellent work. I just did a test with crystalx, and I’m extremely impressed.

[edit] of course it’s going to be WAY easier when the section tab improves… …click drag release… …click drag release… save…. for each section. ;)

Last edited by mrdale (2007-03-26 16:37:12)

Offline

#25 2007-03-26 16:48:43

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

Re: Theme mechanism for TxP 4.0.X

zero, I kept the Pages, Forms and Styles names close to the defaults to ease understanding of the mechanism. But anybody can use what they desire, as long as you have a unique prefix denoting your design.

mrdale, good to hear CrystalX is working. Yes, the setting of defaults in the sections needs improving, I’m looking into this.

Offline

#26 2007-04-30 04:55:06

root
Member
From: Manila, Philippines
Registered: 2004-05-31
Posts: 48

Re: Theme mechanism for TxP 4.0.X

Oh wow, I can’t believe I missed this! I’ll try this when I have free time. Thanks :D

Offline

#27 2007-05-21 20:39:08

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,475
Website

Re: Theme mechanism for TxP 4.0.X

Bert, I finally got round to trying this out and it’s great! It will save everyone a lot of time in the template competition if everyone uses it. You’re da man!

Is there a way for me to export an existing template and add a prefix to every file, so it imports in the same way as Mistylook? I know I will have to then manually add the prefix here and there to the contents of forms, pages and styles to make it work, but if I could add the prefix on export, it would help me a lot cos I have a lot of forms and pages and styles.

Alternatively, is there some utility that I could do this with the exported files?


Dozy P My attempt at music

Offline

#28 2007-05-21 22:00:07

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,475
Website

Re: Theme mechanism for TxP 4.0.X

OK, I found something called Bulk Rename Utility that does the job perfectly :-)

( for those who want to use it just add the prefix to Add 7 )


Dozy P My attempt at music

Offline

#29 2007-05-22 13:11:25

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

Re: Theme mechanism for TxP 4.0.X

zero wrote:

OK, I found something called Bulk Rename Utility that does the job perfectly :-)

I use XnView for my file renaming needs, even though it’s an image viewer it has a very capable file renaming utility.

Glad you like the templating mechanism, hope to add more designs as time permits.

Offline

#30 2007-05-22 13:39:17

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,475
Website

Re: Theme mechanism for TxP 4.0.X

hcgtv wrote:

I use XnView for my file renaming needs, even though it’s an image viewer it has a very capable file renaming utility.

Cheers, it looks interesting. I’ll check it out later


Dozy P My attempt at music

Offline

Board footer

Powered by FluxBB