Thread Rating:
  • 3 Votes - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Gallery
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #31
RE: Gallery
I'd be interested in a gallery plugin!  More details please!  Biggrin

I started using ezGallery before I started using XThreads but I am thinking this gallery plugin is a latest attachments gallery, which would be cool!

[Image: gallery_2_628_39582.jpg]
12-28-2010 09:42 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #32
RE: Gallery
Here you go Rocketfoot Smile

http://www.leefish.nl/mybb/forum-51-page-1.html


[Image: leelink.gif]
MYBB1.6 & XThreads
12-29-2010 12:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #33
RE: Gallery
Cool, thanks!  I will try it out!  Biggrin

[Image: gallery_2_628_39582.jpg]
12-29-2010 12:36 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #34
RE: Gallery
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:

    HTML Code
    <a href="{$forumurl_q}filterxt_prefix=thread_prefix_id">Funny Pictures</a>

    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":

    HTML Code
    <a href="{$forumurl_q}filterxt_prefix=0">Other</a>

    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:
    • Title : Category
    • Key: gal_cat
    • Description: Please select a category for this image.
      Modify it as our needs.
    • Applicable Forums: Select our Images Gallery forum
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Anime
      Games
      Computer
      Funny
      Other

      Modify it as our needs. That is our categories.

    • Editable by / Required Field?: Everyone (required).
    • Display Order: 2
    • Allow Filtering: Yes
  • Then, put this kind of URL in our gal_forumdisplay_threadlist and/or gal_showthread template:

    HTML Code
    <a href="{$forumurl_q}filtertf_gal_cat=Anime">Anime</a>
    <a href="{$forumurl_q}filtertf_gal_cat=Games">Games</a>
    <a href="{$forumurl_q}filtertf_gal_cat=Computer">Computer</a>
    <a href="{$forumurl_q}filtertf_gal_cat=Other">Other</a>

    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:
  • Title : Category
  • Key: gal_cat
  • Description: Please select category for this image. You are allowed to select more than one category.
    Modify it as our needs.
  • Applicable Forums: Select our Images Gallery forum
  • Input Field Type: Checkboxes
  • Values List:

    Code:
    Anime
    Games
    Computer
    Funny
    Other

    Modify it as our needs. That is our categories.

  • Editable by / Required Field?: Everyone (required).
  • Display Order: 2
  • Allow Filtering: Yes
  • Multiple Value Delimiter:

    Code:
    ,&nbsp;

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 Smile

01-24-2011 04:10 AM
Find all posts by this user Quote this message in a reply
x-Treme Offline
Member
***
Posts: 68
Joined: May 2010
Post: #35
RE: Gallery
So everything from the first post is the same and this is just added to it?

Forum Freebies
01-24-2011 10:12 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #36
RE: Gallery
Yes. For example, you can put the category after the {$header} variable in gal_forumdisplay_threadlist and/or gal_showthread template. Just style it. I use the same custom thread fields and forum setting like the first post for the demo. I just style it.

But, maybe you need to update the existing threads so it has a category. If we already have many threads in our images gallery, I think it is better to wait XThreads 1.4 for that, because it is easier later to do that with XThreads 1.4.

Note that the post above is only a basic concept used for some other XThreads example application that use Category. I think it is better to post it like that so we know the basic concept and can learn each other. If later we want to create our own XThreads application and want to use Category for the application, we know how to do that.

01-25-2011 02:48 AM
Find all posts by this user Quote this message in a reply
ReaXion Offline
Junior Member
**
Posts: 7
Joined: Jan 2011
Post: #37
RE: Gallery
RateU,

May I ask how you pulled the image stats out of there that your displaying in the "Image Details" section?

http://www.14.mynie.co.cc/showthread.php?tid=291  Bottom left block. I don't want to copy your html. I'm just curious how you actually pulled the stats like that.
(This post was last modified: 01-25-2011 06:23 AM by ReaXion.)
01-25-2011 06:22 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #38
RE: Gallery
(01-25-2011 06:22 AM)ReaXion Wrote:  May I ask how you pulled the image stats out of there that your displaying in the "Image Details" section?
Of course Smile

XThreads provided the stats. When we create a File Input Type Field, there is a list of variables we can use with the {$GLOBALS['threadfields']['key']['item']}.
   
I just put the variables in gal_showthread template. The Views and Comments is taken from thread views and thread replies. The rating is taken from thread rating.

(This post was last modified: 01-25-2011 06:47 AM by RateU.)
01-25-2011 06:40 AM
Find all posts by this user Quote this message in a reply
ReaXion Offline
Junior Member
**
Posts: 7
Joined: Jan 2011
Post: #39
RE: Gallery
(01-25-2011 06:40 AM)RateU Wrote:  
(01-25-2011 06:22 AM)ReaXion Wrote:  May I ask how you pulled the image stats out of there that your displaying in the "Image Details" section?
Of course Smile

XThreads provided the stats. When we create a File Input Type Field, there is a list of variables we can use with the {$GLOBALS['threadfields']['key']['item']}.

I just put the variables in gal_showthread template. The Views and Comments is taken from thread views and thread replies. The rating is taken from thread rating.

Wow, I'm a moron. I seen that entire block and never gave it my full attention. Thanks for pointing out my stupidity. In the meantime I'll learn to [Image: RTFM.gif]
01-25-2011 07:13 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #40
RE: Gallery
I also always do the stupidity Biggrin

01-25-2011 08:48 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: