IS there anyway i can add this mod to the sitemap index?
Thanks
Mike
Video-Directory Remixed
This is a discussion on Video-Directory Remixed within the General Discussion forums, part of the vBSEO Google/Yahoo Sitemap category; IS there anyway i can add this mod to the sitemap index? Thanks Mike Video-Directory Remixed...
IS there anyway i can add this mod to the sitemap index?
Thanks
Mike
Video-Directory Remixed
Sure. you can use the extra-urls.txt file to manually add urls to the sitemap.
Or, you can make a custom sitemap plugin (or ask the mod author to made one). There are examples in the /addons/ folder. a basic sql query is really all you need to write.
This is a quick and dirty one I made for video directory. The bad part is that the URL's for video directory are pretty search engine friendly (include category titles and video titles in the URL). I got lazy and excluded those, but this will pull all your active categories and videos that have not been reported and include them in your sitemap which is better than nothing I guess. Hope somone with some free time can update this code to include the SEO friendly URL's for video directory.
PHP Code:<?php
$vba_video_url = $vbseo_vars['bburl'];
//pull video categories that are active
$lnkg = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "videocategory WHERE active = 1");
while ($lnk = $db->fetch_array($lnkg))
{
$url = 'video.php?do=viewdetails&categoryid='.$lnk['videocategoryid'];
if(VBSEO_ON)
$url = vbseo_any_url($url);
vbseo_add_url($url, 1.0, $lnk['lastupdated'], 'daily');
}
// pull videos that have not been reported
$lnkg = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "video WHERE reportthreadid = 0");
while ($lnk = $db->fetch_array($lnkg))
{
$url = 'video.php?do=viewdetails&categoryid='.$lnk['videocategoryid'].'&videoid='.$lnk['videoid'];
if(VBSEO_ON)
$url = vbseo_any_url($url);
vbseo_add_url($url, 0.5, $lnk['lastupdated'] ? $lnk['lastupdated'] : $lnk['dateline'], 'weekly');
}
?>
Last edited by WeaponsCache; 10-29-2009 at 03:56 AM.
You should be able to wrap the vbseo_any_url() function about the $url variable. If a CRR is defined, it will pull those style URLs.
see #7:
vBSEO Functions for Extensibility
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
got it, saw that you edited it accordingly. thanks
Last edited by WeaponsCache; 10-29-2009 at 03:57 AM.
wasn't me... lol
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!