Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 01:31 pm EDT

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:
 Quote

All times are EDT. The time is now 01:31 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