Announcement
Collapse
No announcement yet.
Display latest topics on non-vb pages
Collapse
X
-
I have two forums with latest vBulletin. API is activated on both sites, but I have missed anything in configuration for it to work?
www.ciklid.org - Not working
www.zoopet.com - Working
https://www.zoopet.com/forum/api/test.php
PHP Code:<? $vbpath = '..'; define('CSRF_PROTECTION', false); require_once($vbpath . '/includes/vb5/autoloader.php'); vB5_Autoloader::register($vbpath); vB5_Frontend_Application::init('config.php'); $api = Api_InterfaceAbstract::instance(); $search_json = '{ "last":{"from":"100"}, "view":"topic","starter_only":"1", "sort":{"lastcontent":"desc"}, "channel":["18"] }'; $threads = vB_Api::instanceInternal('search')->getInitialResults($search_json, 30, 1); $i = 0; $thread_returns = array(); foreach ($threads['results'] as $tid => $thread_details) { $i++; $thread_returns['results'][$i] = array( 'title' => $thread_details['content']['title'], 'publishdate' => $thread_details['content']['publishdate'], 'channeltitle' => $thread_details['content']['channeltitle'] ); $thread_returns['results'][$i]['postlink'] = vB5_Route::buildUrl( $thread_details['routeid'] . '|fullurl', array( 'nodeid' => $thread_details['nodeid'], 'title' => $thread_details['title'] ) ); } $thread_returns['totalRecords'] = count($thread_returns['results']); $thread_returns['searchJSON'] = $search_json; $thread_returns['days'] = $num_days; if ($thread_returns['totalRecords'] > 0) { header('Content-Type: application/json'); echo json_encode($thread_returns); } ?>
- Top
- Translate
- Bottom
Comment
Latest Posts
Collapse
-
Reply to Welcome to our newest member issueby SnowhogWow! I totally forgot about this.

I just now edited the user.php file. We have a BANNED 'new' user showing in "Welcome to our newest...Today, 08:22 AM -
Reply to Request: Instagram Media Embed or Retrieval Mod for vBulletin Forums Using Snapinstaink Approachby glennrocksvbThank you for the suggestion. I took some time to evaluate the request further and review Instagram's Terms of Use.
I understand the use...Yesterday, 12:05 PM -
I am running a vBulletin forum for a content creator community and wanted to raise a mod request around Instagram media integration. Currently when members...Yesterday, 09:14 AM

Comment