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

Vanilla structure

edited September 2006 in Vanilla 1.0 Help
I have finally made the upgrade to 1.0.1, with a lot of help from this community, and I have been able to change some of the text by adding to the conf/language.php file (thanks to Mini & Dinoboff). Now I want to start a few more surgical changes, by adding a few extra links, etc.

I am a mug at most of this, but I can usually manage to cut and paste to make the changes I need. My problem is, I can't really get a handle on the overall structure of Vanilla, so I find it difficult to find the files I want. I know to check the definitions.php file to find the name of the text where I want to make the structural change, so I can search for it, but there are a lot of files to search through.

So I am looking for a simple key to the structure of Vanilla, specifically a simple explanation of what each of the folders contains, to help me narrow my searches. I have read the documentation "Order of Execution", and could follow the general idea without understanding everything, so I'm guessing the files I want to fiddle with are loaded at steps 5 & 6 for generic changes and 9 for page specific changes (and 7 if I was capable of writing an extension), but I am still unclear which folder and group of files I need to look at.

As examples, here are some specific things I want to do:
  • put a link back to my site home page from the Vanilla logout screen (my forum is a part of a larger site).
  • Add a similar link back to my site home page among the tabs along the top of most pages.
  • Change the appearance of the registration screen.
I am pushing my ignorance to the limits here, and I hope in time to better understand, but can anyone point me in the right direction please?


  • Options
    edited September 2006
    amen to the above...

  • Options
    1. Is easiest achieved with a theme change (look at the files beginning People.xxxx under the themes directory. Work out which file it is you need to change, *copy* that file into the /themes/vanilla/ folder, and make your changes to that new copied file (to avoid problems with future upgrades etc)) 2. Is really easy to do with an extension (check out the $Menu-AddTab() function in the documentation) - you'll probably also want a basic concept of $Context->SelfUrl if you dont want it on all pages. Also worth using isset($Menu) to avoid any unpredicted problems. 3. Again i believe is best as a theme change - see the notes above. Depends what exactly you want to do though.
  • Options
    When we copy the files into /themes/vanilla/ should we add another folder "mytheme" and will that be selectable under the themes and style tab? Will that keep all the default styles and amend my styles, therefore overwriting any duplicates (cascading-wise)?
  • Options
    If you're just changing 1 or 2 files, you should just copy the files into themes/vanilla. If you want to make a whole new theme you should make a new folder in themes called mytheme and put the necessary files in there. For your purposes i'd stick to the first option though.
  • Options
    Thanks again. So just to clarify, is this correct?

    1. If we put a language.php or settings.php file in the conf folder, they over-ride the definitions.php and settings.php files?

    2 And are you saying that if we put framework, people or vanilla files from /library in the themes folder they also will take precedence? I didn't see that in the Order of Execution documentation, but perhaps I missed it, or perhaps I have misunderstood you?

    If I've got this right, what are the "rules" for what goes in conf folder and what goes in themes?
  • Options
    I accomplished what you wanted in two ways. The first way was to add a lussumo type banner at the top. After a while, it didn't seem to work well with the themes/styles I wanted to use. So, I came up with a sidepanel solution. You can see it on my forum.
  • Options
    1. Correct
    2. Putting library files into the themes folder will do nothing. If you need to change core functions you need to do it with extensions. The only thing you can put in the themes folder root is another folder for a whole new theme you're making. (Alternatively you can copy the file you wish to change into the /themes/vanilla folder (i.e. the folder for the vanilla theme) and edit it in there (which prevents changes being overwritten during upgrades as they would if you just changed the original file in the themes root)).

    I hope that makes sense. Every time i try and explain that i try and read it from the perspective of someone who doesnt know what i'm talking about and i'm never really sure if its understandable.
  • Options
    I thought there was another way to customize vanilla. I copied the entire Vanilla theme folder to ine called customvanilla. Then I changed the people_signout_form_validpostback.php to change the link from login to go back to discussions. If you copy the vanilla standard code into this folder, it does take precedence, doesn't it?
  • Options
    I cant get my head around that statement.
  • Options
    pbearpbear New
    edited September 2006

    Yes. There is this structure:

    your_vanilla_directory > themes > vanilla > styles

    Altering the people_signout_form_validpostback.php file first found in themes and moving that copy down a level into the vanilla directory will cause the modified file to be used first.

    And as Mini says, any files not initially found in the themes directory need to be "modified" by making calls to/through delegates by extensions.
This discussion has been closed.