vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.

Page 8 of 13
FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 LastLast
Results 106 to 120 of 195

vBSEO Functions for Extensibility

This is a discussion on vBSEO Functions for Extensibility within the General Discussion forums, part of the vBSEO SEO Plugin category; So everything in <body></body> must go through make_crawlable? ob_start('make_crawlable') seems to be a quick and easy way to add vBSEO ...

  1. #106
    Member
    Real Name
    Eric Chamberlain
    Join Date
    Sep 2006
    Posts
    35
    So everything in <body></body> must go through make_crawlable?


    ob_start('make_crawlable') seems to be a quick and easy way to add vBSEO to third party application, are there any performance downsides to doing this over updating each line of output code?

  2. #107
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    From the performance point of view it's better to pass the whole content to make_crawlable via a single function call.
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  3. #108
    Member
    Real Name
    Eric Chamberlain
    Join Date
    Sep 2006
    Posts
    35
    Ok, now I get some strange behavior.

    The forum is installed in the root and on my homepage (http://mydomain.com/) the links display with the rewritten urls.

    My CRR is

    'z/index\.php\?z-profile=(.+)$' => 'z/$1/'

    But when I am on http://mydomain.com/z/Eric/ or http://mydomain.com/z/index.php?z-profile=Eric (the CRR doesn't redirect the page), the CRR doesn't work and all the links appear like http://mydomain.com/z/index.php?z-profile=Eric

    http://mydomain.com/z/Eric/ has the vBSEO copyright at the bottom and the other links in the header and footer rewrite, so I assume vBSEO is parsing the page.

    Why isn't the CRR working? Does it have anything to do with z being a real directory?

  4. #109
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    Perhaps the links on the z/ pages are included like 'index\.php\?z-profile=X', not 'z/index\.php\?z-profile=X' ?
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  5. #110
    Member
    Real Name
    Eric Chamberlain
    Join Date
    Sep 2006
    Posts
    35
    Dropping the z from both sizes of the CRR has the same rewrite behavior as above, except it also breaks the redirect. z/Eric/ stops working.

    I've also tried using 'index\.php\?z-profile=(.+)$' => '/members/$1/' and the rewrites on the root turn into /z//members/X/ and on t z/index.php?z-profile=X page, the URLs are not rewritten.

    Any other ideas?

  6. #111
    Member
    Real Name
    Eric Chamberlain
    Join Date
    Sep 2006
    Posts
    35
    To simplify testing, I have created two test.php files with the following code:

    PHP Code:
    <?php
    include_once '/home/xxx/html/includes/functions_vbseo.php';
    vbseo_startup();
    ob_start('make_crawlable');
    ?>
    <a href="http://mydomain.com/z/index.php?z-profile=Eric">Eric Profile</a><br />
    I put one file in the root / and one in the /z directory and then enter each URL in my browser. The CRR 'z/index\.php\?z-profile=(.+)$' => 'z/$1/' works in the root test.php and does not work in the z directory test.php.

  7. #112
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    I put one file in the root / and one in the /z directory and then enter each URL in my browser. The CRR 'z/index\.php\?z-profile=(.+)$' => 'z/$1/' works in the root test.php and does not work in the z directory test.php.
    It works for me (in z/ subfolder). Please let me know an example URL so that I can check this.
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  8. #113
    Member
    Real Name
    Eric Chamberlain
    Join Date
    Sep 2006
    Posts
    35
    The site isn't public yet, I will PM you with access instructions.

  9. #114
    Senior Member
    Real Name
    Jan Jaap
    Join Date
    May 2006
    Location
    The Netherlands
    Posts
    132
    Hi!

    I was wondering how to convert the post urls like showthread.php?p=123.

    Best Regards,
    Jan Jaap
    Last edited by Adult SEO; 05-16-2007 at 05:29 AM.
    [SIGPIC][/SIGPIC]

  10. #115
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    Something like that should work:
    PHP Code:
    $threadurl_spec vbseo_thread_url_row_spec(
    array(
    'threadid'=>xx,
    'forumid'=>xx,
    'title'=>xx,
    'postid'=>xx
    )
    VBSEO_URL_THREAD_GOTOPOST); 
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  11. #116
    Senior Member
    Real Name
    Jan Jaap
    Join Date
    May 2006
    Location
    The Netherlands
    Posts
    132
    Hi!

    I managed to do it like this:

    PHP Code:
    $perpage sanitize_maxposts(0);
     
    $getpagenum $vbulletin->db->query_first(&quot;
      
    SELECT COUNT(*) AS posts
      FROM 
    `&quot; . TABLE_PREFIX . &quot;post` AS post
      WHERE threadid 
    = &quot;.$threadinfo[&quot;threadid&quot;].&quot; AND visible 1
      
    AND dateline <= &quot;.$threadinfo[&quot;lastpost&quot;].&quot;
     &
    quot;);
     
    $pagenumber ceil($getpagenum['posts'] / $perpage);
     
    $threadurl $vbulletin->options[&quot;bburl&quot;].'/'.vbseo_thread_url_row($threadinfo$pagenumber).'#post'.$threadinfo[&quot;lastpostid&quot;]; 
    Which option would be faster?

    Best Regards,
    Jan Jaap
    Last edited by Adult SEO; 05-16-2007 at 05:28 AM.
    [SIGPIC][/SIGPIC]

  12. #117
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    There is no difference from performance point of view.
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  13. #118
    Member
    Real Name
    Richard Harris
    Join Date
    Oct 2006
    Posts
    37
    Hi,

    This is driving me crazy. I have been working on this for over an hour and getting nowhere. I hope one of you can help me.

    I am trying to get the last 10 threads from forum ID 71, in descending order from most recent.

    Currently, I use this code:
    PHP Code:
            $newsquery $DB_site->query("
                    SELECT firstpostid, 1thread.threadid, title, avatar, summary
                    FROM 1thread, fp_news_info
                    WHERE 1thread.threadid = fp_news_info.threadid AND forumid=71
                    ORDER BY threadid DESC
                    LIMIT 10
            "
    );

            
    $counter 0;
            while(
    $newsresult $DB_site->fetch_array($newsquery))
            {
                    
    $postquery $DB_site->query("
                            SELECT title, pagetext
                            FROM 1post
                            WHERE postid="
    .$newsresult["firstpostid"]."
            "
    );

            
    $postresult $DB_site->fetch_array($postquery);
            
    printf("
             <a href=\"/showthread.php?threadid=%s\"><img src=\"$newsresult[avatar]\" class=\"avatar\" alt=\"%s\" /></a>
             <h1><a href=\"/showthread.php?threadid=%s\">%s</a></h1>
             <p>$newsresult[summary] <a href=\"/showthread.php?threadid=%s\" class=\"more\">more</a></p>
            </div>"
    $newsresult["threadid"], $postresult["title"], $newsresult["threadid"], $postresult["title"], $newsresult["threadid"]);
                            
    $counter++;
                    } 
    I have tried replacing "/showthread.php?threadid=%s" with other code, but nothing is working for me.

    I have added
    PHP Code:
    vbseo_get_options();
    vbseo_prepare_seo_replace();
    get_forum_info(); 
    and
    PHP Code:
    include_once 'includes/functions_vbseo.php'
    at the top of the file. I have also tried various renditions of codes from post 1 in this thread. Man am I lost. :(

    Any help would be great! Thanks!

    What do I need to change to make the URLs vbseo'd?

  14. #119
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    Hello,

    the following should work:
    PHP Code:
      include_once 'includes/functions_vbseo.php';  
    vbseo_startup();
    $newsquery $DB_site->query("
                    SELECT firstpostid, 1thread.threadid, title, avatar, summary, forumid
                    FROM 1thread, fp_news_info
                    WHERE 1thread.threadid = fp_news_info.threadid AND forumid=71
                    ORDER BY threadid DESC
                    LIMIT 10
            "
    );

            
    $counter 0;
            while(
    $newsresult $DB_site->fetch_array($newsquery))
            {
                    
    $postquery $DB_site->query("
                            SELECT title, pagetext
                            FROM 1post
                            WHERE postid="
    .$newsresult["firstpostid"]."
            "
    );

            
    $postresult $DB_site->fetch_array($postquery);
    $threadurl vbseo_thread_url_row($newsresult);
            
    printf("
             <a href=\"%s\"><img src=\"$newsresult[avatar]\" class=\"avatar\" alt=\"%s\" /></a>
             <h1><a href=\"%s\">%s</a></h1>
             <p>$newsresult[summary] <a href=\"%s\" class=\"more\">more</a></p>
            </div>"
    $threadurl$postresult["title"], $threadurl$postresult["title"], $threadurl);
                            
    $counter++;
                    } 
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  15. #120
    Member
    Real Name
    Richard Harris
    Join Date
    Oct 2006
    Posts
    37
    Oleg, you're a genius! Thank you so much! It works brilliantly!!


Similar Threads

  1. vBSEO 2.4.0 Released - Includes Google AdSense Targeting Feature!
    By Juan Muriente in forum vBSEO Announcements
    Replies: 74
    Last Post: 05-20-2006, 09:29 PM
  2. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-08-2005, 11:00 PM