Results 1 to 12 of 12

Anybody knows how to add similar threads plugin after first post?

This is a discussion on Anybody knows how to add similar threads plugin after first post? within the Off-Topic & Chit Chat forums, part of the Focus on Members category; I have tried the following: PHP Code: <if  condition = " $post [ 'postcount'] %  $vboptions [ 'maxposts'] == 1" > $similarthreads </if>  ...

  1. #1
    Senior Member MadK's Avatar
    Real Name
    Leo
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    140
    Liked
    0 times
    Blog Entries
    2

    Anybody knows how to add similar threads plugin after first post?

    I have tried the following:

    PHP Code:
    <if condition="$post['postcount'] % $vboptions['maxposts'] == 1">

    $similarthreads

    </if> 
    Result: The similar threads box disappears.

    I have also tried this:

    PHP Code:
    [...]

    </if>

    $similarthreads
    <!-- end content table -->
    $spacer_close
    <!-- / end content table -->

    [...] 
    Result: The similar threads appears above the first post, obviously.



    So my question is, does anybody knows how to make it so that the similar threads function can appear after every first post on every page?

    Thanks people!

  2. #2
    Senior Member
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,097
    Liked
    4 times
    What if you try:

    PHP Code:
    <if condition="$post[postcount] % $vboptions[maxposts] == 1"
    The Forum Hosting - Forum Hosting from the Forum Experts

  3. #3
    Senior Member MadK's Avatar
    Real Name
    Leo
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    140
    Liked
    0 times
    Blog Entries
    2
    Quote Originally Posted by Michael Biddle View Post
    What if you try:

    PHP Code:
    <if condition="$post[postcount] % $vboptions[maxposts] == 1"
    Not working.

  4. #4
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    if you do this:

    <if condition="$post[postcount] % $vboptions["maxposts"] == 1">
    <div style="padding: 20px; border: 1px solid #33; background: #ccc;">SIMILAR THREADS</div>
    </if>

    do you get the box?

    If you do, cances are, the similar threads variable isn't available yet that early on in processing...

  5. #5
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    22,367
    Liked
    542 times
    Blog Entries
    4
    I think you need a modification for that as i tried the same for thread tags and that didnt work.
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  6. #6
    Senior Member
    Real Name
    .
    Join Date
    Jul 2006
    Posts
    386
    Liked
    3 times
    Blog Entries
    1
    If you figure this out, please post it. I've been wanting to do this for so long and I ended up with the same thing you ended up with...nothing showing up.

  7. #7
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    Yeah, it's probably like i said.. not availble yet that early on in processing, since the similar threads gets called AFTER the thread is built.

    I would do something like this--

    put a spacer div in the content where you want it to show:
    Code:
    <div id="mysimilarthreadswrap" style="width: 100%; height: 150px;><table id="mysimilarthreads"></table></div>
    Then, make a new client script that does something like
    Code:
    function populatesimthreads() {
    document.getElementById("mysimilarthreads").innerHTML = document.getElementById("collapseobj_similarthreads").innerHTML;
    
    document.getElementById("collapseobj_similarthreads").style.display = "none";
    
    }
    
    window.onload = populatesimthreads;
    its a hack job at best...

  8. #8
    Senior Member f4vn's Avatar
    Real Name
    Lam AJ
    Join Date
    Nov 2007
    Posts
    107
    Liked
    5 times
    Did anyone test ?

  9. #9
    Senior Member
    Real Name
    .
    Join Date
    Jul 2006
    Posts
    386
    Liked
    3 times
    Blog Entries
    1
    I would try, I just don't know where to go with that information :(

  10. #10
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    put the top block in the template where you want them to show
    and put the 2nd code block in the head include, or in a new script.js file, and link it from headinclude.

  11. #11
    Senior Member f4vn's Avatar
    Real Name
    Lam AJ
    Join Date
    Nov 2007
    Posts
    107
    Liked
    5 times
    Quote Originally Posted by briansol View Post
    put the top block in the template where you want them to show
    and put the 2nd code block in the head include, or in a new script.js file, and link it from headinclude.
    Not working for me...

  12. #12
    Member
    Real Name
    mparadise
    Join Date
    Nov 2007
    Posts
    76
    Liked
    2 times
    Blog Entries
    1
    Is there a simpler way of doing this?

Similar Threads

  1. Move linkbacks under similar threads
    By popowich in forum LinkBacks
    Replies: 14
    Last Post: 09-06-2011, 04:33 AM
  2. Linking to Forums and Members in Similar threads
    By tavenger5 in forum General Discussion
    Replies: 1
    Last Post: 11-27-2008, 09:51 AM
  3. Replies: 2
    Last Post: 05-29-2008, 04:41 PM
  4. NNTP Plugin Threads doing RPC Pinging?
    By Ic3m4n in forum General Discussion
    Replies: 3
    Last Post: 02-08-2007, 05: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
  •