• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 ad_message_below template hook doesn't work

DRE

Well-known member
#1
DarkImmortal's PostRatings do not work for me in Xenforo 1.1.1. Everything is fine except when it comes to the ad_message_below template. In Post Ratings, it does not seem to want to keep this template edit for ad_message_below saved:

Code:
<xen:hook name="message_below" params="{xen:array 'post={$message}','message_id={$messageId}'}" />

This is my ad_message_below template right before I hit save after entering the code.

Code:
<xen:hook name="ad_message_below" />
<xen:hook name="message_below" params="{xen:array 'post={$message}','message_id={$messageId}'}" />
<xen:if is="!{xen:helper ismemberof, $visitor, 3,4,7}">
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 1">
<xen:if is="{$forum.node_id} == 17">
<xen:else />
<center>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7690221894315962";
/* T8L In First Post */
google_ad_slot = "5916691495";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
</xen:if>
</xen:if>
</xen:if>


After I hit save, it says:

The following error occurred:

The server did not respond in time. Please try again.

It does this everytime!

The post ratings will actually show up for awhile, then it will disappear.

When I click on ad_message_below to inspect it, the code I entered for post ratings is GONE.

It now looks like this:

Code:
<xen:hook name="ad_message_below" />
<xen:if is="!{xen:helper ismemberof, $visitor, 3,4,7}">
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 1">
<xen:if is="{$forum.node_id} == 17">
<xen:else />
<center>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7690221894315962";
/* T8L In First Post */
google_ad_slot = "5916691495";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
</xen:if>
</xen:if>
</xen:if>
 

DRE

Well-known member
#2
I also experiencing sort of the same issue with Dark Immortal's AzuCloud modification.

I have upgraded from 0.0.1 to 0.1.2 and do not see any search terms after removing azucloud from the template.

Does this mean I have to re-add the template or just wait awhile to see if it will show up later?
Are you running the latest version of XF that has the template hook for it?
Latest version of Xenforo.

What template is needed to be reverted to use this plugin?
It is using the hook ad_below_content, so as long as that is present within your Page_Container.

Your Page_Container template should look something like:

{xen:raw $contents}

<xen:include template="ad_below_content" />

You would normally insert the template under $contents, which it is doing with the use of this hook.
 

gldtn

Well-known member
#3
Seems like some add-on clash, try disabling all of them and working only with the Post rating first and see what happens from there..
 

lasertits

Active member
#4
I found that removing this:

<xen:if is="{$dark_azucloud_enable}">
...code...
</xen:if>

makes it so the AzuCloud addon appears. The addon doesn't seem to be reading the options in the ACP properly, as I made sure "Enable AzuCloud" was checked, saved it, then unchecked - saved, checked, and saved it. Didn't show unless I removed the xen:if statement.