The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
2 posters

    I want Forum Widgets on Index only and not Topics/Posts

    Atman
    Atman
    New Member


    Posts : 2
    Reputation : 2
    Language : English

    Solved I want Forum Widgets on Index only and not Topics/Posts

    Post by Atman May 27th 2020, 9:51 pm

    Technical Details


    Forum version : #ModernBB
    Position : Founder
    Concerned browser(s) : Mozilla Firefox, Google Chrome, Safari
    Screenshot of problem : https://i.servimg.com/u/f32/20/21/93/98/screen10.png
    Who the problem concerns : All members
    Forum link : https://wildemount.forumotion.com

    Description of problem

    Hi,

    I've searched through the forum and saw that the tutorial only shows how to make this possible for phpBB3. I have Modern BB. I want the Forum Widgets sidebar to only be visible on the Index, and not on Topics/Posts.

    Thank you!


    Last edited by Atman on May 28th 2020, 3:12 am; edited 1 time in total
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: I want Forum Widgets on Index only and not Topics/Posts

    Post by TheCrow May 28th 2020, 2:07 am

    Hello @Atman,

    First of all we have to make a new Javascript.
    Administration Panel > Modules > HTML & Javascripts: Javascript Management > Create new javascript (after making sure javascripts are enabled)
    Fill in the information as below:
    Name: Whatever you want
    Placement: In the sub-forums, In the topics, In the gallery

    Now for the code, it actually depends on whether your widgets are on the right or the left side.
    If on the right:
    Code:
    $(function(){
     
        $('#content-container #right').css('display','none');
        $('#content-container #container').css('margin-right','0');
     
    });
    If on the left:
    Code:
    $(function(){
     
        $('#content-container #left').css('display','none');
        $('#content-container #container').css('margin-left','0');
     
    });

    This should do what you are wanting to achieve!

    Regards,
    TC.



    I want Forum Widgets on Index only and not Topics/Posts Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Atman
    Atman
    New Member


    Posts : 2
    Reputation : 2
    Language : English

    Solved Re: I want Forum Widgets on Index only and not Topics/Posts

    Post by Atman May 28th 2020, 3:12 am

    It worked, thank you so much! This also gives me a better understanding of javascript so I can hopefully make the changes I want on my own in the future. This is a truly fantastic community and service and I am so happy to have found it.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: I want Forum Widgets on Index only and not Topics/Posts

    Post by TheCrow May 28th 2020, 3:14 am

    I'm happy it worked! Have a great day! :rose:
    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    I want Forum Widgets on Index only and not Topics/Posts Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!

      Current date/time is November 11th 2024, 1:15 pm