Requirement:
XThreads
Last Updated:
7 October 2012
We will try to create a very simple Football Fixtures. We will use EPL fixtures only as example fixtures.
Here is a simple example to do that:
Create or edit a forum with these settings:
- Template Prefix: xtff_
- Show first post on every showthread page: Yes
- Settings Overrides:
- Setting: Showthread Options -> Post Layout
Value: horizontal
- Custom WOL Text:
- Forum Display:
- New Thread:
- New Reply:
- Show Thread:
Create a Custom Thread Fields with these settings:
AdminCP -> Configuration -> Custom Thread Fields
- Listbox for Home Team
- Listbox for Away Team
The Value List of this custom thread fields is the same as the custom thread fields above.
- Title: Away Team
- Key: xtff_at
- Applicable Forums: 'select our Football Fixtures forum.'
- Input Field Type: Listbox
- Input Field Type: 2
- Values List:
- Editable by / Required Field?: Everyone (required)
- Allow Filtering: Yes
- Display Format:
- Textbox for Match Day / Date of The Match
- Title: Match Day
- Key: xtff_md
- Applicable Forums: 'select our Football Fixtures forum.'
- Input Field Type: Texbox
- Maximum Text Length: 10
- Field Input Width: 10
- Editable by / Required Field?: Everyone (required)
- Text Mask Filter: Date (mm/dd/yyyy)
- Textbox for Score Home Team (Full Time)
- Title: Score Home Team (FT)
- Key: xtff_hft
- Applicable Forums: 'select our Football Fixtures forum.'
- Input Field Type: Texbox
- Maximum Text Length: 2
- Field Input Width: 2
Max score: 99
- Editable by / Required Field?: Everyone
We make this not a required field, because we should be able to add the next fixtures.
Later, after the game played, we need to edit the thread, and put the result.
- Blank Replacement Value:
- Display Format:
- Text Mask Filter: Digits
- Textbox for Score Away Team (Full Time)
This custom thread fields is very similar like the custom thread fields above.
- Title: Score Away Team (FT)
- Key: xtff_aft
- Applicable Forums: 'select our Football Fixtures forum.'
- Input Field Type: Texbox
- Maximum Text Length: 2
- Field Input Width: 2
- Editable by / Required Field?: Everyone
- Blank Replacement Value:
- Display Format:
- Text Mask Filter: Digits
Create new templates in Global Template:
AdminCP -> Templates & Style -> Templates -> Global Templates
- xtff_editpost_first
- xtff_forumdisplay_thread
- xtff_forumdisplay_threadlist
- xtff_newthread
- xtff_postbit
- xtff_postbit_first
- xtff_postbit_first_posturl
- xtff_postbit_posturl
- xtff_showthread
- xtff_showthread_noreplies
- xtff_threadfields_inputrow
Additional Info:
- We need two images for each clubs, small image (for threadlist) and big image (for showthread).
Example:
1. Club: Liverpool - Small Image: Liverpool.jpg - Big Image: Liverpool_b.jpg
2. Club: Manchester United - Small Image: ManchesterUnited.jpg - Big Image: ManchesterUnited_b.jpg
Upload the images to our images/club_logo folder.
- The example above is a very simple example. It is only for the basic system, like club match history as home/away team and head to head story as home/away team. There are some aspects can be expanded with more custom thread fields, like adding Half Time Score, Season, League, and etc. It will make this forum doesn't have ending story
- We can use MyBB Polling as Users Prediction for each match. Or, use the polling as Users Prediction just for Big Match.
- The templates above based on MyBB 1.6 template.
Please tell me if there is something wrong with the code above. I'm still learning
Screenshots:
Showthread - Threadlist
Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=44
Because I really love football, so, I make it based on the actual fixtures (not finished yet)