Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Default view not being overriden in custom theme

looterlooter New
edited July 2012 in Vanilla 2.0 - 2.8

Hello, I have a custom theme and wanted to override the way discussions are laid out. So I copied the discussions folder from "applications\vanilla\views\" and put it in my theme's folder "themes\mytheme\views\", but none of the changes I have made to the layout in table.php are showing up on my discussions page. All I have done is add "THIS IS A TEST" before the discussions thread title is printed but that doesn't show up. I have tried clearing my browsers cache, and I'm pretty sure the server doesn't do any caching. Any ideas why my theme isnt overriding the discussions view? I have attached a screenshot so you can see exactly what I have done.

Comments

  • Options

    how have you included table.php?

    Show us your code.

    grep is your friend.

  • Options
    looterlooter New
    edited July 2012

    Do I have to include it somewhere? I thought I just copied the view's folder over to my theme and that vanilla automatically used/included everything inside that view instead of the default. I have only done what was outlined in the vanilla readme about creating themes and on the site.

  • Options
    looterlooter New
    edited July 2012

    Sorry if I am being to vague, this is my first time creating a theme for Vanilla and I'm still learning how to work with it, if theres any specific code you would like to see just let me know and ill pastebin it (or can I use the code bbtag here?). If I have to define my views somewhere inside of the theme (default.master.tpl or about.php) I have not done that. Since im wanting to override the view "vanilla\applications\vanilla\views\discussions"

    do I just mimic that directory entirely inside my theme

    (vanilla\themes\mytheme\applications\vanilla\views\discussions) ?

  • Options

    what is this table.php? I've never heard of it.

    grep is your friend.

  • Options
    looterlooter New
    edited July 2012

    Ok, I think I just figured out what the problem was. It was one of those ID-10-T errors I get sometimes lol. I was modifying the file discussions/table.php when I should have been modifying helper_functions.php to get the result I was looking for, thanks for helping!

  • Options

    In your theme/vanilla/views/discussions you generally modify the existing files in the folder (they each have a purpose and override the ones in default, and the one withthe same name will all be picked up. If you add files with different names in the views folder you have to include it as x00 says.

    The easiest thing to do is modify helper_functions.php to do what you want to do. If that is not enough, modify the other in your theme folder.

    Download the traditional chocolate theme to see how its done.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    looterlooter New
    edited July 2012

    peregrine said:
    In your theme/vanilla/views/discussions you generally modify the existing files in the folder (they each have a purpose and override the ones in default, and the one withthe same name will all be picked up. If you add files with different names in the views folder you have to include it as x00 says.

    The easiest thing to do is modify helper_functions.php to do what you want to do. If that is not enough, modify the other in your theme folder.

    Download the traditional chocolate theme to see how its done.

    Thanks for the help, that is what the problem turned out to be..I had just looked over table.php thinking it was the file that handled the entire layout of an entry into the discussions table but that functionality is actually inside of helper_functions.php as you pointed out. Now that problem is out of the way, pretty excited to work with forum software that actually supports this kind of functionality, I hate editing core files in other software like wordpress only to have conflicts during updates.

Sign In or Register to comment.