Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to show last 10 topics on other webpages (only some categories.)
I want to show last 10 topics but separate the category.
(showing only one category at a time)
look at my code , what shall I do next ?
on http://ebay.fakjai.com/bbs/top20.php
<script src="jquery.js"></script> <script> // Include this script where you want to embed the latest 10 discussions. // This script requires jQuery. document.write('<div id="vn_discussions_popular"></div>'); jQuery(document).ready(function($) { var url = 'http://ebay.fakjai.com/bbs/discussions.json?page=1-10&callback=?'; $.ajax({ url: url, dataType: 'json', success: function(data) { var foo = 'bar'; var result = ''; for(i in data.Discussions) { d = data.Discussions[i]; result += '<img src="http://ebay.fakjai.com/wp-content/themes/fakjai/images/PostBullets.png"> <a href="'+d.Url+'">'+d.Name+'</a> โดย '+d.FirstName+' ( '+d.CountViews+' เข้าชม '+d.CountComments+' ความคิดเห็น ) </img><br />'; } result = '<ul>'+result+'</ul>'; $('#vn_discussions_popular').html(result); } }); }); </script>
0
Best Answer
-
Todd Vanilla Staff
The post that I originally helped you had the answer in the notes.
Notice that the url looks very similar to the url that you browse to when viewing the forum normally. The only difference is that it has a .json?page=1-20&callback=? on the end. This is the API in action and you can call most urls that way.
0
Answers
The post that I originally helped you had the answer in the notes.
I get it , Thanks so much .