Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

  • Admin Junkies is proud to announce 📣 an awesome ☀️ summer special on ✍️ Content Bundles for YOUR forums! Kickstart your discussions with a Content Bundle. For the entire summer through August, use the promo code AJSUMMER 🎉 to receive 50% 🎁 off your content bundle. For example, a package that normally only costs 100 Credits will only cost 50 💰 credits. Full news here.

XenForo Notices

Al1

Recognized member
Joined
Jul 28, 2023
Messages
85
Website
eatsleepgamerepeat.net
Credits
0
Would anyone be able to help with a xenForo template edit? The current notice systems puts the notice right across the entire width of the forum and pushes the sidebar down as a result:

Image3.png

I would like to edit this so that it sits just across the forum home and doesn't impact the forum width just like this:

Image4.png

The second image/notice is from the welcome notice section in style properties. The first is from the communication/notice section. Any suggestion on how to change this? I asked over on the xenForo official site and got ignored.

Thank you, in advance, for any help/suggestions.
 
Advertisement Placeholder
The problem is going to be with where in the corresponding template the notice code gets called.
Pretty sure it's going to be in the page_container template with this section that puts it in the p-body-inner block.
Code:
<div class="p-body">
    <div class="p-body-inner">
        <!--XF:EXTRA_OUTPUT-->

        <xf:if is="$notices.block">
            <xf:macro template="notice_macros" name="notice_list" arg-type="block" arg-notices="{$notices.block}" />
        </xf:if>

        <xf:if is="$notices.scrolling">
            <xf:macro template="notice_macros" name="notice_list" arg-type="scrolling" arg-notices="{$notices.scrolling}" />
        </xf:if>
I'll look around when I have some time this afternoon and see if there is another block that could be placed in to do what you want. It will probably be above where the node categories are displayed. It will probably be somewhere like p-body-content.
You might be able to use a TMS edit to play with moving that notices section around and it applying across all styles.
I didn't catch your request over there or I would have replied there... but now I'm not so worried about providing help on alternative sites like I used to be. I would still prefer that there was an "XF verified" type badge here to validate license holders, but it is what it is.
 
Last edited:
Yeah, so what I did with mine was, in the PAGE_CONTAINER template, take this:

Code:
<xf:if is="$notices.block">
    <xf:macro template="notice_macros" name="notice_list" arg-type="block" arg-notices="{$notices.block}" />
</xf:if>

<xf:if is="$notices.scrolling">
    <xf:macro template="notice_macros" name="notice_list" arg-type="scrolling" arg-notices="{$notices.scrolling}" />
</xf:if>

and move it to immediately below this:

Code:
<div class="p-body-content">
 
Yeah, so what I did with mine was, in the PAGE_CONTAINER template, take this:

Code:
<xf:if is="$notices.block">
    <xf:macro template="notice_macros" name="notice_list" arg-type="block" arg-notices="{$notices.block}" />
</xf:if>

<xf:if is="$notices.scrolling">
    <xf:macro template="notice_macros" name="notice_list" arg-type="scrolling" arg-notices="{$notices.scrolling}" />
</xf:if>

and move it to immediately below this:

Code:
<div class="p-body-content">
If you are using multiple styles and want it consistent across them, then as I suggested, I'd create a TMS entry so it gets applied to all and you don't have to maintain multiple template changes and worry about "merges" if they are needed.
 
If you are using multiple styles and want it consistent across them, then as I suggested, I'd create a TMS entry so it gets applied to all and you don't have to maintain multiple template changes and worry about "merges" if they are needed.

Yes, definitely recommended for folks running multiple styles. I generally do my own styles, all as child styles to a main style, so I just do the template edits in the main style and they trickle down. Unless it's specifically tied to an add-on, anyways. Oddly enough, though, I do also have an "add-on" called "Little Things", though, which is mostly just a bunch of template modifications. 😂🤦‍♂️
 
Oddly enough, though, I do also have an "add-on" called "Little Things", though, which is mostly just a bunch of template modifications.
I haven't gotten to the point of creating an add-on with the edits... I keep it old school. It is more of a PITA as you do have to get into developer mode to create new ones... but it's not that hard.
 

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 5 17.2%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 24 82.8%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds