Status
Not open for further replies.

Craigr

Customer
Thanks for this great gallery for vBulletin. I have just upgraded to the professional version. :)

I would like to see if possible:
> Recently added comments. At moment i have about 15,000 images in the gallery and it is hard to find if someone has posted a new comment on an image.

> Gallery home page. Rather than have a list of the recent images, how about a layout similar to Photoposts

Latest Images Block
Categories - With stats, such as total images, comments, latest image added
Random Images
Top Viewed images

> In the database table dbtech_gallery_images i have an entry i imported from my own custom gallery called oldviews. This contains the number of views my image had on the old gallery. How would i add this number to the number created by this gallery?

> For large images, how would i stop horizontal scrolling? For example, Viewing Image: Adam Anderson - Special Forces - Roll Of Honour

Sorry for so many queries.
Thanks again, Craig
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Thanks for this great gallery for vBulletin. I have just upgraded to the professional version. :)

I would like to see if possible:
> Recently added comments. At moment i have about 15,000 images in the gallery and it is hard to find if someone has posted a new comment on an image.

> Gallery home page. Rather than have a list of the recent images, how about a layout similar to Photoposts

Latest Images Block
Categories - With stats, such as total images, comments, latest image added
Random Images
Top Viewed images

> In the database table dbtech_gallery_images i have an entry i imported from my own custom gallery called oldviews. This contains the number of views my image had on the old gallery. How would i add this number to the number created by this gallery?

> For large images, how would i stop horizontal scrolling? For example, Viewing Image: Adam Anderson - Special Forces - Roll Of Honour

Sorry for so many queries.
Thanks again, Craig

I'll look at the requests for the next release.

For the database views, you can run a sql query to update them

update dbtech_gallery_images set views = views + oldviews;

not sure what you mean about the horizontal scrolling? You can set the max image width for the style and for your profile. When I view it as a guest it looks right.
 
I'll look at the requests for the next release.

For the database views, you can run a sql query to update them

update dbtech_gallery_images set views = views + oldviews;

not sure what you mean about the horizontal scrolling? You can set the max image width for the style and for your profile. When I view it as a guest it looks right.

Thanks, didn't realize that the views were now included in the dbtech_gallery_images table too now (i had to chance it to INT(10) as it was set to TINYINT(1), i also have a table dbtech_gallery_views can i delete this now.

I see the problem with scrolling, is there any way to set it so people that are registered already you can set it to 800 pixels for width? I changed it via the 'my information' section of the gallery user profile page to 800.
 
Thanks, didn't realize that the views were now included in the dbtech_gallery_images table too now (i had to chance it to INT(10) as it was set to TINYINT(1), i also have a table dbtech_gallery_views can i delete this now.

I see the problem with scrolling, is there any way to set it so people that are registered already you can set it to 800 pixels for width? I changed it via the 'my information' section of the gallery user profile page to 800.

Thanks for catching that, don't know why it's a tinyint. I'll fix it in the next patch.

If you set the dbtech_gallery_max_width stylevar to 800, it will work as if you set everyone's my information. It checks there first then my information and takes the lowest. If my information isn't set then it'll default to the first.

EDIT:
It uses both to track views. The gallery_views table is there so it can keep a unique record of each person that viewed the image. So that kind of needs to stay :)
 
If you set the dbtech_gallery_max_width stylevar to 800, it will work as if you set everyone's my information. It checks there first then my information and takes the lowest. If my information isn't set then it'll default to the first.

Thanks, didn't think to look there. :D
 
Hi Dylan,
Quick question i am trying to create a latest gallery comments box on another page on my site. This is the SQL query i have:
Code:
  $comments = $db->query("
  SELECT *
  FROM " . TABLE_PREFIX . "dbtech_gallery_comments
  ORDER BY date DESC
  LIMIT $limitlower, $perpage");

Obviously it only pulls the information from the comments table. I would also like to pull the information from the image table so i can add a thumbnail and also the usertable so i can get the persons username. How would i go about this as not too sure how to do a join? I a sql join before and my page then took ages to display.

Hope this makes sense. :)

Thanks, Craig
 
