Announcement

Collapse
No announcement yet.

cant display 'active threads' javascript

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

  • cant display 'active threads' javascript

    follow this tip by Floris:
    HowTo Display Latest Active Threads on ANY normal HTML page
    http://www.vbulletin.com/forum/showthread.php?t=158895
    on a page outside vb.

    I changed the code to read
    <a href="http://www.vedicschool.com/ivi/forums/search.php?do=getnew"><strong>Latest Forum Discussions</strong></a></div></td> </tr> </tbody> <tbody> <tr> <td width="100%"> <div> <script type="text/javascript" src="http://www.vedicschool.com/ivi/forums/external.php?type=js"></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 10; x++) { document.writeln("<a href=\"http://www.vedicschool.com/ivi/forums/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a>
    all that shows is a hyperlink to the page latest threads in the forum site.

    see page at http://ayurvedahc.com/index.htm - halfway down the page in the center in table.

    please help
    ~ consciousness changes everything ~

  • #2
    Html problem?

    Try this:

    {
    document.writeln("<a href=\"oracle/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+" (Posted By: "+threads[x].poster+")<br />");
    }

    Not elegant perhaps, but it works for me
    I just added the poster bit on the end, though I think you just want to show thread title. Important thing is to close the expression " and )
    Last edited by Profaders; Thu 19th Jan '06, 9:37am.

    Comment


    • #3
      Thanks Profaders,
      I pasted in the source code, but the code shows up on the webpage
      http://ayurvedahc.com (2nd box down)

      did i put it in the wrong place?
      ~ consciousness changes everything ~

      Comment


      • #4
        Expression problem

        Your expressions between threadid and threadtitle are wrong

        (""+threads[x].title+" (Posted By: "+threads[x].poster+")


        By the look of it you've got an extra ( in there, and a missing < between " "

        Change to:

        {
        document.writeln("<a href=\"yourforumfolder/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+" (Posted By: "+threads[x].poster
        +")<br />");
        }


        Make sure this line is corrected first.

        I use the <br at the end because my column widths are fairly narrow. Looks like your text box is fairly wide, so you might not need it. But get the expressions in that line of code right first

        Comment


        • #5
          Appreciate ur help Profaders,
          Its strange.
          1. I paste exactly what u gave me into Dreamweaver and then I tried Text edit. The code changes once it displays on the screen even though it looks fine in DW/TE.
          I dont know what to make of it...
          ~ consciousness changes everything ~

          Comment


          • #6
            sorry, i notice this thread is very old but I also get the same hyper link problem

            this is my temp file:

            http://www.ai-stockmarketforum.com/newPost.html

            not sure whats going wrong

            edit-- figured it out, delete the spaces and carrage returns, copying and pasting this text seems to lead to errors with line returns
            Last edited by mikep; Tue 3rd Oct '06, 1:22pm.
            ai-stockmarketforum vbulletin-faq vbulletin-fans

            Comment

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