vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
New vBSEO Discount Level for Network Builders Meet vBSEO Team in New York (Nov. 3rd & 4th) vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

Sitemap Function to Map vBPicGallery

This is a discussion on Sitemap Function to Map vBPicGallery within the Feature Requests forums, part of the vBSEO Google/Yahoo Sitemap category; I'm posting the code I am using currently to write my vBPicGallery URLs to vBSEO Sitemaps. This function was coded ...

Go Back   vBulletin SEO Forums > vBSEO Google/Yahoo Sitemap > Feature Requests

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-02-2006, 02:15 PM
Member
 
Join Date: Nov 2005
Posts: 83
Sitemap Function to Map vBPicGallery

I'm posting the code I am using currently to write my vBPicGallery URLs to vBSEO Sitemaps. This function was coded a long time ago, I can't even remember when. The file version of the sitemaps I am using is for 3.x.x, I have no idea which one.

I had customized the vBSEO sitemaps hack to put my sitemaps in the ROOT folder of my sites so I didn't have to use the rewrite rule. I was back then appling any updates to the vBSEO sitemaps hack by hand to stay current. At some point I stopped updating however, so I have no idea how old this code is. No, my root folder was not writable to do this.

Anyway, I'm installing vBSEO now and rather then have something different, I'm installing vBSEO sitemaps by the book. That however caused me to think of two necessities.

First, of course I want my vBPicGallery pages in the sitemaps. But...

Second, I'd like to have my vBPicGallery URLs rewritten.

So, I'd like to work with someone on getting rules and options in vBSEO for vBPicGallery. So, I'm posting the code I currently use for getting vBPicGallery URLs in the vBSEO sitemaps.

Of course it's old, but it works, however I dunno if it will fit in the current version of sitemaps. I have not read the code yet, I figured a cooperative effort would better serve everyone. As I always say, there's more then one way to skin a cat, so this posted code is a suggestion and reference point to get the ball rolling. My goal is to get this plan implemented before I install vBSEO so I can do it all as a package deal.

Thanks for everyones help and consideration.

Function added to vbseo_sitemap_functions.php
PHP Code:
// vBPicGallery Hack
       
function vbseo_sitemap_vbpicgallery($do_pics true)
       {
           global 
$db$vboptions;

           
vbseo_log_entry("[SECTION START] vBPicGallery"true);

           
$added_urls 0;
          
        
// Halls/Members
        
$getmembers $db->query("
              SELECT DISTINCT userid,lastactivity
              FROM " 
TABLE_PREFIX "vbpicgallery_users
          "
);
          
          while (
$member $db->fetch_array($getmembers))
          {
              
vbseo_log_entry("[vBPicGallery] userid: $member[userid]");
          
              
$added_urls++;
              
vbseo_add_url(
                  
$vboptions['bburl'].'/vbpicgallery.php?do=hall&u='.$member[userid],
                   
$vboptions['vbseo_sm_priority_m'],
                  
$member[lastactivity],
                
$vboptions['vbseo_sm_freq_m']
              );
          }
          
$db->free_result($getmembers);
          
        
// Galleries
        
$getmembers $db->query("
              SELECT vbpicgalleryid,lastactivity
              FROM " 
TABLE_PREFIX "vbpicgallery_users
          "
);
          
          while (
$member $db->fetch_array($getmembers))
          {
              
vbseo_log_entry("[vBPicGallery] galleryid: $member[vbpicgalleryid]");
          
              
$added_urls++;
              
vbseo_add_url(
                  
$vboptions['bburl'].'/vbpicgallery.php?do=view&g='.$member[vbpicgalleryid],
                   
$vboptions['vbseo_sm_priority_m'],
                  
$member[lastactivity],
                
$vboptions['vbseo_sm_freq_m']
              );
          }
          
$db->free_result($getmembers);        

        
// Pictures
        
if( $do_pics )
        {
            
$getmembers $db->query("
                  SELECT vbpicgalleryid,u_date
                  FROM " 
TABLE_PREFIX "vbpicgallery_images
              "
);
          
              while (
$member $db->fetch_array($getmembers))
              {
                  
vbseo_log_entry("[vBPicGallery] pictureid: $member[vbpicgalleryid]");
          
                  
$added_urls++;
                  
vbseo_add_url(
                      
$vboptions['bburl'].'/vbpicgallery.php?do=big&p='.$member[vbpicgalleryid],
                       
$vboptions['vbseo_sm_priority_m'],
                      
$member[u_date],
                    
$vboptions['vbseo_sm_freq_m']
                  );
              }
              
$db->free_result($getmembers);                
        }
        return 
$added_urls;
       }
// vBPicGallery Hack 
This is how I called it from within vbseo_sitemap.php just before vbseo_flush_index();
PHP Code:
if( isset($vbulletin->options['vbpgenable']) )
{
    
$vbseo_stat['vBPicGallery'] = vbseo_sitemap_vbpicgallery($vbulletin->options['vbpgpopups']);

__________________
Check out vBPicGallery the Photo Gallery for vBulletin.
Talk about motorcycles with bikers around the world.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 11-02-2006, 06:07 PM
Member
 
Join Date: Nov 2005
Posts: 83
Thanks to BamaStangGuy and Keith Cohen, I see where I need to go and get this done as a simple add on option for vBPicGallery.

Appreciate the help guys!

Last edited by noppid; 11-03-2006 at 02:37 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Forum Site Map vs General Sitemap Lonny General Discussion 3 04-19-2006 01:00 PM
Memory Problem: TraumTeam Troubleshooting 1 04-06-2006 09:24 AM
Site map doesnt respond when clicking Run Sitemap Generator NICEGUY77 Troubleshooting 3 03-23-2006 08:43 PM
vBSEO Google/Yahoo Sitemap Generator for vBulletin 3.6.x, vBulletin 3.5.x & vBulletin 3.0.x Joe Ward General Discussion 0 12-17-2005 02:11 PM


All times are GMT -4. The time now is 07:29 AM.


Powered by vBulletin Version 3.8.0 Beta 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.