Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Atarian - joulukuu 15, 2005, 08:07:44 AP

Otsikko: Share Themes directory across several boards?
Kirjoitti: Atarian - joulukuu 15, 2005, 08:07:44 AP
###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
Otsikko: Re: Autoinstaller for a pre modded board?
Kirjoitti: Dannii - joulukuu 15, 2005, 08:35:10 AP
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.
Otsikko: Re: Autoinstaller for a pre modded board?
Kirjoitti: Atarian - joulukuu 15, 2005, 08:43:54 AP
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
Otsikko: Re: Autoinstaller for a pre modded board?
Kirjoitti: Atarian - joulukuu 15, 2005, 09:56:47 IP
Is there a way to se the Themes directory in the Settings.php file? i only see Sources there.

Thanks again!
Otsikko: Re: Share Themes directory across several boards?
Kirjoitti: Dannii - joulukuu 16, 2005, 06:41:19 AP
You'll have to use a single themes database table, rather than a unique one for each forum.
Otsikko: Re: Share Themes directory across several boards?
Kirjoitti: Atarian - joulukuu 16, 2005, 04:32:54 IP
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!
Otsikko: Re: Share Themes directory across several boards?
Kirjoitti: Compuart - joulukuu 16, 2005, 08:46:41 IP
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).
Otsikko: Re: Share Themes directory across several boards?
Kirjoitti: Atarian - joulukuu 16, 2005, 08:49:31 IP
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 :)
Otsikko: Re: Share Themes directory across several boards?
Kirjoitti: Compuart - joulukuu 16, 2005, 08:56:40 IP
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.
Otsikko: Re: Share Themes directory across several boards?
Kirjoitti: Atarian - joulukuu 16, 2005, 09:07:56 IP
cool, thanks. I'll experiment with editing theme_dir and theme_url.

Thank you very much!