hi
thanks for this addon , I did it on 3.8.8
but it doesn't work when I check the console log, it said this
PHP Code:
extensions-impl.js:509 Powered by AMP ⚡ HTML – Version 1534444305877 https://www.xxxxxx.com/vb/amp.php?t=32366#development=1
mozbar.moz.com/bartender/url-metrics:1 Failed to load resource: the server responded with a status of 403 ()
content_page.js:2561 Bartender API access denied.
SerpResultsMetrics.handleError @ content_page.js:2561
validator.js:1001 AMP validation had errors:
amp$validator$Terminal.error @ validator.js:1001
validator.js:1001 https://www.xxxxxx.com/vb/amp.php?t=32366:447:5 Custom JavaScript is not allowed. (see https://www.ampproject.org/docs/reference/spec#html-tags)
amp$validator$Terminal.error @ validator.js:1001
validator.js:1023 See also https://validator.ampproject.org/#url=https://www.xxxxxx.com/vb/amp.php?t=3D32366
2start:1 Failed to load resource: the server responded with a status of 400 ()
- I also test it on
https://search.google.com/test/amp
it said:
Custom JavaScript is not allowed.
line 446:5
PHP Code:
<script type="text/javascript">
I tried to remove Google Analytics but it doesn't work!
Update ***************
I fix it.
open ampthread template.
search on:
PHP Code:
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
move it to be above
PHP Code:
<style amp-custom>
body {
search on
PHP Code:
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
add this under it
PHP Code:
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
--------------------
Another issue comes on theads pages
https://www.xxxxxx.com/vb/amp.php?t=127909&page=140
is will give you this error on amp google test
PHP Code:
Forbidden or incorrect use of the HTML tag
The 'nowrap' attribute can not appear in the 'td' tag.
<td class="alt1" nowrap="nowrap"><a class="smallfont" href="amp.php?t=127909&page=216" title="last page - Results 1,076 to 1,077 from 1,077"><strong>?</strong></a></td>
i tried to fix it, and it's work with me but I don't know if it currect
go to pagenav tamplete
search on:
PHP Code:
nowrap="nowrap"
change it to:
PHP Code:
style="white-space:nowrap"
End ***************
* There are general issue
very important! must add schema.org data
PHP Code:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"headline": "Article headline",
"image": [
"thumbnail1.jpg"
],
"datePublished": "2015-02-05T08:00:00+08:00"
}
</script>
but the problem is I don't know how to edit the information like:
PHP Code:
"@context": "http://schema.org",
"@type": "NewsArticle",
"headline": "Article headline",
so I tried to make it by using
https://www.google.com/webmasters/markup-helper/
search on
PHP Code:
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
add this under it
PHP Code:
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "Article",
"name" : "$threadinfo[title]",
"author" : {
"@type" : "Person",
"name" : "$post[username]"
},
"datePublished" : "$post[postdate] - $post[posttime]",
"image" : "$post[avatarurl]",
"articleSection" : "$vboptions[bburl]/Channel$foruminfo[forumid]",
"articleBody" : "$post[message]",
"url" : "$vboptions[bburl]/blackberry$threadid.html",
"publisher" : {
"@type" : "Organization",
"name" : "$vboptions[bbtitle]"
"url" : "$vboptions[bburl]",
}
}
</script>
now the problem in those
PHP Code:
"name" : "$post[username]"
"datePublished" : "$post[postdate] - $post[posttime]",
"articleBody" : "$post[message]",
I tried to fix it but it doesn't show on "View page source"
another issue, there is no choose to turn amp off or run it again.
* My issue
- I have an issue using DBSEO, need to change the link to be
PHP Code:
amp.php?t=32366 => amp-t32366.html
i tried any&every thing
PHP Code:
'amp.php?t(.+)' => 'amp-t$1'
'amp.php?t=(.*)' => 'amp-t(.*).html'
'amp.php?t=(.*)' => 'amp-t$1.html'
'^amp\.php\?t=(\d+)' => '/amp/$1'
'^amp\.php\?t=(\d+)' => 'amp/$1.html'
'^amp\.php\?t=(\d+)' => 'amp-t$1.html'
'^amp\.php\?t=(\d+)&page=(\d+)$' => 'amp-t$1-$2.html'
but nothings work!
I also need to make the template RTL.
some Idea !
- I wonder if It possible to make all style as amp ? such forums and user profile ?
- Is it possible to make copy from the archive folder and rename it to amp and make the editing to be amp ? and add script or meta name to head-include template !
any help ?