CTA Featured Threads User Preferences

Unmaintained CTA Featured Threads User Preferences 1.1.0

No permission to download
Compatible XF 1.x versions
  1. 1.2
  2. 1.3
  3. 1.4
  4. 1.5
Additional requirements
This add-on requires CTA Featured Threads.
This add-on is not affiliated with XenForo Ltd.

This guide will explain how to create custom user fields which will enable your users to remove the featured thread blocks from the forum list, forum view and new/recent posts pages.

Once completed they will have three additional check boxes on their account/preferences page, like so:

The attached file is for the automatic template modifications only.
The custom user fields must still be created manually as they cannot be attached to add-ons.

Custom User Fields
The first step is to create the custom user fields.
Rather than type it all out, I have attached screen shots which show what must be entered for each one.

You can edit the text to suit but you must keep the Field ID exactly as shown.
Failure to do so will render the check boxes inoperative.

Forum List
forum-list-01.webp forum-list-02.webp forum-list-03.webp

Forum View
forum-view-01.webp forum-view-02.webp forum-view-03.webp

New / Recent Posts
new-recent-01.webp new-recent-02.webp new-recent-03.webp

The next step is to edit the templates.
There are three ways of doing so, which are explained below:
  1. Installing the attached add-on
  2. Manually editing the templates
  3. Creating template modifications
1. Installing the attached add-on
Simply download and unzip the attached file and then install it like a regular add-on.

2. Manually editing the templates
The three templates you need to edit are:
  • cta_featuredthreads_forum_list
  • cta_featuredthreads_forum_view
  • cta_featuredthreads_find_new_wrapper
Essentially you just wrap the relevant code in a conditional statement related to the custom user field.

<xen:if is="!{$visitor.customFields.CtaFtForumList}">
    Template code to hide when checkbox is checked.

<xen:if is="!{$visitor.customFields.CtaFtForumView}">
    Template code to hide when checkbox is checked.

<xen:if is="!{$visitor.customFields.CtaFtNewRecent}">
    Template code to hide when checkbox is checked.

3. Creating template modifications
In order to do this you must have debug mode enabled.
Once that is done, you must create three separate template modifications.

The find code for each one is the current template contents.
The replace code for each one is the current template contents wrapped in the corresponding custom user field conditional statement, as above.

forum-list-04.webp forum-view-04.webp new-recent-04.webp
Related resources

Latest updates

  1. Updated template modifications

    The template modifications have been updated to work with FT 2.11 and later.
Top Bottom