开发者

Can we do Custom PHP/Mysql with ExpressionEngine

I'm looking into expressionEngine as a CMS for a project i'm working on. I'm not sure if EE works with Custom PHP/JQuery. I'm want to allows users to upload images, Each user's images would go into the user's folder 开发者_StackOverflownamed after his userid. User can then access his uploaded images y clicking on show all images... Something along this liken. I have this done in Pure PHP, but the questions is can this be done in EE and how efficient or easy it is to do so.


I don't see why you couldn't accomplish these things within EE. EE has some good image gallery setups, and custom programming (as of EE 2.0) relies on CodeIgniter.

http://www.packtpub.com/article/expressionengine-creating-a-photo-gallery

Be willing to learn the "EE" (now "CodeIgniter") way of doing it. But sure, you could easily build your own system on top of EE.

http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-file-uploading-and-image-manipulation/

A bonus is that the EE community is very friendly and active. Plus there are some great developers, such as Leevi Graham:

http://leevigraham.com/

http://ee-garage.com/

And some more specific examples:

http://codeigniter.com/user_guide/libraries/file_uploading.html

http://jefim.eu/blog/2009/10/image-file-upload-with-codeigniter/

http://codeigniter.com/forums/viewthread/80610/

Some more good information:

http://net.tutsplus.com/articles/web-roundups/30-awesome-codeigniter-tutorials-for-all-skill-levels/


I haven't touched ExpressionEngine a lot, but I have done some freelance work for designers who have used EE. You can use templates in EE and inject your own PHP code into them no problem. You just have to tweak a couple of settings on a per template basis (enable PHP code and set PHP processing to occur at either the input stage or the output stage - not entirely sure what the effect of that is though).

Basically, yeah you can use your own PHP in EE.


ExpressionEngine (EE) is based on CodeIgniter (CI) a free PHP (MVC) framework. So you you may have to create a custom controller and model to do this but its a simple request so should be easy. Start here: http://codeigniter.com/


As mentioned above, there are several ways of achieving the functionality that you're seeking. The easiest methods involve relying on a couple of carefully crafted conditional statements in EE template code, but this method would dump all images into one folder (instead of storing them within a folder named after each user's ID).

If you find that you really want to break out of this structure and store each user's photos in a unique folder, you could use the EE API. The API allows you to do many powerful things and can be much more convenient to use than standard PHP , depending on the task at hand.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