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

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 73

Thread: Sitemap Generator integration

  1. #51

    Default

    This Forum is over 2,5 Years old, there was always VB+VBSEO+SITEMAP installed, never had any problems.

    Also there is not only the Priory problem, sometimes also the date, url and others, but not all urls, only some.

    i try now to fix it thru VB maintenance to fix threads and or posts, ill see if that helps.

  2. #52

    Default

    problem still there!

    what do you exactly need?

  3. #53
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    PM me access details for Admin CP and FTP. You didn't confirmed did you comment our code and check does it work fine without this. The fact that it was working for years means nothing - you made modifications in file and you could broke some other section fo code by mistake/accident. Please confirm that it is working fine with our code commented before sending us access details.

  4. #54
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    OK - I got PM that it is working now. Merge this thread with the one about Sitemap Generator integration

  5. #55

    Default

    I already put the code For SEO links....


    $prior = vbseo_sm_priority($vboptions['vbseo_sm_priority_rt'], $relp);

    if($vboptions['vbseo_sm_freq_tsmart'])
    {
    $dpassed = (time() - $threadrow['lastpost'])/86400;
    if($dpassed<3)$freq = 'daily';
    else if($dpassed<10)$freq = 'weekly';
    else if($dpassed<100)$freq = 'monthly';
    else $freq = 'yearly';
    }else
    $freq = $vboptions['vbseo_sm_freq_t'];

    vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior");
    //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, 1, $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

    for($p=1; $p<=$totalpages; $p++)
    {
    $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls(
    vbseo_url_thread($threadrow, $p, $archived),
    vbseo_url_thread($threadrow, $p, $archived, true),
    $prior,
    $threadrow['lastpost'],
    $freq
    );

    }

    if($showpost)
    {

    $getposts = $db->query("
    SELECT p.dateline,p.postid,p.threadid
    FROM " . TABLE_PREFIX . "post AS p
    WHERE p.threadid = $threadrow[threadid]
    AND visible = 1
    ORDER BY p.dateline
    ");

    $pcount = 0;
    while ($postrow = $db->fetch_array($getposts))
    {
    $pcount++;
    vbseo_log_entry("[showpost] forum_id: $forumid, thread_id: $postrow[threadid], post_id: $postrow[postid]");
    $relp = $relp*0.8+$pcount/($threadrow['replycount']+1)*0.2;
    $relp*= vbseo_apply_custom_priority('forum', $threadrow['forumid']);
    $prior2 = vbseo_sm_priority($vboptions['vbseo_sm_priority_rp'], $relp);
    $vbseo_stat['p'] += vbseo_add_2urls(
    vbseo_url_post($threadrow, $postrow, $pcount),
    vbseo_url_post($threadrow, $postrow, $pcount, true),
    $prior2,
    $postrow['dateline'],
    $vboptions['vbseo_sm_freq_p']
    );
    }
    $db->free_result($getposts);
    }
    }
    $db->free_result($getthreads);
    $vbseo_progress['step3'] = 0;
    }
    vbseo_inc_progress();
    }

    function vbseo_sitemap_polls($progress)
    {
    global $db, $vboptions, $vbseo_vars;

    if(vbseo_check_progress($progress)) return;
    $added_urls = 0;
    vbseo_log_entry("[SECTION START] polls", true);

    $st = $db->query_first("
    SELECT
    max(voters) as maxre,min(voters) as minre,avg(voters) as avgre
    FROM " . TABLE_PREFIX . "poll
    ");
    foreach($vbseo_vars['forumslist'] as $forumid)
    {
    $getthreads = $db->query("
    SELECT *
    FROM " . TABLE_PREFIX . "thread AS thread
    WHERE forumid = $forumid
    AND visible = 1
    AND pollid > 0
    ");

    while ($threadrow = $db->fetch_array($getthreads))
    {
    $getpoll = $db->query_first("
    SELECT *
    FROM " . TABLE_PREFIX . "poll
    WHERE pollid = ".$threadrow['pollid']."
    ");
    if(!$getpoll)
    continue;

    vbseo_log_entry("[poll] forum_id: $forumid, thread_id: $threadrow[threadid], pollid: $threadrow[pollid]");

    $added_urls++;

    $relp2 = vbseo_math_avg_weight($getpoll['voters'], $st['minre'], $st['maxre'], $st['avgre']);
    $relp2*= vbseo_apply_custom_priority('forum', $threadrow['forumid']);
    $prior = vbseo_sm_priority($vboptions['vbseo_sm_priority_rpoll'], $relp2);
    $added_urls += vbseo_add_2urls(
    vbseo_url_poll($threadrow, $getpoll),
    vbseo_url_poll($threadrow, $getpoll, true),
    $prior,
    $getpoll['dateline'],
    $vboptions['vbseo_sm_freq_poll']
    );

    }
    $db->free_result($getthreads);
    }
    vbseo_inc_progress();
    return $added_urls;
    }

    function vbseo_sitemap_blogs($progress)
    {
    global $db, $vboptions, $vbseo_vars;

    if(vbseo_check_progress($progress)) return;

    if(!vbseo_dbtbl_exists('blog'))
    return 0;

    vbseo_log_entry("[SECTION START] blogs", true);
    vbseo_add_url(VBSEO_ON ? vbseo_any_url($vbseo_vars['bburl'].'/blog.'.VBSEO_PHP_EXT) : $vbseo_vars['bburl'].'/blog.'.VBSEO_PHP_EXT, 1.0);
    $added_urls = 0;

    so I'm still confius where I must put this code $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls( ??

    finally, where is I can find instruction additional code you have to change 1 to $p ?

  6. #56
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Quote Originally Posted by Cuti Malaysia View Post
    I already put the code For SEO links....





    so I'm still confius where I must put this code $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls( ??

    finally, where is I can find instruction additional code you have to change 1 to $p ?
    You put it nowhere! There is no any instruction to put it anywhere! It ALREADY EXISTS in vBSEO. Please read the instruction one more time carefully.

    PS.
    I just changed there world "this" to "our" to void confusions.

  7. #57

    Default

    Code:
    $prior = vbseo_sm_priority($vboptions['vbseo_sm_priority_rt'], $relp);
    
    if($vboptions['vbseo_sm_freq_tsmart'])
    {
    $dpassed = (time() - $threadrow['lastpost'])/86400;
    if($dpassed<3)$freq = 'daily';
    else if($dpassed<10)$freq = 'weekly';
    else if($dpassed<100)$freq = 'monthly';
    else $freq = 'yearly';
    }else
    $freq = $vboptions['vbseo_sm_freq_t'];
    
    vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior");
    //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, 1, $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 
    for($p=1; $p<=$totalpages; $p++)
    {
    $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls(
    vbseo_url_thread($threadrow, $p, $archived),
    vbseo_url_thread($threadrow, $p, $archived, true),
    $prior,
    $threadrow['lastpost'],
    $freq
    );
    
    }
    
    if($showpost)
    {
    
    $getposts = $db->query("
    SELECT p.dateline,p.postid,p.threadid
    FROM " . TABLE_PREFIX . "post AS p
    WHERE p.threadid = $threadrow[threadid]
    AND visible = 1
    ORDER BY p.dateline
    ");
    
    $pcount = 0;
    while ($postrow = $db->fetch_array($getposts))
    {
    $pcount++;
    vbseo_log_entry("[showpost] forum_id: $forumid, thread_id: $postrow[threadid], post_id: $postrow[postid]");
    $relp = $relp*0.8+$pcount/($threadrow['replycount']+1)*0.2;
    $relp*= vbseo_apply_custom_priority('forum', $threadrow['forumid']);
    $prior2 = vbseo_sm_priority($vboptions['vbseo_sm_priority_rp'], $relp);
    $vbseo_stat['p'] += vbseo_add_2urls(
    vbseo_url_post($threadrow, $postrow, $pcount),
    vbseo_url_post($threadrow, $postrow, $pcount, true),
    $prior2,
    $postrow['dateline'],
    $vboptions['vbseo_sm_freq_p']
    );
    }
    $db->free_result($getposts);
    }
    }
    $db->free_result($getthreads);
    $vbseo_progress['step3'] = 0;
    }
    vbseo_inc_progress();
    }
    
    function vbseo_sitemap_polls($progress)
    {
    global $db, $vboptions, $vbseo_vars;
    
    if(vbseo_check_progress($progress)) return;
    $added_urls = 0;
    vbseo_log_entry("[SECTION START] polls", true);
    
    $st = $db->query_first("
    SELECT 
    max(voters) as maxre,min(voters) as minre,avg(voters) as avgre
    FROM " . TABLE_PREFIX . "poll
    ");
    foreach($vbseo_vars['forumslist'] as $forumid)
    {
    $getthreads = $db->query("
    SELECT *
    FROM " . TABLE_PREFIX . "thread AS thread
    WHERE forumid = $forumid
    AND visible = 1
    AND pollid > 0
    ");
    
    while ($threadrow = $db->fetch_array($getthreads))
    {
    $getpoll = $db->query_first("
    SELECT *
    FROM " . TABLE_PREFIX . "poll
    WHERE pollid = ".$threadrow['pollid']."
    ");
    if(!$getpoll)
    continue;
    
    vbseo_log_entry("[poll] forum_id: $forumid, thread_id: $threadrow[threadid], pollid: $threadrow[pollid]");
    
    $added_urls++;
    
    $relp2 = vbseo_math_avg_weight($getpoll['voters'], $st['minre'], $st['maxre'], $st['avgre']);
    $relp2*= vbseo_apply_custom_priority('forum', $threadrow['forumid']);
    $prior = vbseo_sm_priority($vboptions['vbseo_sm_priority_rpoll'], $relp2);
    $added_urls += vbseo_add_2urls(
    vbseo_url_poll($threadrow, $getpoll),
    vbseo_url_poll($threadrow, $getpoll, true),
    $prior,
    $getpoll['dateline'],
    $vboptions['vbseo_sm_freq_poll']
    );
    
    }
    $db->free_result($getthreads);
    }
    vbseo_inc_progress();
    return $added_urls;
    }
    
    function vbseo_sitemap_blogs($progress)
    {
    global $db, $vboptions, $vbseo_vars;
    
    if(vbseo_check_progress($progress)) return;
    
    if(!vbseo_dbtbl_exists('blog'))
    return 0;
    
    vbseo_log_entry("[SECTION START] blogs", true);
    vbseo_add_url(VBSEO_ON ? vbseo_any_url($vbseo_vars['bburl'].'/blog.'.VBSEO_PHP_EXT) : $vbseo_vars['bburl'].'/blog.'.VBSEO_PHP_EXT, 1.0);
    $added_urls = 0;


    please use the easy expalanation to understand. I'm not fluent in english. Is it correct the code i put? Correct or not??


    where to put this code?? please help me top put this code at above so that easy to me to trace

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


    finally, Also in our additional code you have to change 1 to $p.. i not undertand please give example...

  8. #58
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Quote Originally Posted by Cuti Malaysia View Post
    please use the easy expalanation to understand. I'm not fluent in english. Is it correct the code i put? Correct or not??


    where to put this code?? please help me top put this code at above so that easy to me to trace

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


    finally, Also in our additional code you have to change 1 to $p.. i not undertand please give example...
    Ok so - I will describe it in other words - hope it will help

    So - your actual code looks OK - the best way to check it is to run it.

    Additional steps are not necessary - actual solution will add links for threads translated pages to sitemap. Additional steps will allow you also to ad there links to other pages of threads - if thread is big enough to have other pages (2nd, 3rd...).

    So if you want to make this changes. Then you have to remove OUR additional code (the one you added) from place where you have it now and put it in other place. The other place is BEFORE:
    PHP Code:
    $vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls
    And that is what our instruction means - put OUR code BEFORE vBSEO code listed below (instead of actual location of OUR code in your file).

    And the last part tells you clearly that in OUR code (the code you added) you have to find this 1 (the number one - which is used only once in OUR code, so it is very easy) to give you more precised instruction:
    PHP Code:
      $currentthreadurl vbseo_url_thread($threadrow1$archived) . '&amp;language='
    Here is 1 in our code. And you have to change this 1 to $p
    So if you look on line from OUR code where 1 exists and you change it to $p then you will have there:
    PHP Code:
      $currentthreadurl vbseo_url_thread($threadrow$p$archived) . '&amp;language='
    Hope it is more understandable now. Please tell did it help

  9. #59

    Default

    Okay, VBSEO released a new Sitemap generator, how to add it there? Could you just put the correct code in here, it is much easier for all users.

    Okay, its the same like the old vbseo sitemap, thanks.
    Last edited by wowglider.de; 13-06-11 at 22:03.

  10. #60
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Quote Originally Posted by wowglider.de View Post
    Okay, VBSEO released a new Sitemap generator, how to add it there? Could you just put the correct code in here, it is much easier for all users.

    Okay, its the same like the old vbseo sitemap, thanks.
    Great that you already have the answer. Please note that we are thinking about adding support in sitemap integration to generate URLs with already translated links (now only language code is added). We have idea how to do it without killing performance. It will require to separate cache for titles in vBET and it will generate translate link only for those which are already cached. This way it will not kill performance by making thousands translation requests. We cannot tell when exactly it will be supported. At this moment the biggest priority is to support other translation services which we already have implemented, still some little things must be closed before we will release it. After that we will check open feature requests list and make priorities for other tasks

Page 6 of 8 FirstFirst ... 45678 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
  •