cakephp-2.3

How to use CKEditor in cake php 2.3

落爺英雄遲暮 提交于 2019-12-12 06:47:20
问题 I want to use CKEditor in cake php 2.3, trying a lot but not getting any solutions. basically I need image upload option in editor from local system. How could I get success? 回答1: After lots of research, finally i got the solution for implementing CKEditor with image upload option in cakephp 2.3 For image upload in CKEditor you have to use KCFinder please check the below link you can get the details there http://cakephpclues.blogspot.in/2012/01/ckeditor-kcfinder-integration-with.html Also the

The request has been black-holed

心不动则不痛 提交于 2019-12-12 06:38:21
问题 when i am upload multiple images i found The request has been black-holed Error: The requested address '/admins/uploadimage1' was not found on this server. my contoller function public function uploadimage1() { if($this->request->is('post')) { $a=$this->data['Admins']['imgs']; print_r($a); } } view file <?php echo $this->Form->create('Admins',array('controller'=>'Admins','action'=>'uploadimage1', 'type'=>'file', 'accept-charset'=>'utf-8'));?> <table width="95%"> <tr><td><b>Image Title</b></td

Most efficient/easy method for permission system?

寵の児 提交于 2019-12-12 03:53:47
问题 I'm creating an app using CakePHP and have hit a mental barrier when trying to figure out a permission system for the app. I've narrowed it down to a couple different methods, and I'm looking for some information about which would be a) most easily implemented and b) most efficient (obviously there can be trade-off between these two). The app has many different models, but for simplification I'll just use User, Department, and Event. I want to be able to individually control CRUD permissions

Share controllers, models and views in multisite CakePHP 2.3 installation

不羁的心 提交于 2019-12-12 01:34:19
问题 I'm creating a CakePHP 2.3 advanced installation (several apps -websites- that share one same lib folder where all of cake's core files are located). This works without any problems, I just edit the core.php file in the Config folder for each app so it knows where to find cake's files. The file system looks something like: [root] [cake-core-files] [websites] [website-1] [app] [plugins] [vendors] [website-2] ... [website-N] These different apps are in fact different in some things (they are

CakePHP - Controller or No Controller?

牧云@^-^@ 提交于 2019-12-11 23:34:52
问题 I am currently building a web app which has two models, Donor and Donation Models respectively. It has multiple user roles. When the staff user first registers a donor, I want him to be redirected to another form which allows him to fill in the Donation details(the donor is registered once the first donation is successful). Firs of all, should I create a donation controller, from which I would redirect the user using: return $this->redirect(array('controller'=>'donations','action'=>'add'));

cakePHP email login Auth

孤者浪人 提交于 2019-12-11 20:10:02
问题 Hi I am using cakePHP version 2.3.6, ive been trying to create a registration and login, however when i login with a registered username and password it keeps on saying wrong username or password and also I im using email for username. Please help me out thanks. AppController class AppController extends Controller { public $components = array( 'Session', 'Auth' => array( 'loginRedirect' => array('controller' => 'users', 'action' => 'index'), 'logoutRedirect' => array('controller' => 'pages'

CakePHP HABTM data not saving to database

两盒软妹~` 提交于 2019-12-11 19:29:08
问题 I have a model GenForm which has a HABTM relationship with another model PdfFile . I use this to generate a list of checkboxes in my GenForm index view. In the GenForm model, I added: public $hasAndBelongsToMany = array( 'PdfFile' => array( 'className' => 'PdfFile', 'joinTable' => 'gen_forms_x_pdf_files' ) Here's a fragment from my GenForm index.ctp view: <?php echo $this->Form->input( 'PdfFile', array('label' => 'Select some PDF files', 'multiple' => 'checkbox') ); echo $this->Form->input(

ckeditor5 & CakePHP 2.3: How do I make the tables work?

血红的双手。 提交于 2019-12-11 15:15:08
问题 I have a CakePHP 2.3 app that for years has had whatever version CK Editor. I'm working in developing mode, hoping to upgrade it to CKEditor 5. I easily and quickly got rid of all old code and files to make ckeditor5 work just fine in its most basic version. This was a go! However, I do need tables. I'm now working on getting the table feature set up and just cannot get it working. Here's their doc on this: https://docs.ckeditor.com/ckeditor5/latest/features/table.html npm install --save

Multiple Submit buttons in cakephp form

十年热恋 提交于 2019-12-11 15:10:10
问题 I have a form in a cakephp view which saves well with a single button, here is the code in the view book_form.ctp echo $this->Form->create ( 'Book', array ( 'url' => array ( 'controller' => 'Books', 'action' => 'save_record' ), 'class' => 'span12 the_ajaxform', 'inputDefaults' => array ( 'label' => false, 'error' => false ) ) ); . . // form fields . . $options =array( 'label' => __('Save'), 'class' => 'btn btn-primary', 'id'=>'saveform' ); echo $this->Form->end($options); . . This works

using Console/cake on EC2

不羁岁月 提交于 2019-12-11 14:28:58
问题 I'd to use the cakephp console on EC2 by this code : sudo cd /path/to/cakephp/app && Console/cake But weirdly I got this message: No such file or directory 回答1: Solved by installing dos2unix . First you have to install dos2unix sudo yum install dos2unix or sudo apt-get install dos2unix Then run: sudo dos2unix /path/to/app/Console/cake Maybe you need also to grant chmod -R 777 app/Console 来源: https://stackoverflow.com/questions/31888769/using-console-cake-on-ec2