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.

In discussion view hide panel, etc

422422 Developer MVP
edited March 2013 in Vanilla 2.0 - 2.8

In thread discussion view.

I want to do this.

Panel {display:none;}

Content {width:100%;}

I was hoping to use body id to trigger this, just for this page, but unable to as the id is same as index.

Any ideas.

There was an error rendering this rich post.

«1

Comments

  • in a specific discussion or in all threaded discussions.

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

  • 422422 Developer MVP

    all discussions not sure what the difference is to threaded discusions

    There was an error rendering this rich post.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    yes you can I did it , using

    body.Vanilla.Discussion.Index #Content{width:100%;}

    body.Vanilla.Discussion.Index #Panel{display:none;}

  • 422422 Developer MVP
    edited March 2013

    hmmm.

    nope as stated in original post the id for body is same as discussions.

    < body id="index-page" class="in_unknown">

    i am using 2.0.18.1

    There was an error rendering this rich post.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    i am using 2.1.18.1

    oh , sorry then never mind I have not hacked that one yet, maybe I should start to ...

  • peregrineperegrine MVP
    edited March 2013

    @vrijvlinder is correct.

    @422

    all discussions not sure what the difference is to threaded discusions

    I was hoping to use body id to trigger this, just for this page, but unable to as the id is same as index.

    your questions was unclear to me so I pselled it out.

    because discussion topics is

    body.Vanilla.Discussions. .....

    and

    individual discussions are

    body.Vanilla.Discussion. .....

    different ids

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

  • 422422 Developer MVP
    edited March 2013

    not on mine they aint lol. Me tinks I need to investigate further

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited March 2013

    2.0.18.4

    vanilla_discussions_index

    vanilla_discussion_index

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

  • 422422 Developer MVP
    edited March 2013

    to add, durrhhh

    This is heavily modified forum integrated not embedded within our site. Using sso.
    I am wondering if theres a way of adding id to the body tag targetted for this page.

    Via say addclass ( addid ) lol

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited March 2013

    try adding this to your custom css (it works for me in default vanilla theme).

    body.Discussion #Content {
    width:100%;

    }

    body.Discussion #Panel {
    width:100%;
    }

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

  • 422422 Developer MVP
    edited March 2013

    Ok just checked a 2.0.18.1 and 2.0.18.4

    In the former I have in default.master.php

    < body id="Body">

    in the latter I have

    < body id="<?php echo $BodyIdentifier; ?>" class="<?php echo $this->CssClass; ?>">

    I think we may have removed the bloody body tag php code, when we sliced the forum up. Will carry on checking

    There was an error rendering this rich post.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @peregrine said:
    vrjvlinder was almost right :)

    2.0.18.4

    vanilla_discussions_index

    vanilla_discussion_index

    those are the ID, I gave the class, you can also use

    body#vanilla_discussion_index.Vanilla.Discussion.Index

    but Kasper told me a while back that was overkill so I just use the body class now

    however I am not very familiar yet with the 2.1 changes they should not be that different

  • 422422 Developer MVP

    @vrijvlinder you cannot target a class attribute to an id that is the same across all pages, which is the issue. If the ID changed the solution is simple.

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited March 2013

    I edited my comment. It takes longer for processing when you specify more attributes but if you have to isolate - you have to. whatever works. ID would be quicker than class I would think because by default id can only occur once whereas class can be multiple.

    in the end it was confusion because 422 failed to mention the version :):):) originally

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

  • 422422 Developer MVP

    solved it, fgs in our global header we had changed the id structure.

    Solved

    There was an error rendering this rich post.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited March 2013

    Using my method,in 2.0, only the discussion page where you view the thread gets changed, but you must use important on it. The other index pages remain the same.

    body#vanilla_discussion_index.Vanilla.Discussion.Index #Content

    body#vanilla_discussions_index.Vanilla.Discussions.index #Content

    this would only affect the discussion list

  • 422422 Developer MVP
    edited March 2013

    LOL @peregrine

    Actually versioning isnt the issue here, just good old honest stupididy.

    We had replaced our body id, with our own code within global headers.

    There was an error rendering this rich post.

  • 422422 Developer MVP

    @vrijvlinder said:
    Using my method,in 2.0, only the discussion page where you view the thread gets changed, but you must use important on it. The other index pages remain the same.

    body#vanilla_discussion_index.Vanilla.Discussion.Index #Content

    body#vanilla_discussions_index.Vanilla.Discussions.index #Content

    this would only affect the discussion list

    Thats not a good way of doing it, mixing multiple ID's within a reference chain is bad practice.

    Thanks, but I think you may have missed the issue, whilst your answer would be helpful for those who indeed possessed a body id of any sort, for me i didnt have one.

    There was an error rendering this rich post.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited March 2013

    I thought I was on another planet for a moment lol jet lag

  • @422

    I understood you more and more as the conversation progressed.

    somewhat comprehensible ----> crystal clear

    me and v we like to wrestle over ideas.

    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.