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
This is how I called it from within vbseo_sitemap.php just before vbseo_flush_index();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
PHP Code:if( isset($vbulletin->options['vbpgenable']) )
{
$vbseo_stat['vBPicGallery'] = vbseo_sitemap_vbpicgallery($vbulletin->options['vbpgpopups']);
}







