This is a simple addition for our images gallery.
We will try to create categories for the images.
To do this, we have two choice:
1. If we use MyBB 1.6, we can use thread prefix for category.
2. We can use XThreads Custom Thread Fields for images category.
1. Using Thread Prefix (MyBB 1.6 only):
- Create a thread prefix for our Images Gallery forum.
Example:
- Prefix: Funny Pictures
- Display Style: Funny Pictures
- Available in forums: Select our Images Gallery forum
- Available to groups: All Groups
- Then, put this kind of URL in our gal_forumdisplay_threadlist and/or gal_showthread template:
Just replace the thread_prefix with the thread prefix id.
Repeat the step above as our needs.
Because we can't force user to select at least one prefix/category, so, maybe we need to put this kind of URL as Non "Category":
This is as "category" for all images that doesn't have a prefix/category.
Additional information about filtering thread by thread prefix can be found here:
http://mybbhacks.zingaburga.com/showthread.php?tid=555
2. Using XThreads Custom Thread Fields:
- Create a custom thread fields with these settings:
- Then, put this kind of URL in our gal_forumdisplay_threadlist and/or gal_showthread template:
Style it as our needs.
The step above, will force user to select a category for each image. Only one category allowed per image.
This is an additional choice if we want user allowed to select more than one category per image (based on the example above):
Create a custom thread fields with these settings:
The URL in
gal_forumdisplay_theadlist and/or
gal_showthread template is the same as the #2 choice.
Because the demo forum uses 1.4, I can't provide an example using Thread Prefix. But it has category using Custom Thread Fields:
http://www.14.mynie.co.cc/forumdisplay.php?fid=53
If we read other XThreads example application that use Category, basically, it has the same "trick" as this "trick". The difference is only the layout in template. So, we can use the same "trick" for our XThreads application if we want to use Category for it.
Please tell me if there is something wrong with the "explanation" above. I'm still learning