News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Customizing default SMF theme

Started by mosukeric, September 25, 2024, 11:41:42 AM

Previous topic - Next topic

mosukeric

Consider you just installed SMF, keeping the default theme.
How is it best to customize the default theme so that updates won't break changes?

What I do now is just edit .template.php files.
Is there a better way?

@rjen

Depends on what you want changed. I personally felt all I needed were .css changes.

So, copy the default theme to a new theme and only make changes to the copied files. Then you are safe 
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Diego Andrés

Unless the theme has many templates, you're even less likely to encounter an issue during a patch than with the default theme, not 0% chances though.

In fact, if you plan on editing templates anyways, you're better off with a custom theme and keeping your default templates pristine, so do as @@rjen suggested.

SMF Tricks - Free & Premium Responsive Themes for SMF.

mosukeric

I see, so a custom theme is better.

I have played with creating mods, I have a question about the translations.
Is it possible do add/remove translations from Who.english.php for example?

Have created a mod that creates a page with a menu entry, only thing that I have to manually do is the Who.english.php, otherwise everything is added and removed by the install process.

Diego Andrés

Quote from: mosukeric on September 26, 2024, 05:44:37 PMI have played with creating mods, I have a question about the translations.
Is it possible do add/remove translations from Who.english.php for example?

Have created a mod that creates a page with a menu entry, only thing that I have to manually do is the Who.english.php, otherwise everything is added and removed by the install process.

You can add a new language file and load it using loadLanguage function, that way you don't need to edit language files either.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Kindred

You should use a custom language file as mentioned...  or, barring that, add strings into modifications.english.php instead of the specific core file.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mosukeric

Adding to modifications.english.php requires manual editing, I wanted to avoid that, so loading a custom language file seems to be the better option in this case. Otherwise modifications.template.php would be fine.

Advertisement: