Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
How to order related data
If you always want that specific order, you can define that in the relation definition. If you want it only for this specific query, specify it on the query: Model_Categories::find(1, array('related' => array('contents'), …
Comment by
WanWizard
August 2013
permalink
Debugging FuelPHP scripts using Netbeans and XDebug
Xdebug doesn't seem to play ball when it comes to static classes. A bit of good news is that in Fuel v2 there is a lot less static, only some Facade classes (like how Upload, Log or Asset work now) to make it easier to access stuff...
Comment by
WanWizard
August 2013
permalink
Multiple Themes
The config file contains the default/active theme and the fallback theme. You can alter the active theme using Theme::instance()->active('extern'); or fallback using Theme::instance()->fallback('yourfallbacktheme'); or…
Comment by
WanWizard
August 2013
permalink
Rest controller format / mime type
I think you have missed the way the REST controller works. In a good API design, you allow the client to determine the format it wants returned, and it does so using the HTTP-ACCEPT header. If you set that to 'text/xml' on the request, th…
Comment by
WanWizard
August 2013
permalink
Modules and Views
I suggest you look at the Theme class which is designed to decouple the views from the code (both module and app). It allows you to store the default theme template views in the module (or app), and override them in the theme folder. It also allows…
Comment by
WanWizard
August 2013
permalink
Modules and Views
It will automatically do that if the module does not contain a view called 'login'. If the module does contain one, there is no way you can force it to load the global one. Not a good architecture anyway, you'll drop all loose coupl…
Comment by
WanWizard
August 2013
permalink
Rest controller format / mime type
The REST controller returns data in the format requested. You can find how it determines the format in the docs: http://fuelphp.com/docs/general/controllers/rest.html#/format_determination Since a REST controller returns a data structure (internall…
Comment by
WanWizard
August 2013
permalink
Simpleauth installation :-(
If it has already run the migrations, you have to revert them first, to be able to run them again. You can check app/config//migrations.php to see which ones have already run. I don't think you can do a migrate:down with --all, it goes down on…
Comment by
WanWizard
August 2013
permalink
Pagination and "has_many" releations.
You're welcome. Happy coding!
Comment by
WanWizard
August 2013
permalink
Simpleauth installation :-(
Have you configured the Auth config file, and the simpleauth config file, in your app? The migrations will check the driver defined in your app/config/auth.php. Which in this case should be "Simpleauth", and is case sensitive. If it doesn…
Comment by
WanWizard
August 2013
permalink
Pagination and "has_many" releations.
rows_limit doesn't go on the relation: $data['talk_topic'] = Model_Talk_Topic::find($id, array( 'related' =>array('talk_posts'), 'rows_limit' =>1) ); I think. I never us…
Comment by
WanWizard
August 2013
permalink
Pagination and "has_many" releations.
If you want to generate a table view from a query that has related tables, you should use 'rows_limit' and 'rows_offset'. By default ORM will limit on the parent only, not on the total result.
Comment by
WanWizard
August 2013
permalink
Accessing the memcached cache_id
You will have to extend Cache_Storage_Memcached, and make _get_key() public, or add a new public method that calls _get_key().
Comment by
WanWizard
August 2013
permalink
Small question for Lang::get()
It is documented? http://docs.fuelphp.com/classes/lang.html#/method_get
Comment by
WanWizard
August 2013
permalink
Database type not defined in mongo configuration
ORM doesn't support Mongo, and to be honest, Mongo doesn't support SQL queries too. If you want to interact with Mongo, use https://github.com/FrenkyNet/monga, which is going to be the Fuel v2 Mongo DBAL.
Comment by
WanWizard
July 2013
permalink
Small question for Lang::get()
It does not return an empty string, it returns null. And it does so because you haven't defined a default value, i.e. something that should be returned if the language value does not exist. This is the standard behaviour for the lang class, an…
Comment by
WanWizard
July 2013
permalink
Migration in modules
Correct, the sequencing is tracked per location (app/module/package).
Comment by
WanWizard
July 2013
permalink
Modules Best practise and Oil
My mistake, after I checked the code it seems to be implemented for config, but not for anything else. Odd. Maybe create a feature request for it, at https://github.com/fuel/oil/issues ?
Comment by
WanWizard
July 2013
permalink
Modules Best practise and Oil
A module has exactly the same structure, so if you copy the contents of the 'app' folder (of a new installation) to your module folder, you should have everything. You only need to remove the welcome stuff from it. To generate into a modu…
Comment by
WanWizard
July 2013
permalink
Page loading time
I can't say you should, but you could try and see if there is a (for you) significant performance difference. It will depend on the size of the resultset, I don't think you'll see much difference with 10 records... You could always p…
Comment by
WanWizard
July 2013
permalink
What's major way to send a mail Log Error?
FuelPHP uses monolog. It has several formatters for sending emails out: https://github.com/Seldaek/monolog#send-alerts-and-emails Currently is has the StreamHandler defined (for writing to files), and the LineFormatter to produce the required line …
Comment by
WanWizard
July 2013
permalink
Page loading time
That is very difficult to say without knowing what you've been up to, and what you've exactly comparing. The CI core is very light-weight, so if you make something simple, it is bound to be extremely fast compared to more OO frameworks (w…
Comment by
WanWizard
July 2013
permalink
Creating dynamic queries based upon form inputs
Just do that, that's the beauty of objects. Assuming ORM: $query = Model_Something::query(); Input::post('tickvar1', false) and $query->where('var1', Input::post('var1', null)); Input::post('tickvar2'…
Comment by
WanWizard
July 2013
permalink
license and few beginner tips please
old fart my ass... You've got a bit to go yet youngster, I've been coding since 1978... ;-)
Comment by
WanWizard
July 2013
permalink
license and few beginner tips please
1. Yes, we don't do anything else, it's my company's core business. Fuel is released under MIT licence (http://opensource.org/licenses/MIT), which has no restrictions. 2. I don't see any problem in this spec. 3. REST is a 100…
Comment by
WanWizard
July 2013
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,365
Last Active
April 26
Roles
Administrator