Part of the EllisLab Network
This thread is a discussion for the wiki article: Modular Extensions - HMVC
   
1 of 36
1
Modular Extensions - HMVC
Posted: 27 September 2008 03:03 AM   [ Ignore ]  
Summer Student
Total Posts:  6
Joined  01-20-2008

Hi! Congratulations for the great library!
But what about standard query string based URLs:
if I run CI+HMVC

http://localhost/index.php/welcome/welcome

how can I run this

http://localhost/index.php?c=welcome&m=methodname

Did I miss something?

Profile
 
 
Posted: 27 September 2008 03:52 AM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

Query strings will function the same as they do in standard CI.

Welcome to CI forums.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 27 September 2008 05:40 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  6
Joined  01-20-2008
wiredesignz - 27 September 2008 07:52 AM

Query strings will function the same as they do in standard CI.

Welcome to CI forums.

Thanks for the answer!

Ok, but they will access only standard controllers… I’ve made some tests and I couldn’t retrieve information from controllers inside application/modules ?!

Profile
 
 
Posted: 27 September 2008 11:27 AM   [ Ignore ]   [ # 3 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

That’s correct, but you can use both the segmented url and query strings together in CI, so modules are accessible that way.

Good Luck.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 27 October 2008 06:22 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  52
Joined  03-09-2008

This plugin seems to be incompatible with CI 1.7

 Signature 

Daniel M.
Lead I-Group

Profile
 
 
Posted: 27 October 2008 07:24 AM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  374
Joined  05-04-2008
dmiden - 27 October 2008 10:22 AM

This plugin seems to be incompatible with CI 1.7

What problems are you having with it? I am using HMVC with 1.7 and all is well.

 Signature 

[ Adam Griffiths - Freelance Web Applications Developer ]
[ Follow me on Twitter ]

Profile
 
 
Posted: 27 October 2008 04:46 PM   [ Ignore ]   [ # 6 ]  
Grad Student
Rank
Total Posts:  49
Joined  04-29-2008
Adam Griffiths - 27 October 2008 11:24 AM
dmiden - 27 October 2008 10:22 AM

This plugin seems to be incompatible with CI 1.7

What problems are you having with it? I am using HMVC with 1.7 and all is well.

Hi Adam, thanks for submitting the bug.
For the meantime I have come up with a temporary solution, to extend the form_helper.php (MY_form_helper.php) with the function _get_validation_object() and the values changed from $CI->load to $CI->loader which works for now, until maybe a fix has come out smile

Profile
 
 
Posted: 27 October 2008 07:42 PM   [ Ignore ]   [ # 7 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

@nizsmo, there is no $CI->loader object in CodeIgniter.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 27 October 2008 07:46 PM   [ Ignore ]   [ # 8 ]  
Grad Student
Rank
Total Posts:  49
Joined  04-29-2008

really? hmmm well to be honest i only identified the problem, and made the fix, but not sure the reason behind it smile What i described above works for me at the moment (tested in the last 2 hours..) and validation messages are showing up again.

Are you able to help? I suspect it is something to do with HMVC smile thanks!

Profile
 
 
Posted: 27 October 2008 07:47 PM   [ Ignore ]   [ # 9 ]  
Grad Student
Rank
Total Posts:  49
Joined  04-29-2008

Oh BTW love your HMVC library :D

Profile
 
 
Posted: 27 October 2008 07:58 PM   [ Ignore ]   [ # 10 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

Rather than try to maintain two versions of modular extensions I have now made ME5.1 publicly available on the wiki.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 27 October 2008 08:08 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Rank
Total Posts:  49
Joined  04-29-2008

ah, i didn’t realise 5.1 is there, where would i go to see the changes between 4.2 and 5.1?
All my modules (in theory) should still work properly after upgrade?

Thanks for your help!

Profile
 
 
Posted: 27 October 2008 08:25 PM   [ Ignore ]   [ # 12 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3216
Joined  06-10-2007

ME 5.1 has undergone some major changes in codebase, since version 4.2

modules::run() is now dedicated to returning view partials only, and it will return buffered output (a view) from a controller. The syntax for using modules::run is a URI style segmented string and unlimited variables. ie: modules::run(‘module/controller/method’, $var_1, ...$var_n).

To call a module controller from within a controller you can use $this->load->module() or modules::load() and PHP5 method chaining is available for any object loaded by ME. ie: $this->load->library(‘validation’)->run().

The PHP5 spl_autoload feature allows you to freely extend your controllers, models and libraries from application/libraries base classes without the need to specifically include or require them.

The library loader has also been updated to accommodate some CI 1.7 features: ie Library aliases are accepted in the same fashion as model aliases, and loading config files from the module config directory as library parameters (re: Form_validation.php) have beed added.

Setting: $config[‘enable_profiler’] = TRUE,  in application/config.php , allows you to activate CI profiler from config your file.

$config = $this->load->config(‘config_file’),  Returns the loaded config array to your variable.

$CI is added as a default class variable to libraries loaded by ME. ($CI =& get_instance() is not required), Simply use $this->CI->whatever() in your library.

Models and libraries can also be loaded from subdirectories in their respective application directories.

The code is fairly well documented, so if I missed something new, my apologies.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

Profile
 
 
Posted: 27 October 2008 09:23 PM   [ Ignore ]   [ # 13 ]  
Grad Student
Rank
Total Posts:  49
Joined  04-29-2008

Many thanks for your helpful summary of changes wiredesignz!
I just spent the last 2 hours trying to change to v5.1 and integrate/make sure everything still works, encountered quite a few problems, but manage to get everything to work (so far, as it “seems”).
There is no longer the form_validation problem, so its a big help!

Many thanks again, also for taking time to write this great library smile No doubt I will bug you more if i find anything abnormal/unusual raspberry

Profile
 
 
Posted: 28 October 2008 05:27 PM   [ Ignore ]   [ # 14 ]  
Grad Student
Rank
Total Posts:  52
Joined  03-09-2008

I dont get any validation errors with 5.1

 Signature 

Daniel M.
Lead I-Group

Profile
 
 
Posted: 29 October 2008 07:27 AM   [ Ignore ]   [ # 15 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  374
Joined  05-04-2008

I am trying to install 5.1 on a base 1.7 version of CI, and it doesn’t work.

I’ve dropped the libraries in to the application/libraries/ folder and I get the following error.

An Error Was Encountered

Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.

It seems the error is coming from MY_Router.php, but I have no idea how to scout out the problem since there’s no useful info in the error.

 Signature 

[ Adam Griffiths - Freelance Web Applications Developer ]
[ Follow me on Twitter ]

Profile
 
 
   
1 of 36
1