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
Twitter-Bootstrap friendly Pagination Class
Current version (1.3) styles inactive as anchors too, and has more configuration options. It should play ball with bootstrap now.
Comment by
WanWizard
December 2011
permalink
Online OOP PHP Courses / Books
This is a good book: http://www.apress.com/9781430229254 It explains a lot of the design principles behind FuelPHP (2.0).
Comment by
WanWizard
September 2012
permalink
how to filter the result in orm/many_many
You can't with ORM, this is the way it works. If you want custom queries, use the DB class.
Comment by
WanWizard
September 2012
permalink
Best way to alter result
The number is the 'id' of the record. In a many relation, if you have multiple results, they are all of the same type. So I'm a bit clueless to why you want to access one individual result instead of loop to process them all. If I un…
Comment by
WanWizard
September 2012
permalink
Problem inserting new line into plain text email content
I can't see anything obviously wrong with this code. If nobody else can help you, Frank (the author of the package) is back online next week...
Comment by
WanWizard
September 2012
permalink
Email Package
The smtp driver is designed to work with smtp, on port 25. I believe Google requires an SSL encrypted and authenticated connection. I've seen messages from people who solved it, but I don't know how, so maybe a Google search will find som…
Comment by
WanWizard
September 2012
permalink
Contributing to Documentation. Best Practices?
The current documentation is written in html (hardcoded), and stored in a github repository. There is only one branch current, which is the develop branch. At the moment, that is 1.4/develop. Bugfixes on the release version (1.3/master) will be doc…
Comment by
WanWizard
September 2012
permalink
how to filter the result in orm/many_many
In the 'conditions' array of the relationship definition you can define the 'join_type', which defaults to 'left' (which is 'left inner'). You can also specify it on the query as part of the related() method …
Comment by
WanWizard
September 2012
permalink
Lang — Display translations in many languages at once
On second thought it sounded like a good idea. As of now supported in 1.4/develop.
Comment by
WanWizard
September 2012
permalink
Lang — Display translations in many languages at once
Currently you can't. Language files are loaded into in internal unified structure that has no concept of language. If you think this is functionality more people would want, create a feature request at http://github.com/fuel/core/issues. You c…
Comment by
WanWizard
September 2012
permalink
how to filter the result in orm/many_many
You have to pay attention to the different forms of find(). If you pass a parameter to it, it will always return a result, and you can not chain any methods on a result. If you use that, just use a normal find() and use the option array to specify …
Comment by
WanWizard
September 2012
permalink
[TEMPLATE] - How explode the template ?
For simple templates you don't need the Theme class, you can do that with Views and Controller_Template as well. How is very well documented, so I suggest you start by reading instead of asking (hint: see http://docs.fuelphp.com/general/views.…
Comment by
WanWizard
September 2012
permalink
[TEMPLATE] - How explode the template ?
** Moved to General ** Please do not ask questions in a forum dedicated to tips and tutorials.
Comment by
WanWizard
September 2012
permalink
how to filter the result in orm/many_many
Not without manually adding the required where clause. You can work around it by adding static methods to your model that do the prepping: public static function find_active() { return static::find()->related('child')->where(…
Comment by
WanWizard
September 2012
permalink
namespaces use required?
Namespaces are a means to avoid collisions in class naming, and are a core component of FuelPHP's architecture. All classes in app/classes by default live in the global namespace, all FuelPHP core classes are aliased to the global namespace. S…
Comment by
WanWizard
September 2012
permalink
Enable profiler for admins only
The config is loaded very early in the bootstrap of the framework, so I guess Auth doesn't work. You can put this in the before() of your base controller, or create a helper class that you 'always_load' and put it in the _init() meth…
Comment by
WanWizard
September 2012
permalink
Is it possible to have modules inside packages?
Yes, that would work, but obviously creates a dependency between app and your package, which sort of makes it pointless to put them in a package in the first place. If this dependency exists simply create app/cms and put them there. If you want the…
Comment by
WanWizard
September 2012
permalink
V1.3 config question
I've been diving into the changelogs and the git history: The security.auto_encode_view_data config option in app/config/config.php has been renamed to security.auto_filter_output in v1.1. security.htmlentities_flags was introduced on February…
Comment by
WanWizard
September 2012
permalink
V1.3 config question
I have all FuelPHP versions installed here, and I did a quick search in the code over all versions, but I can't find these config keys?
Comment by
WanWizard
September 2012
permalink
Is it possible to have modules inside packages?
Official answer: No, you can't have modules in a package. Unofficial answer: FuelPHP supports multiple module folders, so nobody's stopping you from adding a modules folder to your package, and in the package bootstrap add the folder to t…
Comment by
WanWizard
September 2012
permalink
Config a default parser and get rid of the extension all the time
I don't think you can't. The parser package will install an extension of the View class. It's forge() method uses the extension to lookup the template parser that needs to be used. These are configured in the parser.php config file i…
Comment by
WanWizard
September 2012
permalink
Archive & XML file
You're XML isn't parsed, so you didn't do what I wrote: // create a format object from your XML $xml = Format::forge($myxmlstring, 'xml'); // get the xml as an array $array = $xml->to_array(); // dump the array Debug…
Comment by
WanWizard
September 2012
permalink
how to filter the result in orm/many_many
It depends on your query. Conditions at the moment only work on 'eager' loading, meaning if you run a find() query with related('myrelation'). The condition is ignored when use 'lazy' loading, i.e. running the query wh…
Comment by
WanWizard
September 2012
permalink
Archive & XML file
It will not copy the xml, the xml will be parsed and stored internally in a multidimensional array. Do this so see how it is stored: \Debug::dump($xml->to_array());
Comment by
WanWizard
September 2012
permalink
how to filter the result in orm/many_many
See http://docs.fuelphp.com/packages/orm/relations/intro.html. Add a condition key to the relation definition, containing your where clause.
Comment by
WanWizard
September 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,373
Last Active
12:58AM
Roles
Administrator