cakephp-2.6

Integrate Wordpress CMS in CakePHP

让人想犯罪 __ 提交于 2019-12-13 05:43:22
问题 I'm trying to integrate Wordpress in CakePHP 2.6.1 to use it as a CMS for my end users. I'm including the required file to access wordpress functions: wp-blog-header.php . As CakePHP only allows to include files located inside CakePHP I placed the wordpress intallation inside app/Vendor/wordpress and now I'm trying to import the necesary file in my AppController in this way: App::import('Vendor', 'wordpress'.DS.'wp-blog-header'); But it seems there's some functions conflict as I'm getting

How to define FlashHelper/Component element for general authError message

…衆ロ難τιáo~ 提交于 2019-12-10 09:50:27
问题 After updating CakePHP from 2.6.2 to 2.7.2 I get an missing key error when the auth flash message is created. How can I define the element template for the default authError ? Since SessionComponent::setFlash() has been deprecated I added the FlashComponent in app/Controller/AppController.php and modified all Flash messages from this: // Controller $this->Session->setFlash('Done', 'succeed'); $this->Session->setFlash('There is an error', 'failure'); $this->Session->setFlash('Please log in',