AMPXF - AMP for Xenforo 2

AMPXF - AMP for Xenforo 2 [Paid] 1.4.9

No permission to buy (€50.00)
I know I would choose the second option :)
well, I guess I should just wait some time to see if there will be the difference in search console & Adsense )

while we are on a topic of speed optimizing... If I understand correctly, amp versions of thread pages will be shown to guests only.
and I'm thinking that avatars of posters doesn't give those visitors any information. but they take time for a page to load.
I'm wondering if getting rid of avatars would make pages load noticable faster?
 
well, I guess I should just wait some time to see if there will be the difference in search console & Adsense )

while we are on a topic of speed optimizing... If I understand correctly, amp versions of thread pages will be shown to guests only.
and I'm thinking that avatars of posters doesn't give those visitors any information. but they take time for a page to load.
I'm wondering if getting rid of avatars would make pages load noticable faster?
I'm not sure. The Search engine caches also minimize the images to be as small as possible, and the only ones that would probably "impact the score" much are the ones "above the fold".

You could add a suggestion on ampxf.com for it, maybe others feel they would want it as a feature as well?

I have a feeling that removing the avatars might actually hurt your forum's "credibility" as it then just might look like anonymous users, and IMO the site starts looking more and more like something from the 90s :D

Anyway, if you want to optimize, the thing to do is to remove ads & analytics.. But then you're hurting your bottom line instead... :D 💸

and I guess my signature is slightly outdated )))
Feel free to replace it with this ;) :D
 
mazzly updated AMPXF - AMP for Xenforo 2 with a new update entry:

Version 1.2.0 (Make sure logo is ok styled after install)

  • Logo style options moved into Style properties
    • Make sure the logo looks okay after installing (if you have styled it previously)
  • Noindex threads to not contain link to AMP variant
    • AMP variant to also hold <meta> for noindex
  • Fix large smilie images in some cases
  • <amp-ad insertion of <head>-tag improved
  • Flushing style caches when editing e.g. border radius

Read the rest of this update entry...
 
I think numbers speak for themselves (the former amp pages were from another part of our community, not the forums). Errors have been mostly solved, the google amp bot needs some time to validate them.

View attachment 244449

All I can tell you is that I'm a big fan of amp, because I know how well amp pages perform on wordpress (not in this graph) and how well I can monetize them. I really don't understand how amp is not a core part of xf.
I believe it. I’m running it as of that post I made and I’m excited to see my results.
 
I got this error:
  • Code:
    Exception: Template public:member_about error: Could not find class MaZ\AMP\XF\Str\Formatter when attempting to extend XF\Str\Formatter
    src/XF/Extension.php:174
    Generated by: Unknown account
    Jan 21, 2021 at 9:27 AM
and the details:

Code:
Stack trace
#0 src/XF/App.php(2811): XF\Extension->extendClass('XF\\Str\\Formatte...', NULL)
#1 src/XF/App.php(1458): XF\App->extendClass('XF\\Str\\Formatte...')
#2 src/XF/Container.php(28): XF\App->XF\{closure}(Object(XF\Container))
#3 src/XF/App.php(2827): XF\Container->offsetGet('string.formatte...')
#4 src/XF/Mvc/Entity/Entity.php(173): XF\App->stringFormatter()
#5 src/XF/Mvc/Entity/Entity.php(115): XF\Mvc\Entity\Entity->get('about')
#6 internal_data/code_cache/templates/l3/s26/public/member_about.php(17): XF\Mvc\Entity\Entity->offsetGet('about')
#7 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\Templater), Array, NULL)
#8 src/addons/MaZ/AMP/XF/Template/Templater.php(72): XF\Template\Templater->renderTemplate('member_about', Array, true, NULL)
#9 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\Templater->renderTemplate('public:member_a...', Array)
#10 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#11 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Member\\About', 'public:member_a...', Array)
#12 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#15 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#16 src/XF.php(488): XF\App->run()
#17 index.php(20): XF::runApp('XF\\Pub\\App')
#18 {main}
 
I got this error:
  • Code:
    Exception: Template public:member_about error: Could not find class MaZ\AMP\XF\Str\Formatter when attempting to extend XF\Str\Formatter
    src/XF/Extension.php:174
    Generated by: Unknown account
    Jan 21, 2021 at 9:27 AM
and the details:

Code:
Stack trace
#0 src/XF/App.php(2811): XF\Extension->extendClass('XF\\Str\\Formatte...', NULL)
#1 src/XF/App.php(1458): XF\App->extendClass('XF\\Str\\Formatte...')
#2 src/XF/Container.php(28): XF\App->XF\{closure}(Object(XF\Container))
#3 src/XF/App.php(2827): XF\Container->offsetGet('string.formatte...')
#4 src/XF/Mvc/Entity/Entity.php(173): XF\App->stringFormatter()
#5 src/XF/Mvc/Entity/Entity.php(115): XF\Mvc\Entity\Entity->get('about')
#6 internal_data/code_cache/templates/l3/s26/public/member_about.php(17): XF\Mvc\Entity\Entity->offsetGet('about')
#7 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\Templater), Array, NULL)
#8 src/addons/MaZ/AMP/XF/Template/Templater.php(72): XF\Template\Templater->renderTemplate('member_about', Array, true, NULL)
#9 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\Templater->renderTemplate('public:member_a...', Array)
#10 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#11 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Member\\About', 'public:member_a...', Array)
#12 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#15 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#16 src/XF.php(488): XF\App->run()
#17 index.php(20): XF::runApp('XF\\Pub\\App')
#18 {main}
Did you get it once, or does it show up several times in the ACP? And if only once, was it during install of the addon? 🤔
 
