vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
vBSEO Total Support Team Launches DeskPro New vBSEO Discount Level for Network Builders 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

Regarding sitemaps and its addons

This is a discussion on Regarding sitemaps and its addons within the General Discussion forums, part of the vBSEO Google/Yahoo Sitemap category; hello.. I have created a custom addon to extract dynamic urls from a mod of mine. Its working fine, but ...

Go Back   vBulletin SEO Forums > vBSEO Google/Yahoo Sitemap > General Discussion

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools
  #1  
Old 09-15-2008, 06:14 AM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
Regarding sitemaps and its addons

hello..

I have created a custom addon to extract dynamic urls from a mod of mine. Its working fine, but I need to add more URL's to it. Here is the code.


PHP Code:
$lnkg $db->query_read("SELECT * FROM " TABLE_PREFIX "mytable");
    while (
$lnk $db->fetch_array($lnkg))
    {
        
$url $vbseo_vars['bburl'].'/mypage.php?do=this&uid='.$lnk['uid'];
        if(
VBSEO_ON)
            
$url vbseo_any_url($url);
          
vbseo_add_url($url1.0'''yearly');
    } 
What I don't understand is how to add more than 1 URL that are generated from the same query.

1. As in above, mypage.php?do=this&uid=XX is added BUT how to add more URL's like mypage.php?do=that&uid=XX and so on from the same query. Do I need to run the same query again coz I see vbseo_add_url function doesn't accept more than one "url" as argument.

2. Also, may I know how do we extract page URL's ? like I have 11 pages currently showing 8 records each, so how do I extract pages as their page no (id) isn't stored in database.

Thank You
__________________
India talks | Tech Info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #2  
Old 09-15-2008, 12:11 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,638
Hello,

1. You can just add this inside while() loop:
PHP Code:
$url $vbseo_vars['bburl'].'/mypage.php?do=that&uid='.$lnk['uid'];
        if(
VBSEO_ON)
            
$url vbseo_any_url($url);
          
vbseo_add_url($url1.0'''yearly'); 
2. That would depend on specific mod, for instance you might need to get the number of entries in that "category" with sql query, then divide it on page size to get the number of pages.
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #3  
Old 09-15-2008, 01:33 PM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
1. ah thank you, it works !
2. Can you pleasee explain it programmatically ? my mod is simple and has just one table.
This is my query:-

PHP Code:
SELECT FROM " . TABLE_PREFIX . "mytable ORDER BY `uidDESC LIMIT " . ($limitlower - 1) . "$perpage
So this way, i am fetching/limiting 8 records per page. Now what should I do to extract pages ?

thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #4  
Old 09-15-2008, 02:47 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,638
The code would look like:

PHP Code:

$entries_no 
$db->query_first("SELECT * FROM " TABLE_PREFIX "mytable");
$perpage 8;
$pages_no ceil($entries_no $perpage);
    for (
$pg 0$pg $pages_no$pg++)
    {
        
$url $vbseo_vars['bburl'].'/mypage.php?do=this&page='.($pg+1);
        if(
VBSEO_ON)
            
$url vbseo_any_url($url);
          
vbseo_add_url($url1.0'''yearly');
    } 
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #5  
Old 09-15-2008, 06:36 PM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
ohh thank you so so much sir ! It worked great.

btw, I had to use query_read (instead of query_first) and $count = $db->num_rows($entries_no); (for division part) to get it all working.

3. One thing left in my addon is extracting page URL's for Category pages like this and so on. I am not able to understand what and how the query would be run for it.

My category search query is simple:-

PHP Code:
$db->query_read("SELECT * FROM " TABLE_PREFIX "mytable WHERE category = '$category'  LIMIT " . ($limitlower 1) . ", $perpage"); 
and the original URL is links.php?do=search&cat=Chats and Forums&page=2

4. I read somewhere that DISTINCT clause in SQL query isn't much efficient when there are a lot of records to search from. Is there an alternative for it (I found one but it was hard to understand for me).
What can be the alternate query for this:-
PHP Code:
"SELECT DISTINCT category FROM " TABLE_PREFIX "mytable"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #6  
Old 09-15-2008, 07:19 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,638
3. Try this:
PHP Code:
  $lnkg $db->query_read("SELECT * FROM " TABLE_PREFIX "category");  
    while (
$lnk $db->fetch_array($lnkg))
    {
        
$url $vbseo_vars['bburl'].'/links.php?do=search&cat='.$lnk['title'];
.. 
(assuming that 'title' is correct db field name)
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.


Last edited by Oleg Ignatiuk; 09-15-2008 at 07:48 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #7  
Old 09-15-2008, 07:26 PM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
3. But I need to extract page URL's for category pages just like you did in post #4.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #8  
Old 09-15-2008, 07:49 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,638
You will probably have to combine it with code from post #4 and created nested loop.
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #9  
Old 09-16-2008, 03:03 AM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
alright sir, I have it now working PERFECT, its grabbing all the inside category pages now !

PHP Code:
$lnkg $db->query_read("SELECT DISTINCT category FROM " TABLE_PREFIX "mytable");
    while (
$lnk $db->fetch_array($lnkg))
    {
        
$url $vbseo_vars['bburl'].'/links.php?do=search&cat='.$lnk['category'].'&order=desc';
        if(
VBSEO_ON)
        
$url vbseo_any_url($url);
          
vbseo_add_url($url1.0'''yearly');
        
$lnkc $db->query_read("SELECT uid FROM " TABLE_PREFIX "mytable WHERE category ='" $lnk['category'] . "'");
        
$linkcount $db->num_rows($lnkc);
        
$pages_no ceil($linkcount $perpage);
        for (
$pg 1$pg $pages_no$pg++)
        {
            
$url $vbseo_vars['bburl'].'/links.php?do=search&cat='.$lnk['category'].'&order=desc&page='.($pg+1);
            if(
VBSEO_ON)
                
$url vbseo_any_url($url);
              
vbseo_add_url($url1.0'''weekly');
        }
    } 
5. But what I want to know if there is a much efficient way to do the same. Coz there are 20 distinct categories and as the second query is within the while loop, it would run 20 times, right ?

6. Is there a way to see some kind of debug info of addons ? (like query counts etc.)

7. Can you please tell me, how do we convert titles into lowercase and replace blanks with a hyphen -. Just like vBSEO does for every forum, thread, etc. ?

Thank You
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #10  
Old 09-16-2008, 04:46 AM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,638
Hello,

5. You can use a single query to find list of categories and counts:
PHP Code:
  $lnkg $db->query_read("SELECT count(*) as cnt,category FROM " TABLE_PREFIX "mytable GROUP BY category"); 
6. You should calculate this and output it in your add-on code.

7. You can use vBSEO Functions for Extensibility for that (look for vbseo_filter_text($title) function).
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #11  
Old 09-16-2008, 02:39 PM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
5. Awesome
6. Fine
7. Superb

Thank you so much for your help sir. I got my sitemap addon, CRR's and everything working perfect.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #12  
Old 09-16-2008, 03:13 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,638
You are very welcome
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #13  
Old 10-29-2008, 12:24 PM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
hii..

after so many days I noticed a problem in my directory addon for vbseo sitemap. Maybe because I didn't tested it with vbseo turned off.

okay.. my problem is that sitemap produces errors with the original URL's i.e. with vbseo turned OFF (it works perfect with vbseo ON)

I'm getting the following error in sitemap:-

Code:
XML Parsing Error: not well-formed
Location: http://mysite.com/sitemap_1.xml.gz
Line Number 39, Column 54:  <loc>http://mysite.com/links.php?do=review&title=Vinayaks.com&uid=2</loc>
----------------------------------------------------------------------------^
Please tell me whats wrong in the URL.

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #14  
Old 10-29-2008, 02:35 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,638
Hello,

are you using an add-on to include links.php?xx URLs in sitemap?
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #15  
Old 10-29-2008, 02:38 PM
webwizzy's Avatar
Senior Member
 
Real Name: Vinayak
Join Date: Aug 2008
Location: India
Posts: 118
Send a message via Yahoo to webwizzy
Yes sir... I'm using an addon as they are dynamic URL's generated off the database.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
Reply

Tags
addon, sitemap, tech555

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
vBSEO and official AddOns Hoffi General Discussion 4 07-11-2007 05:46 PM
Custom Rewrite Rules for my addons Snitz Custom Rewrite Rules 0 10-17-2006 04:15 PM
Custom Addons Rewrite Amos Troubleshooting 10 10-14-2005 03:53 PM


All times are GMT -4. The time now is 04:58 AM.


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