News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

beginner theme developer

Started by fms-er2020, December 09, 2020, 06:32:20 PM

Previous topic - Next topic

fms-er2020

hi!

is there any manual or comprehensive guide to learning how to develop themes for smf?

i was able to make a couple of modifications to the default curve theme using the stylus extension

but what i want to understand and learn is how do i actually developer a theme from scratch the proper way

can i just make changes to the php files or is that a bad approach?

how much php do i need to know to understand how hooks work

is this similar to the wordpress hooks,,, or do i even need to learn hooks or is this just for mods?

if you can share best practices would be very much appreciated

thank you very much

Kindred

no, there is no such guide. The best way is to start by making a copy of the default theme and then edit ONLY the files (css or template.php files) which need changes.

(for example, test2.turtleshellprod.com -- (yes, that is 2.1, but the statement still hold's true even for 2.0.x) I have ONLY made edits to the CSS, index.template.php and BoardIndex.template.php to get this done.)

the template files are written in php (which means -- for our code -- that the html is included in echo statements) but the templates should only have display logic in code...   anything which is functional logic should be in Sources/*.php files, not in the template.php files

modern SMF encourages the use of "hooks" instead of direct code edits for mod packages. (which yes, makes it more like wordpress than phpbb -- but the SMF package manager supports both)  HOWEVER, if you're talking about themes, then there should be no need for hooks, since you're only dealing with the templates, not the functional code.

Сл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."

Antes

- nope, none
- You can mirror them in index.css
- good luck in there :)
- As long as your changes stay in template files its fine, if you need something advanced than yea things gets rather complicated.
- Cant say basic, def. more than basic php knowledge but you can cheat your way with doing a lil copy-cat on it...
- no idea, unless you want to do some advanced theme yes hooks are only for mods.
- Install themes from different authors (mind that there is not much), check their approach on the themes and have a generic idea...

There is no such thing as "best" in doing themes, we are putting our artistic values into a theme while the only rule is stay within SMF limits (code structure etc...).

Advertisement: