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
Having trouble relating has_many and belongs_to
No, not a bug. If the model you relate to is in another namespace, then define the namespace. protected static $_has_many = array( 'networks' => array( 'model_to' => '\\namespace\\Model_User_Network', …
Comment by
WanWizard
July 2011
permalink
set a language and load a language file from a template controller
Can you post your controller and language file on http://scrp.at/, so I can use it to test here? I can't reproduce the issue...
Comment by
WanWizard
June 2011
permalink
Routing issue
Ok, I understand. I've just expanded my routes to 'admin/index(.*)?' => 'welcome/admin/$1', ':this/:that' => 'welcome/index', and still welcome/admin is called, the second route doesn't h…
Comment by
WanWizard
June 2011
permalink
PDO exception
You can just add the 'dsn' parameter to the config array, instead of hostname and port. I'm afraid the example is MySQL only, I'll add it to the docs.
Comment by
WanWizard
June 2011
permalink
set a language and load a language file from a template controller
This all looks ok, so how do you determine the load doesn't work from your controller? Your code was incomplete at that point...
Comment by
WanWizard
June 2011
permalink
Routing issue
Just added an action_admin() method to the welcome controller of a fresh Fuel install. Added this route: 'admin/index(.*)?' => 'welcome/admin/$1', And finished with '(:any)' => 'welcome/404' to disable…
Comment by
WanWizard
June 2011
permalink
Routing issue
Ok, so: - your controller is admin, method is index - you want to keep all other URI segments to be able to redirect back - you want a route that captures that I'll see if I can test this...
Comment by
WanWizard
June 2011
permalink
Sessions -> database_connection class throwing exceptions left and right
You need to configure the database instance name there, as described in the docs, and defined in config/db.php. I don't mean the name of your database, I mean this: // The name of this database instance is Fuel::DEVELOPMENT ! Fuel::DEVELOP…
Comment by
WanWizard
June 2011
permalink
SimpleAcl and SimpleGroup example?
You can create your own structure. Store your file in app/config, so you don't loose your settings when you update the package.
Comment by
WanWizard
February 2011
permalink
Routing issue
What is the exact URL you're trying to match? Currently we're guessing to what doesn't work...
Comment by
WanWizard
June 2011
permalink
set a language and load a language file from a template controller
Open core/classes/lang.php, find where $langconf is set in the load() method, and Debug::dump($langconf). If the answer is 'de' ( after using Config::set('language', 'de') ), then the issue is that the language file is…
Comment by
WanWizard
June 2011
permalink
deleting relations
As I see it, 'has_one' and 'has_many' define a downstream relationships, 'belongs_to' defines an upstream relationship. Like "Parent has_one Child", and "Child belongs_to Parent". You can delete do…
Comment by
WanWizard
June 2011
permalink
Sessions -> database_connection class throwing exceptions left and right
Noticed that as well, it's changed to 'development' now.
Comment by
WanWizard
June 2011
permalink
set a language and load a language file from a template controller
I can not reproduce this, your code works perfectly here. Are you sure your language file can be found? If not it will fall back to english.
Comment by
WanWizard
June 2011
permalink
Views example in docs returns error
Or use $data['header'] = View::factory('header', $data)->set('site_title', 'My site title')->render(); Fact is that there's something not right. Either the docs need to be updated (in case neste…
Comment by
WanWizard
June 2011
permalink
SimpleAcl and SimpleGroup example?
It isn't that complicated (hence the name simple): Every user is assigned a group. Group's are defined in the config file simpleauth.php. The default group is 1, which is, as you can see in the config file, a plain user. The config file a…
Comment by
WanWizard
February 2011
permalink
How Does Instance Function Work?
instance() returns existing instance by name, factory() creates new instances. The main reason why instance() doesn't auto-create instances is that in most cases, factory() requires extra parameters and/or configuration to be able to create th…
Comment by
WanWizard
June 2011
permalink
Sessions -> database_connection class throwing exceptions left and right
To be more specific, if you set it to null, the current active database will be used. This works because the DB driver re-uses the current instance if no named instance is specified. I find it dangerous to promote the use of null here, as it can le…
Comment by
WanWizard
June 2011
permalink
Routing issue
Use a regex to capture the (optional) rest of the URI: 'admin/:controller(/.*)?' => 'admin/$1$2'
Comment by
WanWizard
June 2011
permalink
deleting relations
Looks like a bug. Can you create an issue for this at http://github.com/fuel/orm/issues?
Comment by
WanWizard
June 2011
permalink
Routing with regex
If you want to use the match, you need to enclose it in brackets, like with any regex. You can then append it to the URI like so: '([A-Z]{5})' => 'home/test/$1'. In your controller, you'll use Uri::segment(3) to fetch th…
Comment by
WanWizard
June 2011
permalink
Is Fuel proper for me?
Fuel is cool! We're in release candidate stage, which means no more API changes, only bugfixes (if any), completion of documentation, etc. And our public code repository will show you that we fix very fast. A lot of people already use Fuel for…
Comment by
WanWizard
June 2011
permalink
Can I route this?
I'm struggling to understand what the logical difference is between prepending them, and resetting the array (which would make it the only contents). The only difference can be that a non-module route is matched in the first case... Module rou…
Comment by
WanWizard
June 2011
permalink
Modules: what am I doing wrong here?
Exactly what the error message says: "Class template\View not found". If you're using View::something inside a namespaced class, you're calling the class in that namespace. And if that doesn't exist, PHP will complain about…
Comment by
WanWizard
June 2011
permalink
Can I route this?
There's no real logic in the front controller. I use Joomla-style templates, with defined sections. A query from the database gives me a list of sections for the requested URI, and per section the widgets to display. These are processed accord…
Comment by
WanWizard
June 2011
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,370
Last Active
2:32PM
Roles
Administrator