Advertisement:

Author Topic: Modularized template theming  (Read 5746 times)

Offline Glyph

  • Semi-Newbie
  • *
  • Posts: 85
  • Gender: Male
Modularized template theming
« on: September 21, 2016, 12:48:03 AM »
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.

Quote
i.e. pseudocode:
Code: [Select]
<!-- login code starts here -->
<form></form>
<!-- login code ends here -->

backend:
Code: [Select]
/**
*
*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:

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 66,700
    • Arantor on GitHub
Re: Modularized template theming
« Reply #1 on: September 21, 2016, 01:41:39 AM »
Not really sure I see a use case for this... And I've done crazy things with SMF mods and themes over the years.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

Offline Glyph

  • Semi-Newbie
  • *
  • Posts: 85
  • Gender: Male
Re: Modularized template theming
« Reply #2 on: September 21, 2016, 01:59:43 AM »


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.
« Last Edit: September 21, 2016, 02:35:18 AM by Glyph »
Personal TODO: