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
Where can I place store/run global functions/variables?
You should not use return Response::forge(View_Smarty::forge('main/index.tpl'); you shouldl use return Response::forge(View::forge('main/index.tpl'); This is what the Viewmodel does too. If that doesn't work, your parse…
Comment by
WanWizard
January 2014
permalink
Where can I place store/run global functions/variables?
You have a Viewmodel class that matches that request? Do you have the parser package loaded? Do you have configured the Parser package correctly for Smarty? Just checked the Viewmodel code, and all it does at the end is View('main/index.tpl…
Comment by
WanWizard
January 2014
permalink
Live Demo of the FuelPHP Version 2.0 Demo Application
A composer.phar file is only valid for 30 days, so we decided not to include it anymore. Besides that, since composer is becoming more and more common, it makes sense to have composer installed centrally, so you only have one composer install per …
Comment by
WanWizard
January 2014
permalink
Where can I place store/run global functions/variables?
View files go in app/views, Viewmodels go in app/classes/view. A view file is not class, so it doesn't go in the classes folder. The parser package extends the View class in a transparent way, so if you pass a smarty template name to a Viewmod…
Comment by
WanWizard
January 2014
permalink
Where can I place store/run global functions/variables?
You mean you want a custom function to be defined always? Preferrably you use a static class, otherwise define them in a separate file (like we do in fuel/core/base.php), and load that in your app/bootstrap.
Comment by
WanWizard
January 2014
permalink
Rest Controller and CORS Requests
FuelPHP supports any HTTP method your webserver passes on to it. CORS needs to be enabled, and you should not have a webdav module active (in case of Apache) which hijacks the OPTIONS request. How you handle it in your code, it depends. You can use…
Comment by
WanWizard
January 2014
permalink
pagenation rendering
You're storing the rendered HTML into $view->page, which will be escaped by the View object. Either use $view->set_safe('page', Pagination::instance('mypagination')->pages_render()); or pass the Pagination inst…
Comment by
WanWizard
January 2014
permalink
Custom exception class
Another issue I spot is that in FuelPHP, files must contain only a single class, and the namespace and classname must map to the filename. This is not the case here, the autoloader will not be able to map SimpleUserWrongPassword to your exception.p…
Comment by
WanWizard
January 2014
permalink
Where can I place store/run global functions/variables?
If you want to have a config file available "globally", you can add it to the "always_load" section of your config file. No need to add it to a bootstrap.
Comment by
WanWizard
January 2014
permalink
Custom exception class
As a general rule, NEVER modify the framework. You'll going to regret that big time when it's time to upgrade, and you'll have to start merging changes. And there is no need for it. Not only are there plenty of places you can put yo…
Comment by
WanWizard
January 2014
permalink
Getting user's rights with OrmAuth
Define "all" rights? The Ormacl driver compiles a list of effective rights, which contains the permissions assigned directly, and the permissions inherited from group and/or role membership. It also takes removed or admin rights into acco…
Comment by
WanWizard
January 2014
permalink
Route dot character problem?
No. The last dot in a URL is seen as the extension separator, and your is no routing support for extensions unless you enable that (by setting "routing.strip_extension" to false in your app config).
Comment by
WanWizard
January 2014
permalink
can we use auth and oauth at the same time
Your Ormauth config file tells you which db connection needs to be used, and which table name is used for users. This is also used as prefix for the other Ormauth tables. So there are two options: you can use two different db connection (an entry i…
Comment by
WanWizard
January 2014
permalink
DB class, "and_on" statement with select
If you need to include a literal, encapsulate it in a DB::expr() to prevent it being escaped/quoted.
Comment by
WanWizard
January 2014
permalink
i application contain payment gatway how to connect it with fuelphp
Don't ask me how the PayZippy SDK works, I've never seen it before (today). Check the SDK manual to see how you should use it.
Comment by
WanWizard
January 2014
permalink
can we use auth and oauth at the same time
The OAuth implementation (Opauth) that is part of the Auth package is fully integrated with both Simpleauth and Ormauth. The Opauth implementation is compatible with Ninjaauth. You should not use the old Ninjauth package, it is no longer compatible…
Comment by
WanWizard
January 2014
permalink
i application contain payment gatway how to connect it with fuelphp
NOOOOO.... I wrote: create a package (and lets call it payzippy). You should NEVER put anything in a fuel supplied folder, or change any of the fuel supplied files. Check the docs on what a package is and how you use it: http://docs.fuelphp.com/ge…
Comment by
WanWizard
January 2014
permalink
Validation i want to set value not = to a particular value
the same as what?
Comment by
WanWizard
January 2014
permalink
can u store array in to the cache
You can store anything in the cache. Only if you want to store objects, you have to check the PHP docs for the limitations when it comes to serializing on object.
Comment by
WanWizard
January 2014
permalink
i application contain payment gatway how to connect it with fuelphp
The API is the interface of the service, so that is on the service provider side, in this case PayZippy. You application is the service client, that needs to talk to the API. To be able to do that, you often need libraries, like the PayZippy SDK. …
Comment by
WanWizard
January 2014
permalink
Validation i want to set value not = to a particular value
Is this numeric input? Integer or float? If you want to just check for numeric, and > 0, simply use "required|is_numeric|numeric_min[1]".
Comment by
WanWizard
January 2014
permalink
Validation i want to set value not = to a particular value
You mean you want to change the input to 0 if the input does not validate? There is no standard / built-in rule for that, you will have to write your own.
Comment by
WanWizard
January 2014
permalink
i validation i want to check by validation expression
You use the "match_pattern" rule to match any regex against the input field. You can't use string notation (because of the brackets used in the regex string, you need to use add_rule: ->add_rule('match_pattern', '^…
Comment by
WanWizard
January 2014
permalink
i have problem with pagenation i am not able to see the content on the next page
You have defined 'uri_segment' => 2, But in this URL http://localhost/fuelphpn/public/oildemo/pagenation/oildemo/2 the segment containing the page number is 4 ?
Comment by
WanWizard
January 2014
permalink
Page not refreshing when coming from another page.
Glad you've got it sorted.
Comment by
WanWizard
January 2014
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,371
Last Active
May 14
Roles
Administrator