Page 6 of 17 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 LastLast
Results 76 to 90 of 247
Like Tree1Likes

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; I am using a non vBulletin cms in my site, not intergrated. I have made a couple plugins like showing ...

  1. #76
    Junior Member Array Tefra's Avatar
    Real Name
    Chris T.
    Join Date
    Jan 2006
    Posts
    25
    Liked
    0 times
    I am using a non vBulletin cms in my site, not intergrated. I have made a couple plugins like showing latest forum post etc.

    I half managed to finish with the latest post plug
    3D Accelerator on the right.

    The thread links work ok but then if you check the images arrows that they are supposed to point to the last post it doesn't work. It just give a "http://www.3dacc.net/forums/last" link

    Here is my code, it's not vbulletin style but you will get the point
    PHP Code:
    if(!empty($cfg['plugin']['vbforums']['exculde_forumid'])){
        
    $cfg['plugin']['vbforums']['exculde_forumid'] = explode(','$cfg['plugin']['vbforums']['exculde_forumid']);
        
    $where_clause_exclude "AND forumid NOT IN(".implode(','$cfg['plugin']['vbforums']['exculde_forumid']).")";
    }

    include_once 
    'forums/includes/functions_vbseo.php';

    vbseo_get_options();
    vbseo_prepare_seo_replace();
    get_forum_info();


    $sql sed_sql_query("SELECT * FROM vb_thread 
                            WHERE visible = 1 AND open <> 10 
    $where_clause_exclude
                            ORDER BY lastpost DESC LIMIT "
    .$cfg['plugin']['vbforums']['max_threads']);

    while (
    $row sed_sql_fetcharray($sql))
        {    
        
    $jj++;
        
    $t-> assign(array(
            
    //"THREAD_ROW_URL" => $cfg['plugin']['vbforums']['vb_location']."/showthread.php?t=".$row['threadid'],
            
    "THREAD_ROW_URL" => $cfg['plugin']['vbforums']['vb_location']."/".vbseo_thread_url_row($row),
            
    //"THREAD_ROW_URL_LAST" => $cfg['plugin']['vbforums']['vb_location']."/showthread.php?goto=newpost&amp;t=".$row['threadid'],
            
    "THREAD_ROW_URL_LAST" => $cfg['plugin']['vbforums']['vb_location']."/".vbseo_thread_url_row_spec($row,'last'),
            
    "THREAD_ROW_TITLE" => sed_cutstring($row['title'], $cfg['plugin']['vbforums']['title_cutstring']),
            
    "THREAD_ROW_LASTPOST_DATE" => @date($cfg['dateformat'], $row['lastpost'] - $cfg['servertimezone']*3600),
            
    "THREAD_ROW_LASTPOSTER" => $row['lastposter'],
            
    "THREAD_ROW_REPLIES" => $row['replycount'],
            
    "THREAD_ROW_VIEWS" => $row['views'],
            
    "THREAD_ROW_ODDEVEN" => sed_build_oddeven($jj)
            ));    
        
    $t->parse("MAIN.THREAD_ROW");            
        } 
    It's like the "vbseo_thread_url_row_spec" doesn't want to work.

    Any help is appreciated. Thanks in advance.
    3D Accelerator www.3dacc.net
    Maximize your computer performance experience

  2. #77
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    Instead of
    PHP Code:
    vbseo_thread_url_row_spec($row,'last'
    your should use
    PHP Code:
    vbseo_thread_url_row_spec($row,VBSEO_URL_THREAD_LASTPOST
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #78
    Junior Member Array Tefra's Avatar
    Real Name
    Chris T.
    Join Date
    Jan 2006
    Posts
    25
    Liked
    0 times
    thanks a lot it works like a charm!

    What are the rest of codes fro new posts for example ?

    The first post needs some update
    3D Accelerator www.3dacc.net
    Maximize your computer performance experience

  4. #79
    Junior Member Array Tefra's Avatar
    Real Name
    Chris T.
    Join Date
    Jan 2006
    Posts
    25
    Liked
    0 times
    I am trying to apply the vbseo to my cms. It's seems extremely easy i have to admit and i am really happy for this.

    The cms is in root and the forumm in folder /forums
    How can i force the option "Include Domain Name in URLs?" to work on the cms part?

    This is what i have
    PHP Code:
    include 'forums/includes/functions_vbseo.php';

    vbseo_get_options();
    vbseo_prepare_seo_replace();
    get_forum_info();
    $output make_crawlable($output); 
    I am trying this on my localhost, i don't want to mess with the main site until i get the vbseo working 100&#37;


    Nevermind i just saw this thread
    3D Accelerator www.3dacc.net
    Maximize your computer performance experience

  5. #80
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    What are the rest of codes fro new posts for example ?
    Format codes are basically the same as defined in config_vbseo.php:
    PHP Code:
        define('VBSEO_URL_THREAD_NEWPOST',          '%forum_title%/%thread_id%-%thread_title%-new-post.html');
        
    define('VBSEO_URL_THREAD_PREV',             '%forum_title%/%thread_id%-%thread_title%-prev-thread.html');
        
    define('VBSEO_URL_THREAD_NEXT',             '%forum_title%/%thread_id%-%thread_title%-next-thread.html'); 
    i.e., you should use VBSEO_URL_THREAD_NEWPOST for "goto new post"
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  6. #81
    neo
    neo is offline
    Member Array neo's Avatar
    Real Name
    Diego
    Join Date
    Jul 2006
    Location
    in the bank
    Posts
    87
    Liked
    0 times
    When I'm trying to include the vbseo functions using this:

    include_once '../includes/functions_vbseo.php';
    I get

    Warning: main(): open_basedir restriction in effect. File(../includes/functions_vbseo.php) is not within the allowed path(s):

  7. #82
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    You could try to change it to:
    PHP Code:
    include_once dirname(__FILE__).'/../includes/functions_vbseo.php'
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  8. #83
    neo
    neo is offline
    Member Array neo's Avatar
    Real Name
    Diego
    Join Date
    Jul 2006
    Location
    in the bank
    Posts
    87
    Liked
    0 times
    Using
    PHP Code:
    include_once dirname(__FILE__).'/../foros/includes/functions_vbseo.php'
    I get
    Code:
     
    Warning: main(): Unable to access /var/www/vhosts/emudesc.net/httpdocs/wp-content/themes/fresh-compact/../foros/includes/functions_vbseo.php in /var/www/vhosts/emudesc.net/httpdocs/wp-content/themes/fresh-compact/sidebar.php on line 4
    Warning: main(/var/www/vhosts/emudesc.net/httpdocs/wp-content/themes/fresh-compact/../foros/includes/functions_vbseo.php): failed to open stream: No such file or directory in /var/www/vhosts/emudesc.net/httpdocs/wp-content/themes/fresh-compact/sidebar.php on line 4
    Warning: main(): Failed opening '/var/www/vhosts/emudesc.net/httpdocs/wp-content/themes/fresh-compact/../foros/includes/functions_vbseo.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhosts/emudesc.net/httpdocs/wp-content/themes/fresh-compact/sidebar.php on line 4

  9. #84
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    Is the path correct though?
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  10. #85
    neo
    neo is offline
    Member Array neo's Avatar
    Real Name
    Diego
    Join Date
    Jul 2006
    Location
    in the bank
    Posts
    87
    Liked
    0 times
    Quote Originally Posted by Oleg Ignatiuk View Post
    Is the path correct though?
    I think so

    My vBulletin forums are in the /foros directory

    I think this should work but it doesn't

    PHP Code:
    include_once dirname(__FILE__).'../foros/includes/functions_vbseo.php'

  11. #86
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    Just change it to the following then:
    PHP Code:
      include_once '/var/www/vhosts/emudesc.net/httpdocs/foros/includes/functions_vbseo.php'
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  12. #87
    neo
    neo is offline
    Member Array neo's Avatar
    Real Name
    Diego
    Join Date
    Jul 2006
    Location
    in the bank
    Posts
    87
    Liked
    0 times
    It works, but I need help converting this URL's

    PHP Code:
    $sql "SELECT * FROM vb_thread order by dateline desc LIMIT 10 ";
           
    $consulta mysql_query($sql);
           while (
    $fila mysql_fetch_array($consulta)) {
              
    $sql "select * from vb_post WHERE threadid = $fila[threadid] order by dateline desc ";
              
    $resu mysql_query($sql);
              
    $fila2 mysql_fetch_array($resu);
              
    $fecha = @date('j-n-Y'$fila['dateline'] - $hourdiff);
              echo 
    "<a href=\"http://www.emudesc.net/foros/showthread.php?p=$fila2[postid]&mode=linear#post$fila2[parentid]\" target=\"_blank\">".mod($fila[title])."</a><br>";
           } 
    please

  13. #88
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    You should use vbseo_thread_url_row() or vbseo_thread_url_row_spec() functions as described in vBSEO Functions for Extensibility
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  14. #89
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    I guess you need "goto last post" links?
    Please try the following then:
    PHP Code:
    $sql "SELECT * FROM vb_thread order by dateline desc LIMIT 10 ";
           
    $consulta mysql_query($sql);
           while (
    $fila mysql_fetch_array($consulta)) {
              echo 
    "<a href=\"http://www.emudesc.net/foros/".vbseo_thread_url_row_spec($fila,VBSEO_URL_THREAD_LASTPOST)."\" target=\"_blank\">".mod($fila[title])."</a><br>";
           } 
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  15. #90
    neo
    neo is offline
    Member Array neo's Avatar
    Real Name
    Diego
    Join Date
    Jul 2006
    Location
    in the bank
    Posts
    87
    Liked
    0 times
    Yes, I need the go to las post links. It rewrites the url thread but I'm gonna need the name of the forum too

    Code:
    http://www.emudesc.net/foros/name_of_the_forum/thanks_Oleg_this_worked.html
    I'm trying this

    PHP Code:
    echo "<a href=\"http://www.emudesc.net/foros/".vbseo_forum_url($fila[forumid], $pagenum)."/".vbseo_thread_url_row_spec($fila,VBSEO_URL_THREAD_LASTPOST)."\" target=\"_blank\">".mod($fila[title])."</a><br>"
    but I don't know what to do with $pagenum
    Last edited by neo; 01-18-2007 at 02:37 PM.

Page 6 of 17 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 LastLast

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

Posting Permissions

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