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
Installed Simple DOM Parser via Composer Class Still Not Found
p.s. How old is your Fuel installation? That blogpost is ancient, since 1.6 composer is integrated into Fuel, and since 1.7, Fuel itself is installed using composer.
Comment by
WanWizard
October 2015
permalink
Installed Simple DOM Parser via Composer Class Still Not Found
Add the package as a requirement to your composer.json file, and run "composer update" to install it?
Comment by
WanWizard
October 2015
permalink
Rest Controller Return Empty, No Output
And you should get a 404, as the requested URI does not exist.
Comment by
WanWizard
October 2015
permalink
multi database
There are several ways. You can pass the name of the database as configured to the execute() method of a DB call: $record = DB::select()->from('table')->where('id', 1)->execute('otherdb'); For ORM and Model_…
Comment by
WanWizard
October 2015
permalink
Access Facebook SDK via Composer to My Controller
Had a quick peek at the code. The SDK has a persistentData interface, and has included classes for Memory and Session storage. And an interface class, so you can design your own. So if you need persistant storage, you need to develop your own custo…
Comment by
WanWizard
October 2015
permalink
Access Facebook SDK via Composer to My Controller
It assumes PHP's native session management is active. Which isn't the case, since Fuel doesn't use it. I'd call that a bug in the SDK, it has a hardcoded dependency it shouldn't have.
Comment by
WanWizard
October 2015
permalink
Facebook\Exceptions\FacebookSDKException [ 720 ]: Sessions are not active.
From looking at the error message I assume that it makes assumptions about PHP's native session management being active, which Fuel doesn't use.
Comment by
WanWizard
October 2015
permalink
tree_id issue in Multi Tree in Nested Set
The nestedset model doesn't overload the ORM function of the find() method, so I can't see how a column value suddenly would change. What is the contents of the "original" array when you do \Debug::dump($parent);
Comment by
WanWizard
October 2015
permalink
tree_id issue in Multi Tree in Nested Set
In a multi-tree table, you need to make sure the correct tree is selected before you run any operation on it. On some operations, that work with existing objects, the Nestedset model will retrieve the current "tree_id" from the current ob…
Comment by
WanWizard
October 2015
permalink
Create a disabled user
Depends on which Auth driver you use. If you use Simpleauth, the groups are defined in the simpleauth.php config file. If you use Ormauth, there is a users_groups table you should add the new group to. The users table contains a "group_id"…
Comment by
WanWizard
October 2015
permalink
Create a disabled user
What defines a user as disabled is entirely up to you. Most people seem to use a group called "Validating" (or something), and if someone tries to login that is a member of that group, you get a message to check your mailbox, or request t…
Comment by
WanWizard
October 2015
permalink
How to install FuelPHP in a sub-URI?
No nginx user, but this is a posted solution for Laravel, which should work for other apps too: https://forums.serversforhackers.com/t/nginx-config-for-multiple-laravel-apps-running-on-single-server/140/5
Comment by
WanWizard
October 2015
permalink
Nginx + HHVM + Fuelphp = blank page
You can also run "oil refine install" (as root) on your project directory to set the correct rights. And you potentionally missed one: If your app writes to config files, you also need to set write rights on fuel/app/config. BTW, it is …
Comment by
WanWizard
October 2015
permalink
Active field in the user table
The column "last_login" contains the timestamp the user logged-in the last time. PHP is a stateless language, so technically there is no such thing as "active". You could record the last request timestamp, for example using a &…
Comment by
WanWizard
September 2015
permalink
No Valid Template Could be Found
I can't comment with this information. The data you dumped in your previous post shows that $this->theme does not contain a Theme object.
Comment by
WanWizard
September 2015
permalink
changing title and some property is complex
A theme is nothing more than a collection of View objects. So get the correct View object and set the title on it. I gave an example in my previous post for a partial, but you can do the same for a template using get_template().
Comment by
WanWizard
September 2015
permalink
changing title and some property is complex
set_partial() takes either a string or a View object, and if you need access to the View object, you can use get_partial(). So you can do: // define the partial $this->theme->set_partial('header', 'header'); // and later…
Comment by
WanWizard
September 2015
permalink
No Valid Template Could be Found
You get that error if there is no template set at all. Looking at your dump, I'd say you're overwriting your own variables, a Theme instance doesn't have a property called "global_data". This looks like a View object.
Comment by
WanWizard
September 2015
permalink
Return Hook after a function
Check the docs, defined events can return data, which is returned when the trigger() method is used to execute the events.
Comment by
WanWizard
September 2015
permalink
How can i setup Multisite>
That is not that easy, you're basically asking "how do I write an application that has the same functionality as Wordpress multi-site". I created a CMS before, that's months of work...
Comment by
WanWizard
September 2015
permalink
get first of has_many
Run the query the other way around, like "show the first image that has "this" article as it's parent". Child records of an object are always fetched as a complete set, even if you only want to display one of them.
Comment by
WanWizard
September 2015
permalink
Return Hook after a function
Don't know. Wordpress is a CMS, an application, FuelPHP is an application framework, something to develop an application in. It does not have a concept of pages as you define it.
Comment by
WanWizard
September 2015
permalink
How can i setup Multisite>
Define "multisite"? FuelPHP is an application development framework, and as such, it does not have a concept of a "site", that is something your app (the one you need to develop) has to support.
Comment by
WanWizard
September 2015
permalink
Hooks in Fuel
The official answer: when it's ready. ;-)
Comment by
WanWizard
September 2015
permalink
Any way to remove requirement for lowercase paths?
./fuel/app/classes contain Fuel classes. That need exclusively be loaded by Fuel's own autoloader. Like mikepmtl says, no problem using PSR-0 or PSR-4 to load your own classes (the Fuel autoloader supports PSR-0 at the moment, no need to use t…
Comment by
WanWizard
September 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,368
Last Active
3:49AM
Roles
Administrator