Requirement:
XThreads
Last Edit: 7 October 2012
This is another layout for XThreads YouTube Video Gallery. We will use category for this layout.
Custom Thread Fields Setting:
- Textbox for YouTube Video ID:
Create a Custom Thread Fields with this settings:
- Title: YouTube Video ID / URL
- Key: ytvgalid
- Applicable Forums: 'select a forum that we will apply the this layout'
- Input Field Type: Textbox
- Maximum Text Length: 50
- Field Input Width: 50
- Display Format :
If user fill the field with "watch" video id, the value 1 will be used, the value 2 will be "blank".
If user fill the field with "watch" video url, the value 2 will be used, the value 1 will be "blank".
- Text Mask Filter:
this kind of URL supported (thank you very much, Yumi ):
- Editable by / Required Field?: Everyone (required)
Variable in template for displaying this field is: {$GLOBALS['threadfields']['ytvgalid']}.
- Listbox for Video Category:
Create a Custom Thread Fields with this settings:
- Title: Video Category
- Key: ytvgalcat
- Applicable Forums: 'select the forum above'
- Input Field Type: Listbox
- Field Input Height: 1
- Values List:
Modify it as our needs.
- Editable by / Required Field?: Everyone (required)
- Allow Filtering: Yes
We put the filtering url manually in template. We can find it in:
1. Template #7 - ytvgal_forumdisplay_threadlist - line #7 - #18
2. Template #16 - ytvgal_showthread - line #20 - #31
So, if we want to modify the value lists, we need to modify those templates too.
Edit the selected forum with this XThreads Options settings:
- Template Prefix: ytvgal_
- Thread Grouping: 4
- Show first post on every showthread page: Yes
- Enable XThreads' Inline Forum Search: Yes
- Override Threads Per Page: 20
Modify it as our needs.
- Settings Overrides:
- Setting: Showthread Options -> Post Per Page:
Value: 5
Modify it as our needs.
- Setting: Showthread Options -> Post Layout
Value: horizontal
- Custom WOL Text:
- Forum Display: Viewing <a href="{1}">{2}</a>
- New Thread: Adding New Video
- New Reply: Commenting <a href="{1}">{2}</a> Video
- Show Thread: Watching <a href="{1}">{2}</a> Video
We can set the forum settings like disabling IMG code and etc. Also, we can set the forum permission, which usergroup can post video, commenting and etc.
Now, we need to create new templates in Global Template. Please remember that some images in this example linked from tynipic. If we want to use our own image from our server, we need to edit the images url. We can find it in:
1. Template #7 -
ytvgal_forumdisplay_threadlist - line #7 - #18 - Images for category - 3 images.
2. Template #7 -
ytvgal_forumdisplay_threadlist - line #62 - Image for YouTube Logo - 1 image.
3. Template #16 -
ytvgal_showthread - line #20 - #31 - Images for category - 3 images.
Admin CP -> Templates & Style -> Templates -> Global Templates:
- Template Name: ytvgal_forumdisplay_group_sep
- Template Name: ytvgal_forumdisplay_inlinemoderation_col
- Template Name: ytvgal_forumdisplay_nothreads
- Template Name: ytvgal_forumdisplay_searchforum_inline
- Template Name: ytvgal_forumdisplay_sticky_sep
- Template Name: ytvgal_forumdisplay_thread
- Template Name: ytvgal_forumdisplay_threadlist
- Template Name: ytvgal_forumdisplay_threadlist_rating
- Template Name: ytvgal_forumdisplay_threads_sep
- Template Name: ytvgal_forumdisplay_thread_modbit
- Template Name: ytvgal_forumdisplay_thread_null
- Template Name: ytvgal_forumdisplay_thread_rating
- Template Name: ytvgal_postbit
- Template Name: ytvgal_postbit_first
- Template Name: ytvgal_postbit_iplogged_hiden
- Template Name: ytvgal_showthread
- Template Name: ytvgal_showthread_noreplies
- Template Name: ytvgal_showthread_ratethread
- Template Name: ytvgal_showthread_search
Note:
If we want to add video category in each video thumbnail, we need this modification:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=292&pid=27
Suggested by
Shemo
We will find the screenshot in post above. Thanks, Shemo
Change Logs: 28 Sept 2010
Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=10