Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: DeadMan... on March 28, 2023, 05:03:55 PM

Title: Remove Items from 1 board's display
Post by: DeadMan... on March 28, 2023, 05:03:55 PM
Okay, working on a site that has something in one board showing via a portal block.
I'd like to set the board up so nothing else is seen, as it won't be for posting.
Want to remove all in the image, which I know, is basically everything.

Special_Board.png
Title: Re: Remove Items from 1 board's display
Post by: Kindred on March 28, 2023, 07:21:16 PM
Ok, and? so build a theme that does that
Title: Re: Remove Items from 1 board's display
Post by: DeadMan... on March 28, 2023, 07:23:35 PM
I'd like to know if it can be done?
Hopefully via css.
I've tried to display:none some parts, but it would not work.
Title: Re: Remove Items from 1 board's display
Post by: Diego Andrés on March 28, 2023, 07:25:28 PM
Could add your condition in the boardindex.template.php, or enable a custom theme for that board like Kindred says.
It would be a duplicate from the default theme, but with a custom boardindex.template.php, instead of using a conditional, you remove stuff.
Title: Re: Remove Items from 1 board's display
Post by: Diego Andrés on March 28, 2023, 07:30:32 PM
Quote from: DeadMan... on March 28, 2023, 07:23:35 PMI'd like to know if it can be done?
Hopefully via css.
I've tried to display:none some parts, but it would not work.

Yes it's possible with css.

body.board_{board_id} #main_content_section,
body.board_{board_id} .navigate_section {
    display: none;
}
Title: Re: Remove Items from 1 board's display
Post by: DeadMan... on March 28, 2023, 07:53:30 PM
Quote from: Diego Andrés on March 28, 2023, 07:30:32 PMYes it's possible with css.

I had to modify it a bit:

body.board_{board_id} .information,
body.board_{board_id} .navigate_section, body.board_{board_id} .pagesection, body.board_{board_id} #main_content_section .pagesection, body.board_{board_id} #messageindex {
    display: none;
}

If left the #main_content_section there, it also removed the TinyPortal block I want shown.
Thank you for the help, my friend!