Jump to content


Photo
* * * * * 1 votes

(IM) IPB SDK V3


54 replies to this topic

#41 Vince

Vince

    Lead Developer

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,974 posts
  • IPB Version:v3.1.x
  • Real Name:Vince
  • Location:California, USA / Israel

Posted 30 August 2009 - 06:45 AM

Yes, I will be making classes for the Gallery, Downloads and blog.

Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image


Zend Certified Engineer.
Zend Framework Certified Engineer.
-- Email: vadimg88@gmail.com
-- Phone: +972-52-3808258
-- Skype: vadim.gabriel
-- Website: http://www.vadimg.com

formerly known as vadimg88


#42 LukiQ

LukiQ

    n00b

  • Members
  • Pip
  • 3 posts
  • IPB Version:v3.0.x
  • Real Name:Łukasz
  • Location:Breslau

Posted 31 August 2009 - 09:15 AM

So, Vince what about this functionality : Topics (Add,Edit,Update, Delete, add posts to topics, etc...)
Did you start to write this ? When is it going to be releases? If I'm too pushy, I'm sorry.
Thx again for Your great work with this project.

#43 axelay

axelay

    n00b

  • Members
  • Pip
  • 4 posts
  • IPB Version:v3.0.x
  • Real Name:Alex

Posted 01 September 2009 - 02:44 PM

OK I just made another "discovery" which took me a long time to sort out.
If, like me, you open a connection to your database in a common file (called by all the PHP scripts in your site), make sure the block
define ('IPB_PATH', '/forumnew');

require_once ('./IPB_SDK_3/SDKConfig.php');

$sdk = IPBSDK::instance();
$login = $sdk->getClass('login');
$self = $_SERVER['PHP_SELF'];
sits ABOVE anything else. Especially the mysql_connect. Indeed, the connection to the database made by IPB is not using the TRUE flag for using a new_link, therefore my connection was overwritten without any warning so I was not querying the right database (my 2 DBs are kept distinct).

Hope that will preserve some other person's precious hair, mine are stacked neatly under my keyboard... ;)

Alex

#44 LukiQ

LukiQ

    n00b

  • Members
  • Pip
  • 3 posts
  • IPB Version:v3.0.x
  • Real Name:Łukasz
  • Location:Breslau

Posted 08 September 2009 - 05:00 AM

Hi, I am using Your SDK, it's great , ut I have one problem. I've created this class - similar structure to class login : here is a code :
<?php
/**
 * IP.Board 3.0 SDK PostForum
 *
 *
 */
class PostForum
{
	/**
	 * IPB SDK object
	 *
	 * @var object
	 */
	public $sdk;

	/**
	 * IPB Registry object
	 *
	 * @var Object
	 */
	public $registry;

	/**
	 * Login handler object
	 *
	 *
	 * @var Object
	 */
	public $login;

	/**
	 * Ajax class
	 *
	 *
	 * @var Object
	 */
	public $ajax;

	/**
	 * Return the result as a boolean value?
	 *
	 * @var boolean
	 */
	public $returnAsBool = false;

	/**
	 * Shortcut keys for the registry
	 *
	 * @var Mixed Object/Array
	 */
	public $settings;
	public $DB;
	public $request;
	public $lang;
	public $member;
	public $memberData;
	public $cache;
	public $caches;

	/**
	 * Constructor - Class construct
	 *
	 * @param ipsRegistry $registry
	 */
	public function __construct( ipsRegistry $registry ) {
		$this->registry = $registry;
		$this->DB		 =  $this->registry->DB();
		$this->settings   =& $this->registry->fetchSettings();
		$this->request	=& $this->registry->fetchRequest();
		$this->lang	   =  $this->registry->getClass('class_localization');
		$this->member	 =  $this->registry->member();
		$this->memberData =& $this->registry->member()->fetchMemberData();
		$this->cache	  =  $this->registry->cache();
		$this->caches	 =& $this->registry->cache()->fetchCaches();


		/*
	 * Get Forums application initialization
	 */
		require_once( IPS_ROOT_PATH . 'applications/forums/app_class_forums.php' );
	$this->_handlerPost = new app_class_forums( $this->registry );

	/**
	 * Get posting class
	 */
	require_once( IPS_ROOT_PATH . 'applications/forums/sources/classes/post/classPost.php' );
		$this->_postClass = new classPost( $this->registry );
	}

	
	public function addTopicAndPost($idUser,$idForum,$topic="",$postContent="") {
	$this->_postClass->setIsPreview( false );
	$this->_postClass->setForumData( ipsRegistry::getClass('class_forums')->forum_by_id[ $idForum ] );
	$this->_postClass->setForumID(10);//this is id for the forum where the topic is
	$this->_postClass->setPostContent($postContent);
	$this->_postClass->setAuthor($idUser);//this is id for member
	$this->_postClass->setPublished( true );
	$this->_postClass->setSettings( array( 'enableSignature' => 1,
										   'enableEmoticons' => 0,
										   'post_htmlstatus' => 0,
										   'enableTracker'   => 0 ) );
	$this->_postClass->setTopicTitle($topic);
	$this->_postClass->setTopicDescription( "Comments for: ".$topic);

	try {
			if ( $this->_postClass->addTopic() === FALSE )
			{
					print "Topic posting failed.";
			}
	} catch( Exception $error )	{
			print "Topic posting failed: " . $error->getMessage();
	}

	return array($this->_postClass->getTopicData(),$this->_postClass->getPostData());
	}



