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
File Upload help / New to Fuelphp
Sounds better then what it was...
Comment by
WanWizard
March 2012
permalink
Formatting by storing HTML in MySQL, FuelPHP output encoding
Not sure it's available in the 1.1 release (if you use that, 1.2 is on the way...). If you're using 1.1/develop, see http://fueldevdocs.exite.eu/classes/markdown.html We're using the Markdown Extra parser from http://michelf.com/proj…
Comment by
WanWizard
March 2012
permalink
Display specified view if not logged on
Having a parent router isn't a bad idea, but that will add some overhead while not a lot of people would need this. So it is not part of the default Controller or Controller_Template. It is better to create a layered base controller structure,…
Comment by
WanWizard
March 2012
permalink
Formatting by storing HTML in MySQL, FuelPHP output encoding
For the Fuel Depot project we're going to use Markdown for all documentation, comments, blogs etc. FuelPHP has a markdown parser available as part of the core, and there are plenty of WYSIWYG editors available to make it easy for your users to…
Comment by
WanWizard
March 2012
permalink
Display specified view if not logged on
No, this is how it should work. You need to use call_user_func_array() because you want to pass the params unaltered.
Comment by
WanWizard
March 2012
permalink
Load module config file automatically when route into module
I have the base controllers in app/classes/controller (as they are global to my apps). If it's called Controller_Base, it should be in a file called base.php. Note that if you use this in modules, know that Controller_Base lives in the global…
Comment by
WanWizard
March 2012
permalink
upload pdf file on the admin
I assume this is on "Model_Newsrh::add(Upload::get_files());", which is your model.
Comment by
WanWizard
March 2012
permalink
Database selection
As said, it will merge the generic one with the environment one. If you check both (as they are by default), the generic one contains all global definitions, including the driver to be used. The environment one only defines the database (the PDO ds…
Comment by
WanWizard
March 2012
permalink
File Upload help / New to Fuelphp
Your form posts to "/upload", yet your action is called "create". Assuming that this action is in a controller called Controller_Upload, shouldn't you post to "/upload/create"?
Comment by
WanWizard
March 2012
permalink
Display specified view if not logged on
Use a base controller that extends Controller_Template. Add a router() method to that base controller. In that method, check if someone is logged in, and if not, switch the template to your login view, and call the action that powers it (deal'…
Comment by
WanWizard
March 2012
permalink
upload pdf file on the admin
Check your HTML output for errors. The first parameter of Form::file() is a fieldname, which seems to be missing here...
Comment by
WanWizard
March 2012
permalink
Database selection
If you're on 1.1/master (the release), that error message is correct, as PDO does not support list_tables() and list_columns(). This has nothing to do with environments. In 1.1/develop, for the list_columns() method a workaround is implemented…
Comment by
WanWizard
March 2012
permalink
Link users together
That depends on how you have defined your relations.
Comment by
WanWizard
March 2012
permalink
Database selection
The generic config file (config/db.php) and the environment file (config/your_environment/db.php) are merged by the Config class when loaded. If the result is not what you expect, maybe the environment selection failed. Dump \Config::get('db…
Comment by
WanWizard
March 2012
permalink
Load module config file automatically when route into module
Create a base controller for all controllers in the Blog module:
Comment by
WanWizard
March 2012
permalink
File Upload help / New to Fuelphp
I don't really understand what your issue is. The questions you asked where answered, and aren't any easier to solve in other frameworks. CI for example doesn't have anything in regards to form generation and upload processing, you…
Comment by
WanWizard
March 2012
permalink
Date format
That is what Jelmer explained. As format string you can use any format supported by strftime(), and some shortcuts that are defined in app/config/date.php (you can add more if needed).
Comment by
WanWizard
March 2012
permalink
File Upload help / New to Fuelphp
A form field of type 'file' is not an input field, can not be accessed through the Input class, and can not be validated. This is all the task of the Upload class, so once your form validation passes, you need to check if the upload was v…
Comment by
WanWizard
March 2012
permalink
Users roles
I would do that in a router() method which gives you direct action to the action called, but this should work too. I virtually never use an access system based on actual files (controller/method combinations). It gets complicated very fast, you nee…
Comment by
WanWizard
March 2012
permalink
[SimpleAcl] Nested roles?
No, currently you can't. The code uses in_array() to check, so it can't deal with nested definitions.
Comment by
WanWizard
March 2012
permalink
File Upload help / New to Fuelphp
Your form doesn't have the correct enctype, and you also need an input field of type 'file' to be able to upload files. As for file information, Upload::get_files() will return an array with all information it has on each file upload…
Comment by
WanWizard
March 2012
permalink
Users roles
Depends on what authentication system you use. In case of the auth package, roles and rights are handled by the ACL classes. The roles and rights are defined in the simpleauth config file. You can check the Fuel Depot code on http://github.com/fuel…
Comment by
WanWizard
March 2012
permalink
DOCROOT differs between oil tasks and regular classes
For your web application it is. For oil, it isn't, since it's not in public.
Comment by
WanWizard
March 2012
permalink
Performance
There is nothing wrong with FuelPHP's performance. You always have to be careful with interpreting results like this. Every framework is designed different, and that design can have an influence on the test results in a specific test case. Sam…
Comment by
WanWizard
March 2012
permalink
mod_rewrite and 404 on assets
As documented, you use mod_rewrite to remove the index.php from the URL. An .htaccess file that will do this by default on most setups is included in the download.
Comment by
WanWizard
March 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
1:15PM
Roles
Administrator