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
FuelPHProfiler
I find it a very bad practice to add a class to your app/bootstrap that is part of a package. It should be part of the package itself. It doesn't take up any space if default but not used.
Comment by
WanWizard
January 2012
permalink
Int value converted into string using query builder?
The Database Query Builder is originally made for MySQL, for which this is no problem. What platform and which driver are you using, and what is the error you are getting?
Comment by
WanWizard
February 2012
permalink
Int value converted into string using query builder?
Moved to the General section, this has nothing to do with ORM.
Comment by
WanWizard
February 2012
permalink
How to create EXISTS or NOT EXISTS statements?
You can use DB::expr() for everything that you don't want to be escaped.
Comment by
WanWizard
February 2012
permalink
fiels issue
Simply searching for enum would have found you http://fuelphp.com/forums/topics/view/7134 as first result.
Comment by
WanWizard
February 2012
permalink
Special route config question, by newbe
You can try to use a regex to deal with this: '(.*?/)?home/about' => 'home/about/$1', '(.*?/)?accueil/apropos' => 'home/about/$1', You can then define your method as public function action_about($brand…
Comment by
WanWizard
February 2012
permalink
Quick hack for Bootstrap 2.0 integration?
The oil scaffold templates are in views/scaffolding/crud (and views/scaffolding/orm). You can copy that folder structure to app/views, and modify to your liking. If exist they will be used instead of the default ones in the package.
Comment by
WanWizard
February 2012
permalink
Clean Url Problem
If I add that route here, and use $this->request()->param('pageurl'), I get the parameter returned without problems.
Comment by
WanWizard
February 2012
permalink
Routing with models that solely belong to other models
Assuming admin is a module, and you have a controller in there called photos with has an action_index method, 'admin/galleries/:gid/photos' => 'admin/photos/index', should work just fine. Note that this will not match '…
Comment by
WanWizard
February 2012
permalink
prefix url
I have extended the URI class for that purpose, and overloaded the constructor: public function __construct($uri = null) { parent::__construct($uri); if (isset($this->segments[0]) and in_array($this->segments[0], \Config::get('support…
Comment by
WanWizard
February 2012
permalink
How to create EXISTS or NOT EXISTS statements?
Try DB::expr('not exists')
Comment by
WanWizard
February 2012
permalink
Migration error
$foreign_keys is a multi-dimensional array (as you can define multiple entries). See the documentation.
Comment by
WanWizard
February 2012
permalink
One routing controller to rule them all
My front controller is a controller uses the Theme class to create the page template. The different sections of the template (like sidebar, body, etc) are fetched using HMVC calls to module controllers. This way you completely decouple the two, and…
Comment by
WanWizard
February 2012
permalink
Creating an extendable framework with FuelPHP
1. No. A module is a self-contained entity, a mini-app if you will. Like you can't split app, you can't also split a module. 2. No. Once a PHP function is defined, you can not overload it. Extending is difficult if your goal is to keep th…
Comment by
WanWizard
February 2012
permalink
Multiple, Related Applications?
If three 'sites' all share the same code and database, they aren't really three sites are they? They are three running instances of the same site. Can you be more specific? As to sessions, they are driver based, just create a MongoDB…
Comment by
WanWizard
February 2012
permalink
import() for app vendor directory
Use code bbcode tags for your code examples. You have to type them in, the button's don't work for some reason. The import() function was originally designed to load core vendor classes, and allow them to be extended in app. It currently …
Comment by
WanWizard
February 2012
permalink
Clean Url Problem
Routes don't magically retrieve data from the database. If you want this, add a route 'page/:pageurl' => 'page/view'; In your view() method, fetch the 'pageurl' param ( using $this->request()->param() …
Comment by
WanWizard
February 2012
permalink
class truncate
The 'is_html' option deals with HTML tags in the text, it doesn't support HTML entitities. Please create an issue for this on http://github.com/fuel/core/issues so it can be looked at.
Comment by
WanWizard
February 2012
permalink
Concerning time formatting
We haven't invented any new formatting. The format() method uses strftime(), so see http://php.net/manual/en/function.strftime.php
Comment by
WanWizard
February 2012
permalink
Find by unique field (that is not primary ID) and return ORM model instance
If you want data, you always have to 'get' it.
Comment by
WanWizard
February 2012
permalink
Cannot redeclare class when using Routes and Modules
Yes, list all the ones your going to use at the top, using the "use" statement, which will "import" them into the current namespace. Not sure if that is any better, and you will contaminate the current namespace with classes def…
Comment by
WanWizard
February 2012
permalink
How to add a function to ORM Model
There is no $this in a static context, so you can not do that. If you want to have the method operate on the object level, do not define it as static.
Comment by
WanWizard
February 2012
permalink
How to add a function to ORM Model
Moved to the ORM forum.
Comment by
WanWizard
February 2012
permalink
Example of a linux localhost setup
Most obvious reason is that the user that runs your apache daemon has no access to /home/webdev/i2/public, so check the rights on disk.
Comment by
WanWizard
February 2012
permalink
Template Controller and HMVC
Request::forge() forges a new request, exactly like the one that is created from the URI. So the question is: to what controller does the route 'widget/blog' point to, and what does this controller extend?
Comment by
WanWizard
February 2012
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,374
Last Active
9:46PM
Roles
Administrator