	public function addPostReplay($idUser,$idForum,$topicId="",$postContent="") {


		$this->_postClass->setIsPreview( false );
		$this->_postClass->setForumData( ipsRegistry::getClass('class_forums')->forum_by_id[ $idForum ] );
		$this->_postClass->setForumID( $idForum );//this is id for the forum where the topic is
		$this->_postClass->setPostContent( $postContent );
		$this->_postClass->setAuthor( $idUser );//this is id for member
		$this->_postClass->setPublished( true );
		$this->_postClass->setSettings( array( 'enableSignature' => 1,
											   'enableEmoticons' => 0,
											   'post_htmlstatus' => 0,
											   'enableTracker'   => 0 ) );
		$this->_postClass->setTopicID( $topicId );

		/**
		 * And post it...
		 */
		try
		{
			if ( $this->_postClass->addReply() === FALSE )
			{
				return "Reply posting failed:";
				
			}
		}
		catch( Exception $error )
		{
			print "Reply posting failed: " . $error->getMessage();
			exit;
		}


		return array($this->_postClass->getTopicData(),$this->_postClass->getPostData());
	}

}
The function to reply to a topic(addPostReplay) doesn't work, and I cant get it to work. Could You help me ?
Regards
LukiQ

Edited by LukiQ, 08 September 2009 - 05:00 AM.


#45 PeteB

PeteB

    Novice

  • Members
  • PipPip
  • 9 posts
  • IPB Version:v2.3.x
  • Real Name:Pete

Posted 07 October 2009 - 03:11 AM

Hi Vince - any update on this?

#46 tzrtim

tzrtim

    n00b

  • Members
  • Pip
  • 3 posts
  • IPB Version:v3.0.x
  • Real Name:Tim

Posted 20 October 2009 - 02:50 AM

Yeah, Could we know if this is still active on being updated and all? If so it be great to use knowing that any bugs will be fixed and more updates coming out

#47 Splintter

Splintter

    n00b

  • Members
  • Pip
  • 4 posts
  • IPB Version:v2.3.x

Posted 01 November 2009 - 06:09 PM

Add ability to post on IP.Shoutbox and get a random active user on it.

Edited by Splintter, 01 November 2009 - 06:10 PM.


#48 JoshD

JoshD

    Member

  • Members
  • PipPipPip
  • 48 posts
  • IPB Version:v3.0.x
  • Real Name:Josh
  • Location:WI, USA

Posted 02 November 2009 - 05:19 PM

How do I check to see if a user is already logged in?

#49 joshuafrfld701

joshuafrfld701

    n00b

  • Members
  • Pip
  • 1 posts
  • IPB Version:N/A

Posted 19 November 2009 - 10:41 AM

I'll be sure to use it when I switch to IPB 3, but not for quite awhile though. Waiting for all the mods I have currently installed to be upgraded. But do you think you could do an upgrade of the mod.

_________________
kasey kahne calendar

#50 prostate

prostate

    n00b

  • Members
  • Pip
  • 1 posts
  • IPB Version:v3.0.x

Posted 20 November 2009 - 09:56 AM

Nice work, i really hope you are working on some more possibilites like creating / editing topic and get the number of pm ;)

#51 Prodigyx

Prodigyx

    n00b

  • Members
  • Pip
  • 1 posts
  • IPB Version:v2.3.x
  • Real Name:Prodigy

Posted 27 March 2010 - 09:26 AM

Fatal error: Cannot assign by reference to overloaded object in /home/site/www/forum/Classes/Login.php on line 62

Line 62:

$this->settings =& $this->registry->fetchSettings();



& causes error. Does anyone have a solution?

Edit:

Take off __get and __set functions and works now.

Edited by Prodigyx, 27 March 2010 - 09:56 AM.


#52 RichVRed

RichVRed

    n00b

  • Members
  • Pip
  • 1 posts
  • IPB Version:v3.1.x
  • Real Name:Richard

Posted 23 April 2011 - 04:51 AM

<DELETE THIS POST> The question was answered via pm.

Edited by RichVRed, 25 April 2011 - 02:13 AM.


#53 Chongas

Chongas

    n00b

  • Members
  • Pip
  • 1 posts
  • IPB Version:v3.2.x
  • Real Name:Chris Nascimento

Posted 18 May 2013 - 08:41 PM

Download link broken? :s



#54 Billaone67

Billaone67

    n00b

  • Banned
  • Pip
  • 3 posts
  • IPB Version:v1.3.x

Posted 02 June 2013 - 06:22 AM

Merci bcp !!! :^p



#55 powerzx

powerzx

    n00b

  • Members
  • Pip
  • 1 posts
  • IPB Version:v3.3.x

Posted 19 March 2017 - 09:56 PM

Hi, can you reupload ipb sdk file?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

IPB Skin By Virteq