+ Reply to Thread
Results 1 to 4 of 4

Thread: recent forum post problem using external data provider and java script

  1. #1
    Senior Member ~kev~ has disabled reputation ~kev~'s Avatar
    Join Date
    Mar 2007
    Location
    East Texas
    Posts
    166

    recent forum post problem using external data provider and java script

    Enable External Javascript is enabled, to show the recent forum post on the front page I used the code below, and put it below the $navbar. this code is from a vbulletin 3.5 faq page I found on this site. This code seems rather heavy, can someone please point me to a more streamlined JS script to show the recent post? Also, the most recent threads are not showing up on the home page, only some of the recent post.

    My site is built with Vbulletin 3.6.5 - installed a month ago.

    </if>
    <if condition="$vbulletin->options['externaljs']">
    <!-- show latest active threads -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
    align="center">
    <tbody>
    <tr>
    <td class="thead" colspan="2">
    <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_external')"><img
    id="collapseimg_forumhome_external"
    src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_external].gif" alt="" border="0" /></a>
    <a href="search.php?$session[sessionurl]do=getnew">Latest Active Threads</a>
    </td>
    </tr>
    </tbody>
    <tbody id="collapseobj_forumhome_external" style="$vbcollapse[collapseobj_forumhome_external]">
    <tr>

    <td class="alt1" width="100%">

    <div class="smallfont">
    <script type="text/javascript" src="external.php?type=js"></script>
    <script language="" type="text/javascript">
    <!--
    for (var x in threads)
    {
    document.writeln("<img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <span class=\"time\">($vbphrase[posted_by]: "+threads[x].poster+")</span><br />");
    }
    //-->
    </script></div>

    </td>
    </tr>
    </tbody>
    <!-- show latest active threads -->
    </table>
    <br />
    </if>

  2. #2
    (formerly peterska2) peterska2 will become famous soon enough
    Join Date
    Oct 2003
    Location
    England
    Age
    29
    Posts
    8,874
    1. Heavy in what way?

    2. How do you wish it to display

    3. This will only display threads in forums that guests have access to. It will not show threads from any other forums.

    4. The code displays the most recent threads, not the most recent posts. It also uses the settings in vBulletin Options > External Data Provider to control how often it updates.

  3. #3
    Senior Member ~kev~ has disabled reputation ~kev~'s Avatar
    Join Date
    Mar 2007
    Location
    East Texas
    Posts
    166
    1. I saw an example of another recent thread JS and it was only 5 or 6 lines. It was an example code so I did not use it.

    2. As the threads are updated, the code is not showing all the updated post, just the newly created threads.

    How can I get threads that have been posted to, and newly created threads to display?

  4. #4
    (formerly peterska2) peterska2 will become famous soon enough
    Join Date
    Oct 2003
    Location
    England
    Age
    29
    Posts
    8,874
    1. This will probably have been just the javascript section and not the styling and layout for the box as well.

    2 & 3. See number 4 in my post above. If you wish to display latest posts and not latest threads (which is what this displays) then you will require a modification. Please visit vBulletin.org for modification advice, support and assistance.

+ Reply to Thread

Similar Threads

  1. set amount of threads returned in java external data provider?
    By infexious in forum vBulletin 3.6 Questions, Problems and Troubleshooting
    Replies: 1
    Last Post: Sat 30th Sep '06, 1:00pm
  2. External Data Provider problem
    By agoldstraw in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 0
    Last Post: Tue 12th Oct '04, 8:32am
  3. External Data Provider
    By jluerken in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 2
    Last Post: Tue 17th Aug '04, 1:28pm
  4. External Data Provider - script help pls
    By Dabbler in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 1
    Last Post: Sat 7th Aug '04, 3:06pm
  5. external.php java script only one forum ?
    By Miko in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 2
    Last Post: Mon 8th Sep '03, 8:40pm

Bookmarks

Posting Permissions

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