View Full Version : vBSEO Sitemap Addon
tfw2005
11-11-2010, 06:00 PM
Updated to this:
For each additional instance/addon file you have:
Change - fetch_entry_url
to:
fetch_entry_url2
fetch_entry_url3
fetch_entry_url4
etc. Each file must have it's own named function, or else there are conflicts.
tfw2005
11-19-2010, 01:43 PM
There were some issues with this regarding it being run via scheduled task as opposed to hitting "run generator now" in the vbseo sitemap cp.
If anyone is still interested, post here and I'll try to explain the fix.
Above should work for non-seo dynamics urls tho.
tintin74
12-06-2010, 04:22 AM
Hello, there's no vb 4 / dynamics 2.0 version compatible ?
belcamino
04-20-2011, 02:53 PM
I am using this code for my plugin (FOR VBseo sitemap inclusion of Dynamics URLs)
$datastore_fetch[] = "'adv_dyna_cats'";
The one posted (post 19 throws an error).
When VBSEO generates a site map each day, the urls are not SEO friendly (they are more like post=23 or whatever).
When I manually run the site map generator, the urls are SEO friendly (ie. http://www.puaforums.com/articles/pick-up-artist-articles-1/how-do-i-use-pick-up-lines-to-become-a-pickup-artist-5/)
Any idea why?
PS - it also goes back and cleans up the previously generated sitemaps ?!?!@$@!?
larina
10-30-2011, 03:17 PM
There were some issues with this regarding it being run via scheduled task as opposed to hitting "run generator now" in the vbseo sitemap cp.
If anyone is still interested, post here and I'll try to explain the fix.
Above should work for non-seo dynamics urls tho.
I am very interested, could you explain how to fix this please?
larina
11-01-2011, 09:01 PM
I spent the whole day with searching and testing. I am ALMOST there, could someone help with the rest?
This plugin-code should work with automatic generation daily via vbSeo. And it makes seo-friendly urls, what is working fine for category-links. But the problem I still have with it are the links to an entry.
Here the code:
<?php
if(!defined('VBSEO_SMDIR'))exit;
// replace the URL below with your vBa dyna main folder URL
$vba_dyna_url = 'http://www.domain.com/dynamics/';
$lnkg = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "adv_dyna_categories");
while ($lnkc = $db->fetch_array($lnkg))
{
$url = preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnkc['title'])))))) . '-' . $lnkc['catid'] . '/';
if(VBSEO_ON)
$url = vbseo_any_url($url);
$url = $vba_dyna_url . str_replace($vbseo_vars['bburl'] . '/', '', $url);
vbseo_add_url($url, 1.0, $lnk['lastupdated'], 'daily');
}
$lnkg = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "adv_dyna_entries");
while ($lnk = $db->fetch_array($lnkg))
{
$url = preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnkc['title'])))))) . '-' . $lnk['catid'] . '/' . preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnk['title'])))))) . '-' . $lnk['entryid'] . '/' ;
if(VBSEO_ON)
$url = vbseo_any_url($url);
$url = $vba_dyna_url . str_replace($vbseo_vars['bburl'] . '/', '', $url);
vbseo_add_url($url, 1.0, $lnk['lastupdated'], 'weekly');
}
?>
Where the problem sits I have marked in red in the code. It does find the right catid, but not the cat-titletext. So links to an entry look for example like this at my sitemap:
http://www.feelinggood24.de/rezepte/-46/tomatensalat-mit-joghurtsauce-4/
Marked the error in red, before -46 the category-title should be shown.
That's the only problem in this code, links that just show to a category do work fine, like this for example: http://www.feelinggood24.de/rezepte/hauptgerichte-2/
Here the link to my sitemap directly, everything at the top starting with /rezepte/ is dynamics: http://www.feelinggood24.de/sitemap_addon_1.xml.gz
I can't believe being so far at the solution, but cannot fix the rest :( Is someone out there who could fix that?
larina
larina
11-01-2011, 09:09 PM
ops I forgot to mention ... til the problem is solved I use this sitemap, but for links to entries without spider friendly urls.
Replacing this part in the code:
$url = preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnkc['title'])))))) . '-' . $lnk['catid'] . '/' . preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnk['title'])))))) . '-' . $lnk['entryid'] . '/' ;
with this:
$url = 'showentry.php?e='.$lnk['entryid'] . '&catid='.$lnk['catid'];
makes the sitemap work correctly in the whole, but links to entries are not rewritten to spiderfriendly.
... this just if someone is looking at my sitemap and is wondering.
deathemperor
11-01-2011, 11:30 PM
There were some issues with this regarding it being run via scheduled task as opposed to hitting "run generator now" in the vbseo sitemap cp.
If anyone is still interested, post here and I'll try to explain the fix.
Above should work for non-seo dynamics urls tho.
looking for fixing this issue
plz give us instructions
larina
11-02-2011, 02:56 PM
looking for fixing this issue
plz give us instructions
This would be very very great :) Thousand thanks in advance!!!
larina
11-30-2011, 05:07 PM
I spent the whole day with searching and testing. I am ALMOST there, could someone help with the rest?
This plugin-code should work with automatic generation daily via vbSeo. And it makes seo-friendly urls, what is working fine for category-links. But the problem I still have with it are the links to an entry.
Here the code:
<?php
if(!defined('VBSEO_SMDIR'))exit;
// replace the URL below with your vBa dyna main folder URL
$vba_dyna_url = 'http://www.domain.com/dynamics/';
$lnkg = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "adv_dyna_categories");
while ($lnkc = $db->fetch_array($lnkg))
{
$url = preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnkc['title'])))))) . '-' . $lnkc['catid'] . '/';
if(VBSEO_ON)
$url = vbseo_any_url($url);
$url = $vba_dyna_url . str_replace($vbseo_vars['bburl'] . '/', '', $url);
vbseo_add_url($url, 1.0, $lnk['lastupdated'], 'daily');
}
$lnkg = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "adv_dyna_entries");
while ($lnk = $db->fetch_array($lnkg))
{
$url = preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnkc['title'])))))) . '-' . $lnk['catid'] . '/' . preg_replace('/-+/', '-', str_replace (' ', '-', preg_replace("/[^a-z_0-9 -]/i", '', strtolower(html_entity_decode(trim($lnk['title'])))))) . '-' . $lnk['entryid'] . '/' ;
if(VBSEO_ON)
$url = vbseo_any_url($url);
$url = $vba_dyna_url . str_replace($vbseo_vars['bburl'] . '/', '', $url);
vbseo_add_url($url, 1.0, $lnk['lastupdated'], 'weekly');
}
?>
Where the problem sits I have marked in red in the code. It does find the right catid, but not the cat-titletext. So links to an entry look for example like this at my sitemap:
http://www.feelinggood24.de/rezepte/-46/tomatensalat-mit-joghurtsauce-4/
Marked the error in red, before -46 the category-title should be shown.
That's the only problem in this code, links that just show to a category do work fine, like this for example: http://www.feelinggood24.de/rezepte/hauptgerichte-2/
Here the link to my sitemap directly, everything at the top starting with /rezepte/ is dynamics: http://www.feelinggood24.de/sitemap_addon_1.xml.gz
I can't believe being so far at the solution, but cannot fix the rest :( Is someone out there who could fix that?
larina
Hey friends :)
Is nobody out there, who can fix this little issue???
I am sure many people would be very thankful for a working dynamics sitemap addon which takes the seo-friendly-urls and even does work via vbseo-cronjob.
It works so nice (via cronjob), and it works perfectly for the categories, just the entries-stuff has to be fixed. Someone with php/mysql-knowledge easily should be able to do this?
larina
NJStangers
04-03-2012, 07:29 AM
Old thread revive I know but I'm having an issue adding this to my site....can anyone help?
This is the error I get after following all the steps in the first post and read me file
[addon module] vbseo_sm_dynamics.php [16,344.8Kb mem used] [22,838s (+22,781s)]
Fatal error: Call to undefined function fetch_cat_url() in /home/stangers/public_html/forum/vbseo_sitemap/addons/vbseo_sm_dynamics.php on line 21
Brian
04-09-2012, 02:19 PM
Try looking in the vbseo_sitemap/addons/vbseo_sm_dynamics.php file for all instances of "fetch_cat_url" and replace them with "dyna_fetch_cat_url".
NJStangers
04-09-2012, 02:21 PM
thanks it worked! Anyway to get the Category/SubCategory appended to the article title tags instead of the name of the blog I used?
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.