Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthoroutbreak
    • CommentTimeOct 24th 2005
     # 1
    mark, i know you're working on the latest version with a revised template system. is there anyway you could quickly describe the changes you made to make the forum easier to style? i'm very curious about that o8 screenshot you keep posting and just how much easier it actually will be to stylize vanilla.
    • CommentAuthorMark
    • CommentTimeOct 25th 2005
     # 2
    Here's how the folder structure is set up currently:



    So, there is a base folder that holds all themes. You can create a new theme by just copying the default vanilla theme and then altering all of the files within. As you can see, right now in the templates folder there are only five template files that I've created. I've still got to go make a few other ones - eventually it will hold all template files for all pages.

    Those template files contain all xhtml in vanilla, so you can change it completely. I haven't dumbed it down at all - there is php code in those template files, too. So if you were a smartypants, you could pretty much do whatever you wanted in there.

    The next thing to wrap your head around is how themes are applied. A forum will only ever have a single theme applied to it. So, on this forum you couldn't have one person seeing that o8-style theme and another person looking at this current default vanilla theme. There are various reasons for that, the biggest one being that if a theme intrinsically changes the way the forum functions, then one person might be able to do something in theme A that theme B never intended that person to do.

    But there is still custom styling on each theme - which is why each theme (as you can see in the image) has a "styles" folder. The idea there is that once you've defined the xhtml how you want it, you can still apply multiple styles to it and allow your users to switch between those. So in the future we'll have new themes coming out and available to vanilla administrators - and then we'll have new styles coming out for particular themes, and those styles are available directly to the forum users.

    Does that help?
  1.  # 3
    Wait, so in the next rev people wont be able to run different themes on the same forum?
    What are the chances of the forum admin being able to choose between running a theme system OR the existing style system? Pretty much zero i assume?
    Minisweeper watches marks head explode.
    • CommentAuthorSirNot
    • CommentTimeOct 25th 2005 edited
     # 4
    I think he's saying that in the next revision the entire theming system will sort of step back one pace. At the current, the html is embedded within the PHP, and you can style it differently with CSS but can't actually change the html without a whole lot of difficulty. With the new system, each theme will contain the html, and within each theme users can run different styles. As the themes, containing the html, will have a large effect upon how users interact with the forum, there can only be one theme running at a time, but within that theme different users can style it with CSS how they like.

    Not sure if that's entirely accurate, just my impression.
  2.  # 5
    Um, hold on, somehow i managed to completely miss that entire last paragraph. *bows and exits
    •  
      CommentAuthorgiginger
    • CommentTimeOct 25th 2005
     # 6
    Damn, that's damn impressive setup/idea. I can't wait to get started.
    •  
      CommentAuthorjsanders
    • CommentTimeOct 25th 2005
     # 7
    +10 points for powerful theming engine

    +100 points for excellent css style control within the theming engine

    i can't wait to see this.
    • CommentAuthorMark
    • CommentTimeOct 25th 2005
     # 8
    Wait, so in the next rev people wont be able to run different themes on the same forum?

    That is correct, but they *can* apply different styles to the current theme.

    What are the chances of the forum admin being able to choose between running a theme system OR the existing style system? Pretty much zero i assume?

    Well, it's open source, so you can do whatever you want. Originally that was what I wanted to do, but as I mucked about in the xhtml on my first test theme I realized that looking at the site in two different themes posed a myriad of potential problems, so I pulled back on the reigns.

    SirNot got it bang on.
  3.  # 9
    Right when I start visiting this forum less and less, Mark releases more captivating sneak peaks. I have my attention.
  4.  # 10
    "I realized that looking at the site in two different themes posed a myriad of potential problems" - well to my thoughts, you wouldnt have to use 2 different themes, what i was suggesting was that people could choose between how the style system runs now, and how it's going to run soon. But that's because i misread that the users would infact stil have control over the stylesheet they were using, in which case my theory is pointless.
    •  
      CommentAuthorlech
    • CommentTimeOct 25th 2005
     # 11
    Mini, it's gonna be great, nothing to worry about :)
  5.  # 12
    i know, i'm a little worried that i doubted mark for nearly a whole second there.
    Forgive me father, i've been working overclock recently.
    •  
      CommentAuthorBergamot
    • CommentTimeOct 25th 2005 edited
     # 13
    The php files in the root folder (current version) seem basically to be bare wrappers around controls that do the actual page rendering; is this true of the template files in the new version?
    • CommentAuthorMark
    • CommentTimeOct 25th 2005
     # 14
    It's an extension of the page controls. Basically, the page controls will now just include the rendering templates where required.
    •  
      CommentAuthornathan
    • CommentTimeOct 26th 2005
     # 15
    Mini, it's gonna be great, nothing to worry about :)

    Tell me about it. I can't wait.
    •  
      CommentAuthorBen
    • CommentTimeOct 26th 2005
     # 16
    This could prove to be an annoyance in some cases. If you made a style that relied on a certain theme, your audience can only use it if they scrap what theme and styles they already have and use yours instead.
  6.  # 17
    yeah ben - thats partly what i was considering when i was startled at first that people wouldnt be able to swop styles as they can at present. I suppose it depends how many people go to the extra effort of making an entire theme - i presume that there will be considerably more styles than themes.
    • CommentAuthortimberford
    • CommentTimeOct 26th 2005
     # 18
    so if the admin switch the theme on a forum will it automatically switch the users' chosen styles as well?
  7.  # 19
    i assume it must do.
    • CommentAuthorMark
    • CommentTimeOct 26th 2005
     # 20
    I haven't yet written a theme switching control. But when I do it will have two selectors on it - the first will contain the theme selection, and the second will contain a "default style" selection. So if you create a new theme and create three styles for it, you can select your theme in the first dropdown, and then choose which style you want to default users to in the second selector.

    However, this will be an extension since I expect that for the most part an administrator will create a theme when starting his/her forum and then only very rarely re-template their forum.
  8.  # 21
    So you mean the entire thing wont be an extension? Or will that just be an extension extension?
    • CommentAuthorMark
    • CommentTimeOct 27th 2005
     # 22
    Theming will be a part of the core.
    Granted, you can just stick with the default theme if you want.

    There was no way to make theming (or templating or whatever you want to call it) an extension because it required restructuring the vanilla folders and ripping code out of core controls.
    •  
      CommentAuthoroutbreak
    • CommentTimeOct 29th 2005
     # 23
    i am very very excited for this. the only thing i didnt like about vanilla was the lacking of ability to switch around some html elements, but now thats solved. bravo mark!
    •  
      CommentAuthorJazzman
    • CommentTimeNov 29th 2005
     # 24
    Btw Mark, have you considered Smarty? Or is it too "heavy weighted"?
    •  
      CommentAuthorlech
    • CommentTimeNov 29th 2005
     # 25
    Jazz, it's been discussed before, if I recall correctly, mark wasn't gonna go for it.
    • CommentAuthorjos
    • CommentTimeNov 29th 2005 edited
     # 26
    http://lussumo.com/community/comments.php?DiscussionID=702

    ofcourse, there may be some more recent discussion where marc states he won't go for it, but in here it seems like it will be incorporated
    •  
      CommentAuthorJazzman
    • CommentTimeNov 29th 2005 edited
     # 27
    Mark: wow. smarty is cool - and it's exactly what I was planning for templates in the next rev of vanilla

    Seems like Mark was interested. Personally I think Smarty will be too big. It's a complete other system. I checked out Savant which is cleaner and very good commented. It's just a class with plugins and it doesn't have a new template coding markup language, it just uses php. The main function of Savant is to seperate layout from content.
    • CommentAuthorjos
    • CommentTimeNov 29th 2005
     # 28
    Personally I don't think any of all these is necessary. WP has some great themes though it uses plain php in it. Maybe it is easier for most people. But is there so much difference between {post_date} and <?php post_date(); ?> ?
    Is there actually much performance lost when using smarty? Since it seems quite common probably not, but maybe someone has some experience with this.
    •  
      CommentAuthorJazzman
    • CommentTimeNov 29th 2005
     # 29
    Well.. most templating systems attempt to seperate code from layout... But I don't think you should go for that. I agree with jos that {post_date} is not much different from <?php post_date(); ?>.... Template system shoulds seperate content from layout. Content is variable, layout isn't. Therefor I like WP's theming system. Just some core php functions that do the trick.
    •  
      CommentAuthorlech
    • CommentTimeNov 29th 2005
     # 30
    Personally, I preffer something that uses a super simple render call, as opposed to having to stick opening and closing php tags all over the damn place. In the long run you're not left looking for that one unclosed tag and scratching your head at why half the page renders and half dumps your code onto the screen.
    • CommentAuthorMark
    • CommentTimeNov 29th 2005
     # 31
    that comment of mine was way back in August. Feels like a lifetime ago. There's no smarty in the next rev of Vanilla. I decided to keep it simple. You'll see soon.
    •  
      CommentAuthorBergamot
    • CommentTimeNov 29th 2005
     # 32
    The suspense, it is kiiiiiillling me :D
    •  
      CommentAuthoralexis
    • CommentTimeDec 4th 2005
     # 33
    Hi, I'm new to Vanilla and love the way it works, congratulations Mark.

    I am currently using 0.92 and wanted to know how easy will the upgrade be for the next version, I'm really interested in the new templating features but I would like to start inviting people to my new forum and be able to jump to the next version without much downtime.

    Best regards!
    • CommentAuthorMark
    • CommentTimeDec 4th 2005 edited
     # 34
    Eventually when everyone agrees that 0.9.3 is ready for public release, I will sit down and write an upgrade script. So the transfer won't take more than a few minutes (unless you encounter some kind of unforseen problem, of course).
  9.  # 35
    Put it this way, i grabbed the latest copy of 0.9.3 and switched my forum over in (not that i was counting) probably under 5 minutes. Couple of issues here and there but thats because it really is a beta. If you waited for the real release with the install (and presumably upgrade, mark?) scripts, I'd like to lay myself on the line and guess you could upgrade in a minute. If you did it now, then yeah, i'd say you were looking at a maximum 10 minute downtime unless something went /really/ wrong.
    •  
      CommentAuthoralexis
    • CommentTimeDec 4th 2005
     # 36
    That's great news!, thanks guys, I will keep this new forum using 0.9.2 for now and learn more about extensions, customizing and getting familiar with the code and when the time comes I will upgrade to 0.9.3

    Regards!
  10.  # 37
    If you're gonna familiarise yourself with the code i'd suggest you grab the latest version from the svn and familiarise yourself with that to save having to relearn stuff. Definately a good idea to keep the live forum on 9.2 for now though :)
Add your comments
    Username Password
  • Format comments as