XF 1.1 Trying to figure out code for ignored users

Mr. Wah

Member
Apologies if this is in the wrong forum

Been stumped on this for a bit. So I have a forloop that lists a set number of items. I want it to check if the item it is about to render is from a user who is on the visitor's ignore list. Here's the original code which did not hide the messages if a user was on the ignore list.

Code:
                <li>
                    <xen:avatar user="$update" size="s" img="true" />
                    <a href="{xen:link members, $update}" class="username" style="display: inline;">{xen:helper richUserName, $update}</a>
                    <span class="userTitle">{$update.message} (<xen:datetime time="$update.post_date" />)</span>
                </li>

I then tried the following code, but it listed all the messages as the ignore message, even those who weren't on the visitor's ignore list:

Code:
                <li>
                                      <xen:if is="{$update.message.isIgnored}">
                                      {xen:phrase you_are_ignoring_content_by_this_member}               
                                      <xen:else />
                    <xen:avatar user="$update" size="s" img="true" />
                    <a href="{xen:link members, $update}" class="username" style="display: inline;">{xen:helper richUserName, $update}</a>
                    <span class="userTitle">{$update.message} (<xen:datetime time="$update.post_date" />)</span>                                      
                                      </xen:if>
                </li>

Any help in understanding either whatever syntax or pseudo issue I'm missing, would be appreciated.
 
Last edited:
It simply checks the visitor's ignore list against the user you provide.
The function is located in Template/Helper/Core.php
and is named helperIsIgnored()
 
Back
Top Bottom