HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.

Layout Structure

edited February 2007 in Vanilla 1.0 Help
I was looking to take specific parts of the Vanilla layout structure and place them into individual parts of my layout. Since the Vanilla layout is very fluid placing vanilla inside the body of my layout looks fine, but what I would like to do is place particular parts of the layout and place them in my current CSS DIV's. I don't really want to create a style. I'm wondering if there is a way to pick apart the structure. For example: Place the Calendar Extension in a side bar box. The structure is generated so I'm not sure where to start. Any help would be greatly appreciated.

Comments

  • You can only do it if you know PHP programming and CSS, as you need to edit the theme files.
  • Grab the theme of your choice, open it up in your favourite code highlighter and start reading ;)
  • Hi!

    One place to look is appg/settings.php. There are some lines of code, interesting to you:
    // Vanilla Control Positions
    $Configuration['CONTROL_POSITION_HEAD'] = '100';
    $Configuration['CONTROL_POSITION_MENU'] = '200';
    $Configuration['CONTROL_POSITION_BANNER'] = '200';
    $Configuration['CONTROL_POSITION_PANEL'] = '300';
    $Configuration['CONTROL_POSITION_NOTICES'] = '400';
    $Configuration['CONTROL_POSITION_BODY_ITEM'] = '500';
    $Configuration['CONTROL_POSITION_FOOT'] = '600';
    $Configuration['CONTROL_POSITION_PAGE_END'] = '700';
    This defines the order of the different parts of the vanilla-layout! You can change them in different places:

    Inside appg/settings.php file: Don't do that, it may be changed on updates.
    Inside conf/settings.php - much better!
    Inside an extension, that's a nice one, because you can change much things on this way, and being completly undependent of vanilla updates.

    Bye
    Tiggr
  • edited February 2007
    I'm very comfortable with CSS and I can get around in PHP. I'm not expert with PHP, but I'm willing to further learn in order to accomplish this. Tiggr - the order looks like it could be helpful for some aspects of what I'm doing. Does anyone know where the code is held that generates the pages? For example, if you are viewing the main page you can view the source in a browser and see the DIV tags and the structure of the layout. However if you are editing the raw file with out it being rendered through a browser you can see the PHP. I am guessing that the reason I can't back track to this code is probably due to my lack of PHP experience.
  • edited February 2007
    Posting twice in a row on my own thread is not my favorite thing to do, but I have made some progress and I wanted to clarify what I am trying to do. I am hoping someone out there has some experience with this. I am not trying to create a theme. I know I can manipulate how Vanilla looks with CSS and themes, however you still can't create any layout structure you want. You only have the existing <DIV> tags Vanilla was originally designed with. I would like particular parts of Vanilla to integrate with my layout. Really what I am trying to do is place the Panel portion of Vanilla in a box thats resides in a sidebar of my layout. This has been tough because the Vanilla layout has been designed to unfold in a very specific way, if I just move stuff around it gets messy. I've noticed that Vanilla is a very tight application, I can't just shove stuff around and expect it to work. Some DIV tags start at the end of one PHP files and end on another, this is because Vanilla would just expect the files to follow each other. Since I need to move the files this doesn't work for me. I know there is a firing order for these files and it can be changed, but that alone doesn't solve my problem. I have manged to get the panel in the sidebar, but its really not a viable solution for the web site since it isn't 100% working, it is a bit messy. I was hoping someone could explain how I might do this. Does anyone have experience moving around the structure of Vanilla? Thank you to all that have replied.
  • MarkMark Vanilla Staff
    I'm not 100% sure I really understand what you are trying to do, but if you are talking about taking parts of Vanilla's xhtml code and placing it into your own website's xhtml so that it all looks the same, that's going to be very tough without working with css files and customizing it. That would be tough with any forum integration, for that matter. The option that seems to come up for most people is to just design the xhtml in your own application from the ground up however you want, and then get the data or information on your own in your application. A "same data, different code" approach.
This discussion has been closed.