Results 1 to 6 of 6

vbulletin sitemap.php

This is a discussion on vbulletin sitemap.php within the General Discussion forums, part of the vBulletin SEO Discussion category; Hello, how can I create a sitemap like this one: Web Hatt? - Türkiyenin En Güncel Forumu...

  1. #1
    Senior Member Majora's Avatar
    Real Name
    Matze
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    287
    Liked
    4 times

    vbulletin sitemap.php

    Hello,
    how can I create a sitemap like this one: Web Hatt? - Türkiyenin En Güncel Forumu
    Mehr Besucher für dein Forum: vBulletin SEO Optimierung

  2. #2
    Senior Member Majora's Avatar
    Real Name
    Matze
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    287
    Liked
    4 times
    Okay,
    i have found this hack.

    sitemap.php:

    PHP Code:
    <?php
    $script 
    'sitemap.php';
    $count 100;
    $lastpost true;
    $asc false;


    // ####################### SET PHP ENVIRONMENT ###########################
    error_reporting(E_ALL & ~E_NOTICE);

    // #################### DEFINE IMPORTANT CONSTANTS #######################
    define('SKIP_SESSIONCREATE'1);
    define('DIE_QUIETLY'1);
    define('THIS_SCRIPT''sitemap');

    // ################### PRE-CACHE TEMPLATES AND DATA ######################
    // get special data templates from the datastore
    $phrasegroups = array('forum');
    $specialtemplates = array();

    // pre-cache templates used by specific actions
    $actiontemplates = array();

    // ######################### REQUIRE BACK-END ############################
    require_once('./global.php');

    // #######################################################################
    // ######################## START MAIN SCRIPT ############################
    // #######################################################################

    // We don't want no stinkin' sessionhash
    $vbulletin->session->vars['sessionurl'] =
    $vbulletin->session->vars['sessionurl_q'] =
    $vbulletin->session->vars['sessionurl_js'] =
    $vbulletin->session->vars['sessionhash'] = '';

    $vbulletin->input->clean_array_gpc('r', array(
        
    'offset'  => TYPE_UINT,
    ));

    if(
    $vbulletin->GPC['offset']) $offset=$vbulletin->GPC['offset'];
    else 
    $offset 0;

    // check to see if there is a forum preference

        
    foreach (array_keys($vbulletin->forumcache) AS $forumid)
        {
            
    $forumperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];
            if (
    $forumperms $vbulletin->bf_ugp_forumpermissions['canview']
                AND (
    $forumperms $vbulletin->bf_ugp_forumpermissions['canviewothers'])
                AND ((
    $forumperms $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
                AND 
    verify_forum_password($forumid$vbulletin->forumcache["$forumid"]['password'], false)
            )
            {
                
    $forumchoice[] = $forumid;
            }
        }

        if (!empty(
    $forumchoice))
        {
            
    $forumsql "AND thread.forumid IN(" implode(','$forumchoice) . ")";
        }
        else
        {
            
    $forumsql "";
        }

    if (empty(
    $forumchoice))
    {    
    // no access to view selected forums
        
    exit;
    }

    $threadcount $db->query_first_slave("
        SELECT count(*)    AS totalthreads    
        FROM " 
    TABLE_PREFIX "thread AS thread
        WHERE 1=1
            
    $forumsql
            AND thread.visible = 1
            AND open <> 10
    "
    );
    $totalthreads $threadcount['totalthreads'];

    $threadcache = array();
    // query last threads from visible / chosen forums
    $threads $db->query_read_slave("
        SELECT thread.threadid, thread.title, thread.lastpost        
        FROM " 
    TABLE_PREFIX "thread AS thread
        WHERE 1=1
            
    $forumsql
            AND thread.visible = 1
            AND open <> 10
        ORDER BY " 
    . ($lastpost "thread.lastpost" "thread.dateline") . ($asc?" ASC ":" DESC ") ."
        LIMIT "
    .$offset.",$count
    "
    );
    while (
    $thread $db->fetch_array($threads))
    // fetch the threads
        // remove sessionhash from urls:
        
    $threadcache[] = $thread;
    }

    $output .= $stylevar[htmldoctype];
    $output .= "<html xmlns='http://www.w3.org/1999/xhtml' dir='$stylevar[textdirection]' lang='$stylevar[languagecode]' xml:lang='$stylevar[languagecode]'><head>";
    $output .= "<meta http-equiv='Content-Type' content='text/html; charset=".$stylevar[charset]."' />";
    $output .= "<title>".$vbulletin->options['bbtitle']."</title></head><body>";

    $output .= "\r\n<br/><h1>".$vbphrase['view_full_version'].": <a href='".$vbulletin->options['bburl']."'>".$vbulletin->options['bbtitle']."</a></h1>";
    $output .= "\r\n<br/>".$vbphrase['go_to_page'];
    $page_current=intval($offset/$count)+1;
    $page_max=intval($totalthreads/$count)+1;

    for(
    $i=1;$i<=$page_max;$i++)
    {
        if(
    $i<=20||$i==$page_max||($i>$page_current-5&&$i<$page_current+5)) {
            
    $output .= "<a href='".$script."?offset=".(($i-1)*$count)."'>".$i."</a> ";
        }
    }

    if (!empty(
    $threadcache))
    {
        foreach (
    $threadcache AS $threadnum => $thread)
        {
            
    $output .= "\r\n<br/>&raquo; <a href='"$vbulletin->options['bburl'] . "/showthread.php?t=".$thread['threadid']."'>".$thread['title']."</a>";
        }
    }
    $output .= "</body></html>";

    echo 
    $output;
    ?>
    How can I rewrite the URL's from "showthread.php?t=" to the vbseo URL format:

    Shisha & Wasserpfeifen Forum

    What should I edit in the sitemap.php
    Mehr Besucher für dein Forum: vBulletin SEO Optimierung

  3. #3
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    you need to incorporate the vbseo_any_url() function around your links.

    see: vBSEO Functions for Extensibility for more info.

  4. #4
    Senior Member Majora's Avatar
    Real Name
    Matze
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    287
    Liked
    4 times
    Quote Originally Posted by briansol View Post
    you need to incorporate the vbseo_any_url() function around your links.

    see: vBSEO Functions for Extensibility for more info.
    How do i do this.....?
    Mehr Besucher für dein Forum: vBulletin SEO Optimierung

  5. #5
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,100
    Liked
    622 times
    Blog Entries
    4
    Hello Linh ,

    You need to contact the mod author and ask their asistance.
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  6. #6
    Senior Member Majora's Avatar
    Real Name
    Matze
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    287
    Liked
    4 times
    Simple Sitemap - vBulletin.org Forum

    Yes, and now? How do I rewrite the vbulletin url's to to vbseo url's??
    Mehr Besucher für dein Forum: vBulletin SEO Optimierung

Similar Threads

  1. Replies: 15
    Last Post: 09-18-2010, 04:50 PM
  2. Vbulletin Sitemap Sorunu
    By becerikli in forum Türkçe
    Replies: 1
    Last Post: 03-02-2009, 10:48 AM
  3. vbseo sitemap vbulletin 3.7.0 da çalışmıyor??
    By gulceumit in forum Türkçe
    Replies: 4
    Last Post: 05-15-2008, 07:50 AM
  4. sitemap for Vbulletin Blog
    By Essamz in forum Sitemap Features Archive
    Replies: 2
    Last Post: 10-13-2007, 10:12 AM
  5. Replies: 0
    Last Post: 12-17-2005, 01:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •