Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By bradlis7 on
I'm doing a PHPTemplate theme, and I was wondering if there was any way to add your own options to admin->themes->configure->*theme_name_here*?
My theme can support multiple colors, and instead of including 5 themes, and limiting it to that, I'd like to provide the user text boxes to change the colors manually, and maybe provide some suggestions.
I looked at Making additional variable availables to your templates, but I don't think that's what I'm looking for.
Thanks in advance.
Comments
interested too
interested too
I can see why not, but would be useful
I can see reasons for this not to be useful. For one, most people are just going to go to the global theme settings to change the settings.
I've tried looking at the phpTemplate code itself, but I can't tell what would need to be overridden in order to do this.
Is there a theme out there that successfully does this?
--
Bradlis7.com | Churchofchristnet
I had resolved this
I had resolved this ,and worked good for my drupal website.
first patch system.module
then in YourThemeName's template.php file add a function phptemplate_settings()
you can get the config value with
download patch: http://drupal.org/node/56713
Quick question
I recently ran into some trouble with theme_settings (http://drupal.org/node/45300#comment-86446), although calling init_theme(), itself or via theme() seemed to solve the problem, it actually didn't (http://drupal.org/node/45300#comment-86478). I haven't tested your patch, but does it also work when your theme is not the active theme? Say bluemarine is active and you're accessing the settings of YourThemeName?
edited to add: I see you also resorted to fetch all the settings with $settings = variable_get( 'theme_esjing_settings', array()); That should prevent the issue above.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
It seems not worked.
>but does it also work when your theme is not the active theme?
It seems not worked. seems can only configure when theme active.
is it a drupal bug or we are on wrong road?
Reopen issue?
Can you confirm in cq. reopen issue http://drupal.org/node/56713 ?
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
I had add a new issue
I had add a new issue ,http://drupal.org/node/57676, and got a patch for it.
so please test it.
pj169.com