MyBB Community Forums

Full Version: The way the pages are made.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Its really bugging me but.
Im sick of having to find all the pages that need a complete, top-to-toe html format.

Is there anyway you can have a template page that just inputs the "body" layout of the code.
and maybe browsing to pages could be done through url additions. like.

http://website.com/mybb/index.com?page=showthread

and the showthread template would just say stuff like.

header=true
toplinks=true
welcome=true

etc. where it displays those according to those settings, as well as the page itself.

It means themes would be very easy to create.

It would be possible to maybe have... two or three sets of templates.

One for the Main looking pages.
Another for the little popup windows
and another for the IMpopups.

also a system that reverts back to the old one incase you needed that "each-page-is-custom" feel.

it wouldn't be difficult.

You would just need an extra file that stores what <title> to use.

all the original pages templates would be...
what goes between the <body> tags. (minus the header + footer).

The page template would be something like.

<html>
<meta>
<title>$title</title>
$headerinclude
</meta>
<body>
<!-- start of page layout -->
$header
<!-- more html -->
$page
<!-- more html -->
$footer
</body>
</html>

hmmn.
Also to revert back to the custom form of making themes, you could just put a two layer Array, like, $page['name','custom']

and the 'name' would be like the showthread or calendar (see above examples) and the custom would say whether to show the generic code (custom = false) or show the unique code (the old layout, (custom = true)).

anyone like this idea? Or is this what is being worked on in gold?
I'm new here so maybe I'm just an idiot but I don't really understand what you're saying. Are you saying you'd like one template for editing an entire style? Something that is both the header and footer combined together?

If that's the case then I agree. I would be more handy then having to go between two different templates pages all the time. The style page could atleast include forms for the CSS, header and footer.
This is just used to create a page with the MyBB theme your runing and make a template for this new page so you can add what ever you want to it.
oh, well that's really cool then.
actually, its not.

what I was saying is that nearly all the pages include a generic layout.

*same code in the body tags, except for the actual page itself*

now, what I was saying is that instead of calling up all the code. It knows what it needs to display the page, and then a php variable $page is put in there, which displays the whole page content.

Therefore it reduces the need to go through ALL of the template pages.

as for stuff like adding new pages, it would be really easy.