Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Webmasters Area (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=14)
-   -   Mysidia Project - A new Look (http://www.mysidiaadoptables.com/forum/showthread.php?t=3839)

Tequila 09-29-2012 05:47 PM

Mysidia Project - A new Look
 
Final New Home - MysidiaAdvanced.tk

:3

Hall of Famer 09-30-2012 12:29 AM

Oh it looks really nice Nyxi, thanks for doing this. ^^

Tequila 09-30-2012 09:39 AM

Thanks! I've also posted a couple of threads with information like this one with some questions I'd like answered and a second with stuff I'd like to be able to do with the proposed new template system.

All feedback is welcome!

Hall of Famer 09-30-2012 09:18 PM

Oh that's so cool, new template system? Actually I am considering using Smarty for Mys v1.3.3 and onward, so it may be a good starting point?

Tequila 09-30-2012 10:00 PM

Quote:

Originally Posted by Hall of Famer (Post 24819)
Oh that's so cool, new template system? Actually I am considering using Smarty for Mys v1.3.3 and onward, so it may be a good starting point?

It's smarty that I'm working on. ;3 I'd love to be able to split parts of the page up depending on where we can plug the .tpl files. ;3

Hall of Famer 09-30-2012 11:31 PM

I see. Hows your experience with Smarty so far? Converting old template system into Smarty template system should be easy, although you may encounter some issues using smarty's Smarty::assign() method if you aint quite familiar with OOP.

Theoretically three .tpl files should be sufficient for this script, one for the main theme, one for ACP theme, and another for the install wizard theme. Of course custom themes may define their own .tpl files, so the number may vary if we include old themes such as Green and Elements in official package.

Tequila 10-01-2012 09:30 AM

I figured we could set a main .tpl with different sections defined by sub .tpls. I'll take a look at other systems with a similar setup first though.

Although, this seems promising: http://www.smarty.net/inheritance

Quote:

layout.tpl
PHP Code:

<html>
<
head>
  <
title>{block name=title}Default Page Title{/block}</title>
</
head>
<
body>
{
block name=body}{/block}
</
body>
</
html

mypage.tpl
PHP Code:

{extends file="layout.tpl"}
{
block name=title}My Page Title{/block}
{
block name=body}My HTML Page Body goes here{/block

output of mypage.tpl
PHP Code:

<html>
<
head>
  <
title>My Page Title</title>
</
head>
<
body>
My HTML Page Body goes here
</body>
</
html


Quote:

Instead of managing our page layout in several files (header.tpl, footer.tpl, etc.), we now manage it in one cohesive template (layout.tpl), and define the changeable blocks of content with {block ...} tags. Now you can simply extend the layout.tpl (which basically copies it) and then customize any of the defined block elements. You can have any number of child templates chained together, thus the concept of inheritance.

Hall of Famer 10-01-2012 11:07 AM

I see, this sounds like a good idea to me. This way all custom templates can extend a main .tpl file and define their own header and body with less code.

Tequila 10-02-2012 05:53 PM

Yep. ;3

I'll keep researching it. ;3 After all my bug brought home an "I wasn't all that good at school" slip today. It's a boring night for her. Maths, and Words, and things like that.

Tequila 10-02-2012 06:15 PM

Anyone Want to Join?
I'm looking for helpers and aspiring coders to join up. I'll even provide hosting for your mods that need external files.

You can give feedback on projects that I'm working on as well. I won't post all of them here now. ;3


All times are GMT -5. The time now is 02:27 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.