Welcome to Geeklog, Anonymous Sunday, November 24 2024 @ 09:14 pm EST
Geeklog Forums
Template.class hack
Status: offline
remy
Forum User
Full Member
Registered: 06/09/03
Posts: 162
Location:Rotterdam & Bonn
Having quite a lot Theme's around, it ain't always easy to figure out what the differences are. Maintaining templates in a theme for f.i. custom user functions is a pain.
To bypass all the templates which are the very same in all themes, I've created a separate directory. After hacking template.class, it is looking for the template first in the normal directory, supplied with set_root, and -if not there- it looks in the alternate directory.
One may specify the alternate directory with a new method set_path.
After testing, it is oke to me.
I've cleaned the theme trees (./layout) with all identical theme templates. It's amazing how little files are really different. :speechless:
This leaves developers with a standard directory, and they have only to maintain the customized templates.
In typical style_sheet themes, the only files left are style.css and functions.php.
There could be some more functionality:
-have set_path to supply an array, comparable with the PATH environment variable :doh:
-do the same with theme images and/or logo
Would you think of more or else?
Please let me know. Please comment.
my :twocents:
To bypass all the templates which are the very same in all themes, I've created a separate directory. After hacking template.class, it is looking for the template first in the normal directory, supplied with set_root, and -if not there- it looks in the alternate directory.
One may specify the alternate directory with a new method set_path.
After testing, it is oke to me.
I've cleaned the theme trees (./layout) with all identical theme templates. It's amazing how little files are really different. :speechless:
This leaves developers with a standard directory, and they have only to maintain the customized templates.
In typical style_sheet themes, the only files left are style.css and functions.php.
There could be some more functionality:
-have set_path to supply an array, comparable with the PATH environment variable :doh:
-do the same with theme images and/or logo
Would you think of more or else?
Please let me know. Please comment.
my :twocents:
13
10
Quote
All times are EST. The time is now 09:14 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content