Results 1 to 4 of 4

2 DB Queries for Prev/Next Thread Links ?

This is a discussion on 2 DB Queries for Prev/Next Thread Links ? within the General Discussion forums, part of the vBSEO SEO Plugin category; I'm running vBSEO 3.2.0; in which theres this setting: Replace 'Previous/Next Thread' redirect links? Enable this option to replace the ...

  1. #1
    Senior Member Shadab's Avatar
    Real Name
    Shadab
    Join Date
    Oct 2007
    Location
    Bhopal
    Posts
    821
    Liked
    0 times
    Blog Entries
    12

    2 DB Queries for Prev/Next Thread Links ?

    I'm running vBSEO 3.2.0; in which theres this setting:
    Replace 'Previous/Next Thread' redirect links?

    Enable this option to replace the 'Next Thread' & 'Previous Thread' links with direct, Content Relevant links.
    Note: This option adds two queries.
    What's the status of this feature in 3.3.0 ?
    Does enabling this setting still adds 2 queries in the latest version of vBSEO (ie, 3.3) ?


    -Shadab.

  2. #2
    Senior Member
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,097
    Liked
    5 times
    3.3.0:

    Replace 'Previous/Next Thread' redirect links?
    Enable this option to replace the 'Next Thread' & 'Previous Thread' links with direct, Content Relevant links. Note: This option adds two queries.
    The Forum Hosting - Forum Hosting from the Forum Experts

  3. #3
    Senior Member Shadab's Avatar
    Real Name
    Shadab
    Join Date
    Oct 2007
    Location
    Bhopal
    Posts
    821
    Liked
    0 times
    Blog Entries
    12
    So, the function vbseo_get_next_thread() is called twice (fn($threadid, false) & fn($threadid, true)) to get the titles of the next and previous thread ?

    Could this not be done with a single query ?

    SELECT t.forumid, t.threadid, t.title, t.replycount, t.lastposter, t.lastpostid, t.lastpost
    FROM thread AS t
    LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = t.threadid AND type = 'thread')
    WHERE forumid = 33 AND visible = 1 AND open <> 10 AND deletionlog.primaryid IS NULL
    ORDER BY ABS(lastpost + 0.0 - 1240574678)
    LIMIT 1, 2

    -------------------------------------------------------------------------
    $thread[forumid] , $thread[lastpost]

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,741
    Liked
    168 times
    Good idea, but this query will return 2 "next" queries in case if both of them are closer to "current" thread than "previous" one, i.e. it will not work consistently.

Similar Threads

  1. Threads ending in "prev thread" do not work
    By afx1 in forum Bug Reporting
    Replies: 2
    Last Post: 08-22-2007, 11:57 AM

Posting Permissions

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