[CSCN] Moving Staff Tools to Nav Group

[CSCN] Moving Staff Tools to Nav Group 1.0.1

No permission to download
#Wz
I am sorry for misunderstanding your idea. I thought that you were talking about the CSCN anniversary theme.
The addon itself should work well with XF 2.2.8.
Feel free to report any issue you have encountered.
 
I installed this on our test forum. It works really nice with the stock XenForo theme, but does not work with our third party theme, Flare (from ThemeHouse). However, it could be a simple change. I will look into it here tomorrow and see if I can find where to make the changes in the templates--it shouldn't be too difficult, and I can post the changes here for anyone who needs them. Only one of the three PAGE_CONTAINER template modifications is working for all themes:

1641334103680.webp
 
Here is one of the differences.

This is the code in the add-on that is being replaced:

Code:
                            <a href="{{ link('account/alerts') }}"
                                class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--alerts js-badge--alerts badgeContainer{{ $xf.visitor.alerts_unviewed ? ' badgeContainer--highlighted' : '' }}"
                                data-badge="{$xf.visitor.alerts_unviewed|number}"
                                data-xf-click="menu"
                                data-xf-key="{{ phrase('shortcut.alerts_menu')|for_attr }}"
                                data-menu-pos-ref="< .p-navgroup"
                                title="{{ phrase('alerts')|for_attr }}"
                                aria-label="{{ phrase('alerts')|for_attr }}"
                                aria-expanded="false"
                                aria-haspopup="true">
                                <i aria-hidden="true"></i>
                                <span class="p-navgroup-linkText">{{ phrase('nav_alerts') }}</span>
                            </a>

Here is the same code which should be replaced in the Flare theme. It is almost the same. It only adds u-ripple in the first class statement, and the spacing is different (fewer spaces or tabs from the left margin), which will also throw it off.

Code:
            <a href="{{ link('account/alerts') }}"
               class="p-navgroup-link u-ripple p-navgroup-link--iconic p-navgroup-link--alerts js-badge--alerts badgeContainer{{ $xf.visitor.alerts_unviewed ? ' badgeContainer--highlighted' : '' }}"
               data-badge="{$xf.visitor.alerts_unviewed|number}"
               data-xf-click="menu"
               data-xf-key="{{ phrase('shortcut.alerts_menu')|for_attr }}"
               data-menu-pos-ref="< .p-navgroup"
               title="{{ phrase('alerts')|for_attr }}"
               aria-label="{{ phrase('alerts')|for_attr }}"
               aria-expanded="false"
               aria-haspopup="true">
                <i aria-hidden="true"></i>
                <span class="p-navgroup-linkText">{{ phrase('nav_alerts') }}</span>
            </a>

For my own purposes, I can create two new template edits to fix this. But for general purposes, the "search" text to replace is a bit broad, so other third party themes will possibly have issues with this.
 
Here is one of the differences.

This is the code in the add-on that is being replaced:

Code:
                            <a href="{{ link('account/alerts') }}"
                                class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--alerts js-badge--alerts badgeContainer{{ $xf.visitor.alerts_unviewed ? ' badgeContainer--highlighted' : '' }}"
                                data-badge="{$xf.visitor.alerts_unviewed|number}"
                                data-xf-click="menu"
                                data-xf-key="{{ phrase('shortcut.alerts_menu')|for_attr }}"
                                data-menu-pos-ref="< .p-navgroup"
                                title="{{ phrase('alerts')|for_attr }}"
                                aria-label="{{ phrase('alerts')|for_attr }}"
                                aria-expanded="false"
                                aria-haspopup="true">
                                <i aria-hidden="true"></i>
                                <span class="p-navgroup-linkText">{{ phrase('nav_alerts') }}</span>
                            </a>

Here is the same code which should be replaced in the Flare theme. It is almost the same. It only adds u-ripple in the first class statement, and the spacing is different (fewer spaces or tabs from the left margin), which will also throw it off.

Code:
            <a href="{{ link('account/alerts') }}"
               class="p-navgroup-link u-ripple p-navgroup-link--iconic p-navgroup-link--alerts js-badge--alerts badgeContainer{{ $xf.visitor.alerts_unviewed ? ' badgeContainer--highlighted' : '' }}"
               data-badge="{$xf.visitor.alerts_unviewed|number}"
               data-xf-click="menu"
               data-xf-key="{{ phrase('shortcut.alerts_menu')|for_attr }}"
               data-menu-pos-ref="< .p-navgroup"
               title="{{ phrase('alerts')|for_attr }}"
               aria-label="{{ phrase('alerts')|for_attr }}"
               aria-expanded="false"
               aria-haspopup="true">
                <i aria-hidden="true"></i>
                <span class="p-navgroup-linkText">{{ phrase('nav_alerts') }}</span>
            </a>

For my own purposes, I can create two new template edits to fix this. But for general purposes, the "search" text to replace is a bit broad, so other third party themes will possibly have issues with this.
The difficulty is that I am simply bad at programming, including complicated RegEx programming.

I am busy maintaining an input method project (Objective-C). However, I guess I really can do less help with the issue you met above.
 
Top Bottom