Requirement:
XThreads
Latest Edit: 7 October 2012
This idea based on
Forum Blog by Yumi. Thank you very much, Yumi
With XThreads, we can create an article gallery. In this example, we will combine XThreads with
Thread Tooltip Preview by Yumi.
Here is a simple example to do that:
1. This is for article categories. Create a Custom Thread Fields with this settings:
- Title: Category
- Key: atcgal
This is the key. So, the variable will be: {$GLOBALS['threadfields']['atcgal']}
- Description: Choose category for this article (required). You can choose more than one category.
- Applicable Forums: 'select the forum where we will apply this article gallery.
- Input Field Type: Checkboxes
We are allowing user to choose more than one category per article.
- Values List:
Modify it as our needs. These are our categories.
- Editable by / Required Field?: Everyone (required)
It will force every user to select at least one category when they create a thread.
- Display Order: 1
- Allow Filtering: Yes
With this option = Yes, we can filter our articles based on their categories.
- Display Format:
- Multiple Value Delimiter: , (plus one space)
If a user choose more than one category, it will be displayed:
- Formatting Map List:
To display this formatting list, later we need to put {$GLOBALS['threadfields']['atcgal']} variable in our template.
2. Now, XThreads Options in Forum settings (the forum in the settings above):
- Template Prefix: atcgal_
- Show first post on every showthread page: Yes
- Enable XThreads' Inline Forum Search: Yes
- Override Threads Per Page: 2
Modify it as our needs. Threads per page in thread list.
- Settings Overrides:
- Setting: Showthread Options -> Post Per Page:
Value: 4
Modify it as our needs.
- Setting: Showthread Options -> Post Layout
Value: horizontal
This will force horizontal postbit layout when user view all threads in this forum.
As an option, set Default Sort By: Thread creation time.
3. Create new templates in Global Template:
- Template Name: atcgal_forumdisplay_nothreads
- Template Content:
- Template Name: atcgal_forumdisplay_thread
- Template Content:
- Template Name: atcgal_forumdisplay_threadlist
- Template Content:
- Template Name: atcgal_forumdisplay_threadlist_rating
- Template Content:
- Template Name: atcgal_forumdisplay_thread_rating
- Template Content:
- Template Name: atcgal_postbit
- Template Content:
- Template Name: atcgal_postbit_first
- Template Content:
- Template Name: atcgal_showthread
- Template Content:
- Template Name: atcgal_showthread_noreplies
- Template Content:
- Template Name: atcgal_showthread_ratethread
- Template Content:
- Template Name: atcgal_showthread_search
- Template Content:
- Template Name: atcgal_forumdisplay_threads_sep
- Template Content:
- Template Name: atcgal_forumdisplay_sticky_sep
- Template Content:
- Template Name: atcgal_forumdisplay
- Template Content:
Additional Info:
If we want to create an article gallery without the Thread Tooltip Preview plugin, we need another step:
1. Create a Custom Thread Fields with this settings:
- Title: Article Preview
- Key: atcgalprev
This is the key. So, the variable will be: {$GLOBALS['threadfields']['atcgalprev']}
- Description: Type a preview for this article.
- Applicable Forums: 'select the article gallery forum'
- Input Field Type: Multiline Textbox
- Editable by / Required Field?: Everyone (required)
It will force every user to write a preview for their article.
- Display Order: 2
- Display Parsing: Check all of the checkboxes except Allow HTML.
Modify it as our needs.
2. Find this code in
atcgal_forumdisplay_thread template:
Replace with:
Screenshots:
1. User create an article thread:
2. User view the post:
3. Thread List:
I'm sorry for my English
Live Demo: http://www.14.mynie.co.cc/forumdisplay.php?fid=8