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.
    •  
      CommentAuthorPhunky
    • CommentTimeAug 11th 2005
     # 1
    Although i love the FileBrowser, i was wondering if your thinking of implementing some form of Template API so that it would be simpler to re-arrange the layout of things.

    As currently i need to hack/mod the functions myself to move things like the folder lists above the preview image and such.

    Just an idea but i think it would be a great help!
    • CommentAuthorthe aloha
    • CommentTimeAug 11th 2005
     # 2
    concur, albeit moreso with such functionality in vanilla.
    • CommentAuthorjonezy
    • CommentTimeAug 11th 2005
     # 3
    it's all css, you can change the layout pretty easily... in version 2 i wrote a style sheet that moved the directory listing to the right or left of the page
    •  
      CommentAuthorPhunky
    • CommentTimeAug 11th 2005
     # 4
    Yeah if i wanted to just style the basic layout i could very easy do it with CSS, but im needing to merge it into WordPress for my site, which requires me to delve into the functions.

    Also it would be nice to be able to simple rearrange elements, like moving the now and next to a side bar or moving the current path to somewhere else than the top.

    Sure its possible but if there was a nice simple template api we could just use functions like directoryPath(NoRoot,ListSubs) and such to allow for much more simpler intergration of this into CMS and Blogs
    • CommentAuthorMark
    • CommentTimeAug 11th 2005
     # 5
    There are two problems with templating the filebrowser:

    1. It was meant to have as few files as possible. The original filebrowser was a single file that you'd just drop into a directory, and I've even been considering getting rid of the config and filetypes.xml file for the next rev.

    2. In order to make it run fast, I've done some really wacky string building as the page is parsed. I did this so that it could perform multiple tasks at the same time during big looping calls, rather than having to loop things three or four times, it only has to do it once.

    Now, what you're asking is not uncommon, and I think that it is worthwhile to change the filebrowser to allow this, but it won't be happening any time soon. I'm not planning on revising the filebrowser for quite some time - too many other things on my plate at the moment.

    You are, of course, welcome to hack it out yourself and post the results on here for others asking for the same thing.
    • CommentAuthordknowles
    • CommentTimeAug 11th 2005
     # 6
    You could always just build the strings then use smarty (http://smarty.php.net/) for templating.
    • CommentAuthorMark
    • CommentTimeAug 11th 2005
     # 7
    wow. smarty is cool - and it's exactly what I was planning for templates in the next rev of vanilla.
    • CommentAuthordknowles
    • CommentTimeAug 11th 2005 edited
     # 8
    No reason to re-invent the wheel!

    If you haven't already seen it, the PEAR library is also way cool (http://pear.php.net/)
    • CommentAuthorpmjones
    • CommentTimeAug 12th 2005
     # 9
    There's no reason to use Smarty. Instead, a simple, elegant, and powerful alternative exists, with a much smaller footprint: Savant (http://phpsavant.com).

    Savant uses PHP as its template markup language; among other things, it allows you to build object-oriented plugins to provide your own custgom behaviors. Finally, If you decide that you really do need to "compile" your templates, you can write a custom compiler that does exactly (and only!) what you want.

    Of course, I'm the author, so I'm biased in favor of it. ;-)
    • CommentAuthorthe aloha
    • CommentTimeAug 13th 2005
     # 10
    i am happy that templates will be included. makes me think of sticking around.
Add your comments
    Username Password
  • Format comments as