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

Removing HTML from asset?

Id like to remove some of most of the HTML in the content asset, as I have something else in mind. Any ideas how I can edit the Content asset to my liking?

Tagged:

Comments

  • Options
    hgtonighthgtonight ∞ · New Moderator

    The content asset holds the rendered output of a controller's view. Generally, you override the view, modify the data via an event handler, change the controller logic via an override, or hide stuff with JS/CSS.

    If you elaborate on your specific need, I can push you in the right direction.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    ChizbangChizbang New
    edited February 2014

    Id like to basically start again when it comes to how threads display (I have a completely different layout in mind).
    Any ideas?

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Do you want to remove the parts that render the forum ? In other words, remove the discussions and the rest of it ?

    If you remove assets, you disable the forum. You do not remove the html to change the layout. You can add rows and columns and re order what is already there.

    You can hide stuff via js or css. But you probably should first learn what the assets contain and how they work before trying to rewrite them .

    I recommend you try out several themes and see how they are put together. Avoid incomplete themes or bad themes.

    The framework of the layout must have certain things you must work with. These are the entire forum across all pages and used by plugins.
    Head
    Body
    Content
    Panel
    Foot

    If you remove these assets or rename them, many plugins who use those assets to be rendered will not work.

    You can add parts in between those assets and you can move them from their normal place. but removing them will break the forum and break themes and plugins.

  • Options
    ChizbangChizbang New
    edited February 2014

    Well, remove parts and re add them so I suppose im better of doing what you suggested. I mainly just want to re arrange where everything goes and maybe change a few things here and there. What would I be best off searching for in order to find what im looking for?
    I want to mainly do this:
    Redesign the new discussion page completely and add a step by step system (out of JS), for example: Only select category shows up, you press next and shows up what the title and contents of discussion should be etc.

    Id also like to change how the index page looks by making it so you select a category youd like to view. I know it already does this, but it also shows the latest discussions which is not what I want.

    Thanks!

  • Options
    hgtonighthgtonight ∞ · New Moderator

    If you are looking to change the underlying markup (the HTML output), you are looking for view overrides. You can find more here: http://vanillawiki.homebrewforums.net/index.php/Views

    If you just want to change the presentation, you want to start hacking some custom CSS together. You can find more information about that here: http://vanillawiki.homebrewforums.net/index.php/A_Quick-Start_Guide_to_Creating_Themes

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited February 2014

    I think you should look at the modules and controllers.

    A controller is essentially a specific page. It is also a view. A view is what a user sees or an admin.

    So you can use the same assets but for different purposes depending on the view.

    Look at themes that are very different from the default layout so you can dissect them and study how they are put together to get an idea of how far you can take it.

    It is amazing all you can do when you know how and the right way. When you approach Vanilla, look at it with simplicity . It is very simple and everything works together in a logical simple way to understand.

    Many people make it hard on themselves because they complicate something simple.

    Keep it simple until you get a handle on it. Looking at the files and the structures helps understand the relationships and will give you ideas.

    Look at plugins, Vanilla is the base and plugins extend it's capabilities.

    Look at plugins from these people they are some of the best devs here and know their stuff. You can learn a lot from those, I did :)

    @xx0

    @peregrine

    @businessdad

    @hgtonight

    @R_J

    @shadowdare

    Before trying to massively change the way things are meant to work, please try as many plugins and themes as you can . Then you don't have to re create something that already exists and save yourself the trouble.

    Plugins can also be modified to your needs. Just get your feet really wet with vanilla and it will all come to you spontaneously .

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    .oO(why isn't there any blushed smiley?)

    You should start with getting the idea of a MVC framework. Vanilla is "only" one of four applications that were written on top of the Garden framework (which was purely written to be the underlying framework for a forum software, which makes it truely unique and a pleasure to work with) and that are enclosed in the official download.
    /applications/dashboard is for the admin part: user management, settings, plugin management, etc
    /applications/vanilla is the forum with categories, discussions, comments
    /applications/conversations is the private messaging part
    /applications/skeleton is a slightly outdated example application

    You'll find many useful examples in the plugin section (faq: "difference between addon/plugin?" My advice: always start with a plugin. By the time you will need an addon you will be experienced enough to know that). Whenever I start with a plugin, I search for similar plugins.
    There is no documentation that will empower you to write a great plugin, but there are many plugins that you will understand just by looking at their source and together with the documentation you will soon be on your way for your first plugin.
    (By the way: sometimes it really makes sense to look at more than one plugin when looking for examples because there is often more than one way to get to a solution with Vanilla)

    What you describe above is a custom theme. If you want to change the look of a "thread" - discussion here at Vanilla ;) - you will find the files you are searching for in /applications/vanilla/views/discussion
    In order to change the look completely, you could create a custom theme and copy all those files in your custom theme folder and change them there. Again: look at other custom themes in order to see how it is done.

    Whenever you want to know where the original "theme" files are, look at the url which tells you in what subdirectory you could find the files:
    vanillaforums.org/discussion/26135 => /applications/vanilla/views/discussion
    vanillaforums.org/messages/1234#latest => /applications/conversations/views/messages
    vanillaforums.org/dashboard/user => /applications/dashboard/views/user
    You will need to know the application that you are looking at (dashboard/vanilla/conversations) but the rest will be obvious as soon as you understood the principle.

Sign In or Register to comment.