Customizing SMF > SMF Coding Discussion

Adding custom theme options


I am building my own theme. I'd like to add a field in theme options that site admins (aka me) can use to control a theme-based change.

Example: I want a field where I can insert board IDs so that I can use a different theme variant for that board. Related: Theme variant per board. I have some nice suggestions on how to do this by hand in the theme, but it'd be fun to figure out how to do it in the UI.

This is really an experiment, but I can't find documentation about adding custom theme settings. At the moment, my question is adding a theme option in general.


SMF Version: 2.0.15

I swear that there was documentation on this as some point...

function template_options()
in Settings.template.php

Fantastic! Thank you. I'll play around with this.  ;)

Chen Zhen:
Mess around with the attached mod.
It adds the board/theme options to:
 Admin -> Modifications -> Board Themes


[0] Message Index

Go to full version