Requirement:
XThreads
Based on the Topic Images and Thread Description example application, and the MyBB Downloads Area, we will try to create a very simple Themes Downloads / Portfolio.
Create or edit a forum with these settings:
- Template Prefix:
- Language File Prefix: thdld_
- Enable XThreads' Inline Forum Search: Yes
- Offset forumdisplay {$colspan}: 1
- Custom WOL Text:
- Forum Display:
- New Thread:
- New Reply:
- Show Thread:
Create a Custom Thread Fields with these settings:
AdminCP -> Configuration -> Custom Thread Fields
- Textbox for Short Description:
- Title: Short Description
- Key: thdld_desc
- Applicable Forums: 'select our Themes Downloads forum'
- Editable by / Required Field?: Everyone (required)
- Display Order: 1
- Display Format:
- Hide Input Field: Yes
- Listbox for Color:
- Title: Color
- Key: thdld_color
- Applicable Forums: 'select our Themes Downloads forum'
- Input Field Type: Listbox
- Field Input Width: 10
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Allow Filtering: Yes
- Display Order: 2
- Display Format:
- Hide Input Field: Yes
- Listbox for Style:
- Listbox for Width:
- Title: Width
- Key: thdld_width
- Applicable Forums: 'select our Themes Downloads forum'
- Input Field Type: Listbox
- Field Input Width: 10
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Allow Filtering: Yes
- Display Order: 4
- Display Format:
- Hide Input Field: Yes
- File input field type for File Downloads:
- Title: File
- Key: thdld_file
- Applicable Forums: 'select our Themes Downloads forum'
- Input Field Type: File
- Valid File Extensions: rar|zip|7z
Modify it as our needs.
- Maximum File Size: 1048576
Modify it as our needs. It is a maximum file size (in bytes) that can be uploaded.
- Editable by / Required Field?: Everyone (required)
- Display Order: 5
- Display Format:
- Hide Input Field: Yes
- File input field type for Main Preview:
- Title: Main Preview
- Key: thdld_img1
- Applicable Forums: 'select our Themes Downloads forum'
- Input Field Type: File
- Valid File Extensions: jpg|jpeg|gif|png
- Maximum File Size: 1048576
Modify it as our needs. It is a maximum file size (in bytes) that can be uploaded.
- Editable by / Required Field?: Everyone (required)
- Display Order: 6
- Only Accept Image Files: Yes
- Image Thumbnail Generation: 120x90
- Display Format:
- Hide Input Field: Yes
- File input field type for Index Preview:
- Title: Index Preview
- Key: thdld_img2
- Applicable Forums: 'select our Themes Downloads forum'
- Input Field Type: File
- Valid File Extensions: jpg|jpeg|gif|png
- Maximum File Size: 1048576
Modify it as our needs.
- Editable by / Required Field?: Everyone (required)
- Display Order: 7
- Only Accept Image Files: Yes
- Image Thumbnail Generation: 120x90
- Display Format:
- Hide Input Field: Yes
- File input field type for Forumdisplay Preview:
- Title: Forumdisplay Preview
- Key: thdld_img3
- Applicable Forums: 'select our Themes Downloads forum'
- Input Field Type: File
- Valid File Extensions: jpg|jpeg|gif|png
- Maximum File Size: 1048576
Modify it as our needs.
- Editable by / Required Field?: Everyone (required)
- Display Order: 8
- Only Accept Image Files: Yes
- Image Thumbnail Generation: 120x90
- Display Format:
- Hide Input Field: Yes
- File input field type for Showthread Preview:
- Title: Showthread Preview
- Key: thdld_img4
- Applicable Forums: 'select our Themes Downloads forum'
- Input Field Type: File
- Valid File Extensions: jpg|jpeg|gif|png
- Maximum File Size: 1048576
Modify it as our needs.
- Editable by / Required Field?: Everyone (required)
- Display Order: 9
- Only Accept Image Files: Yes
- Image Thumbnail Generation: 120x90
- Display Format:
- Hide Input Field: Yes
- Multiline Textbox for Installation Instruction:
- Title: Installation Instruction
- Key: thdld_install
- Applicable Forums: 'select our Themes Downloads forum'
- Editable by / Required Field?: Everyone (required)
- Display Parsing: Use MyBB Parser (MyCode)
- MyBB Parser Options: Allow newlines, Filter Badwords, Allow MyCode
- Display Order: 10
- Display Format:
- Hide Input Field: Yes
- Multiline Textbox for License:
- Title: License
- Key: thdld_license
- Applicable Forums: 'select our Themes Downloads forum'
- Editable by / Required Field?: Everyone (required)
- Display Parsing: Use MyBB Parser (MyCode)
- MyBB Parser Options: Allow newlines, Filter Badwords, Allow MyCode
- Display Order: 11
- Display Format:
- Hide Input Field: Yes
Create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:
- thdld_download_postbit_first and thdld_download_postbit_first_classic
This template will be used as License page. This page will be displayed after users click the Download link in the default postbit_first/classic page. In tThe actual download link is in this page.
- thdld_editpost_first
- thdld_forumdisplay_searchforum_inline
- thdld_forumdisplay_thread
- thdld_forumdisplay_threadlist
Can sort by downloads.
- thdld_newthread
- thdld_postbit_first and thdld_postbit_first_classic
Will be used as Default page. The Download link in this page will leads users to the License Page.
- thdld_showthread
- thdld_threadfields_inputrow
Additional Info:
- We use language prefix for this (attached). Upload it to our inc/languages/english folder.
- The templates above based on MyBB 1.6.3 templates.
That's the basic. Just modify it as our needs.
Please tell me if there is something wrong with the code above. I'm still learning.
Screenshot:
1. Newthread / Editpost:
2. Thread List:
3. Showthread:
Default Page and License Page (will be displayed after clicking the Download link in the Default Page).
Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=16
I don't have a stock of themes, so I just put color images there.