Bugs should be reported on the Bug Tracker. To download the latest bleeding-edge version of the SDK, head over the SVN repository.
![]() ![]() |
|
Problems with Portal 1.3 and SDK
|
Jul 18 2004, 12:25 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 67 Joined: 4-February 04 Member No.: 81,360 IPB Version: Not Applicable |
I'm using IPB 1.3 and Portal 1.3. I've got the sdk mod working to a certain extent but I'm having problems using it in more than one area of the page, i.e. in 2 different php boxes or on the header/logo area and in a php box. Example:
This is in one php box and works ok.. nclude ('/home/myaccount/public_html/forums/ipbsdk/ipbsdk_class.inc.php'); $SDK =& new IPBSDK(); if ($SDK->is_loggedin()) { echo "you are logged in"; } else { echo "you are not logged in"; } This is in the same box further down and works.. $posts = $SDK->list_forum_topics ("3", array("limit" => "10", "start" => "0", "order" => "desc", "orderby" => "post_date"), "0"); $c=0; while ( $c < '10' ) { echo $posts [$c]['title']."(".$posts [$c]['desription'].")<br>"; ++$c; } If i try to add the following to another box on the same page I get Fatal error: Cannot redeclare class ipbsdk in /home/lomhqco/public_html/forums/ipbsdk/ipbsdk_class.inc.php on line 122... Code(basically same as above): include ('/home/myaccount/public_html/forums/ipbsdk/ipbsdk_class.inc.php'); $SDK =& new IPBSDK(); $posts = $SDK->list_forum_topics ("3", array("limit" => "10", "start" => "0", "order" => "desc", "orderby" => "post_date"), "0"); $c=0; while ( $c < '5' ) { echo $posts [$c]['title']."(".$posts [$c]['desription'].")<br>"; ++$c; } How can I make it work for other boxes or areas of the page? I have this same problem when putting some code into the header/logo area and then also in a php box. This post has been edited by Jargonaut: Jul 19 2004, 03:55 PM |
|
|
|
Jul 19 2004, 11:22 AM
Post
#2
|
|
|
Newbie ![]() Group: Members Posts: 67 Joined: 4-February 04 Member No.: 81,360 IPB Version: Not Applicable |
Has anyone else got this to work across more that one box on Portal 1.3? Or is the problem not related to that and I'm just doing something wrong?
Any help would be greatly apreciated. This post has been edited by Jargonaut: Jul 19 2004, 11:39 AM |
|
|
|
Jul 19 2004, 03:53 PM
Post
#3
|
|
|
Newbie ![]() Group: Members Posts: 67 Joined: 4-February 04 Member No.: 81,360 IPB Version: Not Applicable |
Got it working. The only thing I changed was to use require_once instead of incude in each box.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 10th March 2010 - 09:56 PM |