Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Admin theme selecting
Hi,
I’m testing out a preliminary build of a second colour scheme version of Hive admin theme, but it is not showing in the theme select list. Any idea why (and also where the list actually gets the theme’s name from)?
Offline
Re: Admin theme selecting
If you name the folder hiveNeutral
and the file hiveNeutral.php
the same as your class, it works.
The other way around – changing the class to use a hyphen doesn’t work as php doesn’t like a hyphen in the class name.
TXP Builders – finely-crafted code, design and txp
Online
Re: Admin theme selecting
Yep, jakob is correct. Hyphens are out because PHP uses the theme name to make internal variables and classes. Underscores or camelCase are your only options.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Admin theme selecting
OK, thanks. Regarding the theme name that appears in the select list – can we have a better way of doing that than relying on the directory name? Like a string or something?
Offline
Re: Admin theme selecting
philwareham wrote #297412:
a string or something?
Hadn’t thought of that. Guess there’s no harm in wrapping the select list names in a call to gTxt()
. Worst case scenario is that it’ll return the name of the folder itself. Give it a go if you like.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Admin theme selecting
Offline
Re: Admin theme selecting
philwareham wrote #297421:
I don’t know how! :( Any help appreciated. :)
Ahem, I lied. You don’t use gTxt()
at all. Try adding a title
entry to the array in your theme’s manifest()
function. The prefs panel should then use that as the name.
If it doesn’t find one, you get the theme’s filename after it has been run through ucwords
, which is what you’re seeing now.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Admin theme selecting
Thanks Stef, I will try that.
Offline
Re: Admin theme selecting
There is now an alternative version of Hive in the 4.6dev core, with a flatter style and neutral colour scheme – this is in additional to the Classic Yellow Hive which will still be the default. Try it out and let me know if there are any display bugs.
Offline
Pages: 1