Announcement

Collapse
No announcement yet.

latest active thread on non-vb pages question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • latest active thread on non-vb pages question

    Hi,

    I am trying to setup the latest threads on non-vb pages

    I have already read and researched a lot:

    Originally posted by Steve Machol View Post
    vBulletin includes an external feed system which allows to to feed the latest ten public threads (not posts) to external pages. Here's a thread explaining this:

    http://www.vbulletin.com/forum/showp...59&postcount=7

    And here's an explanation on how to use this in a web page:

    http://www.vbulletin.com/forum/showp...58&postcount=1

    And here's the online documentation:

    http://www.vbulletin.com/docs/html/m...group_external
    I am using this code:

    <script src="http://www.coolpersia.com/forums/external.php?type=js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    for (i in threads)
    {
    document.writeln(threads[i].title + " (" + threads.poster + ")<br />");
    }
    //-->
    </script>

    I have tried everything i knew but still facing the following

    1. When you go to the html where i implemented it you will see ( http://coolpersia.com/tt.html )that the thread title are no links. I would like to have only the title (not username) set as link , so when someone click on it, he/she will go to the topic.

    2. Why can i set the amount of threads to appear? right now you see that there are only 4 threads i would like to have 5 or 6....

    I have also tried this script:

    <script type="text/javascript">
    [i]<!--
    for (var i = 0; i < threads.length; i++)
    {
    [i] document.write('<a href="http://www.iris-studios.com/gkwc/showthread.php?t=' + threads[i]['threadid'] + '">' + threads[i]['title'] + '</a> <em>Posted on: ' + threads[i]['threaddate'] + ' by ' + threads['threadtime'] + '</em><br />');
    }
    //-->

    </script>

    The problem with this one is that its showing to many info. like date, time etc. I just want the user name to appear....

    Any idea's?

    thanks in advance...

  • #2
    any ideas?

    Comment


    • #3
      The second section of code that you are using (the one that is showing the date and time) can be edited to just show the title and the username by using
      Code:
      [I][COLOR=#800000]<script type=[COLOR=#0000ff]"text/javascript"[/COLOR]>[/COLOR][/I]
      [i][I][COLOR=#000080]<!--[/COLOR][/I]
      [I][COLOR=#000080]    for (var i = 0; i < threads.length; i++)[/COLOR][/I]
      [I][COLOR=#000080]    {[/COLOR][/I]
      [i][COLOR=#000080]        document.write('<a href=[COLOR=#0000ff]"http://www.iris-studios.com/gkwc/showthread.php?t=' + threads[i]['threadid'] + '"[/COLOR]>' + threads[i]['title'] + '</a> <em>Posted by ' + threads[I]['poster'] + '</em><br />');[/I]
      [I]    }[/I]
      [I]//-->[/I][/COLOR]
      [COLOR=#800000]</script>[/COLOR]
      instead of the code that you are currently using.

      Comment

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