PHP:
$comments = $db->query("
    SELECT 
        c.*, 
        u.username, 
        im.imageid, 
        im.instanceid 
    FROM " . TABLE_PREFIX . "dbtech_gallery_comments c 
    LEFT JOIN " . TABLE_PREFIX . "dbtech_gallery_images im ON c.associd = im.imageid 
    LEFT JOIN " . TABLE_PREFIX . "user u ON im.userid = u.userid
    ORDER BY 
        date DESC
    LIMIT 
        $limitlower, $perpage
");

The easiest way to display a thumbnail would be to just called the page that displays it. If you only use one gallery instance you can put the shortname into the string, otherwise you'd need to do another query to get the shortname to use in the link.

dbtgallery.php?do=gallery_image&id=<imageid>&gal=gallery&type=thumb

You could link straight to the image but you would need to pull the code out of a few functions to get that done.
 
PHP:
$comments = $db->query("
    SELECT 
        c.*, 
        u.username, 
        im.imageid, 
        im.instanceid 
    FROM " . TABLE_PREFIX . "dbtech_gallery_comments c 
    LEFT JOIN " . TABLE_PREFIX . "dbtech_gallery_images im ON c.associd = im.imageid 
    LEFT JOIN " . TABLE_PREFIX . "user u ON im.userid = u.userid
    ORDER BY 
        date DESC
    LIMIT 
        $limitlower, $perpage
");

The easiest way to display a thumbnail would be to just called the page that displays it. If you only use one gallery instance you can put the shortname into the string, otherwise you'd need to do another query to get the shortname to use in the link.

dbtgallery.php?do=gallery_image&id=<imageid>&gal=gallery&type=thumb

You could link straight to the image but you would need to pull the code out of a few functions to get that done.

Excellent, thanks a lot. :)

Hopefully one last question, when including the results in the template would i include them like this: {vb:raw c.date} {vb:raw im.imagename} ?
 
Excellent, thanks a lot. :)

Hopefully one last question, when including the results in the template would i include them like this: {vb:raw c.date} {vb:raw im.imagename} ?

You would need to do some work on the php side before you can display the info. You need to do a while loop to fetch the records from the db, then you have to fix things like the date. It needs to be converted from the unix timestamp into a visible date. things like that, will determine what variable you use in the template.
 
For example, if you did something like

PHP:
$comments = $db->query("
    SELECT 
        c.*, 
        u.username, 
        im.imageid, 
        im.title, 
        im.instanceid 
    FROM " . TABLE_PREFIX . "dbtech_gallery_comments c 
    LEFT JOIN " . TABLE_PREFIX . "dbtech_gallery_images im ON c.associd = im.imageid 
    LEFT JOIN " . TABLE_PREFIX . "user u ON im.userid = u.userid
    ORDER BY 
        date DESC
    LIMIT 
        $limitlower, $perpage
");

while($results = $db->fetch_array($comments))
{
$commentdate = vbdate("m-d-Y", $results['date']);

                $templater = vB_Template::create('dbtech_gallery_custom_commens');
                    $templater->register('results'        , $results);
                    $templater->register('commentdate'    , $commentdate);
                $comments .= $templater->render();

}

In the template you would use {vb:raw commentdate} for the date, but for the image title it would be {vb:raw results.title}

Hope that helps explain it a bit
 
For example, if you did something like

PHP:
$comments = $db->query("
    SELECT 
        c.*, 
        u.username, 
        im.imageid, 
        im.title, 
        im.instanceid 
    FROM " . TABLE_PREFIX . "dbtech_gallery_comments c 
    LEFT JOIN " . TABLE_PREFIX . "dbtech_gallery_images im ON c.associd = im.imageid 
    LEFT JOIN " . TABLE_PREFIX . "user u ON im.userid = u.userid
    ORDER BY 
        date DESC
    LIMIT 
        $limitlower, $perpage
");

while($results = $db->fetch_array($comments))
{
$commentdate = vbdate("m-d-Y", $results['date']);

                $templater = vB_Template::create('dbtech_gallery_custom_commens');
                    $templater->register('results'        , $results);
                    $templater->register('commentdate'    , $commentdate);
                $comments .= $templater->render();

}

In the template you would use {vb:raw commentdate} for the date, but for the image title it would be {vb:raw results.title}

Hope that helps explain it a bit

Excellent, thanks. Exactly what i was after. :)
 
Status
Not open for further replies.

Similar threads

  • Locked
  • thread_type.dbtech_ecommerce_suggestion thread_type.dbtech_ecommerce_suggestion
Replies
3
Views
852
  • Locked
  • thread_type.dbtech_ecommerce_suggestion thread_type.dbtech_ecommerce_suggestion
Replies
1
Views
868
  • Locked
  • thread_type.dbtech_ecommerce_suggestion thread_type.dbtech_ecommerce_suggestion
Replies
2
Views
798
  • Locked
  • thread_type.dbtech_ecommerce_suggestion thread_type.dbtech_ecommerce_suggestion
Replies
3
Views
665

Legacy DragonByte Gallery

vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
865
Customer rating
0.00 star(s) 0 ratings
Back
Top