Javascript Feed Format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • furst
    Senior Member
    • Dec 2005
    • 202
    • 3.5.x

    Javascript Feed Format

    I have recently put a few javascript feeds on my forum home but I do not like the way they look.

    Where as right now they are formatted as such:
    Lost (Posted By: M U G G S)
    with the linked thread title followed by (Posted By: thread starter's name), I would like to change it to
    Lost - furst (28) [a small arrow image linked to the last post of the thread]
    Where the linked thread title is followed be "- last posters name (# of posts) [a small arrow image linked to the last post of the thread]"

    Can anyone tell me how I can change the output accordingly? Right now I have this to display the feeds at the forum home:
    Code:
    <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="3">
    <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>
    <center><a href="search.php?$session[sessionurl]do=getnew">Latest Threads</a></center>
    </td>
    </tr>
    </tbody>
    <tbody id="collapseobj_forumhome_external" style="$vbcollapse[collapseobj_forumhome_external]">
    <tr>
     
    <td class="alt1" width="33%">
     
    <div class="smallfont">
    <script type="text/javascript" src="external.php?type=js&forumids=67,70,71"></script> 
    <script language="" type="text/javascript">
    <!--
    for (x = 0; x < 10; x++)
    {
    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 class="alt1" width="*">
     
    <div class="smallfont">
    <script type="text/javascript" src="external.php?type=js&forumids=72,66,77,79,76,78,75,69,73"></script> 
    <script language="" type="text/javascript">
    <!--
    for (x = 0; x < 10; x++)
    {
    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 class="alt1" width="33%">
     
    <div class="smallfont">
    <script type="text/javascript" src="external.php?type=js&forumids=68"></script> 
    <script language="" type="text/javascript">
    <!--
    for (x = 0; x < 10; x++)
    {
    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>
     
    </td>
     
     
    </td>
    </tr>
    </tbody>
    <!-- show latest active threads -->
    </table>
    <br />
    </if>
  • Chroder
    Senior Member
    • Dec 2002
    • 1449

    #2
    Some of the information you want is not available in the JS feed, nor any of the other feeds. You'll need to create a custom feed or a plugin to get the information you want.

    Comment

    • furst
      Senior Member
      • Dec 2005
      • 202
      • 3.5.x

      #3
      Oh, I was hoping it could just be called from other parts of the forum.

      Which of the information is available through the feed?

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        It only shows new threads.

        Comment

        • Chroder
          Senior Member
          • Dec 2002
          • 1449

          #5
          The JS object vB creates has:
          Code:
          this.threadid = threadid;
          this.title = title;
          this.poster = poster;
          this.threaddate = threaddate;
          this.threadtime = threadtime;
          Each one of those values are available through the JS feed.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...