Results 1 to 4 of 4

Problem with vBSEO Sitemap 3.0 and vBGallery add-on

This is a discussion on Problem with vBSEO Sitemap 3.0 and vBGallery add-on within the Troubleshooting forums, part of the vBSEO Google/Yahoo Sitemap category; Originally Posted by tavenger5 The addon for vbGallery in the new package does not work correctly. The variable for gallery_url ...

  1. #1
    Member PossumX's Avatar
    Real Name
    Possum
    Join Date
    Oct 2007
    Location
    CT
    Posts
    41
    Liked
    2 times

    Problem with vBSEO Sitemap 3.0 and vBGallery add-on

    Quote Originally Posted by tavenger5 View Post
    The addon for vbGallery in the new package does not work correctly. The variable for gallery_url is gone which breaks the url completely for browseimages.php and the other showimage.php url's are wrong. The old vbseo_sm_vbgallery.php works fine.
    I edited vbseo_sm_vbagallery.php, in the addons directory, in order to get the URL paths to be correct in the sitemap addon, and that worked for the addon_sitemap generation (I do think the gallery_url variable would be the right way for this to work, as editing the file manually for the paths could be confusing for some)

    The red text in the below shows how I had to edit the file to make the addon sitemap URLs valid for my site.

    Code:
    $url = $gallery_url.'/vBforum/gallery/browseimages.php?c='.$mod['catid'];
    $url = $vbseo_vars['bburl'].'/gallery/showimage.php?i='.$mod['imageid'];
    $url = $vbseo_vars['bburl'].'/gallery/showimage.php?i='.$mod['imageid'].'&original=1';
    My problem, now, is that Google keeps stating that this sitemap is a problem:

    Code:
     We  encountered an error while trying to access your Sitemap. Please ensure  your Sitemap follows our guidelines and can be accessed at the location you provided and then resubmit.
    Yet, the sitemap component is completely visible, readable, with valid URL links in the format. Any ideas why Google is being finicky about this? I'll give it a couple of days, as all the other sitemap components are downloaded and read fine, it's just this addon, since I included the vBGallery URLs.

    Link to sitemap in question: sitemap_addon1.xml.gz <-This is now reflective of the below posted information.
    NBSSportfishing.com Sportfishing Forums | Saltwater Fishing

  2. #2
    Member PossumX's Avatar
    Real Name
    Possum
    Join Date
    Oct 2007
    Location
    CT
    Posts
    41
    Liked
    2 times
    OK, nevermind, the above interprets invalid as well when Google takes the physical URL from the sitemap file.

    The vbseo_sm_vbagallery.php is simply missing the following variable declaration:

    Code:
    $gallery_url = 'http://www.YourSiteDomain-Path.com/gallery';
    ...as well as the 2 .'/showimage.php?i* references need to be adjusted to use the variable as well (however, it is already used for $url = $gallery_url.'/browseimages.php?c='.$mod['catid'];, even though the variable was not declared.

    Here is what my vbseo_sm_vbagallery.php addon file looks like now, and it appears to work properly. Please do correct me if I am wrong. The red represents the addition or replacements I performed.

    Code:
    <?php
    
     /******************************************************************************************
     * vBSEO Google/Bing Sitemap Generator for vBulletin v3.x and 4.x by Crawlability, Inc.    *
     *-----------------------------------------------------------------------------------------*
     *                                                                                         *
     * Copyright © 2010, Crawlability, Inc. All rights reserved.                               *
     * You may not redistribute this file or its derivatives without written permission.       *
     *                                                                                         *
     * Sales Email: sales@crawlability.com                                                     *
     *                                                                                         *
     *-------------------------------------LICENSE AGREEMENT-----------------------------------*
     * 1. You are free to download and install this plugin on any vBulletin forum for which    *
     *    you hold a valid vB license.                                                         *
     * 2. You ARE NOT allowed to REMOVE or MODIFY the copyright text within the .php files     *
     *    themselves.                                                                          *
     * 3. You ARE NOT allowed to DISTRIBUTE the contents of any of the included files.         *
     * 4. You ARE NOT allowed to COPY ANY PARTS of the code and/or use it for distribution.    *
     ******************************************************************************************/
        $gallery_url = 'http://www.nbssportfishing.com/vBforum/gallery';
    
        $mods = $db->query("SELECT catid,title,lastimagedateline FROM " . TABLE_PREFIX . "ppgal_categories ORDER BY `displayorder`");
        while ($mod = $db->fetch_array($mods))
        {    
            $url = $gallery_url.'/browseimages.php?c='.$mod['catid'];
    
            if(VBSEO_ON)
                $url = vbseo_any_url($url);
    
              vbseo_add_url($url, '0.3', $mod['lastimagedateline'], 'daily');
        }
    
        $mods = $db->query_read('SELECT imageid,dateline,originalname FROM ' . TABLE_PREFIX . 'ppgal_images');
        while ($mod = $db->fetch_array($mods))
        {    
            $url = $gallery_url.'/showimage.php?i='.$mod['imageid'];
    
            if(VBSEO_ON)
                $url = vbseo_any_url($url);
              vbseo_add_url($url, '0.4', $mod['dateline'],'daily');
    
            if ($mod['originalname']){
            $url = $gallery_url.'/showimage.php?i='.$mod['imageid'].'&original=1';
    
            if(VBSEO_ON)
                $url = vbseo_any_url($url);
              vbseo_add_url($url, '0.4', $mod['dateline'],'daily');
            }
        }
    ?>
    NBSSportfishing.com Sportfishing Forums | Saltwater Fishing

  3. #3
    Senior Member
    Real Name
    John
    Join Date
    Dec 2005
    Posts
    762
    Liked
    30 times
    I made similar changes with vbseo_sm_vbagallery.php and that fixed my issues with the URL's being incorrect.

  4. #4
    Junior Member
    Real Name
    MrKing
    Join Date
    Dec 2009
    Posts
    5
    Liked
    0 times
    Thankyou Possum working great

Similar Threads

  1. vbgallery installed with vbseo
    By arsenal81 in forum Troubleshooting
    Replies: 1
    Last Post: 06-07-2009, 12:39 PM
  2. بخصوص vbgallery مع ال vbseo
    By faisal saad in forum العربية
    Replies: 1
    Last Post: 01-25-2008, 01:29 AM
  3. VBSEO & VBGallery
    By JohnScott in forum vBSEO Features Archive
    Replies: 2
    Last Post: 06-24-2006, 07:42 PM
  4. vBGallery Problem - Members gallery Links are the same
    By Ace Shattock in forum Troubleshooting
    Replies: 4
    Last Post: 05-10-2006, 07:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •