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
Need help to install a parser, please
I assumed that had already happened. In the first post it said "And this is where my twig folder (installed via composer) is located"...
Comment by
WanWizard
September 2015
permalink
Need help to install a parser, please
You don't have to, if you want to use twig as the parser for all your templates, and you will never use standard templates anymore, you can also configure the parser to map the .php extension to twig. But that means you also have to create twig…
Comment by
WanWizard
September 2015
permalink
Need help to install a parser, please
There is no "twig" package, the package is called "parser". If you installed twig using composer, it will be able to find and use it automatically, if you give your views the ".twig" extension.
Comment by
WanWizard
September 2015
permalink
example for creating module in fuelphp
I give you the link? I can not be more public than that?
Comment by
WanWizard
September 2015
permalink
Can i use wordpress like plugins system in FuelPHP?
Wordpress is a CMS. FuelPHP is an application development framework. Hooks and Plugins are application level functionality, and FuelPHP is not an application. Your mixing two different things.
Comment by
WanWizard
September 2015
permalink
Hooks in Fuel
I don't expect that to be implemented in the current codebase, the 2.0 event library already supports priorities within an event.
Comment by
WanWizard
September 2015
permalink
Is it possible to write multiple SELECTs using DB::select() than raw DB::query()?
You can just construct two queries, and use one in the other as a subquery: $subquery = DB::select('id')->from('table'); $result = DB::select()->from('othertable')->where('foreignkey', 'in'…
Comment by
WanWizard
September 2015
permalink
my route code not work
You're welcome, happy coding! :-)
Comment by
WanWizard
September 2015
permalink
my route code not work
Can't imagine that it has to do with the operating system version. The variable is created in $fieldset = \Fieldset::forge('form'); If that fails, the ->add() call on the next line with give you a PHP error (call on a non-obje…
Comment by
WanWizard
September 2015
permalink
my route code not work
It is impossible that $this->formfieldset() would ever return false.
Comment by
WanWizard
September 2015
permalink
my route code not work
With the code I gave you the var_dump() can't return false?
Comment by
WanWizard
September 2015
permalink
my route code not work
PHP applications are stateless, you can't carry anything from one request to the next, unless you store it into the session. So if you split the action into a separate get and post, you end up duplicating some of your "prepping" code…
Comment by
WanWizard
September 2015
permalink
my route code not work
Normally you post a form to the same URL, and after processing the form, redirect away, which will prevent users reloading the form in the browser. If you want to split the logic for displaying the form and processing it in the controller, you can …
Comment by
WanWizard
September 2015
permalink
my route code not work
What is exactly the problem? The form loads fine here, and if I request the URI directly, I get a 404. If I replace your Controller_hmvc before() method with a var_dump(\Request::is_hmvc()), it returns true when I request the root and your form is…
Comment by
WanWizard
September 2015
permalink
my route code not work
You should not return an exception, you should throw an exception. My point is that return array( 'articles/comments/addcomments/(:any)' => function () { return \Request::forge('articles/comment/add/$1')->…
Comment by
WanWizard
September 2015
permalink
prevent session data lost when image not found
BTW: the reason this isn't there by default is that a missing image is a coding error that should be fixed. If you had used the Asset class to access the image, you would have had a not-found error.
Comment by
WanWizard
September 2015
permalink
prevent session data lost when image not found
Change your .htacess rewrite rules. The default rules rewrite everything that isn't a file or a directory to index.php, you may want to exclude the public assets folder, so you get a webserver 404 instead of a rewrite to your app.
Comment by
WanWizard
September 2015
permalink
my route code not work
Where in the docs does it state that inline routes support any parameters? And why use an inline route for this, you're not adding any logic, so a normal route mapping would work fine too?
Comment by
WanWizard
September 2015
permalink
Fuel\Core\Date vs \DateTime
We wrote an entire new Date class, that was interface compatible with PHP's DateTime class (so you could also use it in any function or method that uses DateTimeInterface as a typehint. See https://github.com/fuelphp/common/blob/master/src/Date…
Comment by
WanWizard
September 2015
permalink
Auth package migrations with changed models
If you extend, you should make sure to remain compatible. You obviously havent, so that is what you need to fix. Since you have extended, migrations will use your extended version, that is the entire idea behind framework class extensions in Fuel..…
Comment by
WanWizard
September 2015
permalink
Send a notify email when fatal error happens
Yes. If you're on 1.8-dev, it's very easy as the Log class now has an initialize() method you can overload. If you're on 1.7+, you should be able to either backport the Log class, or to upgrade to 1.8-dev. Once done, this is an exam…
Comment by
WanWizard
September 2015
permalink
Send a notify email when fatal error happens
You can also use a custom log handler. Monolog has quite a lot of ready-made handlers (https://github.com/Seldaek/monolog/tree/master/src/Monolog/Handler) and you can roll your own pretty easily.
Comment by
WanWizard
September 2015
permalink
Passing functions to views error !!
Are you up to date? This has been addressed here: https://github.com/fuel/core/issues/1881
Comment by
WanWizard
September 2015
permalink
validate elements of array
Use array_reduce() with a closure: $checknumeric = function($carry, $value) { return $carry and is_numeric($value); }; $result = (is_array($input) and array_reduce($input,$checknumeric,true)); $result will be true if $input is an array and al…
Comment by
WanWizard
September 2015
permalink
File upload problems
Read up on the use of composer: https://getcomposer.org/ Change 2.0.3 to 2.0.4 and run a composer update. That will install the new version.
Comment by
WanWizard
September 2015
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,452
Last Active
December 12
Roles
Administrator