Welcome Guest ( Log In | Register )


Check out the FREE chatroom mod for IPB 3.x

> About IPB SDK

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
Jargonaut
post 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
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2010 - 09:19 AM
Invision Skins · IPB Skins