hmvc

CodeIgniter and HMVC questions

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 07:14:12
First of all, sorry for any convenience caused by this post because this is the first time I post a question here and I need more time to get used to with this. Q1. I want to create 2 "master controllers" for FrontEnd and BackEnd like this: MY_Controller extends CI_Controller FrontEnd extends MY_Controller and all frontend controllers will extend FrontEnd . BackEnd extends MY_Controller and all backend controllers will extend BackEnd . What's the best way to do that with HMVC (MX)? Thanks @Wesley Murch for giving the idea to put 3 classes MY_Controller, Frontend, Backend into MY_Controller.php

How to create a widget system in Codeigniter

为君一笑 提交于 2019-12-02 20:52:57
I am creating a custom CMS in Codeigniter and I'd like to have a widget system similar to what is used in Wordpress. For example, I'd like to have a widget that shows the last 5 posts displayed on the sidebar. I'd also like to be able to control what pages this widget appears on page-by-page basis. I am using Phil Sturgeon's Template library , so an example controller looks like: $this->template->set_partial('header', 'layouts/header'); $this->template->set_partial('footer', 'layouts/footer'); $this->template->set_partial('sidebar', 'layouts/sidebar'); $this->data['title'] = "Create Post";

CodeIgniter load controller within a controller HMVC

风流意气都作罢 提交于 2019-12-02 10:24:28
I'm using http://github.com/philsturgeon/codeigniter-template/ for the templates and I trying to load other controller view to actual view as a partial. My main problem is that I cant append meta data (javascripts, css) from other controller to the main controller. application/core/MY_Loader.php class MY_Loader extends CI_Loader { function __construct() { parent::__construct(); } function controller( $sController ) { global $RTR; // Parse the sController string ex: demo/index $aControllerData = explode( '/', $sController ); $sMethod = !empty( $aControllerData[1] ) ? $aControllerData[1] :

Codeigniter + HMVC + REST

女生的网名这么多〃 提交于 2019-12-02 01:56:41
问题 I'm working on Codeigniter + HMVC based application and I'm trying to add a new module. I use Phil Sturgeon's REST_Controller 2.6.0 and Format libraries to create an REST API as a module. When I try to get for example http://api.example.com/user/id/1/ or http://api.example.com/user/id/1/format/json I gеt the below error: A PHP Error was encountered Severity: Notice Message: Undefined property: Api::$format Filename: libraries/REST_Controller.php Line Number: 380 In my routes.php I have this:

Codeigniter + HMVC + REST

坚强是说给别人听的谎言 提交于 2019-12-01 23:11:21
I'm working on Codeigniter + HMVC based application and I'm trying to add a new module. I use Phil Sturgeon's REST_Controller 2.6.0 and Format libraries to create an REST API as a module. When I try to get for example http://api.example.com/user/id/1/ or http://api.example.com/user/id/1/format/json I gеt the below error: A PHP Error was encountered Severity: Notice Message: Undefined property: Api::$format Filename: libraries/REST_Controller.php Line Number: 380 In my routes.php I have this: $route['user/id/(:num)/format/(:any)'] = "api/user/$1/format/$2"; $route['user/id/(:num)'] = "api/user/

Codeigniter HVMC modular seperation extension URL rewrite / routing

这一生的挚爱 提交于 2019-12-01 14:22:06
Ive been using HVMC modular extension, and its working great, but Im having trouble figuring out how to use, and if it is possible to use URL routing with HVMC. Basically, I have a module called “site”, which is my main default site controller. All of the other modules I am not using directly, I am only using them by calling echo modules::run(‘controller/method’);—So basically I just want to remove “site” from the URL so that all the methods within the site module/controller appear without the word “site” in it. Can anyone tell me if this can be done with HVMC modular extensions? Any help much

Codeigniter HVMC modular seperation extension URL rewrite / routing

笑着哭i 提交于 2019-12-01 12:26:58
问题 Ive been using HVMC modular extension, and its working great, but Im having trouble figuring out how to use, and if it is possible to use URL routing with HVMC. Basically, I have a module called “site”, which is my main default site controller. All of the other modules I am not using directly, I am only using them by calling echo modules::run(‘controller/method’);—So basically I just want to remove “site” from the URL so that all the methods within the site module/controller appear without

Trouble with HMVC modular extensions for CodeIgniter

耗尽温柔 提交于 2019-12-01 06:34:35
I've been developing locally on MacOS X Snow Leopard using PHP 5.3, CodeIgniter 2.0 and HMVC Modular Extensions. Everything has been working great. Suddenly, for no reason I can pinpoint, I am occasionally getting this error when trying to bring up a page: Unable to select the specified database: app Filename: /Library/WebServer/Documents/www/development/appdb/third_party/MX/Loader.php Line Number: 96 The error doesn't occur at any specific place, it just seems to appear every 5-10 page loads or so. It usually goes away after a refresh, although sometimes I may need to refresh a couple of

codeigniter+HMVC cross module call controller->method

て烟熏妆下的殇ゞ 提交于 2019-11-30 07:10:45
问题 I am pulling all my hair off... Have been searching every thread, would appreciate if someone can point me to a working example. Accroding to the doc: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc I can call another module->controller using modules::run('module/controller/method', $params); modules::load('module/controller/method', $params); or $this->load->module('module/controller'); $this->controller->method(); Problem: the "method()" is never called. only

codeigniter+HMVC cross module call controller->method

百般思念 提交于 2019-11-29 03:57:52
I am pulling all my hair off... Have been searching every thread, would appreciate if someone can point me to a working example. Accroding to the doc: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc I can call another module->controller using modules::run('module/controller/method', $params); modules::load('module/controller/method', $params); or $this->load->module('module/controller'); $this->controller->method(); Problem: the "method()" is never called. only constructor of the controller is called every time. The objective is to build self-contained MVCs as module and