News:

Wondering if this will always be free?  See why free is better.

Main Menu

Share Themes directory across several boards?

Started by Atarian, December 15, 2005, 08:07:44 AM

Previous topic - Next topic

Atarian

###EDIT###

I see that I can set the sources directory in Settings.php, is there a setting like this for the Themes directory?

Thanks!

###/EDIT###

I'm currently setting up a free (ad supported) SMF hosting thing. It will have one or two google ads, so nothing too crazy. I want to include some pre google ad modded themes I'm working on, and I'd like to edit the admin panel to keep people from modding the themes (on ad supported boards) so they don't remove the ads.

I will also offer paid hosting for a forum which will give you a custom subdomain, FTP access, and a fully featured ad free board.

I'm using cpanel/Fantastico to install SMF now, but having to manually mod all of the ad supported boards individually will drive me nuts. I was wondering if there was an autoinstaller for SMF that will let me install a modded board.

Thanks,
Jeff

Dannii

You can use the same sources and themes folders which simplifies it greatly (if you disallow custom themes), but there isn't a free autoinstaller that I know of. Some others have done so, but I'm pretty sure they've written everything themselves.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Atarian

Wow, I was just thinking about using the same sources and themes folder. Thanks for confirming that, it will definately save a lot of time! And I will be able to add themes any time I want to all the free forums :D

Atarian

Is there a way to se the Themes directory in the Settings.php file? i only see Sources there.

Thanks again!

Dannii

You'll have to use a single themes database table, rather than a unique one for each forum.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Atarian

I'm not exactly sure how to do that. Is there a variable I can change somewhere, or do I have to do it for each one in phpmyadmin?

Thanks again!

Compuart

In the themes table for each theme there are settings 'theme_dir', 'theme_url' and 'images_url'. They could all point to one central location. That should be sufficient to centralize themes (though you'd still have to modify the admin panel to remove the theme support).
Hendrik Jan Visser
Former Lead Developer & Co-founder www.simplemachines.org
Personal Signature:
Realitynet.nl -> ExpeditieRobinson.net / PekingExpress.org / WieIsDeMol.Com

Atarian

could i edit a file in the sources directory to have those fields changed to the centralized theme section?

This is a great piece of forum software, I would really love to use it for this project :)

Compuart

The themes are loaded mainly inside Load.php (loadTheme() and loadTemplate()), so you could change it there. However, I think the easiest way would be to change the install SQL file, which adds the inital theme settings to the database.
Hendrik Jan Visser
Former Lead Developer & Co-founder www.simplemachines.org
Personal Signature:
Realitynet.nl -> ExpeditieRobinson.net / PekingExpress.org / WieIsDeMol.Com

Atarian

cool, thanks. I'll experiment with editing theme_dir and theme_url.

Thank you very much!

Advertisement: