Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 can xthreads be used to make an advanced gallery?
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #1
can xthreads be used to make an advanced gallery?
vbgamer's photo gallery plugin is nice, but it lacks the ability to add more than 1 photo and for user's to create their own albums.  he was supposed to make a pro version to include all that but it doesn't appear as though he's done much more with the plugin.

would xthreads be able to have these features found here?

http://www.smfhacks.com/smf-gallery-pro.php

I'd be willing to pay a few bucks to have a gallery with features like that on mybb.
08-09-2011 07:51 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: can xthreads be used to make an advanced gallery?
(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:

    Code:
    {$newthread}

    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:

    Code:
    {$threadslist}

    Replace it with:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <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
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    <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:

    Code:
    <navigation>

    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&amp;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&amp;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&amp;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&amp;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 Biggrin
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............ Zzz (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 Whistle

The above "features" will be added automatically for each XThreads applications Rules

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

(This post was last modified: 08-10-2011 06:49 AM by RateU.)
08-10-2011 06:42 AM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #3
RE: can xthreads be used to make an advanced gallery?
rateu, I'm having a really hard time checking out your demo's because the site is REALLY REALLY slow.  is it possible that you can try the demo on zinga's box?

edit: I was able to check out the demo.  very interesting.  the one thing I was hoping to do would be to upload more than 1 photo at once....I suppose it can be done with the attachments how it is now.  I'll have to add your demo and try it out.

where's the upload_photo.gif image at?
(This post was last modified: 08-10-2011 05:18 PM by Shemo.)
08-10-2011 02:42 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: can xthreads be used to make an advanced gallery?
Just wait for it - it should eventually load.

My Blog
08-10-2011 04:01 PM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #5
RE: can xthreads be used to make an advanced gallery?
(08-10-2011 04:01 PM)ZiNgA BuRgA Wrote:  Just wait for it - it should eventually load.

zinga, is it possible to add more than 1 upload box?

huh, did the mods and it doesn't look much like yours, rateu:
http://andrewshemo.com/testforum/forumdi...http://andrewshemo.com/testforum/forumdisplay.php?fi
(This post was last modified: 08-10-2011 05:33 PM by Shemo.)
08-10-2011 05:17 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: can xthreads be used to make an advanced gallery?
(08-10-2011 05:17 PM)Shemo Wrote:  zinga, is it possible to add more than 1 upload box?
You can have as many as you want.  But it's a fixed amount and you have to code all of them into your templates.

(08-10-2011 05:17 PM)Shemo Wrote:  huh, did the mods and it doesn't look much like yours, rateu:
http://andrewshemo.com/testforum/forumdi...http://andrewshemo.com/testforum/forumdisplay.php?fi
Maybe cause there's no images?

My Blog
08-10-2011 06:55 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #7
RE: can xthreads be used to make an advanced gallery?
(08-10-2011 02:42 PM)Shemo Wrote:  rateu, I'm having a really hard time checking out your demo's because the site is REALLY REALLY slow.
Well, I can't do anything with that.

(08-10-2011 02:42 PM)Shemo Wrote:  where's the upload_photo.gif image at?
In the same folder/dir with the newthread.gif images.

(08-10-2011 05:17 PM)Shemo Wrote:  http://andrewshemo.com/testforum/forumdi...http://andrewshemo.com/testforum/forumdisplay.php?fi
You can't use that default URL. You need to use the XThreads filter URL:
http://andrewshemo.com/testforum/forumdi...http://andrewshemo.com/testforum/forumdisplay.php?fid=3&filt


Edit:
OK, I've set a testing forum here:
http://xtest.byethost7.com
I hope you can access it now Biggrin

The user album:
http://xtest.byethost7.com/forumdisplay.php?fid=3
You can see that we can't view the image using the default URL.
We need to use XThreads filter URL to access it:
http://xtest.byethost7.com/forumdisplay....http://xtest.byethost7.com/forumdisplay.php?fid=3&filt
http://xtest.byethost7.com/forumdisplay....http://xtest.byethost7.com/forumdisplay.php?fid=3&filt
With that way we can make the forum acts like a personal user album, not a global user album.

We can access it by clicking the filter URL.
Example URL in the profile page:
http://xtest.byethost7.com/member.php?ac...http://xtest.byethost7.com/member.php?action=pro
http://xtest.byethost7.com/member.php?ac...http://xtest.byethost7.com/member.php?action=pro
Click the My Album button.
Or, we can put it in postbit:
http://xtest.byethost7.com/showthread.php?tid=5
Click the Album button in the second post (comments).

You can try it there. But you need to register first. Just use a fake email address. The registration is set to Instant Activation.

(This post was last modified: 08-11-2011 07:46 AM by RateU.)
08-11-2011 04:21 AM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #8
RE: can xthreads be used to make an advanced gallery?
loads much quicker now, rateu!

few questions I had while they're fresh in my mind:

1) is it possible for a photo to be added when you reply to your own original post.  for example, since this isn't a pure photo gallery, I was thinking that if a user created a new thread called "guitars" and wanted to keep all their guitar photos within that thread, they could reply to their own thread with a new image.  when checking out your demo board, I did not see the ability to do that; just on the original post.

2) can we enable the breadcrumb and have it point to the newly created URL's that xthreads creates?