Have you tried reinstalling the addon? That error looks quite odd to me honestly..

If reinstalling doesn't help, could you open a support ticket request on ampxf.com ? :)
 
@mazzly Please can you add support Compatibility with @AddonFlare Moods
and Awards addon. Also @XFA Trophies addon. Should disable showing Moods, Awards and Trophies icons from AMP page because this aren't showing correctly.

View attachment 244540

View attachment 244541
No worries, those can be easily fixed. ACP > Appearance > Templates and edit the template "amp_style_custom.less"

Add the following:
CSS:
.awardsPostbitContainer ul {
    list-style: none;   
    padding-left: 0; /* This one you might want to tweak, depending.. */
}
.awardsPostbitContainer ul li {
    display: inline-block;
}
.awardsPostbitContainer .unknown-img {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.afMood .unknown-img {
    width: 115px;
    display: inline-block;
}

/* Only include this last piece if you want Mood + Awards to be on "same line" */
.awardsPostbitContainer {
    display: inline-block;
}
Note: You can ofc change the 20px and 115px as you see fit :)

The reason they are not included by default is that AMP has some limitations on included styles, and we can't trust other addons CSS styles to be "small enough". Therefore things like these need to add the "bare minimum" to still look good etc in AMP.

I've been thinking about including some "automatic fixes" for certain other addons by default, but I need to make it in some "smart way" :)
 
Last edited:
No worries, those can be easily fixed. ACP > Appearance > Templates and edit the template "amp_style_custom.less"

Add the following:
CSS:
.awardsPostbitContainer ul {
    list-style: none;
}
.awardsPostbitContainer ul li {
    display: inline-block;
    padding-left: 0; /* This one you might want to tweak, depending.. */
}
.awardsPostbitContainer .unknown-img {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.afMood .unknown-img {
    width: 115px;
    display: inline-block;
}

/* Only include this last piece if you want Mood + Awards to be on "same line" */
.awardsPostbitContainer {
    display: inline-block;
}
Note: You can ofc change the 20px and 115px as you see fit :)

The reason they are not included by default is that AMP has some limitations on included styles, and we can't trust other addons CSS styles to be "small enough". Therefore things like these need to add the "bare minimum" to still look good etc in AMP.

I've been thinking about including some "automatic fixes" for certain other addons by default, but I need to make it in some "smart way" :)

Does not fixed and Still are showing.

ScreenShot00141.webp

ScreenShot00142.webp

Also getting Problematic pages then how to fix?

  • DISALLOWED_TAG on line: 94 column: 3
    The tag 'font' is disallowed.
 
Does not fixed and Still are showing.

View attachment 244553

View attachment 244554

Also getting Problematic pages then how to fix?

  • DISALLOWED_TAG on line: 94 column: 3
    The tag 'font' is disallowed.
Looks fine to me:
1611233564459.webp

As for the remaining ones I missed:
CSS:
.trophyIcon {
    display: inline-block;
}

DISALLOWED_TAG on line: 94 column: 3
The tag 'font' is disallowed.
Somewhere in your site (likely notices) you are using the <font>-tag, which is old and not valid according to html5 spec. Please open a support ticket if you need help identifying it :)
 
@Nirjonadda I also realized there was a small error in the css I sent this morning (I updated it now) but it should be:
CSS:
.awardsPostbitContainer ul {
    list-style: none;   
    padding-left: 0; /* This one you might want to tweak, depending.. */
}
.awardsPostbitContainer ul li {
    display: inline-block;
}
(I had the padding-left rule set in wrong selector previously)
 
@Nirjonadda I also realized there was a small error in the css I sent this morning (I updated it now) but it should be:
CSS:
.awardsPostbitContainer ul {
    list-style: none;  
    padding-left: 0; /* This one you might want to tweak, depending.. */
}
.awardsPostbitContainer ul li {
    display: inline-block;
}
(I had the padding-left rule set in wrong selector previously)

So this is now look like this? Also This Code can be add via extra.less template?

Code:
/* AMP addon icons Fix START */
.awardsPostbitContainer ul {
    list-style: none;   
    padding-left: 0; /* This one you might want to tweak, depending.. */
}
.awardsPostbitContainer ul li {
    display: inline-block;
}
.awardsPostbitContainer .unknown-img {
    width: 20px;
    height: 20px;
    display: inline-block;
}
.afMood .unknown-img {
    width: 115px;
    display: inline-block;
}
.trophyIcon {
    display: inline-block;
}
/* AMP icons Fix End */
 
Top Bottom