Installing XenForo Locally and Setting-up Eclipse

Eclipse is a lost to me... had to use codelobster. Installing xenforo on localhost was easier then I thought it would be. Now that the basic part is done and going back to creating my styles.

Do not know what you use in that video to edit folders `file permission`, but I am alright with how it is working.
 
Ah!!!! Too bad that Zend Studio is $300. I already bought Coda and love it. I can't see myself switching now. :(
 
I think I am a lost cause too!
smile.png


I am actually developing with Netbeans over a SVN setup and on a portable setup (http://www.portableapps.com/, a real life savior!). The actual test server and SVN repositery run on a server at home (but I may well switch on one of my servers in the datacentre).

The only pain is the templating. Either webdav or online, and that system doesn't help with a revisioning system. Now I really have to configure netbeans to understand "Zend Framework". It's there, I just haven't had the time, nor the will, to cnfigure it, really.

Eclipse is a fine piece of IDE too and I used it while developing on the symfony framework (http://www.symfony-project.org/).

For those that can afford an SVN server, I can't really stress how important a revisioning system can be to your projects: to be able not to overwrite files is just as precious as backing up your system!
 
Ah!!!! Too bad that Zend Studio is $300. I already bought Coda and love it. I can't see myself switching now. :(
Use Eclipse PDT, there's no point in buying Zend Studio (which is basically just Eclipse PDT with a few little extras) until you've worked with Eclipse and decided that you like it. Everything I do in the video is PDT, not Zend Studio functionality.
 
Use Eclipse PDT, there's no point in buying Zend Studio (which is basically just Eclipse PDT with a few little extras) until you've worked with Eclipse and decided that you like it. Everything I do in the video is PDT, not Zend Studio functionality.

Hmmm... That's good to know. I will be attempting to do just that! Now I feel dumb installing a 408MB "Zend Studio" system. And I highly doubt I'll be switching, I love Coda. Its amazing, always has been. Its just they don't really facilitate... other things.
 
Use Eclipse PDT, there's no point in buying Zend Studio (which is basically just Eclipse PDT with a few little extras) until you've worked with Eclipse and decided that you like it. Everything I do in the video is PDT, not Zend Studio functionality.
If I assigned a class to a variable, it doesn't seem to "understand" and allow things. Something like this:

PHP:
$model = XenForo_Model::create('XenForo_Model_AddOn');
$model->get
It doesn't come up with any of the XenForo_Model_AddOn "get" methods...? Do you know how to get around this by chance?
 
If I assigned a class to a variable, it doesn't seem to "understand" and allow things. Something like this:

PHP:
$model = XenForo_Model::create('XenForo_Model_AddOn');
$model->get
It doesn't come up with any of the XenForo_Model_AddOn "get" methods...? Do you know how to get around this by chance?

That's why they make extensive use of code such as this:

PHP:
/**
 * @return XenForo_Model_Node
 */
protected function _getNodeModel()
{
	return $this->getModelFromCache('XenForo_Model_Node');
}

Note the @return phpdoc, which good IDEs such as PhpED, Zend Studio, PDT, etc. will take into account.
 
That's why they make extensive use of code such as this:

PHP:
/**
 * @return XenForo_Model_Node
 */
protected function _getNodeModel()
{
	return $this->getModelFromCache('XenForo_Model_Node');
}

Note the @return phpdoc, which good IDEs such as PhpED, Zend Studio, PDT, etc. will take into account.
So, it saying @return *something* that's what it associates to it. It doesn't "figure" out the class and immediately populate it or whatever?
 
So, it saying @return *something* that's what it associates to it. It doesn't "figure" out the class and immediately populate it or whatever?

The @return tells the IDE that the function will return an instance of XenForo_Model_Node, so any variables you set using the _getNodeModel function will have the functions from XenForo_Model_Node show up in intellisense.
 
The @return tells the IDE that the function will return an instance of XenForo_Model_Node, so any variables you set using the _getNodeModel function will have the functions from XenForo_Model_Node show up in intellisense.

So, yes, that explains what I was asking. I used XenForo_Application::get() and it wasn't showing up with anything. Could a possibility of casting it work. (XenForo_Model_Blah) $var = XenForo_Model::create('XenForo_Model_Blah');?
 
I am a Java guy but it is unlikely eclipse will react to the comments in that way. It reads the code...

(XenForo_Model_Blah) $var = XenForo_Model::create('XenForo_Model_Blah');

This is a guess without looking XenForo_Model::create definition returns a base class, but the input string tells it to create a subclass. Anyway

$var = (XenForo_Model_Blah)XenForo_Model::create('XenForo_Model_Blah');

But php scripting is new to me. This would cast the return type to the expected subclass. But I am still looking for a compiler :)
 
Thank you for creating such an awesome video. I've always struggled with setting up a local test area for basic tweaks and always ended up doing the edits on my live server. I really appreciate this video, thanks again!
 
I am a Java guy but it is unlikely eclipse will react to the comments in that way. It reads the code...

(XenForo_Model_Blah) $var = XenForo_Model::create('XenForo_Model_Blah');
Unfortunately PHP won't interpret this correctly, it is limited to casting to simple variable types as far as I can tell... at least, that's all Eclipse responds to.

What you can do though is add some hinting comments like this:
PHP:
/* @var $userModel XenForo_Model_Visitor */
$userModel = $this->getModelFromCache('XenForo_Model_User');
 
I think I am a lost cause too! :)

I am actually developing with Netbeans over a SVN setup and on a portable setup (http://www.portableapps.com/, a real life savior!). The actual test server and SVN repositery run on a server at home (but I may well switch on one of my servers in the datacentre).

The only pain is the templating. Either webdav or online, and that system doesn't help with a revisioning system. Now I really have to configure netbeans to understand "Zend Framework". It's there, I just haven't had the time, nor the will, to cnfigure it, really.

Eclipse is a fine piece of IDE too and I used it while developing on the symfony framework (http://www.symfony-project.org/).

For those that can afford an SVN server, I can't really stress how important a revisioning system can be to your projects: to be able not to overwrite files is just as precious as backing up your system!
word.
that's why it would be cool, to be able to export options,phrases,templates,groupperms (and everything else stored in the database) into xml files

Just like they are doing it already in xenforo development mode
 
Unfortunately PHP won't interpret this correctly, it is limited to casting to simple variable types as far as I can tell... at least, that's all Eclipse responds to.

What you can do though is add some hinting comments like this:
PHP:
/* @var $userModel XenForo_Model_Visitor */
$userModel = $this->getModelFromCache('XenForo_Model_User');

Hinting? I guess my mind is stuck in strong typing. No matter, I am finding PHP very enjoyable.
 
Hinting? I guess my mind is stuck in strong typing. No matter, I am finding PHP very enjoyable.
Notice the comment in front of it? This'll tell the IDE that $userModel is a "XenForo_Model_Visitor" item, populating the intellisense pop up.
 
There's a wizard under File > Import that you can point to the directory where your code for that project lives.
 
Top Bottom