Any HTML content between categories and forums
Add advertisements or announcements through Administration > Forums
Go to Administration > Categories/Forums and add the category and forum where we want the content to be displayed.
BUT!!! such a category should NOT be under hidden categories !!! If there are hidden sections above it, then create a forum at the bottom of the desired (open) category.
The categories have a problem with the ordinal ID. It is possible to "touch" the correct category only if the order of the categories is the same for all users.
In the forum settings, we add the html content we need to the description.
If we're going to leave the forum title, we insert Redirect to URL (there will be a title-link)
In the group settings, just in case, remove the ticks for "answers" and "topics" for everyone. We leave the "read forum" checkboxes for those who should have access to view your ad (it may not be available to everyone).
Insert into administration > custom style (or html-top between <style> tags) general settings:
.punbb #pun-category3 thead,
#pun-category3 .modlist,
#pun-category3 .tc2,
#pun-category3 .tc3,
#pun-category3 .tcr {display: none !important;}
.punbb #pun-category3 .tcl {
overflow: visible;
width: 100%;
border: none;
}
The red number is the order of the category from the top.
We get the following effect:
Next, add options:
/*Removing the category title*/
#pun-category3 h2 {display: none !important;}/*Removing the forum icon*/
#pun-category3 div.icon {display: none !important;}
#pun-category3 td div.tclcon {margin-left: 0 !important;}/*Removing the forum title*/
#pun-category3 .tcl h3 {display: none !important;}
Delete unnecessary lines. If we insert everything, we get the following effect:
If you have a block layout (each cell of the table has display: block or similar), then you can place ads not in a separate category, but between forums.
#forum_f118 .tclcon h3, /*removes the forum title*/
#forum_f118 .icon, /*removes the forum icon*/
#forum_f118 .tcr, #forum_f118 .tc2, #forum_f118 .tc3 {display: none !important;}
Red - Forum ID
BUT! the code will work ONLY for block layout.
If you have a standard table, then the cell with content can stretch to the full width of the category ONLY if there is one in the category or all the rows of the category have this style. Therefore, we create a separate category for table styles.