New post & reply buttons in threads

Скачать New post & reply buttons in threads
Недавно искали:

Itnull

Команда форума
Администратор
Регистрация
22.05.13
Сообщения
25.513
Реакции
9.471
Веб-сайт
itnull.me
  • Автор темы
  • Администратор
  • Модер.
  • Команда форума
  • #1
Compatible XF Versions2.2 , 2.3Visible BrandingNo

You can use this to show it members of certain usergroups. Simply edit the "in_array" below to add usergroups to it.

This will add a "reply" button next to the newthread button.

Even if a bot is aware of the newthread & new post buttons, they will no longer follow it with the nofollow attribute, additionally they won't see it if you configure which groups can see these buttons correctly.

Go to: ACP --> Template --> thread_view and find:
HTML:
<xf:breadcrumb source="$forum.getBreadcrumbs()" />

Add this code directly below that line:
PHP:
<xf:if is="{$xf.visitor.user_id} AND in_array({$xf.visitor.user_group_id}, [2, 3, 18, 4, 5])">
<xf:pageaction>
<xf:button href="{{ link('forums/post-thread', $forum) }}" class="button--primary" icon="write" rel="nofollow">
{{ phrase('post_thread') }}
</xf:button>
<xf:button href="{{ link('threads/reply', $thread) }}" data-xf-click="overlay" class="button--primary" icon="reply" rel="nofollow">
{{ phrase('post_reply') }}
</xf:button>
</xf:pageaction>
</xf:if>
Updated to work properly on xenforo 2.3

  • Removing overlay="true" seemed to resolve the issue.
1721481393125.png
 
Назад
Сверху Снизу