Ross for some reason after my staff forum was upgraded to v2, the API on the main website stopped working. The API is still active and the password is set so i'm not sure whats wrong..
Can you let me know if this is still an issue?
Yea it is:
http://shiningashes.net/
thats the website url, anything needing the url to the forum, you should have it in your PM still and if not i'll PM it to you. But line 25 which is giving the error is calling a post in a thread using the API system.
That site is not loading for me?
hmm works fine for me, tired clearing your DNS setting yet? But the site is the best way to see if its working. Because here is the errors i am getting:
Trying to call a thread:
Warning: Invalid argument supplied for foreach() in /home/Private/public_html/index.php on line 25
Trying to call profile information:
Fatal error: Cannot use string offset as an array in /home/Private/public_html/includes/sidebar.php on line 21
Edit: but the odd thing is that I can still login via the API..
I can access it fine now but couldn't earlier. Although I wouldn't be surprised if it was a problem with our ISP in the office.
Anyway, what API action is that trying to call? (/api/an-action/...)
i'll just post all my main API data, guessing you change one of the settings in v2 that would cause it to break?
Thread CallingCode:
- <?php
- $latest_news = $vforums_api -> request('api/recent/board/publicupdates/max/1/mode/topics/allow_all/1');
- foreach($latest_news as $post) {
- ?>
- <div class="content">
- <h2>News</h2>
- <div class="text">
- <div class="right"><?=date('l dS \of F Y', $post['timestamp']);?></div>
- <h4 class="subject"><u><?=$post['subject'];?></u></h4>
- <blockquote><?=$post['message'];?></blockquote>
- <div style="text-align : right;">~ <?=$post['display_name'];?></div>
- </div>
- </div>
- <?php
- }
- ?>
Also as for th mini-profile, the <?php if(!$logged_in) { ?> isn't being recognized it just shows <!
Should be showing up OK now?
yes seems like it, thanks Ross. Disaster averted![]()