Frequently Asked Questions
Important FAQ
Q: Can I use PHP inside XThreads settings?
If you want to use PHP inside XThreads settings, you need to install PHP in Templates / Complex Templates plugin.
Q: Where I can find the info about the conditionals?
You can find more info, discussions and examples in: Note that you don't need to install Template Conditionals plugin if you want to use conditionals inside XThreads settings only. You need to install Template Conditionals plugin if you want to use conditionals in your templates.
Q: What knowledges I should have to use XThreads?
HTML and CSS knowledge is strongly recommended; you should also be familiar with MyBB's template system. Because you can use conditionals in various XThreads settings, a knowledge about conditional structure is a plus point for you to create a more dynamic applications.
Q: Does XThreads add some additional area or settings?
XThreads will adds these additional area inside your AdminCP:
  • Custom Thread Fields section under the Configuration tab - this is where you can add custom thread fields
  • XThreads Options section under forum add/edit - this allows you to customise various XThreads options on a per forum basis
Q: Does XThreads add some additional templates?
XThreads will adds these additional templates when it is installed:
  • editpost_first - allows you to have a different editpost template for editing the first post of a thread; defaults to {$editpost} which uses the default editpost template
  • forumdisplay_group_sep and forumdisplay_thread_null - for use with thread grouping; defaults to nothing
  • showthread_noreplies - displayed in the {$posts} variable for showthread only if the thread has no replies.  See the comment in the template for more information.
  • forumdisplay_searchforum_inline - inline forum searching - you don't need to bother with this unless you want to...
  • threadfields_inputrow - how extra fields are displayed in newthread/editpost (of first post) - don't need to worry about this one either
Although not an added template, you can also customise the various postbit* templates through postbit_first*, which will only apply to the first post.
Q: Is there any templates modified by XThreads?
The following templates will be modified when the plugin is installed:
  • editpost and newthread - adds {$extra_threadfields} to the template, which just displays any added thread fields
  • showthread - inserts {$first_post} before {$posts}; in XThreads, it's possible to customise the first post differently from other posts (requires the forum option "Show first post on every showthread page" to be set)
  • forumdisplay_threadlist
    • insert {$nullthreads} after {$threads}; this is just for display "null threads" if thread grouping is used
    • insert {$sort_by_prefix} before the first option in the sorter listbox - this is to give the option to sort threads by thread prefix
    • from the above, some other sorting options are added below the Sort By: Views option in the listbox
  • forumdisplay_threadlist_sortrating - similar to the above, inserts a sort by number of ratings option to the sorter listbox
Q: How to upgrade XThreads?
Unless stated otherwise, the general procedure for upgrades is to simply upload the new files, then visit your AdminCP. In there, you'll be presented with a notice to run the upgrade - just follow what it says from there on.
Q: How to install XThreads?
Standard installation procedures apply. Download and extract it.
After extraction, you'll need to upload the plugin to your forum. To do this, upload everything in the Upload folder to the forum's root directory; ensure that the inc/plugins/*.php files get uploaded to inc/plugins on the server.

Some things you may need to pay attention to:
  • If you have changed the location of your admin directory, you need to rename the admin folder in the package.
  • If you are not using English for the AdminCP, you may wish to rename the english folder to your language before uploading (if no translation is available)
  • You may need to CHMOD the uploads/xthreads_ul/ folder to 0777 after uploading the files (probably won't though).
Q: Where I can download XThreads?
You can download XThreads from these locations: Please use the above discussion thread for more information, updates and posting questions/feedback you may have.
Q: What's the system requirements for using XThreads?
XThreads compatible with MyBB 1.4, and 1.6 with MySQL or MySQLi DBMS. Even XThreads compatible with MyBB 1.5 (MyBB 1.6 beta).
Q: What's XTHreads?
XThreads is a powerful MyBB plugin which provides a flexible environment for administrators to perform various modifications. The basic idea is giving you the ability to define custom fields for your threads, and providing methods to give you a lot of flexibility with customising forums. It's really difficult to explain XThreads in a simple manner. You can somewhat think of it as a tool to allow admins to perform a higher level of customisation on their forum.
General FAQ
Q: Can We Use MyBB Editor For Our XThreads Textarea?
This is possible if we have one textarea only. So, if our XThreads applications only use one textarea only, and it doesn't use MyBB textarea, we can grab the MyBB editor and attach it to our textarea.
This is not XThreads limitation, but this is MyBB Editor limitation.
To do this:
  • Edit the custom thread field, and set the Use Custom Input HTML setting to Yes.
  • Inside the textarea of the Input Field HTML setting, by default, there is a code like this:

    HTML Code

    Assign an ID for the textarea, and name it as message:

    HTML Code

  • Open up template_prefix_newthread/template_prefix_editpost_first template, depends on what template prefix we use for the forum, and find the default MyBB message textarea there:

    HTML Code
    <textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>

    Remove or rename the ID's name, then hide it.
    The result is something like this:

    If we have more than one textarea, we need an editor that supports more than one textarea in one page, like CKEditor, TinyMCE and etc.

Q: How displaying the value of a custom thread field?
You need to make changes to the relevant templates. Use {$GLOBALS['threadfields']['key']} in templates to reference that field. For example, if the Key of the custom thread field is myfield, then you need to use {$GLOBALS['threadfields']['myfield']} in templates to reference that field. This is slightly different for file inputs type.
  • For displaying it in each thread on the threadlist, generally, you need to edit your forumdisplay_thread template.
  • For displaying it on your showthread page, generally, you need to edit your showthread/postbit/postbit_classic template.
  • For displaying it on your search results page, generally, you need to edit your search_results_threads_thread template.
  • For displaying it on your portal announcements page, generally, you need to edit your portal_announcement template.
Q: How editing a custom thread field?
Go to your AdminCP -> Configuration -> Custom Thread Fields.
Clicking the title of the custom thread field you want to edit will lead you to the edit page.
Q: How creating a custom thread field?
After installing and activating XThreads, go to your AdminCP -> Configuration -> Custom Thread Fields -> Add Thread Field.
You can read the description of each settings for more info about it.

Search this Forum:
Forum Jump: