Requirement:
XThreads
Updated: 7 October 2012
We will try to create a simple trading forum with XThreads.
Here is an example for it:
Edit/create a forum. XThreads settings:
- Template Prefix: trdf_
- Thread Grouping: 2
- Show first post on every showthread page: Yes
- Enable XThreads' Inline Forum Search: Yes
- Settings Overrides:
- Setting: Show Thread Options -> Post Layout
- Value: horizontal
- Allow Blank Post Message: Yes
- Hide Forum: Yes
We need to put this forum url manually in our templates (e.g: header template).
- Custom WOL Text:
- Forum Display: Viewing Trading Forum
- New Thread: Create A New Trade
- New Reply: Responding <a href="{1}">{2}</a> Trade
- Show Thread: Viewing <a href="{1}">{2}</a> Trade
Forum settings:
We will use the forum rules as our Trading Forum "Index" page. Because we can use HTML in the forum rules, so, we can style it with HTML. Just use our creativity for it.
Additional Forum Settings:
- Forum Rules: Display rules for this forum on the thread listing
- Title: Welcome To Our Trading Forum
- Rules: Type whatever we want here.
Custom Thread Fields Setting:
- Listbox for Buy / Sell:
Create a Custom Thread Fields with this settings:
- Title: Need To
- Key: trdftnt
- Applicable Forums: 'select our trading forum'
- Input Field Type: Listbox
- Field Input Width: 10
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Display Order: 1
- Allow Filtering: Yes
- Hide Input Field: Yes
- Listbox for Minimum Or Maximum Value For Price:
Create a Custom Thread Fields with this settings:
- Title: Minimum Or Maximum Value
- Key: trdfminmax
- Applicable Forums: 'select our trading forum'
- Input Field Type: Listbox
- Field Input Width: 15
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Display Order: 2
- Hide Input Field: Yes
- Textbox for Price:
Create a Custom Thread Fields with this settings:
- Title: Price
- Key: trdfprice
- Applicable Forums: 'select our trading forum'
- Field Input Width: 10
- Editable by / Required Field?: Everyone (required)
- Display Order: 3
- Display Format:
- Text Mask Filter:
- Hide Input Field: Yes
Variable in template for displaying this field is: {$GLOBALS['threadfields']['trdfprice']}.
- Listbox for Product Condition:
Create a Custom Thread Fields with this settings:
- Title: Condition
- Key: trdfcond
- Applicable Forums: 'select our trading forum'
- Input Field Type: Listbox
- Field Input Width: 10
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Display Order: 4
- Allow Filtering: Yes
- Hide Input Field: Yes
- Listbox for Trading Status:
Create a Custom Thread Fields with this settings:
- Title: Status
- Key: trdfstatus
- Applicable Forums: 'select our trading forum'
- Input Field Type: Listbox
- Field Input Width: 15
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Display Order: 5
- Allow Filtering: Yes
- Hide Input Field: Yes
- Textbox for quantity of product user wants to sell/buy:
Create a Custom Thread Fields with this settings:
- Title: Quantity
- Key: trdfquantity
- Applicable Forums: 'select our trading forum'
- Maximum Text Length: 3
Max quantity: 999
- Field Input Width: 3
- Editable by / Required Field?: Everyone (required)
- Display Order: 6
- Default Value: 1
- Text Mask Filter:
- Hide Input Field: Yes
Variable in template for displaying this field is: {$GLOBALS['threadfields']['trdfquantity']}.
- Listbox for choosing whether the min/max price is for total or for each, related to the product quantity:
Create a Custom Thread Fields with this settings:
- Title: Each Or Total
- Key: trdfet
- Applicable Forums: 'select our trading forum'
- Input Field Type: Listbox
- Field Input Width: 10
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Display Order: 7
- Hide Input Field: Yes
- Listbox for product category:
Create a Custom Thread Fields with this settings:
- Title: Category
- Key: trdfcat
- Applicable Forums: 'select our trading forum'
- Input Field Type: Listbox
- Field Input Width: 15
Modify it as our needs. Depends on the long of the line in value list.
- Field Input Height: 1
- Values List:
Modify it as our needs.
- Editable by / Required Field?: Everyone (required)
- Display Order: 8
- Allow Filtering: Yes
- Hide Input Field: Yes
- File Input for Product Image:
Create a Custom Thread Fields with this settings:
- Checkboxes for Payment Method:
Create a Custom Thread Fields with this settings:
- Title: Payment Method
- Key: trdfpayment
- Applicable Forums: 'select our trading forum'
- Input Field Type: Checkboxes
- Values List:
Modify it as our needs.
- Editable by / Required Field?: Everyone (required)
- Display Order: 10
- Allow Filtering: Yes
- Multiple Value Delimiter:
- Hide Input Field: Yes
Maybe it is better if we use images....
Now, we need to create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:
- Template Name: trdf_editpost_first
Well, we can see that the title and description for our custom thread fields typed manually in this template. Modify it as our needs.
- Template Name: trdf_forumdisplay
Just removing the rules from this template.
- Template Name: trdf_forumdisplay_group_sep
- Template Name: trdf_forumdisplay_nothreads
- Template Name: trdf_forumdisplay_rules
- Template Name: trdf_forumdisplay_searchforum_inline
I'm not quite sure....
- Template Name: trdf_forumdisplay_sticky_sep
We need that td to bypass the validator
- Template Name: trdf_forumdisplay_thread
Well, we are using image for the Buy/Sell, Status and Condition (line #32 - #34). Modify it as our needs.
- Template Name: trdf_forumdisplay_threadlist
All filtering URL laid here. If we changed the value list, maybe we need to change this template too. And we put the forum rule variable in this template.
- Template Name: trdf_forumdisplay_threadlist_rating
- Template Name: trdf_forumdisplay_threads_sep
We need the td to bypass the validator if there is a global announcement and there is no sticky thread in this forum
- Template Name: trdf_forumdisplay_thread_modbit
- Template Name: trdf_forumdisplay_thread_null
- Template Name: trdf_forumdisplay_thread_rating
- Template Name: trdf_newreply_modoptions
- Template Name: trdf_newthread
Again, we put the title and description for fields manually in this template. If we change the fields, maybe we need to edit this template too.
- Template Name: trdf_postbit
- Template Name: trdf_postbit_first
- Template Name: trdf_postbit_iplogged_hiden
- Template Name: trdf_post_subscription_method
We add additional description here. I'm using View New Subscribed Posts plugin from Yumi. So, maybe some description has a relationship with that plugin (link in header). Modify it as our needs.
- Template Name: trdf_showthread
- Template Name: trdf_showthread_noreplies
- Template Name: trdf_showthread_ratethread
- Template Name: trdf_showthread_search
All templates above based on MyBB 1.4.
Updated: 03 Sept 2010 29 May 2011
Screenshots:
1. New Thread:
2. Show Thread:
3. Thread List:
That is our forum rules
Actual thread (has an active class):
Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=35