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
8243
Activity
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
Can I route this?
Should be \Routes::$routes. It's a static class property. I do something similar, but my modules don't produce pages, only widgets. So by front controller sets up the theme, fetches the defined widgets from the database, launches requests…
Comment by
WanWizard
June 2011
permalink
Can I route this?
Any entry in config/routes.php is per definition public. If the result of your database lookup is a URI that is public (routeable), you can feed the result back into a new request object, and route it. But you don't have to make it so complica…
Comment by
WanWizard
June 2011
permalink
why this error simple orm model_user::find()
Model::find() returns a query builder object, where you can use QB methods like where(), limit(), order_by() to filter the results of the query. Each method returns the object itself, so you can chain methods. Which means you need to finish your ch…
Comment by
WanWizard
June 2011
permalink
why this error simple orm model_user::find()
You're not doing a get(), so it will return a query object, which when assigned to the view, can't be converted to string. See http://fuelphp.com/docs/packages/orm/relations/intro.html#usage
Comment by
WanWizard
June 2011
permalink
Routing with regex
Route parsing uses a preg_replace(), so any valid regex for that function will do. You do not need to specify the delimiters, and you can use the normal regex placeholders ($1 etc) on the righthand side of the route definition...
Comment by
WanWizard
June 2011
permalink
PDO exception
The message to me is very clear: your DSN is wrong. So check your config/db.php and correct the error in the DSN.
Comment by
WanWizard
June 2011
permalink
Having issues with encoded entities.
$this->template should be a view. So $this->template->set('var', $var, false); should do the trick...
Comment by
WanWizard
June 2011
permalink
Having issues with encoded entities.
Correct. But that will disable all encoding, which from a security perspective isn't the preferred option.
Comment by
WanWizard
June 2011
permalink
Extending email class
Depends. If it's a minor change, I would extend it. If it's functionally different, create a new driver. In this case, I would probably do both (class Email_FromTemplate extends \Fuel\Fore\Email_Sendmail for example), and then define …
Comment by
WanWizard
June 2011
permalink
Having issues with encoded entities.
Fuel by default encodes on output. If you're data is already encoded, assign the data to the view without encoding it by passing false as third parameter of the set() method.
Comment by
WanWizard
June 2011
permalink
Extending email class
The problem here is that the Email class is a static 'front' for Email functionality. When you call Email::factory(), you'll get a driver object returned based on the type of mail transport you have configured. Your code then uses th…
Comment by
WanWizard
June 2011
permalink
Extending email class
From where do you call the Email class? And how do you call it? And your app's bootstrap.php contains this? Autoloader::add_classes(array( 'Email' => APPPATH.'classes/email.php', ));
Comment by
WanWizard
June 2011
permalink
sqllite3
You can use the PDO driver to connect to a SQLite3 database. Just provide the correct DSN.
Comment by
WanWizard
June 2011
permalink
Problem with multiple upload validation error messages
I suggest you add this as a feature request on http://github.com/fuel/core/issues, and ask Jelmer's opinion, he's the author of the validation class.
Comment by
WanWizard
June 2011
permalink
DBUtil::create_table with Unique?
Haven't had time to review them. I'll see if I can do that later today...
Comment by
WanWizard
June 2011
permalink
Lang class - fallback language
This means you'll have to load both the intended language and the fallback language, and do an array_merge of the two. As you don't know whether or not the intended language file is complete, this means always have to do this, with will d…
Comment by
WanWizard
February 2011
permalink
CMS can not be this easy!
I'll have a go at rewriting the 404 logic when I have the time. The way it works now is not logical, it can be simplified a great deal without breaking anything, and allowing you to use the _404_ route as a catch-all without having to deal wit…
Comment by
WanWizard
April 2011
permalink
REST Client
I'll leave this to Phil. Maybe you can contact him on twitter, he's travelling at the moment, I'm not sure he reads this...
Comment by
WanWizard
May 2011
permalink
Problem with multiple upload validation error messages
Can you do a \Debug::dump() of the result of get_errors() in your validate method? I have a feeling the issue is on the Validation side, I'm not sure you can have distinct error messages for a single validation method, I think it only keeps on…
Comment by
WanWizard
June 2011
permalink
Problem with multiple upload validation error messages
Ah, a little bit of explanation and code helps... I understand now what you're trying to do here, and if called correctly, that should work. Do I understand you correctly in that if one of the uploads failed, you'll get the same error me…
Comment by
WanWizard
June 2011
permalink
Problem with multiple upload validation error messages
Now I'm confused. This looks like your talking about validation functionality, which has nothing to do with the Upload class (and isn't used to validate uploaded files). Upload deals with $_FILES only, not with $_POST. You should not use …
Comment by
WanWizard
June 2011
permalink
Problem with multiple upload validation error messages
I've been thinking about this. The way it currently works, is that checking stops after the first error encountered. There is only one error code possible, and therefore also only one error message. Changing this means changing the logic of th…
Comment by
WanWizard
June 2011
permalink
CMS can not be this easy!
My point is that if we deal with the odd way of 404 routing, we don't need to introduce _catchall_ as a workaround, because basically the 404 route IS (or should be) a catch all... The router should deal with the 404 handling internally, and r…
Comment by
WanWizard
April 2011
permalink
CMS can not be this easy!
I don't think this is the way to go, as it doesn't fix the real issue, which is: the 404 route is not a controller/method combo, it's a route. This means you can't simply use it as a last resort route, it has to be processed by …
Comment by
WanWizard
April 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,388
Last Active
10:08AM
Roles
Administrator