Bug Bad Path For Thumbnails When Using Physical Image & A Gallery Path Other Than Forum

Status
Not open for further replies.

bzcomputers

Customer
Bad Path For Thumbnails When Using Physical Image & A Gallery Path Other Than Forum

If you choose a different path option for the Gallery, for instance www.home.com/gallery/, and have thumbnail type set to "Physical Image"
all thumbnail paths are bad.

It will look for them at:

Code:
http://www.home.com/[COLOR="#FF0000"]gallery[/COLOR]/dbtech/gallery/images/upload/1/1/thumb/

instead of the correct path of:

Code:
http://www.home.com/forum/dbtech/gallery/images/upload/1/1/thumb/
 
Sorry about that.
Open dbtech/gallery/includes/class_core.php

Find

PHP:
public static function fetch_thumb_link($imageid)

About 14 lines below that you will see

PHP:
$file_dir = self::fetch_image_path($imageid, 'url');

After that add

PHP:
        if (self::$vbulletin->options['dbtech_gallery_thumb_type'] == 1)
        {
            $file_dir = str_replace(self::$vbulletin->options['dbtech_gallery_urlpath_text'], self::$vbulletin->options['bburl'] . '/', $file_dir);
        }

Let me know if that works. Might take some tweaking to get the right setting depending on the different situations that can be out there. I setup the gallery to run in another folder on here and it had the same problem but works with the fix.

You should end up with something like

PHP:
    public static function fetch_thumb_link($imageid)
    {
        global $stylevar;

        $image_query = self::$vbulletin->db->query_first("
            SELECT 
                dateline, 
                filetype, 
                userid 
            FROM " . TABLE_PREFIX . "dbtech_gallery_images 
            WHERE 
                imageid = " . intval($imageid)
        );

        $file_dir = self::fetch_image_path($imageid, 'url');

        if (self::$vbulletin->options['dbtech_gallery_thumb_type'] == 1)
        {
            $file_dir = str_replace(self::$vbulletin->options['dbtech_gallery_urlpath_text'], self::$vbulletin->options['bburl'] . '/', $file_dir);
        }

...
 
Status
Not open for further replies.

Similar threads

  • Locked
  • thread_type.dbtech_ecommerce_suggestion thread_type.dbtech_ecommerce_suggestion
Replies
1
Views
878

Legacy DragonByte Gallery

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