Latest post on non vbulletin page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • croft
    Senior Member
    • Aug 2002
    • 310
    • 4.1.x

    #16
    I use this now as a headline thing only at the moment.



    Im wondering what i need to add to the code to get the date it was posted ?
    All i have now is the topic and the user hwo posted.
    I want it to show like "bla bla bla By croft at date"
    Pimp Daddy Croft Magazine

    Comment

    • Linus
      New Member
      • Apr 2001
      • 19

      #17
      Hmm doesn't seem to work for me ??

      I get a JavaScript error saying thread not defined or something
      Last edited by Linus; Sun 21 Sep '03, 11:35pm.

      Comment

      • Byron
        Senior Member
        • Nov 2000
        • 525
        • 3.0.0 Beta 6

        #18
        How to edit the code to show Posts, Views and link to poster Profile?
        .

        Comment

        • Byron
          Senior Member
          • Nov 2000
          • 525
          • 3.0.0 Beta 6

          #19
          I get a javascript error.

          Error: 'threads[...].threadid' is null or not an object
          Code: 0
          .

          Comment

          • Marco
            Senior Member
            • Nov 2000
            • 827
            • 3.8.x

            #20
            Originally posted by b00tsauce
            Is there a way to limit the number of characters when it displays? Like let's say I'll be putting this information in a table but I dont want the characters to go to the next line or anything...? Just limit it to about 15 characters max and then display a "..." at the end. These were seen on most of the vbindex/vbhome hacks.
            Yes, that can be done. Convert the value to a string, have it count the characters then cut it off if it's over a certain # of characters.

            For instance, if you wanted to do this with the post title, you'd use something like this:
            Code:
            var titleAsString = new String(threads[i].title);
            if (titleAsString.length > 15)
            {
            var newTitle = titleAsString.substring(0,15);
            document.write(newTitle + "...");
            }
            else
            {
            document.write(titleAsString);
            }

            Comment

            • Byron
              Senior Member
              • Nov 2000
              • 525
              • 3.0.0 Beta 6

              #21
              Originally posted by Byron
              I get a javascript error.

              Error: 'threads[...].threadid' is null or not an object
              Code: 0
              I found the source of the javascript error already.

              for (i = 0; i < 15; i++)

              If you set the code to display 15 threads and your test forum has less than that amount of threads, the error will appear.

              How can we prevent this the error from happening?

              I want to include latest threads from a single forum. This is a problem if the forum is new.
              .

              Comment

              • MrNase
                Senior Member
                • Jun 2003
                • 3575
                • 3.8.x

                #22
                is there a way to display the latest thread first? by now the latest thread is the last one
                That's the end of that!

                Comment

                • killervette
                  New Member
                  • Dec 2003
                  • 21
                  • 3.0.0 Gamma

                  #23
                  Is there a way to display a X amount of characters of the actual post too? Like a latest news kind thing.... shows some and then Click Here to get the whole post???

                  Comment

                  • pablo
                    Senior Member
                    • Apr 2002
                    • 592
                    • 3.8.x

                    #24
                    so does anyone have it worked to display the last X active topics ? Showing threads really isn't the most accurate if people are looking for active topic/discussions.
                    My Sites :

                    Comment

                    • Duke of Lions
                      Senior Member
                      • Dec 2001
                      • 133
                      • 5.6.4

                      #25
                      Originally posted by Byron
                      I get a javascript error.

                      Error: 'threads[...].threadid' is null or not an object
                      Code: 0
                      That is due to the fact the number of posts in your forum are less then 15, so start posting.....

                      I am using the script below, but I have two errors, on the one public forum, gastenboek, you cannot view it without logging in, while forum permissions are set for unregistered to be able to do everthing, how come? Also when you do login you can see the posts but it says threadid=undefined I have searched many threads but cannot find it.... Anyone?

                      <script type="text/javascript" src="<A href="http://www.wyswert.nl/forum/external.php?type=js&forumids=78"></script">http://www.wyswert.nl/forum/external.php?type=js&forumids=78"></script>
                      <script type="text/javascript">
                      <!--
                      for (i = 0; i < 15; i++)
                      {
                      document.writeln("<b><a href=\"<A href="http://www.wyswert.nl/forum/showthread.php?threadid="+threads.threadid+"\">"+threads[i].title+"</a></b>&nbsp;&nbsp;By">http://www.wyswert.nl/forum/showthread.php?threadid="+threads.threadid+"\">"+threads[i].title+"</a></b>&nbsp;&nbsp;By: <i>"+threads[i].poster+"</i><br />");
                      }
                      //-->
                      </script>
                      Please ReadThe****ingManual

                      Comment

                      • Alex
                        Senior Member
                        • Mar 2001
                        • 223

                        #26
                        I have a question to the script Scott posted. Everything works fine so far.

                        But what I wanted to do is format the output alternately per line. Meaning, the first line should have a grey background, the second a white, the third a grey background again, etc. Can somebody point that out for me? I'm not a javascript pro at all. Thanks!
                        Greetz Alex
                        Spasschat-Team - the best chat, you've ever seen :)

                        Comment

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