1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

vbsitemap version 0.1 for google sitemaps

Discussion in 'Google Sitemaps' started by kalius, Jun 4, 2005.

  1. #1
    GET Latest Version Below ( 0.3)

    This php script will generate a url list (in a text file) of a vb forum, that you can feed to the google sitemap creator.

    It currently list all forums and all treads urls + the base url of the site and base url of the forum.

    All the variables needed are explained on the file.

    Next version will hopefuly add an url to the file everytime a thread is created.
    Also I plan to make it generate itself the goole sitemap file.

    Suggest any other improvements.

    Let me know if somebody uses it, and how it works.
    Tested on vb version 3.0.7.

    Is you use it and make improvements share them!!

    First atachment is the php file, the second is an example of the generated file


    P.S. It just reads from the database but I'm not responsable for anything and its provided as it is.
     

    Attached Files:

    kalius, Jun 4, 2005 IP
    dct and Infiniterb like this.
  2. AfterHim.com

    AfterHim.com Peon

    Messages:
    1,923
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That is a great resource!

    I don't run vbulletin, but if you want to create one for php-nuke, that would be great ;)
     
    AfterHim.com, Jun 4, 2005 IP
  3. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #3
    Looks good. Just ran it.

    Was wondering if there was also a way to get the vb archive included into this list?

    Thanks.
     
    Infiniterb, Jun 4, 2005 IP
  4. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'll look into the archive part, It shouldn't be too complicated.

    Afterhim.com: I don't know anything about php-nuke, can't help with that one.
     
    kalius, Jun 4, 2005 IP
  5. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #5
    Nice tool. Good job.
     
    noppid, Jun 4, 2005 IP
  6. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks noppid.

    For the ones that have or will run it:

    Is all the variables easy to understand?
     
    kalius, Jun 4, 2005 IP
  7. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #7
    I can read the code handily. Even with no comments. It was understandable too.

    One worry is scalability in that query. That may need addressing for larger forums.
     
    noppid, Jun 4, 2005 IP
  8. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks noppid I know that, I will look into that later, after the auto add when a new tread is created is done.

    I'm really just a php noob, The only other script I have done is this
    golf shop, Its just a datafeed script with reviews that works with all(or most) shareasele datafeeds.(the layout sucks need to work on that soon)
     
    kalius, Jun 4, 2005 IP
  9. sarahk

    sarahk iTamer Staff

    Messages:
    28,641
    Likes Received:
    4,486
    Best Answers:
    123
    Trophy Points:
    665
    #9
    I've got a site I work with that just has the forum so I changed your code to this version... and I call includes/config.php to get the database info.

    It needs a clean up to check the variables and it doesn't handle the forum index pages (I took that out, need to add it back in) but will assist Google in getting round the site.

    change line 101 to
    $url = $base."showthread.php?".$threadq.$row[0];


    See it in action at: http://www.assetmagazine.co.nz/vbsitemap-02.php

    Sarah
     

    Attached Files:

    sarahk, Jun 4, 2005 IP
    kalius and Infiniterb like this.
  10. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #10
    Still good work. You'll build it into a great tool I'm sure. These things are never done. ;)
     
    noppid, Jun 4, 2005 IP
  11. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Great sarahk k

    Here is version 0.3.
    Changelog:

    Merged Sarahk changes more cleanly with the old code.
    Added the functionality sarahk removed on her version with improvements.
    Fixed an error on Sarahk version.
    Result is a valid Sitemap xml file (thanks Sarahk!!!)
    Result file is now a GZ file, No more need for Googles Python Script. (no ping feature yet, add the sitemap manaually to google sitemaps).

    Working version:
    here

    Thanks for the reputation guys/girls.
     

    Attached Files:

    kalius, Jun 4, 2005 IP
    sarahk and mcncyo like this.
  12. vauge

    vauge Well-Known Member

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    138
    #12
    Question,

    
    <url>
    <loc>http://www.aeforums.net/forum/forumdisplay.php?f=84</loc>
    <lastmod>[B]1969-12-31T14:58:58Z[/B]</lastmod>
    <changefreq>changefreq=daily</changefreq>
    <priority>priority=0.8</priority>
    </url>
    
    Code (markup):
    lastmod date is 1969, but changefreq is daily - would this confuse google?
     
    vauge, Jun 4, 2005 IP
  13. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #13
    Nice to see other people wrapping their heads around this one. Hopefully it'll work its way into a nice sitemap hack that can be shared at www.vbulletin.org.
     
    Infiniterb, Jun 4, 2005 IP
  14. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Infiniterb I will post it there soon, It looks like its getting to be way more that the original plan.
     
    kalius, Jun 4, 2005 IP
  15. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #15
    If I understand this correctly:

    $fchange ='daily' ;
    $tchange ='weekly';

    The code is saying that the fourm display is changing daily, while the show thread is changed weekly.

    Is this correct or am I missing something?
     
    Infiniterb, Jun 4, 2005 IP
  16. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Thanks fixing.....
    Sarahk: Last post is the last post ID not the time.

    Some dates (the base and forum home) are generated from the servers current time.. I guess my host don't have the time right
     
    kalius, Jun 4, 2005 IP
  17. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #17
    kinda:
    Each forum changes daily, each tread changes weekly is what it says.

    Those are variables, they are examples, you can change them to whatever you want withing the google sitemap rules.
     
    kalius, Jun 4, 2005 IP
  18. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #18
    The last attachement 0.3 has all the fixes now that vauge catched. Thanks.
     
    kalius, Jun 4, 2005 IP
  19. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #19
    Here's something that may need to be considered for those with large forums (I have one with over 1 million threads):

     
    Infiniterb, Jun 4, 2005 IP
  20. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Infiniterb: I Know right now it's not very functional for people with large forums, but I'm planning on working on it. Sorry i'm not a php guru so I'm a little slow.
    I posted it here this morning to share something back to the DP community that has taught me a lot of stuff.
     
    kalius, Jun 4, 2005 IP