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
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
How can I setup this properly?
There is nothing heavy about Ormauth. You don't have to use anything you don't have to, we have plenty of apps that only use groups and/or roles, and no permissions. In these cases, we tend to extend the users table with a client_id or an …
Comment by
WanWizard
September 2017
permalink
Can Theme class help me in this case?
You can do that with Fuel as well, you only need to write a View extension for it. I personally think it's a pointless excercise given your initial question, you are just moving the code snippets elsewhere, but you still have to maintain your …
Comment by
WanWizard
September 2017
permalink
Can Theme class help me in this case?
If you want to process data, you have to put your code somewhere? How else do you want to do it?
Comment by
WanWizard
September 2017
permalink
Can Theme class help me in this case?
Normally, you would pass View objects to set_partial(). If the (raw) data you need to send to the view needs pre-processing, create a Presenter for that View, and pass the Presenter object to set_partial(). So something like: $this->theme->set…
Comment by
WanWizard
September 2017
permalink
Nestedset advanced breadcrumbs
I don't see the relation between SEO friendly URI's and hardcoding. Our webengine uses the type field to distinguish between different types of URI's that it can generate. You don't need that, your code isn't generic. It was…
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,366
Last Active
April 29
Roles
Administrator