3) if it's possible to add more than 1 photo in a thread, can we have the ability to list the amount of photos within an album.  so, rather than it saying comments and views, it would say comments, photos, and views.
(This post was last modified: 08-11-2011 04:29 PM by Shemo.)
08-11-2011 04:27 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #9
RE: can xthreads be used to make an advanced gallery?
(08-11-2011 04:27 PM)Shemo Wrote:  1) is it possible for a photo to be added when you reply to your own original post.  for example, since this isn't a pure photo gallery, I was thinking that if a user created a new thread called "guitars" and wanted to keep all their guitar photos within that thread, they could reply to their own thread with a new image.  when checking out your demo board, I did not see the ability to do that; just on the original post.
I think you need to rethink your design.  The above suggestion simply wouldn't work.
If you want "sub-albums", it may be possible to some extent with filters, but they would have to be either fixed across everyone (same categories for everyone) or users could specify their own categories, but there's no default functionality to show all the categories they've created.

(08-11-2011 04:27 PM)Shemo Wrote:  2) can we enable the breadcrumb and have it point to the newly created URL's that xthreads creates?
XThreads won't add filtered arguments to the breadcrumb.  You can make a custom breadcrumb template however, which achieves that.

My Blog
08-11-2011 05:04 PM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #10
RE: can xthreads be used to make an advanced gallery?
(08-11-2011 05:04 PM)ZiNgA BuRgA Wrote:  
(08-11-2011 04:27 PM)Shemo Wrote:  1) is it possible for a photo to be added when you reply to your own original post.  for example, since this isn't a pure photo gallery, I was thinking that if a user created a new thread called "guitars" and wanted to keep all their guitar photos within that thread, they could reply to their own thread with a new image.  when checking out your demo board, I did not see the ability to do that; just on the original post.
I think you need to rethink your design.  The above suggestion simply wouldn't work.
If you want "sub-albums", it may be possible to some extent with filters, but they would have to be either fixed across everyone (same categories for everyone) or users could specify their own categories, but there's no default functionality to show all the categories they've created.

(08-11-2011 04:27 PM)Shemo Wrote:  2) can we enable the breadcrumb and have it point to the newly created URL's that xthreads creates?
XThreads won't add filtered arguments to the breadcrumb.  You can make a custom breadcrumb template however, which achieves that.

I guess that's why I wasn't sure if xthreads would be able to accomplish what I was fully looking for.  maybe rateu can pull some magic out of his bag and amaze us both, again....

I wish vbgamer would code his pro gallery because I'd be willing to pay for it.

zinga, have you thought about building a photo gallery plugin and maybe charging a few bucks for it?
08-11-2011 06:46 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: