XF 2.3 Changing order of copyright notices in the footer

smallwheels

Well-known member
Licensed customer
In the footer of the various pages of the forum there is the XF copyright notice "Community platform by XenForo® © 2010-2026 XenForo Ltd.". One can optionally add something below that via languages -> "commonly edited phrases" -> "Extra footer copyright". And some addons do add their copyright notice there as well.
In my case this lead to a bit of chaos: First there is the standard XF notice. Ond second position there is a notice from one add on. On third posistion there is the "extra footer copyright"-notice for my forum that I added manually and then, on forth and fifth position, there are again two notices that add ons put there.

I do not want to get rid of any of those notices but would like to change the order of the notices so that my manual one is either on top (preferred, to make it more visible) or at the bottom, but not in the middle (as it is now).

Any advice how to achieve that?
 
To answer my own question: The bit in question is in the template "Page_Container" and looks like this:

Code:
<xf:if contentcheck="true">
                <div class="p-footer-copyright">
                    <xf:contentcheck>
                        <xf:copyright />
                        {{ phrase('extra_copyright') }}
                    </xf:contentcheck>
                </div>
            </xf:if>

If you switch the positions of xf:copyright and "phrase('extra_copright')" you are half way there: Your custom copyright notice is now on top of all the others. Just that the XF copyright is now somwhere in the middle of the copyright notices that the various add ons put there and those are in my case partly following directly to whatever you put into "extra copyright" as a phrase w/o even a line break.

Further investigation showed, that the add on authors do not follow a stringent way how and where to put their copyright notices. They are injected via template modifications and while i.e. Events Manager injects it's notice at the end of the "custom copyright" phrase, w/o a line break but with a leading pipe "|" 8way run injects his the same way but with a line break while Dragon Byte injects his at the end of "xf:copyright /" with a linebreak. The outcome is an optical mess, obviously. Even worse: Via ACP these modifications are locked and cannot be edited.

I quickly checked wether the XF Developer Documentation gives advice about where and how to place a copyright notice for add on developers but it seems no avail.

For my taste the best solution would be an additional phrase like i.e. add-on_copyright that would be in the footer and any add on dev could place his notice into. This way things would follow a clearer structure and would be much easier to handle and looking far more stringent, including the individual extra_copyright phrase. Could i.e. look like that:

Code:
<xf:if contentcheck="true">
                <div class="p-footer-copyright">
                    <xf:contentcheck>  
                        {{ phrase('extra_copyright') }}
                        <xf:copyright />
                        {{ phrase('add-on_copyright') }}
                    </xf:contentcheck>
                </div>
            </xf:if>

Will try how to achieve something like that w/o shooting myself in the foot when updating add ons.
 
I've now tried this the dirty way with success. Don't like the process, but it is easy and it works. If anybody wants to do it here is how it works. Try it at your own risk.

1. For each language on your forum create a new phrase "addon_copyright" and leave the text blank.
2. within the template Page_Container" search for
Code:
{{ phrase('extra_copyright') }}
and place
Code:
{{ phrase('addon_copyright') }}
above or below it - whatever suits you better.
3. for each add on that you want the copyright notice to move within the footer to the location of the new phrase navigate to the /src/addons directory on your server/webspace, find the folder of the addon (name of the add on author, then name of the add on), navigate to the folder "_data" within there and find the file "template_modifications.xml". Open it in your editor.
4. Find the section that adds the copyright notice to the "Page_Container"-template and replace "extra_copyright" with "addon_copyright". Save the file to your server.
5. rebuild the addon in question. You'll get a warning notice about a modified file - but that is what you did.
6. Check on the footer of your forums if it worked as intended. The copyright notices should now be in the order you wanted.

One downside of this dirty approach is that each time you update on of the add ons with a new version you'll have to remember to to edit the template_modifications.xml of the add on after copying the new files on the server and before the update (or, if you forget it, you can edit them after the update and rebuild the add on).
 
Back
Top Bottom