Requirement:
XThreads
Update: 23 Oct 2011
Maybe you can modify this example:
Edit/create a forum. XThreads settings:
- Template Prefix: gf_ (Ooops! It is not Guardian Force in FF VIII though )
- Show first post on every showthread page: Yes
- Enable XThreads' Inline Forum Search: Yes
- 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 Garage
- New Thread: Submit A New Vehicle
- New Reply: Commenting <a href="{1}">{2}</a> Vehicle
- Show Thread: Viewing <a href="{1}">{2}</a> Vehicle
Custom Thread Fields Setting:
- Listbox for vehicles details layout:
We will create two thread list layout. So, we need this to get the second layout. The only filtering fields here.
Create a Custom Thread Fields with this settings:
- Title: Browse Vehicle
- Key: gfbv
- Applicable Forums: 'select our garage forum'
- Input Field Type: Listbox
- Field Input Height: 1
- Values List:
- Editable by / Required Field?: Everyone (required)
- Display Order: 1
- Allow Filtering: Yes
- File Input for Vehicle Image:
Create a Custom Thread Fields with this settings:
- Title: Vehicle Image
- Key: gfvimg
- Applicable Forums: 'select our garage forum'
- Input Field Type: File
- Valid File Extensions: gif|png|jpg|jpeg
Modify it as our needs. It is the extensions of image that can be uploaded.
- Maximum File Size: 102400
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: 2
- Only accept uploaded images: Yes
- Image Thumbnail Generation: 80x60|120x90|160x120
Modify it as our needs. Depends on what thumbnails dimension we want to display for the image.
- Textbox for Price:
Create a Custom Thread Fields with this settings:
- Textbox for Odometer:
Create a Custom Thread Fields with this settings:
- Listbox for vehicles color:
Create a Custom Thread Fields with this settings:
- Title: Color
- Key: gfcolor
- Applicable Forums: 'select our garage forum'
- Input Field Type: Listbox
- Field Input Height: 1
- Values List:
Modify it as our needs.
- Editable by / Required Field?: Everyone
- Display Order: 5
Variable in template for displaying this field is: {$GLOBALS['threadfields']['gfcolor']}.
- File Input for additional vehicle image:
Repeat this step as our needs. Use different key. e.g: gfvimg3, gfvimg4 and etc....
Create a Custom Thread Fields with this settings:
- Title: Vehicle Image #2
- Key: gfvimg2
- Applicable Forums: 'select our garage forum'
- Input Field Type: File
- Valid File Extensions: gif|png|jpg|jpeg
Modify it as our needs. It is the extensions of image that can be uploaded.
- Maximum File Size: 102400
Modify it as our needs. It is a maximum file size (in bytes) that can be uploaded.
- Editable by / Required Field?: Everyone
- Only accept uploaded images: Yes
- Image Thumbnail Generation: 160x120
Modify it as our needs. Depends on what thumbnails dimension we want to display for the image.
- Display Format :
Variable in template for displaying this field is: {$GLOBALS['threadfields']['gfvimg2']['value']}. If we repeat this step, we need to change the variable too, and place it in our gf_showthread template.
In this example, we only use two additional vehicle images. So, the variable is: {$GLOBALS['threadfields']['gfvimg2']['value']} and {$GLOBALS['threadfields']['gfvimg3']['value']}.
- File Input for modification image:
Repeat this step as our needs. Use different key. e.g: gfmimg2, gfmimg3 and etc....
Create a Custom Thread Fields with this settings:
- Title: Modification Image #1
- Key: gfmimg1
- Applicable Forums: 'select our garage forum'
- Input Field Type: File
- Valid File Extensions: gif|png|jpg|jpeg
Modify it as our needs. It is the extensions of image that can be uploaded.
- Maximum File Size: 102400
Modify it as our needs. It is a maximum file size (in bytes) that can be uploaded.
- Editable by / Required Field?: Everyone
- Only accept uploaded images: Yes
- Image Thumbnail Generation: 160x120
Modify it as our needs. Depends on what thumbnails dimension we want to display for the image.
- Display Format :
Variable in template for displaying this field is: {$GLOBALS['threadfields']['gfmimg1']['value']}. If we repeat this step, we need to change the variable too, and place it in our gf_showthread template.
In this example, we only use two modification images. So, the variable is: {$GLOBALS['threadfields']['gfmimg1']['value']} and {$GLOBALS['threadfields']['gfmimg2']['value']}.
Now, we need to create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:
- Template Name: gf_forumdisplay_nothreads
- Template Name: gf_forumdisplay_searchforum_inline
- Template Name: gf_forumdisplay_sticky_sep
- Template Name: gf_forumdisplay_thread
- Template Name: gf_forumdisplay_threadlist
- Template Name: gf_forumdisplay_threadlist_rating
- Template Name: gf_forumdisplay_threads_sep
- Template Name: gf_forumdisplay_thread_modbit
- Template Name: gf_forumdisplay_thread_rating
- Template Name: gf_postbit_first
- Template Name: gf_postbit_first_classic
- Template Name: gf_showthread
Well, we are using jQuery tabs here. Not the best jQuery tabs. If you have other jQuery or other javascript framework tabs, use it. Personally, I prefer to use MyBb tabs. But it is a bit hard to control (for me ) If we don't have jQuery yet, we need to download, and upload it to our jscripts folder. Or, we can use google libraries. but if we already have jQuery attached in our forum and "works" in showthread page, remove line #11 - #14. I get this jQuery tabs from this post: http://community.mybb.com/thread-62039.html Funny story....
- Template Name: gf_showthread_noreplies
- Template Name: gf_showthread_ratethread
- Template Name: gf_showthread_search
I've repeated many fields in this example, like in the overview tab and details tab. Just modify it. Template above based on MyBB 1.4 template.
Logs:
05 Oct 2010
Screenshots:
Thread List:
We have "two" thread list layout there
Show thread:
Like I said before, I've repeated many fields here. Just modify it.
Live Demo:
http://xtest.byethost7.com/forumdisplay.php?fid=8 (you can test it here)
http://www.7173mustangs.com/forum-garage