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
ORM Model code generation from database?
There is a task called fromdb: php oil refine fromdb:help which can generate both models and scaffolding from an existing table (or multiple tables). Note that this works best with MySQL or MariaDB, other databases may not return enough informati…
Comment by
WanWizard
November 2015
permalink
Use a string or integer in the DB join ON method
You need to encapsulate that: DB::expr('string').
Comment by
WanWizard
November 2015
permalink
How i fetch all roles assigned to a user
Ormauth uses standard ORM models, so it's a standard query. $roles = \Model\Auth_User::find($userid)->related('roles')->get();
Comment by
WanWizard
November 2015
permalink
Auth package not working in oil task
The only two "external dependencies" in generating the password hash are the salt and the number of iterations, so they must be different for some reason. You can check that by dumping Config::get('auth') in both your oil task a…
Comment by
WanWizard
November 2015
permalink
Auth package not working in oil task
The method works you say, so there is nothing wrong with loading the package. If the package wasn't loaded, you would have gotten a "class not found" error. Anything in your "admin"module that may influence the outcome, lik…
Comment by
WanWizard
November 2015
permalink
Error handler error in PHP7
We're planning a new release once PHP7 has been officially released and we've done a thorough test with it.
Comment by
WanWizard
November 2015
permalink
Error handler error in PHP7
Switch to 1.8/develop. In PHP7 "Error" is an internal class, so we had to rename it.
Comment by
WanWizard
November 2015
permalink
Cannot upload image
Always a tricky subject, file permissions. Glad you got it sorted.
Comment by
WanWizard
November 2015
permalink
Need some Uderstanding on Roles and Groups
Technically, a group and a role are the same. Both can be assigned to a user, and both can be linked to a set of permissions. A user van have only one group (has-many relation), and multiple roles (manymany relation). A role is usually related to …
Comment by
WanWizard
November 2015
permalink
template file not found, bug?
That is quite logical. As I said, when you use forge(), you are just creating an object. Like you would when you use "new". But in the after() method when you render the page, you use Theme::instance(). This uses a COMPLETELY different …
Comment by
WanWizard
November 2015
permalink
template file not found, bug?
I have no clue what you're on about. Instance() does exactly the same as forge(), only difference it that is stores the instance by name so you can retrieve it later, while forge() always forges a new object. I understand where you store your…
Comment by
WanWizard
November 2015
permalink
template file not found, bug?
If you do it that way, they are in different folders? Or do you want to have a selection of frontend themes, and a selection of backend themes? In that case it will probably make sense to split them like you did, and your config should work fine. …
Comment by
WanWizard
November 2015
permalink
Cannot upload image
That error should have a filename in it, so this implies that the load() method does not get a filename passed.
Comment by
WanWizard
November 2015
permalink
template file not found, bug?
What version of Fuel are you on? I see in your dump some Windows related issues that are solved in the current version as far as I know. It is looking for "D:\xampp\htdocs\dir.dev\fuel\app\themes\frontend\default\.\template.php", does tha…
Comment by
WanWizard
November 2015
permalink
How to force update record?
It looks like it checks though: https://github.com/fuel/orm/blob/1.8/develop/classes/observer/updatedat.php#L80
Comment by
WanWizard
November 2015
permalink
How to force update record?
The createdat observer will only be called on an INSERT, never on an update. The updatedat observer is called on every UPDATE, and will also update the updated_at column is a related and loaded child record has changed. This only works if the clien…
Comment by
WanWizard
November 2015
permalink
Can i have a php based cron service like wp-cron?
I don't know wp-cron. I assume you want to create and run background processes. What exactly do you want to do? How do you want to trigger them?
Comment by
WanWizard
November 2015
permalink
302 Redirects on Heroku
Have you tried it with the htacess that is supplied with your FuelPHP installation? Afaik Heroku uses fcgi, which requires different rewrite rules...
Comment by
WanWizard
November 2015
permalink
ORM find, find_by or query()->where get's me unwanted result
Because find() does a query on primary key (usually 'id'), which is a numeric column? Both PHP and MySQL do implicit type conversions, for MySQL see http://dev.mysql.com/doc/refman/5.7/en/type-conversion.html
Comment by
WanWizard
November 2015
permalink
multi database
In your db.php. For the default database definition, Fuel provide a lot of defaults, but for others you need to define that yourself. There is an example of a full config in the docs: http://fuelphp.com/docs/classes/database/introduction.html#/conf…
Comment by
WanWizard
November 2015
permalink
Changing login username from email to cellno
You will have to overload the Auth login class and change the login() method, or write your own login method, using that code as the basis.
Comment by
WanWizard
November 2015
permalink
I want to add simplecaptcha in my form
Which simplecaptcha? There are lots that call themselfs that, but the primary sourceforge project is for Java apps?
Comment by
WanWizard
November 2015
permalink
Fuel controllers and Server Events
What you can try in your loop is an explicit ob_flush(); flush(); after echo'ing out your update. Please note that this means a PHP process running for every client, which is not very efficient, and may cause your webserver to overload if yo…
Comment by
WanWizard
November 2015
permalink
Fuel controllers and Server Events
You can't do that in Fuel, it's a framework made for request/response operations, it's not a continues listener which you need for this kind of implementation. It requires a streamed response to be able to send continues updates, whi…
Comment by
WanWizard
November 2015
permalink
send to controller from view and get result set without page refreshing
Add the jquery javascript code to your view, and have it do an ajax call to a rest controller method, which can return the data in json format, which your javascript code can use to update the page. Just like any other application where you would d…
Comment by
WanWizard
November 2015
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,365
Last Active
April 26
Roles
Administrator