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
Sending parameter value in viewmodel
Viewmodel::forge() doesn't have the option to pass variables, like a View has. So you need to use: - set() - set_safe() - property assignment ( like $viewmodel->at = 123; ) In the Viewmodel, you use $this->at to retrieve the value...
Comment by
WanWizard
September 2014
permalink
Lang class with php files
This: Lang::load('article', 'article', 'en'); loads the strings into the "article" group, so you need to use $helper = Lang::get('article.article' . $id); This is what we call "dot-notation&…
Comment by
WanWizard
September 2014
permalink
Lang class with php files
p.s. in both cases the INSERT statement is the result of a PHPMyAdmin export ;-)
Comment by
WanWizard
September 2014
permalink
Lang class with php files
Did a second insert: Lang::load('article.db', 'article', 'de'); Lang::set('keyname2', array('name' => 'GermanName2', 'description' => 'GermanDescription2'), '…
Comment by
WanWizard
September 2014
permalink
Lang class with php files
I just ran your code here (slightly modified): Lang::load('article.db', 'article', 'de'); Lang::set('keyname', array('name' => 'GermanName', 'description' => 'GermanDe…
Comment by
WanWizard
September 2014
permalink
Lang class with php files
Cool, thanks for the feedback.
Comment by
WanWizard
September 2014
permalink
Lang class with php files
We aim to please... :-)
Comment by
WanWizard
September 2014
permalink
Lang class with php files
Not needed anymore, found and fixed the issue: https://github.com/fuel/core/commit/23798fe27ad37c862c565fadf8c5b36fc05db944
Comment by
WanWizard
September 2014
permalink
Lang class with php files
To start with your last question: the Lang class uses an "extension" to determine in which format the data is, and where to find it. By default, the ".php" extension is used, which in the above example makes that Lang::load('…
Comment by
WanWizard
September 2014
permalink
User session Ghosting / Spoofing
Not with the standard codebase. Are you using Simpleauth or Ormauth?
Comment by
WanWizard
September 2014
permalink
Video tutorial on building applications with FuelPHP
If you're willing to keep track of your problems, we can see where the docs are lacking in information and clarity. Which we need to make improvements. Alternatively, if you want to help, you can fork the docs repository, make changes you thi…
Comment by
WanWizard
September 2014
permalink
Warning! Fuel\Core\PhpErrorException [ Warning ]:
Looks like you have a browscap.ini file on your server, configured in your php.ini file, that is not valid. get_browser() is a PHP function: http://php.net/manual/en/function.get-browser.php
Comment by
WanWizard
September 2014
permalink
User session Ghosting / Spoofing
If you have disabled multiple user logins, that is indeed the case. You can control that behaviour in the simpleauth or ormauth config file in app/config, by changing 'multiple_logins' => false to 'multiple_logins' => …
Comment by
WanWizard
September 2014
permalink
User session Ghosting / Spoofing
If you're using Auth, you don't need to do anything, you can Auth::force_login() to create a login session as any given user id.
Comment by
WanWizard
September 2014
permalink
Video tutorial on building applications with FuelPHP
The docs state that you unpack the zip, or clone the repo, run composer, and then point the DocumentRoot of your virtualhost to the public folder. FuelPHP was never written with beginners in mind, it's mainly used in large (corporate) applicat…
Comment by
WanWizard
September 2014
permalink
Request curl always return 404
The cURL request driver does: $ch = curl_init('http://localhost/test.php'); curl_exec($ch); which should be identical.
Comment by
WanWizard
September 2014
permalink
Video tutorial on building applications with FuelPHP
Please indicate what your problems were, and we can improve it. As experienced users, it is sometimes easy to overlook something, that we find easy, but which is a struggle for beginners. I am really interested what your problems were, for me insta…
Comment by
WanWizard
September 2014
permalink
Additional data in pivot table (many to many) ?
Correct. You can name the model anything you like, just use the _table_name property to define the correct table if the Model can not determine it from the model name automatically.
Comment by
WanWizard
September 2014
permalink
Additional data in pivot table (many to many) ?
Note that if you take this route, give the pivot table an id column. Don't use the combination of 'film_id' and 'cinema_id' as a compound primary key, the ORM does not support columns that are both primary key and foreign …
Comment by
WanWizard
September 2014
permalink
Additional data in pivot table (many to many) ?
The standard many-to-many, with a defined through-table, does not support that. What you can do is split the relation into two one-to-many relations, by using a model for the through-table. You can use that in parallel to the current many-to-many, …
Comment by
WanWizard
September 2014
permalink
shared data for javascript. CSRF tokens problem...
I don't know, it depends on where you check the token. If you have auto checking active (by setting security.csrf_autoload to true), there is no option to change the setting, as this is done very early in loading the framework, long before a c…
Comment by
WanWizard
September 2014
permalink
shared data for javascript. CSRF tokens problem...
So, if you don't want that, you can use \Config::set('security.csrf_expiration', 3600); // set the expiration to one hour in your controller, so that a new one isn't generated. Note that you have to do this before you call Se…
Comment by
WanWizard
September 2014
permalink
shared data for javascript. CSRF tokens problem...
A CSRF token gets reset if: - it is used (i.e. after submitting a form and doing a token validation) - it is expired The first one is hard-coded behavior, so you need to overload the Security classes check_token() method if you want to change that.…
Comment by
WanWizard
September 2014
permalink
Using lang from database
The problem with some RDBMS engines is that an UPDATE returns zero if no rows are updated (for example MySQL). That means you can't check whether the update failed, or the update was a success but nothing had changed. And Lang needs to know t…
Comment by
WanWizard
September 2014
permalink
shared data for javascript. CSRF tokens problem...
You can update the config value controlling this behaviour before your controller method generates the View?
Comment by
WanWizard
September 2014
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,400
Last Active
1:41PM
Roles
Administrator