show latest topics outside the forum
hi,
how can i show the latest topics posted from a specific category in the forum outside the forum in another php page?
0
hi,
how can i show the latest topics posted from a specific category in the forum outside the forum in another php page?
Comments
write mysql query and php code to display latest post
grab data from Discussion,Comment,User tables
extremely new and unfamiliar with php
btw, i'm using vanilla 2.1
Don't do that.
You can retrieve the data in json Format by appending .json to the controller name in the url
For example:
http://vanillaforums.org/categories.json/vanilla-2-1
Take a look at the vanilla forums wordpress plugin, which does exactly what you want:
https://wordpress.org/plugins/vanilla-forums/
If you are not using wordpress, a starting point would be to copy the contents of the function
vf_widget_discussionsfrom widgets.php and include the functions.phpAnother (probably easier) option would be to create a view in vanilla that just shows the
DiscussionsModuleand embed this into your page.If you are not using wordpress, I suggest you add Latest Post List as a plugin and pull the module into your site via AJAX.
You can request any module on your site through the module controller. Request
http://forums.example.com/module/latestpostlistmoduleand you will get a preformatted html string.You are probably going to want to install your plugin first
http://vanillaforums.org/addon/latestpostlist-plugin
Haha
@x00 thanks for the link.