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

Add images where forum title and description are

OnlyAnExcuseOnlyAnExcuse ✭✭
edited July 2012 in Vanilla 2.0 - 2.8

What i'd like to do is add an image where a forum's title/description are, and have a different one for each.

Each forum seems to have these (this an example from this site):

<h1 class="H HomepageTitle">Vanilla - Free, Open-Source Forum Software</h1> <div class="P PageDescription">Community support for Vanilla's developer community.</div>

And that's where i'd like to put a category-specific image, along with the text.

Any (simple) way of doing this?

«1

Comments

  • Options
    422422 Developer MVP

    Can you post a screenpic plz

    There was an error rendering this rich post.

  • Options

    This is how it looks now:

    This is how i'd like to add an image (in this case a logo)

    If there was a way I could add a class for each category which would add an individual image to each, that's what i'd like to do. But as it stands i'm a bit stuck!

  • Options
    OnlyAnExcuseOnlyAnExcuse ✭✭
    edited July 2012

    double post apologies

  • Options
    peregrineperegrine MVP
    edited July 2012

    write a plugin using this event.

    DiscussionsController_BeforeRenderAsset_Handler
    
    
    i if ((!$Sender->Category) = scottishpremier
    echo "<img........>
    
    if ((!$Sender->Category) = blahbla2
    echo "<img........>
    
    etc.
    

    look at hidecategory plugin modify it and call it your own name.

    then post it as an add-on when you get it solved.

    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
    422422 Developer MVP

    What @peregine says. You also have missing icon on big button.

    There was an error rendering this rich post.

  • Options

    Yeah, I compressed the LESS files from bootstrap theme and the icons didn't seem to work afterwards, but ill get round to it.

    That's great penegrine, thanks - i'll look into that. Cheers!

  • Options
    peregrineperegrine MVP
    edited July 2012

    I'll post an add-on called CategoryImageHeader in a few for you to test.

    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
    422422 Developer MVP

    Looked more like a utf issue. Nice custom version of kasperlargers bootstrap, looks ace

    There was an error rendering this rich post.

  • Options

    http://vanillaforums.org/addon/categoryimageheader-plugin-1.0

    @OnlyAnExcuse
    I can't work on it anymore today, but if you want to test it, and get back to me.

    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
    KasperKasper Scholar of the Bits Copenhagen Vanilla Staff
    edited July 2012

    @OnlyAnExcuse said:
    Yeah, I compressed the LESS files from bootstrap theme and the icons didn't seem to work afterwards, but ill get round to it.

    You'll need to fix the FontAwesome paths in the compiled version of the code if you want the icons to display correctly. Awesome customizations by the way, it looks fantastic!

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • Options

    Thanks for the compliments 422 and kasperisager - it was based on Cerulean bootswatch but decided to opt for black as a neutral colour.

    I've still to change a few things and get the colours right, once i do i'll post it on the showcase area.

    @peregrine, testing the plugin as we speak, thank you!

  • Options

    @penegrine

    Installed plugin but showing a blank page for the settings.

  • Options
    peregrineperegrine MVP
    edited July 2012

    It should have shown settings before. I rewrote some things anyway and re uploaded the plugin w/ proof of the settings panel is not blank!

    let me know if you have problems with the new one.

    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

    It's the same sadly on my website - though I do have it going on a test server on my computer.

    I should have mentioned i'm using Vanilla 2.1 on my website, it seems absolutely fine on the latest stable release (2.0.18.4). Blank on 2.1 though (sorry for not mentioning that before).

    Really appreciate your help @peregrine, not many forum package support sites have members willing to write a basic plugin for you :)

  • Options
    peregrineperegrine MVP
    edited July 2012

    Are you sure its the release or the theme that makes it non-functional.

    never mind I just tried it on 2.1. I'll try to see what the problem is with the dashboard.

    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

    I get the dashboard setting issues resolved on 2.1.

    Unfortunately, in vanilla 2.1 they removed the event I was using :)

    So I have to use CategoriesController_BeforeRenderAsset_Handler

    but I am trying to figure out to only process if the asset is contents

    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

    ok cool :)

  • Options
    peregrineperegrine MVP
    edited July 2012

    use version 1.2 of this plugin - see if it gives you some semblance of what you want.

    there are only a few events for placement. so jquery may be the next option or adding a 1 line event to a file in your views folder.

    but see if the image placement works with categories.

    remove your old CategoryHeaderImage directory - so the files don't interact with each other.

    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

    Working great - posted image in feedback thread for plugin. Will work on CSS to ensure it sits perfectly, you're a star, cheers!

  • Options

    thx for the feedback. glad it worked your site looked cool, and I liked your idea of the image that you proposed.

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

Sign In or Register to comment.