Requirement: XThreads
Latest Update: 7 October 2012
We can use XThreads for Contact Us system. We will combine it with
Quick Thread plugin.
Here is a simple example for it:
Custom Thread Fields Setting:
- Textbox for Name:
Create a Custom Thread Fields with this settings:
- Title: Name
- Key: contus_name
- Applicable Forums: 'select a forum that we will apply for this system'
- Input Field Type: Textbox
- Editable by / Required Field?: Everyone (required)
Variable in template for displaying this field is: {$GLOBALS['threadfields']['contus_name']}.
- Textbox for E-Mail:
Create a Custom Thread Fields with this settings:
- Title: E-Mail
- Key: contus_email
- Applicable Forums: 'select a forum above'
- Input Field Type: Textbox
- Editable by / Required Field?: Everyone (required)
- Display Order: 2
- Text Mask Filter: Email address
Variable in template for displaying this field is: {$GLOBALS['threadfields']['contus_email']}.
- Listbox for Category:
Create a Custom Thread Fields with this settings:
- Title: Category
- Key: contus_cat
- Applicable Forums: 'select the forum above'
- Input Field Type: Listbox
- Field Input Height: 1
- Values List:
Modify it as our needs.
- Editable by / Required Field?: Everyone (required)
- Display Order: 3
- Allow Filtering: Yes
We put the filtering url manually in template:
Template #4 - contus_forumdisplay_inlinemoderation_col - line #18 - #20
So, if we want to modify the value lists, we need to modify those templates too.
- Multiline Textbox for Message:
Create a Custom Thread Fields with this settings:
- Title: Message
- Key: contus_msg
- Applicable Forums: 'select a forum above'
- Input Field Type: Multiline Textbox
- Field Input Width: 62
Modify it as our needs. This is the width of the textarea.
- Editable by / Required Field?: Everyone (required)
- Display Parsing: Plain text with new lines
- Display Order: 4
Variable in template for displaying this field is: {$GLOBALS['threadfields']['contus_msg']}.
- Listbox for Status:
Create a Custom Thread Fields with this settings:
- Title: Status
- Key: contus_status
- Applicable Forums: 'select the forum above'
- Input Field Type: Listbox
- Field Input Height: 1
- Values List:
Modify it as our needs.
- Editable by / Required Field?: Everyone
- Display Order: 5
- Allow Filtering: Yes
We put the filtering url manually in template:
Template #4 - contus_forumdisplay_inlinemoderation_col - line #11 - #13
So, if we want to modify the value lists, we need to modify those templates too.
- Default Value: New
- Display Format:
- Hide Input Field: Yes
We put this input field manually in our templates:
Template #1 - contus_editpost_first - line#23
Edit the selected forum with this XThreads Options settings:
- Template Prefix:
- Language File Prefix: contus_
- Show first post on every showthread page: Yes
- Hide Forum: Yes
We need to put this forum url manually in our templates (e.g: header template). Or, we can put this forum url in Contact Us Link under Admin CP -> Configuration -> Settings -> General Configuration -> Contact Us Link.
- Allow Blank Post Message: Yes
- Settings Overrides:
- Setting: Showthread Options -> Post Layout
Value: horizontal
- Default Thread Filter:
- Field: contus_status
- Value: New
- Custom WOL Text:
- Forum Display: Contact Us
- New Thread: Using Contact Us Form
Then, we need this additional settings for that forum:
- Moderation Options: Yes, moderate new threads
- Forum Permissions:
Don't use these settings for Administrator or user group which can manage the submitted forms (Unapproved Threads).
Basically, we need these settings for Guest user group, so they can use the form.
If we want registered user group has an ability to use this form, we need to set their permission like this too.
Use these forum permissions settings for each user group which is allowed to use the Contact Us form. Only thick these options:
- Use custom permissions (below)
- Can view forum?
- Can post threads?
Now, we need to create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:
- Template Name: contus_editpost_first
- Template Name: contus_forumdisplay
- Template Name: contus_forumdisplay_inlinemoderation
For 1.4:
For 1.6:
- Template Name: contus_forumdisplay_inlinemoderation_col
- Template Name: contus_forumdisplay_nothreads
- Template Name: contus_forumdisplay_quick_thread
- Template Name: contus_admin_forumdisplay_quick_thread
- Template Name: contus_forumdisplay_thread
- Template Name: contus_forumdisplay_threadlist
- Template Name: contus_newthread
- Template Name: contus_postbit_first
- Template Name: contus_post_captcha
- Template Name: contus_threadfields_inputrow
We can do anything with the submitted form (unapproved thread) in this forum, like edit, delete, change their status, edit their category and etc. But please, don't ever to approve it. If we approve a thread in this forum id, the thread will be shown in the thread list, below the contact us form. And because XThreads tightly integrated to MyBB, we have a full control for it, like adding field to the form, removing some fields, editing some field in our contact us form, using MyBB forum permissions, managing the submitted form (the unapproved threads) and etc. Yeah, Yumi does a lot of magics to XThreads.
Edit Log:
15 September 2010 -
11 February 2011 -
19 March 2011 -
21 July 2011
Screenshoots:
1. Here is our contact us form. And this is how the thread list layout should be viewed by Guest or other user group which has access to the form.
2. XThreads and MyBB validation error. Of course.
3. We still have the built in MyBB preview thread function.
4. This is how the layout for Admin. With this way we have an ability to manage the submitted form (unapproved threads)
5. Editing the thread will give us an access to an hidden thread fields. In the example above, Status. The field can be accessed from editing page only. It will make us easier to track whether the submitted form already responded - Confirmed, or not responded yet - New, or even a spam - Ignored. We already have a filtering url for this in thread list.
Like said before, the only thing that we can't do in this forum is approving a thread.
6. Postbit. Yeah, standard postbit. We use it only to read the submitted form / thread contents.
Additional Info:
We use language file prefix for redirect message (attached). Upload it to our
inc/languages/english/ folder or edit/modify it, and upload it to our language folder.
Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=26
You can try the Contact Us form there. Just use a fake name and a fake e-mail address.
That is a forum in a free host and free domain. Please forgive me if the forum down for an hour, even all a day.