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
8247
Activity
Custom (http) exceptions
The reserve_routes snippet is only relevant in case of modules with their own route file, and it is there to make sure that when module routes are loaded, routes like _404_ are not converted to module/_404_. It has nothing to do with what you are ex…
Comment by
WanWizard
September 2017
permalink
can not access to custom header variable
No, because text/plain is no data content type. How would you parse that data? Nothing says that is contains json. or multiform/data. or a posted image. or... We're not going to hardcode anything weird just because you happen to have a non-com…
Comment by
WanWizard
September 2017
permalink
can not access to custom header variable
Because in your plain PHP example you simply ignore the content type, you assume that whatever is input is in application/json format, and process it as such. Fuel can't do that. As the input can be in different formats (Fuel supports all obiou…
Comment by
WanWizard
September 2017
permalink
can not access to custom header variable
logical, json data should be of type application/json? You have to set the correct content type on your ajax call.
Comment by
WanWizard
September 2017
permalink
Nestedset change item order
I didn't describe a swap, I described the move of a node. Which is exactly what drag and drop does, we have plenty of apps that use that kind of operation, which the type of URL I used. We only pass two id's, you don't need more to mo…
Comment by
WanWizard
September 2017
permalink
can not access to custom header variable
How about Input::json()? You can read php://input only once (up until PHP 5.6, after that depending on implementation), and the Framework reads and processes it when it starts.
Comment by
WanWizard
September 2017
permalink
How to setup these route(s)?
If they don't support rewrites, Fuel doesn't work anyway, as it requires rewrites to work (there are some ways around it, but they result is very ugly URL's). "Security by obscurity" means you are trying to make things secur…
Comment by
WanWizard
September 2017
permalink
Nestedset change item order
That can't be, the action of moving a node are three queries. Your code loops over the entire tree and moves or saves everything? Your ajax call should be something like POST /api/nodes/reorder/5/6 which then in the backend- does a find(5)- doe…
Comment by
WanWizard
September 2017
permalink
How to setup these route(s)?
Apart from the fact that security by obscurity is never a good idea, perhaps it is better to solve this problem with a rewrite rule in your webserver configuration, so rewrite "admin" to "admin"return a webserver 404 for /admin/*…
Comment by
WanWizard
September 2017
permalink
Nestedset change item order
Yes, you can use the the next_sibling() / previous_sibling() methods for that. $child2->previous_sibling($child1)->save(); will move child2 to before child1. This is the beauty of nested sets. ;-) The docs have a few examples of how to use the…
Comment by
WanWizard
September 2017
permalink
Cannot set 'or' condition for $_conditions.
This is something to be looked at. Please create a feature request for it at https://github.com/fuel/orm/issues/new
Comment by
WanWizard
September 2017
permalink
How to setup these route(s)?
If you want more routes, just define them. Just take into account that routes are processed in the sequence they are defined, so define more specific routes before less specific ones, the first match gets it. A 404 is a 404, what special handling do…
Comment by
WanWizard
September 2017
permalink
FileSystemLoader baseDir must be a directory: UTF-8
How did you install Mustache? This is not a Fuel error, it is Mustaches file loader that complains it can't find the "UTF-8" directory. Not a rights issue? The last two are cosmetic, PHP doesn't really care, but this is because …
Comment by
WanWizard
September 2017
permalink
Customizing fieldset template
As to your last question: up until now, Fuel has been a purely community driven project, meaning people working on it in their free time, or as part of their dayjob. This is great because it means you're completely independent (the main reason…
Comment by
WanWizard
September 2017
permalink
Customizing fieldset template
The ORM - Fieldset - Validation triangle has always been a bit of black magic, ever since Jelmer created it. I always have to dive into the code to exactly see how it works. ;-) You can define the label in the ORM field form array, you can use a lan…
Comment by
WanWizard
September 2017
permalink
Customizing fieldset template
I'm not sure I understand this question. Form-attributes are defined in the form.php config file, which contain the HTML needed to generate a form. It also makes sure your forms all have the same look and feel. It is not a problem to define for…
Comment by
WanWizard
September 2017
permalink
Data serialization and security
No, only version up until 1.7.1. are vulnerable.
Comment by
WanWizard
September 2017
permalink
Call to undefined method Fuel\Core\Database_PDO_Result::seek()
Fix pushed.
Comment by
WanWizard
September 2017
permalink
Call to undefined method Fuel\Core\Database_PDO_Result::seek()
Yeah, working on it as we speak. Expect a fix in an hour or so... :-)
Comment by
WanWizard
September 2017
permalink
Data serialization and security
The main problem with unserialize() is the fact that it can create objects from a string, which can potentionally dangerous if you don't know the source of the string. When it comes to Fuel, the only place where such a string can come into the …
Comment by
WanWizard
September 2017
permalink
Sharing model between apps.
There are several solutions possible. If your apps are completely seperate (i.e. they have their own Fuel install, they should be able to run on different servers), the simplest is to move those classes to a package, and install the package in all t…
Comment by
WanWizard
September 2017
permalink
How to deal with 3rd-party assets?
Yes, that is not a problem. This issue is that everything is organized per asset type, so you have a "root path" and a renderer per type (css, js, etc). The Asset class is designed around this concept. But you have a path where everything …
Comment by
WanWizard
September 2017
permalink
How to deal with 3rd-party assets?
That can't really be helped, the Asset class needs to know where to find files of a certain type. If you have a system that puts assets in a different place you'll have to adapt your way of working. It is by design not to go looking for fi…
Comment by
WanWizard
September 2017
permalink
How to deal with 3rd-party assets?
I just copied and pasted the file info from your post. If loading "styles.css" works, and that file is in /admin/assets/default, then the above will work, as long as a bootstrap.min.css file exists in /admin/assets/default/bower_components…
Comment by
WanWizard
September 2017
permalink
How to deal with 3rd-party assets?
Yes, why not? Theme::instance()->asset('bower_components/bootstrap/dist/css/bootstrap.min.css', 'css'); Should work fine.
Comment by
WanWizard
September 2017
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,453
Last Active
6:35AM
Roles
Administrator