News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Modularized template theming

Started by Glyph, September 21, 2016, 12:48:03 AM

Previous topic - Next topic

Glyph

Originally spawned off my random blabbering here: http://www.simplemachines.org/community/index.php?topic=548744.msg3891997#msg3891997

What I propose is a more organized templating system so certain template features can be more modularized.

Quotei.e. pseudocode:
<!-- login code starts here -->
<form></form>
<!-- login code ends here -->


backend:

/**
*
*CHECK FOR LOGIN CODE
*make sure bookmark login options are enabled and that the login code exists in the current default template
*/
if $bookmark_hide_state === FALSE and bookmark_login_exists("template_name") === FALSE {
show_login_form();
}


Obviously it's explicitly hidden unless enabled. This way if there are any conflicts with specific plugins this will simply work! ;)
I would submit some code to the core git but i'm not confident it would pass approval. Not to mention I have no idea what i'm doing on github lol.
Personal TODO:

Arantor

Not really sure I see a use case for this... And I've done crazy things with SMF mods and themes over the years.

Glyph

#2


You know looking back at this there had to be something in that monster drink. Leave alone the modularization pitch; why I gave disabling logins altogether as an example is beyond me right now...

I suppose i'm more interested in having random themes more customizable from the admin template.
i.e. http://i.imgur.com/ElEaaHS.png

This is a situation where I don't want the default login forms; that bootstrap navbar will be added into a plugin im working on for any theme. With the default login forms it makes things a bit redundant which is more of a pet peeve than anything but it's really hard to modify a themes template without modularization so that everything looks correct.
Personal TODO:

Advertisement: