Announcement

Collapse
No announcement yet.

display latest posts of vb in other website

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

  • display latest posts of vb in other website

    hello dear friends
    i want to display "Latest posts" of my VB5 forum in the the main site, in my main page of website(linux-zone.org) thar written in HTML, i assign a little part for displaying "Latest posts"of my VB5 forum (linux-zone.org/forums). according to what you said in my past question about RSS that it has many problem, so i forget about RSS.

    i searched and found a website that has done just like what i want but just on VB4.

    Click image for larger version  Name:	ash-latest-posts.png Views:	0 Size:	17.9 KB ID:	4431318

    i checked its source and i found , for display Latest Posts of VB, he uses a java script file in his HTML page named : parse2.js

    PHP Code:
    <div id="latest-post">
    <
    div class="title">
    latest post's
    <span><i class="fa fa-folder-open"></i></span>
    </div><ul>
    <script src="http://test.org/parse2.js" type="text/javascript"></script>
    </ul>
    </div> 
    when i checked contents of parse2.js , i found that it used "showthread.php" file for load the "Latest Posts" :
    PHP Code:
    for(i=0;i<=13;i++){var str=threads[i].title;if(str.length>45)str=str.substring(0,45);document.write('<li><a href="http://http://site.org/forums/showthread.php?t=',threads[i].threadid,'" target="_blank">'str+'</a></li>');} 
    it called "external.php" (a script written in java) in HTML codes Header :
    PHP Code:
    <script src="http://http://site.org/forums/external.php?type=JS" type="text/javascript"></script
    now , i did like what he had done in my HTML codes, even i edited the path of showthread.php and external.php files that has changes in path on VB5 but still no success in displaying Latest Post.
    PHP Code:
    http://linux-zone.org/forums/core/vb/api/external.php?type=JS

    http://linux-zone.org/forums/core/vb/api/vb4/showthread.php?t=',threads[i].nodeid,' 
    Click image for larger version  Name:	linux-zone-latest-post.png Views:	0 Size:	26.8 KB ID:	4431319

    do you have any idea to solve the problem?!!
    Last edited by habili; Thu 9th Jan '20, 2:18am.

  • #2
    You would need to update your javascript to account for the newer output of the external.js script provided in vBulletin 5. There is no showthread.php in vBulletin 5.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      i don't understand what you said : "You would need to update your javascript to account for the newer output of the external.js script provided in vBulletin 5."
      do you have any document to do that?

      Comment

      Related Topics

      Collapse

      • z-at-ox
        Can I have scripts in posts?
        by z-at-ox
        I understand that this is an security risk if everyone can do it, but can i make it so admins can place scripts in posts?

        The script I am talking about.

        Code:
        <span id="a2itemwidget"></span>
        ...
        Thu 9th May '13, 10:27am
      • 2Luke2
        Module to call php code
        by 2Luke2
        I'm trying to create a module that will run a php script. below is my php script. I guess I just don't know well enough how to make that run on the forums. I tried to put the raw data in a static html...
        Wed 13th Feb '13, 7:08am
      Working...
      X