Can you give more details about this?Other than improvement for existing features, this update includes AMP support which should be super fast for user on mobile devices / 3G connection.
You can edit bdcache_amp_thread_view and add the advertisements.@xfrocks Is there a specific content template used on AMP pages, or some variable passed to the template that we can use to display a different set of advertisements on AMP pages?
<xen:container var="$containerTemplate">bdcache_amp_PAGE_CONTAINER</xen:container>
<div align="center">
<amp-ad width=320 height=50
type="adsense"
data-ad-client="ca-pub-2342938126547092"
data-ad-slot="3406133228">
</amp-ad>
</div>
<xen:include template="thread_view" />
<div align="center">
<amp-ad width=320 height=50
type="adsense"
data-ad-client="ca-pub-2342938126547092"
data-ad-slot="3406133228">
</amp-ad>
</div>
The container template is "bdcache_amp_PAGE_CONTAINER" (instead of the normal "PAGE_CONTAINER"). Both the container template and the content template will have a variable named "bdCache_isAmp".@xfrocks Is there a specific content template used on AMP pages, or some variable passed to the template that we can use to display a different set of advertisements on AMP pages?
The best way to include components is below:You can edit bdcache_amp_thread_view and add the advertisements.
then it looks like this
Code:<xen:container var="$containerTemplate">bdcache_amp_PAGE_CONTAINER</xen:container> <div align="center"> <amp-ad width=320 height=50 type="adsense" data-ad-client="ca-pub-2342938126547092" data-ad-slot="3406133228"> </amp-ad> </div> <xen:include template="thread_view" /> <div align="center"> <amp-ad width=320 height=50 type="adsense" data-ad-client="ca-pub-2342938126547092" data-ad-slot="3406133228"> </amp-ad> </div>
But you also have to include the script in the header
https://www.ampproject.org/docs/reference/components/amp-ad
<xen:callback class="bdCache_Helper_Amp"
method="renderCustomElementScript"
params="{xen:array 'element=ad',
'date=201610261016'}"><script async custom-element="amp-ad"<xen:comment>
</xen:comment> src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
</xen:callback>
I am using PHP 7.1 RC6 and it works fine.
Using latest version, I don't have this issue.
it's happen when i use "$config['debug'] = true;"Template Errors: PAGE_CONTAINER
- Function mcrypt_encrypt() is deprecated in ***/library/bdCache/Crypt.php, line 44:
43:
44: <noscript><style>.JsOnly, .jsOnly { display: none !important; }</style></noscript>
45: <link rel="stylesheet" href="css.php?css=xenforo,form,public&style=' . urlencode($_styleId) . '&dir=' . htmlspecialchars($visitorLanguage['text_direction'], ENT_QUOTES, 'UTF-8') . '&d=' . htmlspecialchars($visitorStyle['last_modified_date'], ENT_QUOTES, 'UTF-8') . '" />
https://xfrocks.com/other/threads/bd-cache.131/page-11#post-4926i have this error with latest bd-cache and 7.1 php
it's happen when i use "$config['debug'] = true;"
New version has moved away from this method. You can safely ignore it for now (and update to new version when it's available).i have this error with latest bd-cache and 7.1 php
it's happen when i use "$config['debug'] = true;"
Google Search Console is giving me a lot of errors and it seems like it doesn't index most of the AMP pages because of the errors.
View attachment 143759
I started a PC with you. It looks like it's not rendering the AMP pages anymore.Please pick one url for each error and send me here or via convo. Thanks.
<script defer src="/myjsfile_1.js"></script>
<script defer src="/myjsfile_2.js"></script>
<script defer src="/myjsfile_3.js"></script>
We use essential cookies to make this site work, and optional cookies to enhance your experience.