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

Go down

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

Post by Atman on May 28th 2020, 3:51 am

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, 9:12 am; edited 1 time in total
Atman
Atman
New Member

Posts : 2
Reputation : 2
Language : English

View user profile https://wildemount.forumotion.com

Back to top Go down

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

Post by TheCrow on May 28th 2020, 8: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.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6410
Reputation : 746
Language : Greek, English

View user profile https://forumote.forumotion.com

Back to top Go down

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

Post by Atman on May 28th 2020, 9: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.
Atman
Atman
New Member

Posts : 2
Reputation : 2
Language : English

View user profile https://wildemount.forumotion.com

Back to top Go down

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

Post by TheCrow on May 28th 2020, 9:14 am

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

Male Posts : 6410
Reputation : 746
Language : Greek, English

View user profile https://forumote.forumotion.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum