AMPXF - AMP for Xenforo 2

AMPXF - AMP for Xenforo 2 [Paid] 1.4.9

No permission to buy (€50.00)
Yes! )

Speaking on adding options. I'm getting notifications from ahrefs kind of "google doesn't like dynamic pages, use static instead". So I was thinking about an option for those who already use rewrite rules for friendly urls, to rewrite /threads/title/?amp=1 into /threads/title/amp/ or /amp/threads/title/.

What do you say?
Good question :)

I think for AMP it doesn't really matter as those are anyway detected by the bots through a metatag on the normal page.

Also there is an official answer regarding this from Google already in 2008: https://developers.google.com/search/blog/2008/09/dynamic-urls-vs-static-urls

I personally think ?-urls are ugly for the cases where users will see them, in AMP pages they usually won't (at least with AMP Real URL option) :)

Usually the rewrite rules require a bit of work with the underlying webserver, which is not something that I would want to start instructing our users how to do :D
 
If it's a beta should I still upgrade to it?
I marked it as a Beta yesterday because it had some "bigger changes" in the underlying code and I didn't want everyone to install it at once in case there would've been some problems. Since then there are 2 more small releases out that didn't add much.

Anyway there are now 20+ forums running that Beta and no problems reported, so I would say it is quite safe. I will probably release the next version as "stable" :) 👍
 
After last upgrade, I got full pages with errors, big conflict with Siropu chat addon

Confirmed ;)
  • ErrorException: [E_NOTICE] Undefined index: isAMP
  • src/addons/MaZ/AMP/Listener.php:235

  • Generiert von:
  • 12 Februar 2021 um 19:47


Stack-Trace​


#0 src/addons/MaZ/AMP/Listener.php(235): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/vhosts...', 235, Array)
#1 [internal function]: MaZ\AMP\Listener::templater_macro_pre_render(Object(MaZ\AMP\XF\Template\XF22\Templater), 'public', 'siropu_chat_mes...', 'room', Array, Array)
#2 src/XF/Extension.php(35): call_user_func_array(Array, Array)
#3 src/XF/App.php(2823): XF\Extension->fire('templater_macro...', Array, 'public:siropu_c...')
#4 src/XF/Template/Templater.php(736): XF\App->fire('templater_macro...', Array, 'public:siropu_c...')
#5 src/addons/MaZ/AMP/XF/Template/Templater.php(105): XF\Template\Templater->callMacro('siropu_chat_mes...', 'room', Array, Array, NULL)
#6 src/XF/Template/Templater.php(836): MaZ\AMP\XF\Template\Templater->callMacro('public:siropu_c...', 'room', Array, Array)
#7 src/addons/Siropu/Chat/Pub/View/Chat.php(39): XF\Template\Templater->renderMacro('public:siropu_c...', 'room', Array)
#8 src/XF/Mvc/Renderer/AbstractRenderer.php(91): Siropu\Chat\Pub\View\Chat->renderJson()
#9 src/XF/Mvc/Renderer/Json.php(63): XF\Mvc\Renderer\AbstractRenderer->renderViewObject('Siropu\\Chat:Cha...', '', Array)
#10 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Json->renderView('Siropu\\Chat:Cha...', '', Array)
#11 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(TickTackk\DeveloperTools\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(TickTackk\DeveloperTools\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#14 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#15 src/XF.php(488): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}


Status der Anfrage​


array(4) {
["url"] => string(17) "/chat/room/1/join"
["referrer"] => string(31) "https://www.elo-forum.org/chat/"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(6) "/chat/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 
Can someone explain this like I'm 5....

What's the bot for?

I thought if we put this on our site, it converted the templates to amp for mobile users and that was kinda it.

Trying to figure out what the bot is for etc...

Also - do uploaded videos play as normal on the amp pages?

Most of our AMS stories have videos in them, so wanna make sure users can see those.

thx
 
Hi

Now i got this error:

  • ErrorException: [E_NOTICE] Undefined index: isAMP
  • src/addons/MaZ/AMP/Listener.php:235
  • Generado por: RafaVar
  • 12 Feb 2021 a la(s) 14:53

#0 src/addons/MaZ/AMP/Listener.php(235): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/forobeta/...', 235, Array)
#1 [internal function]: MaZ\AMP\Listener::templater_macro_pre_render(Object(MaZ\AMP\XF\Template\XF22\Templater), 'public', 'af_forumstats_s...', 'renderStats', Array, Array)
#2 src/XF/Extension.php(35): call_user_func_array(Array, Array)
#3 src/XF/App.php(2823): XF\Extension->fire('templater_macro...', Array, 'public:af_forum...')
#4 src/XF/Template/Templater.php(736): XF\App->fire('templater_macro...', Array, 'public:af_forum...')
#5 src/addons/MaZ/AMP/XF/Template/Templater.php(105): XF\Template\Templater->callMacro('af_forumstats_s...', 'renderStats', Array, Array, NULL)
#6 src/XF/Template/Templater.php(836): MaZ\AMP\XF\Template\Templater->callMacro('public:af_forum...', 'renderStats', Array, Array)
#7 src/addons/AddonFlare/ForumStats/Pub/Controller/ForumStats.php(57): XF\Template\Templater->renderMacro('public:af_forum...', 'renderStats', Array)
#8 src/XF/Mvc/Dispatcher.php(350): AddonFlare\ForumStats\Pub\Controller\ForumStats->actionResultsAll(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('AddonFlare\\Foru...', 'ResultsAll', Object(XF\Mvc\RouteMatch), Object(AddonFlare\ForumStats\Pub\Controller\ForumStats), NULL)
#10 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(AddonFlare\ForumStats\Pub\Controller\ForumStats), NULL)
#11 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#13 src/XF.php(488): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}

array(4) {
["url"] => string(24) "/forum-stats/results-all"
["referrer"] => string(21) "https://forobeta.com/"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(1) "/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 

 
mazzly updated AMPXF - AMP for Xenforo 2 with a new update entry:

1.3.5 Beta 5

  • Moved <amp-analytics> code into own template amp_analytics for better separation and easier management of custom code there (less template conflicts)
  • AMPBot won't complain about logo width/height not being set when using a text logo
  • Extend XFRM & XFMG correctly with the XFCP_-system so it works with other addons that also extend their functionality.

Read the rest of this update entry...
 
Top Bottom