XF 2.1 Random notices order

Pentago

Member
Hello everyone

Is it possible to randomize the notices in the standard notices plugin?

I tried to change something in notice_macros, as it was written here (https://xenforo.com/community/resources/xenforo-2-random-ads-code.8245/) but it doesn't work. I think I didn't implement it well. As I understand, for notices displaying, one has this part of code in notice_macros:

<div class="notice-content"> <xf:if is="$notice.dismissible AND !$notice.custom_dismissible"> <a href="{{ link('account/dismiss-notice', null, {'notice_id': $notice.notice_id}) }}" class="notice-dismiss js-noticeDismiss" data-xf-init="tooltip" title="{{ phrase('dismiss_notice')|for_attr }}"></a> </xf:if> {$contentHtml|raw} </div>

And I thought that it is probably a simple substitution of :
{$contentHtml|raw}
For:
{$contentHtml.{{ ($xf.time % 3) + 1 }}|raw}

But it doesn't work. Can anyone suggest any idea about that? Will be much thankful for any ideas
 
Back
Top Bottom