Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads vBET5 Test

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: Sitemap Generator integration

  1. #1
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    2,924
    Blog Entries
    1

    Default Sitemap Generator integration

    You can simply integrate vBET with vBSEO Sitemap Generator (it is free) to include links to translated pages into generated sitemap.


    Please note that instructions below will allow you to add into your sitemap links for threads translated pages. Because of performance reason those links will not be translated - there will be only added language code. Google will find real page anyway since you will get 301 redirect. Please note that it is not best approach - Google prefers to have final links in sitemap not redirecting one, but forcing translation of thousands links in all languages in the same time could kill your server or be threated by Google as attack (if links are not cached yet).

    If you have any PHP programming skills you can modify instructions below to support also other parts of sitemap - not only threads URLs. Solution below will add translated links only for first pages of threads.

    Integration instructions:
    You just have to edit one file: vbseo_sitemap_functions.php in vbseo_sitemap directory.

    Find:
    PHP Code:
    vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior"); 
    And place AFTER it...

    For SEO links
    PHP Code:
    //additional code 
    require_once(DIR'/includes/vbenterprisetranslator_functions_vbseo.php');
    $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi'); 
    if(!
    $archived) { 
      
    $strlenhost strlen($vbseo_vars['bburl']."/"); 
      
    $currentthreadurl vbseo_url_thread($threadrow1$archived);
      
    $currentthreadurl_before substr($currentthreadurl,0,$strlenhost);
      
    $currentthreadurl_after "/".substr($currentthreadurl,$strlenhost);
      
    $lastpost =& $threadrow['lastpost'];
      
    $vbseo_stat['t'] += sizeof($alanguages);
      foreach(
    $alanguages as $language) { 
        
    vbseo_add_url($currentthreadurl_before.$language.$currentthreadurl_after$prior$lastpost$freq); 
      } 
    }   
    //end additional code 
    NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguages
    Also if you disabled some languages in option panel you have to delete its codes too.

    For links with language= (do NOT use booth - only appropriate for your links type)
    PHP Code:
    //additional code
    require_once(DIR'/includes/vbenterprisetranslator_functions_vbseo.php');
    $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi');
    if(!
    $archived) {
      
    $currentthreadurl vbseo_url_thread($threadrow1$archived) . '&language=';
      
    $vbseo_stat['t'] += sizeof($alanguages);
      
    $lastpost =& $threadrow['lastpost'];
      foreach(
    $alanguages as $language) {
        
    vbseo_add_url($currentthreadurl.$language$prior$lastpost$freq);
      } 
    }  
    //end additional code 
    NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguages
    Also if you disabled some languages in option panel you have to delete its codes too.


    ********************************************************************************
    OPTIONAL:
    If you want to add to sitemap also links for other thread pages (if thread have several pages), then additional code from last step must be added in other place - BEFORE:
    PHP Code:
    $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls
    Also in this additional code you have to change "1" to "$p".
    Last edited by r.dziadusz; 14-04-12 at 16:24.

  2. #2
    Senior Member
    Join Date
    Dec 2009
    Posts
    276

    Default

    Is there any way I can exclude translated member pages in the sitemaps?

  3. #3
    Member
    Join Date
    Oct 2009
    Posts
    72

    Default

    Hi

    I noticed that translated forum pages in the sitemap are listed with the seo language code (/en/) in the url but the native language url title.
    However if you visit the page the url is translated as well.

    Example:

    Sitemap URL:
    http://www.patientenfragen.net/en/vorstellungen/alle-neuen-herzlich-willkommen-t1810.html
    (url is completly german)

    If visited the url gets translated:
    http://www.patientenfragen.net/en/vorstellungen/to-all-the-new-welcome-t1810.html

    If your sitemap shows not translated urls will the urls not be listed in german too at google even if the page is translated to english?

    That could confuse searching users at google, don't you think?

    And another question....

    why is it that subforums are not translated in the url as well?

    Example:

    Current URL
    http://www.patientenfragen.net/en/vorstellungen/ (german)

    Translated URL
    http://www.patientenfragen.net/en/introductions/ (currently this does not happen)

    why is that?

    StarBuG

  4. #4
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    2,924
    Blog Entries
    1

    Default

    At this moment we provide very simple integration with sitemap generator. And be calm - Google will not index wrong URLs - there is 301 redirect so Google will index final page which has good URL. We are aware that it would be best to provide already translated URLs in sitemap, but it could be very resource consuming. So at this moment if you want to integrate this is the way and in the future we can work on this issue.

    About categories translation:
    Translation of categorie name in URL's

  5. #5
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    2,924
    Blog Entries
    1

    Default ANOTHER OPTIMIZATION

    Integration code was optimized again - please see first post for optimized integration code

  6. #6
    Senior Member
    Join Date
    May 2010
    Posts
    257

    Default

    I am a noob when it comes to codes and stuff, so please forgive my questions here.

    In my vbseo_sitemap_functions.php I find <?php three times, so should I then add that code after all three instances?

    Also should I add the SEO links code + the links with language code after the "vbseo_log_entry" code. In other words, should they both be in there?

    Thanks for the help!!

  7. #7
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    2,924
    Blog Entries
    1

    Default

    Quote Originally Posted by Taurus View Post
    I am a noob when it comes to codes and stuff, so please forgive my questions here.

    In my vbseo_sitemap_functions.php I find <?php three times, so should I then add that code after all three instances?

    Also should I add the SEO links code + the links with language code after the "vbseo_log_entry" code. In other words, should they both be in there?

    Thanks for the help!!
    There is nothing to apologize for - we are here for you

    Please add out code after first <?php - I jut updated instruction so it will be clear in the future

    No - put only one block of code for links which you are using. You cannot use booth kinds of links so you only apply for one block of code (each is described for which kind of links it is).

  8. #8
    Senior Member
    Join Date
    Oct 2009
    Posts
    142

    Default

    Quote Originally Posted by vBET View Post
    You can simply integrate vBET with vBSEO Sitemap Generator (it is free) to include links to translated pages into generated sitemap.

    Please note that instructions below will allow you to add into your sitemap links for threads translated pages. Because of performance reason those links will not be translated - there will be only added language code. Google will find real page anyway since you will get 301 redirect. Please note that it is not best approach - Google prefers to have final links in sitemap not redirecting one, but forcing translation of thousands links in all languages in the same time could kill your server or be threated by Google as attack (if links are not cached yet).

    If you have any PHP programming skills you can modify instructions below to support also other parts of sitemap - not only threads URLs. Solution below will add translated links only for first pages of threads.

    Integration instructions:
    You just have to edit one file: vbseo_sitemap_functions.php in vbseo_sitemap directory.

    Find:
    PHP Code:
    vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior"); 
    And place AFTER it...

    For SEO links
    PHP Code:
    //additional code 
    $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi'); 
    if(!
    $archived) { 
      
    $strlenhost strlen($vbseo_vars['bburl']."/"); 
      
    $currentthreadurl vbseo_url_thread($threadrow1$archived);
      
    $currentthreadurl_before substr($currentthreadurl,0,$strlenhost);
      
    $currentthreadurl_after "/".substr($currentthreadurl,$strlenhost);
      
    $lastpost =& $threadrow['lastpost'];
      
    $vbseo_stat['t'] += sizeof($alanguages);
      foreach(
    $alanguages as $language) { 
        
    vbseo_add_url($currentthreadurl_before.$language.$currentthreadurl_after$prior$lastpost$freq); 
      } 
    }   
    //end additional code 
    NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguages
    Also if you disabled some languages in option panel you have to delete its codes too.

    For links with language= (do NOT use booth - only appropriate for your links type)
    PHP Code:
    //additional code
    $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi');
    if(!
    $archived) {
      
    $currentthreadurl vbseo_url_thread($threadrow1$archived) . '&amp;language=';
      
    $vbseo_stat['t'] += sizeof($alanguages);
      
    $lastpost =& $threadrow['lastpost'];
      foreach(
    $alanguages as $language) {
        
    vbseo_add_url($currentthreadurl.$language$prior$lastpost$freq);
      } 
    }  
    //end additional code 
    NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguages
    Also if you disabled some languages in option panel you have to delete its codes too.


    ********************************************************************************
    OPTIONAL:
    If you want to add to sitemap also links for other thread pages (if thread have several pages), then additional code from last step must be added BEFORE:
    PHP Code:
    $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls
    Also in this additional code you have to change 1 to $p.

    Is it safe to do this then?
    If google bans you?
    Regards

  9. #9
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    2,924
    Blog Entries
    1

    Default

    Quote Originally Posted by mario06 View Post
    Is it safe to do this then?
    If google bans you?
    Regards
    Yes it is safe.
    No - Google will not ban you. You may get information about redirects in sitemap in your webmaster tools.

    Also please note that we consider sitemap integration as not necessary. Google will find your translated pages anyway crawling your normal pages. Having links to translated pages in sitemap can just make it indexed faster, but it is NOT necessary to get it indexed.

  10. #10
    Member
    Join Date
    May 2010
    Posts
    97

    Default

    Quote Originally Posted by vBET View Post
    You can simply integrate vBET with vBSEO Sitemap Generator (it is free) to include links to translated pages into generated sitemap.

    Please note that instructions below will allow you to add into your sitemap links for threads translated pages. Because of performance reason those links will not be translated - there will be only added language code. Google will find real page anyway since you will get 301 redirect. Please note that it is not best approach - Google prefers to have final links in sitemap not redirecting one, but forcing translation of thousands links in all languages in the same time could kill your server or be threated by Google as attack (if links are not cached yet).

    If you have any PHP programming skills you can modify instructions below to support also other parts of sitemap - not only threads URLs. Solution below will add translated links only for first pages of threads.

    Integration instructions:
    You just have to edit one file: vbseo_sitemap_functions.php in vbseo_sitemap directory.

    Find:
    PHP Code:
    vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior"); 
    And place AFTER it...

    For SEO links
    PHP Code:
    //additional code 
    $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi'); 
    if(!
    $archived) { 
      
    $strlenhost strlen($vbseo_vars['bburl']."/"); 
      
    $currentthreadurl vbseo_url_thread($threadrow1$archived);
      
    $currentthreadurl_before substr($currentthreadurl,0,$strlenhost);
      
    $currentthreadurl_after "/".substr($currentthreadurl,$strlenhost);
      
    $lastpost =& $threadrow['lastpost'];
      
    $vbseo_stat['t'] += sizeof($alanguages);
      foreach(
    $alanguages as $language) { 
        
    vbseo_add_url($currentthreadurl_before.$language.$currentthreadurl_after$prior$lastpost$freq); 
      } 
    }   
    //end additional code 
    NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguages
    Also if you disabled some languages in option panel you have to delete its codes too.

    For links with language= (do NOT use booth - only appropriate for your links type)
    PHP Code:
    //additional code
    $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi');
    if(!
    $archived) {
      
    $currentthreadurl vbseo_url_thread($threadrow1$archived) . '&amp;language=';
      
    $vbseo_stat['t'] += sizeof($alanguages);
      
    $lastpost =& $threadrow['lastpost'];
      foreach(
    $alanguages as $language) {
        
    vbseo_add_url($currentthreadurl.$language$prior$lastpost$freq);
      } 
    }  
    //end additional code 
    NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguages
    Also if you disabled some languages in option panel you have to delete its codes too.


    ********************************************************************************
    OPTIONAL:
    If you want to add to sitemap also links for other thread pages (if thread have several pages), then additional code from last step must be added BEFORE:
    PHP Code:
    $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls
    Also in this additional code you have to change 1 to $p.
    hehe your instruction is bit confusing

    so what is looks like the code need to add also links for other thread pages (if thread have several pages) For SEO links



    where to add $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls(

    and where to change 1 to $p.



    is this correct

    PHP Code:
    //additional code 
    $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi'); 
    if(!
    $archived) { 
      
    $strlenhost strlen($vbseo_vars['bburl']."/"); 
      
    $currentthreadurl vbseo_url_thread($threadrow$p$archived);
      
    $currentthreadurl_before substr($currentthreadurl,0,$strlenhost);
      
    $currentthreadurl_after "/".substr($currentthreadurl,$strlenhost);
      
    $lastpost =& $threadrow['lastpost'];
      
    $vbseo_stat['t'] += sizeof($alanguages);
      foreach(
    $alanguages as $language) { 
        
    vbseo_add_url($currentthreadurl_before.$language.$currentthreadurl_after$prior$lastpost$freq); 
      } 
    }
    $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls(
    //end additional code 

Page 1 of 5 123 ... LastLast

Tags for this Thread

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31