(08-09-2011 07:51 AM)Shemo Wrote: [ -> ]the ability to add more than 1 photo
If what you meant by the "more than 1 photo" is multi uploads, unfortunately, XThreads doesn't have that feature.
But if what you meant is upload unlimited photos one by one (thread by thread), you know that XThreads can do that.
(08-09-2011 07:51 AM)Shemo Wrote: [ -> ]user's to create their own albums
If we have
Template Conditionals or
PHP in Templates / Complex Templates plugin installed on our forum, with some "tricks", maybe we can create a relative very simple user's album.
Assuming we already have the
XThreads Images Gallery example application on our forum:
- Edit gal_forumdisplay_threadlist template:
Find:
Replace it with:
Code:
<if $mybb->user['uid'] == $mybb->input['filterxt_uid'] then>
{$newthread}
</if>
|
The newthread link will be displayed for the album owner only. This will make that page is like a personal page (album).
Maybe we need to change the newthread image by creating a new gal_forumdisplay_newthread template, and specify the new image there.
For example:
gal_forumdisplay_newthread template:
HTML Code
<a href="newthread.php?fid={$fid}"><img src="{$theme['imglangdir']}/upload_photo.gif" alt="Upload a new photo" title="Upload a new photo" /></a>
|
Upload the upload_photo.gif image to our theme's image directory.
We don't need to worry about the multipage pagination and sort-order-datecut form, because XThreads will "capture" the filter automatically if the URL has it.
- Edit gal_showthread template, and place this kind of URL in the template:
HTML Code
<div style="text-align: center;">
<strong><a href="{$forumurl_q}filterxt_uid={$thread['uid']}">View Album</a></strong>
</div>
|
We need the URL to go back to the forumdisplay page, and filter the thread "automatically" by the thread author.
We need it because we will remove the navigation for this forum.
- Create gal_forumdisplay template, copy paste the entire forumdisplay code into the template.
Find:
Replace it with:
HTML Code
<if $mybb->input['filterxt_uid'] || $mybb->usergroup['cancp'] == 1 then>
{$threadslist}
<else>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead">
<strong>{$foruminfo['name']}</strong>
</td>
</tr>
<tr>
<td class="trow1">
There is no images can be displayed. Please specify the User's Album you want to be displayed
</td>
</tr>
</table>
</if>
|
This will make that the page is not like as "general" images gallery. The threads (in this case are the images) won't be displayed if there is no a user id XThreads filtering system supplied by the viewer.
However, the threads will be displayed for Admin, so we can manage all user's images there.
Example for full gal_forumdisplay template, based on the default MyBB 1.6.4 forumdisplay template:
HTML Code
<html>
<head>
<title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
{$headerinclude}
{$rssdiscovery}
<script type="text/javascript">
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
</script>
</head>
<body>
{$header}
{$moderatedby}
{$usersbrowsing}
{$rules}
{$subforums}
<if $mybb->input['filterxt_uid'] || $mybb->usergroup['cancp'] == 1 then>
{$threadslist}
<else>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead">
<strong>{$foruminfo['name']}</strong>
</td>
</tr>
<tr>
<td class="trow1">
There is no images can be displayed. Please specify the user's images you want to be displayed
</td>
</tr>
</table>
</if>
{$footer}
</body>
</html>
|
- Create gal_header template. Copy paste the entire header template into this new template, and remove this code from it:
We need to remove the default navigation because in showthread page, when a user view an image, if the viewer click the default navigation to go back to the forumdisplay page, it will lead to the default forumdisplay URL without filtering.
That's why we need to edit the gal_showthread template, and put the "custom" URL in the template to go back to the forumdisplay page, and get the filtering URL automatically.
However, we've set our gal_forumdisplay page to not displaying threads/images if there is no XThreads user id filtering system supplied in the URL, and displaying the "warning" to them.
If we don't mind about it, we can skip this step, and maybe we don't need to edit the gal_showthread template.
- Put this kind of URL for link to a user's album:
HTML Code
<a href="forumdisplay.php?fid=user_album_forum_id&filterxt_uid=user_id">View This User's Album</a>
|
For example, we can put this URL in member_profile template:
HTML Code
<a href="forumdisplay.php?fid=user_album_forum_id&filterxt_uid={$memprofile['uid']}">View This User's Album</a>
|
If a user click the link, the viewer will view the profile owner's album.
Or this URL in header_welcomeblock_member template:
HTML Code
<a href="forumdisplay.php?fid=user_album_forum_id&filterxt_uid={$mybb->user['uid']}">View My Album</a>
|
If the user click the URL, they will see their album.
Or this URL in postbit_author_user template:
HTML Code
<a href="forumdisplay.php?fid=user_album_forum_id&filterxt_uid={$post['uid']}">View This User Album</a>
|
If the user click the URL, they will see the post author's album.
Change the user_album_forum_id with the forum ID.
- Put this kind of URL for link to create a new thread/upload a new photo in that forum:
HTML Code
<a href="newthread.php?fid=user_album_forum_id">Upload Photo</a>
|
In some area, maybe we need to use conditional for that.
For example, in member_profile template, maybe we can use this code:
Code:
<if $mybb->user['uid'] == $memprofile['uid'] then>
<a href="newthread.php?fid=user_album_forum_id">Upload Photo</a>
</if>
|
This will make the link a bit "private".
Again, change the user_album_forum_id with the forum ID.
That's our relative very simple User's Album
We can use the same "tricks" to create other user's thingy application.
(08-09-2011 07:51 AM)Shemo Wrote: [ -> ]these features found here?
Features? I think Yumi created XThreads not specified for Images Gallery only. So, not all features from a dedicated Images Gallery scripts will be found on XThreads.
But, because Yumi integrated XThreads tightly with MyBB threads, I'm sure we have these "features" by "default":
- Images Rating (thread rating)
- Usergroup permission for rate the photo (rate thread permission)
- Usergroup permission for having User's Album (create a new thread permission)
- Usergroup permission for viewing User's Album (view forum permission)
- Images comments (thread reply)
- Usergroup permission for commenting photo (thread reply permission)
- Usergroup permission for editing comment (edit post permission)
- Delete photo (thread delete)
- Usergroup permission for deleting photo (delete thread permission)
- Edit photo (edit thread)
- Usergroup permission for editing photo (edit thread permission)
- Search photo (search thread - XThreads inline search)
- Search comments (search posts)
- Track views (thread views)
- The number of comments (num replies)
- Comments notify (thread subscribe)
- Approve/Unapprove photo (thread moderating)
- Report photo (thread/post report)
- Report comments (thread/post report)
- end etc............ (quite lazy to write up all MyBB features related to thread and forum).
That's not including the XThreads features. Plus, if we have plugins related to thread/forum that add new features in those areas, it means that we also have that "features" in our Photo Album
The above "features" will be added automatically for each XThreads applications
Hope that can help you.
I've tried to set it up on the demo forum:
http://www.14.mynie.co.cc/forumdisplay.p...http://www.14.mynie.co.cc/forumdisplay.php?fid=17&filt
http://www.14.mynie.co.cc/forumdisplay.p...http://www.14.mynie.co.cc/forumdisplay.php?fid=17&filt
http://www.14.mynie.co.cc/forumdisplay.p...http://www.14.mynie.co.cc/forumdisplay.php?fid=17&filt
http://www.14.mynie.co.cc/forumdisplay.p...http://www.14.mynie.co.cc/forumdisplay.php?fid=17&filt
http://www.14.mynie.co.cc/forumdisplay.p...http://www.14.mynie.co.cc/forumdisplay.php?fid=17&filt
If there is no XThreads user id filtering system supplied on the URL:
http://www.14.mynie.co.cc/forumdisplay.php?fid=17
Example for link on profile:
http://www.14.mynie.co.cc/member.php?act...http://www.14.mynie.co.cc/member.php?action=profile&ui
The gallery is based on the Images Gallery, I've just copied all threads there:
http://www.14.mynie.co.cc/forumdisplay.php?fid=53