Requirement: XThreads
Last Update: 18 October 2011
I have an idea using XThreads custom thread fields as plugin settings. This is a simple example plugin that uses XThreads as its setting (attached).
This plugin will display thread title and its preview form selected thread. We need
Thread Tooltip Preview plugin to display the preview, and put this variable in
portal template:
Create a custom thread fields with this setting:
- Title: Display To Portal?
- Key: xtdispportal
- Applicable Forums: select some forums
- Input Field Type: Listbox
- Field Input Height: 1
- Values List :
- Editable by / Required Field? : Administrators
- Allow Filtering: Yes
That is our plugin setting. Basically, we need a setting that we can choose
Yes in a thread that want be displayed in portal. We can set it when creating a new thread or editing an existing threads.
Because this is not a required fields, we will get two option in
new thread or
edit post page:
The (Not set) is the "default value". So, when a regular user create a new thread or edit their thread, this value will be set automatically. Of course they can't change the setting because we already set this custom thread fields permission to Administrators only. And we can give the "power" to some user group like Super Moderator or Moderator to be able to set a thread to be displayed in portal, if there is a good thread from member to display (by editing the thread, select Yes in the setting).
Optional Setting
Do this only if we are allowing Moderators to set a thread to be displayed in portal.
Create Moderator Tools:
Admin CP -> Configuration -> Moderator Tools -> Add New Thread Tool
- Name: Display In Portal
- Name: Display this thread in portal
- Available in forums: Select in which forum we apply the xtdispportal custom thread field. Related to Applicable Forums setting of the custom thread field.
- Modify Custom Thread Field(s):
- Field: xtdispportal
- Value: Yes
With this custom Moderator Tools, we can set a thread to be displayed in portal directly without needed to full edit the thread.
Of course this is for example only. We need to create different settings depends on what settings needed for our plugin.
Update Logs:
19 March 2011