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
Autoloader::register()
Composer is only an installer, nothing else. Modules don't have a bootstap, and if it's a package, you just have to add your vendor folder to the package paths, after which you can just load the package like any other. You should not have…
Comment by
WanWizard
November 2013
permalink
Redirect back infinite loop
A flash var expires after page load, so it's gone when you redirect. So if you want to detect a redirect loop (= two redirects), it can not be used. If you want to use a header, it needs to be set client side (because it has to be incoming), w…
Comment by
WanWizard
November 2013
permalink
Querying a query. How does it work?
But caching is per individual object, on primary key. The ORM retrieved from cache after the query has run, it should not produce incorrect results. Re-reading the initial post again, this is where it goes wrong: 2) The second call to Model_Cour…
Comment by
WanWizard
November 2013
permalink
Redirect back infinite loop
That is the danger with redirecting in general, not specifically with redirect_back(). You could set a session var (not a flash var) before redirecting in login, and check before you redirect if it exists, which would indicate you're looping?
Comment by
WanWizard
November 2013
permalink
Multilingual Image Support in Fuel
You don't need to extend anything. Get yourself an Asset instance, and use add_path() to add the language dependent asset path. That will also provide you with a fallback, if the language specific file isn't found, it will load the generi…
Comment by
WanWizard
November 2013
permalink
Calendar Package
NinjAuth is no longer needed, Auth has built-in support for Oauth.
Comment by
WanWizard
November 2013
permalink
Querying a query. How does it work?
Must be my mistake then. I tought you said one worked and one not, and wanted to know why. If you want to see what happens behind the scenes, use DB::last_query() to dump the query constructed by the ORM, so you can see the SQL that was generated. …
Comment by
WanWizard
November 2013
permalink
Querying a query. How does it work?
Now you're confusing me. If it works, what exactly is your question?
Comment by
WanWizard
November 2013
permalink
using Model (database) result in View
A View is a separate entity, so nothing from your controller (or anywhere else for that matter) is available in your views unless you pass it. You pass $data to your view, and expect to have $title available as a variable in your view. This means $…
Comment by
WanWizard
November 2013
permalink
Been trying to get a simpleauth setup working for days, anyone know an up to date tutorial?
What is the problem you encounter?
Comment by
WanWizard
November 2013
permalink
FuelPHP 2.0
I understand your problem, but it's too early to tell. All I can say is that for us, FuelPHP is a means of making money, and not a hobby project, or a "pet project" from some commercial company like many other frameworks out there. …
Comment by
WanWizard
November 2013
permalink
ManyMany with model in the middle (with attributes)
Well, it was from the top of my head. ;-) You are sure $user is a valid Model_User object?
Comment by
WanWizard
November 2013
permalink
ManyMany with model in the middle (with attributes)
I personally never use find(), but prefer query(), it's more descriptive of what the query does. But if you insist, you can use find_by_user_id_and_agency_id($userid, $agencyid)...
Comment by
WanWizard
November 2013
permalink
ManyMany with model in the middle (with attributes)
If you add a model in between instead of a through table, you need to use that as well: // assume an existing user and agency $user = Model_User::find(1); $agency = Model_Agency::find(1); // construct a new through object with a default status $us…
Comment by
WanWizard
November 2013
permalink
Upload an image
:-) Glad to hear you've got it sorted.
Comment by
WanWizard
November 2013
permalink
Upload an image
dump Upload::get_files(); and Upload::get_errors();, after save(). The first one will contain all validated and saved uploaded files, the second one the files that errorred. Since you call process() with a custom config, did you disable auto proce…
Comment by
WanWizard
November 2013
permalink
Upload an image
That should work fine.
Comment by
WanWizard
November 2013
permalink
Querying a query. How does it work?
If it makes sense, why is it confusion you? ;-) You say "give me all courses with all their students, which have a course_id of 5, and students with grade A". Courses without students don't have students with grade "A", and…
Comment by
WanWizard
November 2013
permalink
Upload an image
In your controller, you use $post on line 29, but that is defined nowhere? And on line 41, you create a new $post, overwriting whatever it was before, and losing your image information. The image name should be part of the forge too.
Comment by
WanWizard
November 2013
permalink
Is there a way to remove a fetched model instance?
I don't understand what you mean with "delete these models from fetched data"?
Comment by
WanWizard
November 2013
permalink
Where clause in a relatd model
The ORM will always try to construct consistent resultsets. Which means that if you have 1 parent and 10 children, and you request a limit(5), in a normal join you will only get 5 of the 10 child records back. With ORM, you will still get all 10 c…
Comment by
WanWizard
November 2013
permalink
I can't connect partial in theme
if (strpos($response->body(), '{exec_time}') !== false or strpos($response->body(), '{mem_usage}') !== false) contains twice the call $response->body() which will return the response, cast to string. Since your response…
Comment by
WanWizard
November 2013
permalink
I can't connect partial in theme
You're returning the Theme instance as response, so you're relying on the __toString() method to auto render the instance on output. Which means you might have an index.php issue, due to the double call to $response->body() towards the…
Comment by
WanWizard
November 2013
permalink
I can't connect partial in theme
I have a feeling your theme renders twice. Up until 1.7 the $this->partials array is used in render() to collect the rendered output, before it is returned. Which means that if you call render() a second time, $this->partials is no longer a m…
Comment by
WanWizard
November 2013
permalink
error : Maximum function nesting level of '100' rea
Your ajax call is requesting json, not html.
Comment by
WanWizard
November 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,373
Last Active
12:01AM
Roles
Administrator