Announcement

Collapse
No announcement yet.

How to pull latest thread on my html homepage

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

  • How to pull latest thread on my html homepage

    Ok, i will rephrase my questions.

    I am trying to pull the latest thread to my html homepage. How should i do it

    I look into this : http://www.vbulletin.com/forum/showt...stall+rss+feed

    However, when the link is point to "search.php?do=getnew", It comes out error page. i already check yes on the external feed option at the External Data Provider.

    BY the way, if i uses this code , do i need to install RSS first?

  • #2
    RSS is a protocol; a structured language; a meutual agreed way to communicate... etc. Not a software, so you don't need to install it.

    Use this code here in documentations exactly as is, and it wouldn't cause any errors. Don't change it to search.php?do=getnew because that link will just give you a normal page output which cannot be parsed by the code you have (you can probably code special things to parse that; but that's not supported).
    Best Regards,
    Andy Huang

    Comment


    • #3
      I am sorry, but i do not know what you mean by that. It is still not working.

      I try to replace the script page with what you recommended and still it is not ok.

      Comment


      • #4
        This is what the code that i use before i change the javascript code that you recommended.

        <!-- show latest active threads -->
        <table cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
        <tbody>
        <tr>
        <td colspan="2">
        <a href="search.php?do=getnew">Latest Active Threads</a>
        </td>
        </tr>
        </tbody>
        <tbody>
        <tr>

        <td width="100%">

        <div>
        <script type="text/javascript" src="external.php?type=js"></script>
        <script language="" type="text/javascript">
        <!--
        for (var x in threads)
        {
        document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />");
        }
        //-->
        </script></div>

        </td>
        </tr>
        </tbody>
        <!-- show latest active threads -->
        </table>
        <br />
        The "search.php?do=getnew" is point to the error page when it is open at www.yourdomain.com/search.php?do=getnew.

        After i change the javescript from:

        <script type="text/javascript" src="external.php?type=js"></script>
        <script language="" type="text/javascript">
        <!--
        for (var x in threads)
        {
        document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />");
        }
        //-->

        </script
        to

        <script src="http://www.yourdomain.com/forumpath/external.php?type=js" type="text/javascript"></script><script type="text/javascript"><!--for (i in threads){document.writeln(threads[i].title + " (" + threads[i].poster + ")<br />");}//--></script>
        It is still the same, nothing change. not working
        Last edited by tonynlek; Sat 27 Jan '07, 8:02pm.

        Comment


        • #5
          ANy help?

          Comment


          • #6
            Please wait at least 24 hours before bumping your posts.

            From the forum rules:
            http://www.vbulletin.com/forum/showthread.php?t=42918

            Please wait a reasonable amount of time before bumping posts. For style changes and general 'how-to' questions this should be 24 hours. For specific troubleshooting issues, use 12 hours as a guideline.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment


            • #7
              My apologies, I forgot to mention that you should update the yourdomain and forumpath part.

              If your page is not in the same directory with your forum, you should include at least a relative path to your forum.

              IE:
              If your page is http://www.yourdomain.com/page.html, and your forum is located at http://www.yourdomain.com/forums/, then you should change it to yourdomain.com/forums/external.php?type=js.

              If your page is http://www.yourdomain.com/page.html, and your forum is lcoated at http://www.yourforum.com/, then you should change it to http://www.yourforum.com/external.php?type=js.

              The link that you had in your original code is also one of those 'need to update path' things where you need to include at least a relative path to it. IE: /forum/search.php?do=getnew

              Please give the above a try, and if nothing else works, you may wish to post the URL to your page and URL to your forum; we can construct the path for you as needed that way more accurately as well.
              Best Regards,
              Andy Huang

              Comment


              • #8
                I used vB's code but it was never up-to-date, so I looked at THIS. It works fine on our homepage.

                If you don't want to output the posts that way, but want an RSS type link but not use XML-RSS you can get something like THIS

                Bob

                Comment


                • #9
                  So that means i need to create a page for the latest thread feeds and then point to that page for the feeds to be seen in my homepage. Is that correct? i am quite confuse with the whole thing. sorry but ia m not a prorgammer. i will try my best to test it out and post again

                  Comment


                  • #10
                    ok i have done it. I pu tin forumpath and i just removed the "path: word.

                    I see that the update is the thread title and the poster nick. HOw should i put in a way that only thread is shown without the poster's nick

                    Currently is : document.writeln(threads[i].title + " (" + threads[i].poster + ")<br />"); ---> this is thread with nick.

                    How do i do it with only thread ( without the nicks)

                    Comment


                    • #11
                      Bob, your script is cool. i will try taht out. But there is one thing i do not understand.

                      This part: " The page it's on must have a .php extension or you should setup apache to parse the page correctly. "

                      So does it mean i need a PHP page or HTml page or what.

                      Comment


                      • #12
                        Originally posted by tonynlek View Post
                        Bob, your script is cool. i will try taht out. But there is one thing i do not understand.

                        This part: " The page it's on must have a .php extension or you should setup apache to parse the page correctly. "

                        So does it mean i need a PHP page or HTml page or what.
                        I am wondering the same

                        Comment

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