AMPXF - AMP for Xenforo 2

AMPXF - AMP for Xenforo 2 2.3.0 Patch Level 3

No permission to buy (€50.00)
We recently had to restore our build environment from a backup, and had forgotten to run xf:dex-import to load relevant content from the addon files.. Therefore the previously uploaded release had a mix of XF2.2 and XF2.3 CSS styles, which led to warnings.

We've uploaded a fixed version now and re-enabled downloading of it.
This update is for XF2.3 only
  • Fix styling for spoilers on AMP pages
  • Emojis no longer render with double width & height attrs.
  • Use the new getSmilieHtml instead of old/deprecated getDefaultSmilieHtml to convert smilie <img> into <amp-img>
  • Explicitly set a.avatar to relative sizing to prevent avatar <amp-img> to take the whole screen and block other content
    • This only seems to happen on some themes...
  • Fix for [E_DEPRECATED] usort(): Returning bool from comparison function...
  • Fix where reaction icons would have double width & height attributes set (AMP warning)
  • Like
Reactions: woei and PhineasD
Note: This version is only compatible with XF 2.3...

XF2.3 compatibility update, which brings the same features as the old one but adapted to fit style changes in XF2.3

Some notes:
  • Due to the new CSS variations in use, the inlined CSS is slightly larger than before ( ~10kB), which might cause problems on some pages that render many elements with custom styling.
  • XF2.3 changed how the header/logo is rendered, so it might be good to check that the logo renders okay in AMP mode.
  • This is the initial XF2.3 compatibility release, which might have some minor styling problems. If anything is found, please open a support ticket on ampxf.com
  • Added options for tracking users with Google Analytics 4
    1689062971695.webp
  • Optimized logo loading by adding the data-hero attribute that makes caches speed up the loading.
  • Added LCP section and option to not render avatars in the forum/node-views (since they are not visible on smaller devices anyway)
As explained in https://xenforo.com/community/resources/ampxf-amp-for-xenforo-2.8225/updates#resource-update-43189

With this update, the add-on strips out the non-validating <template> part so that forums using the advanced cookie don't get non-valid AMP pages where e.g. youtube videos are placed..

Once the advanced cookie is "out of beta" we will add similar functionality to the add-on that is aligned with XF's cookie functionality.
Fix that makes the Templater class correctly support both XF2.1 and XF2.2, so that It doesn't raise errors when used together with the Cloudflare add-on

Big shout out to @digitalpoint for the pointers :) 👍

This version also includes a small fix from Patch Level 1 (which we forgot to release 🙈 ) where a merged thread's AMP page wouldn't redirect to the AMP page of the "new target"
Fixed a bug where Xenforo cloud customers' validation tokens would not be accepted.
  • Like
Reactions: Masetrix
Back
Top Bottom