cakephp

Applying multiple CSS classes to same text in TinyMCE

Hi all! I am having some issues getting TinyMCE to be as flexible as I need it to be. In my editor (used in a cakePHP-based app) I am not allowing users to edit the html, so we are relying entirely on the WYSIWYG. Unfortunately, TinyMCE is currently not allowing users to apply two CSS classes to the same text. Whichever style is appl...

how I use the facebook API in my php code?

hii Friends, I am working on widgets.I want to build facebook application in small widget. so how I use the facebook API in my php code. please provide the guidline. please... Help me.. ...

When Rails require mod_rails, what about Django, TurboGears, Symfony, CakePHP? Can they deploy using mod_python and mod_php?

When Rails applications seem hard to deploy (or used to be), what about Django, TurboGears, Symfony, CakePHP -- can they be simply deployed using mod_python or mod_php? Actually, won't it need something like a mod_django so that the code can run in a "Django" environment? (Just like Rails' script/console or Rails 3's rails console) ...

Send a file through a POST request with http_socket in CakePHP?

Hi, I need to make a HTTP POST call to a Hudson CI server from CakePHP. The call is parametrized and contains a few key/value pairs. Some of those are in fact files which need to be uploaded. Since I'm using CakePHP, I'd rather use the HttpSocket class which comes with the framework rather then try and write my own cURL based implement...

How to find users based on groups defined in ACL in CakePHP?

I'm using CakePHP here. Let's say I have 3 groups of user, namely: Super Admin Admin Customer and this scenario has been setup using ACL. Now, how do I return only users that belong to a particular group? e.g. Find all Customer only I am able to do this using pure SQL statement: SELECT * FROM `users` WHERE `id` IN ( SELECT foreign...

CAKEPHP : How to connect database on Godaddy from mycomputer (localhost) ?

Please, write 1 example config connect database from localhost to godaddy. This is connect to database from files on server to server : var $default = array( 'driver' => 'mysql', 'persistent' => false, 'host' => 'mysite.db.6650008.hostedresource.com', 'login' => 'myaccount', 'password' => 'password12', 'database' => 'mysit...

what does the CakePHP test suite do? What is the purpose of it?

Why must I use the test suite? I have never used any SimpleTest Unit Test, or any testsuit. If write a testsuit won't it take a lot of time? I don't understand the purpose of it. Please explain the benefits. Thanks. ...

How to use CakePHP's database.php file for custom scripts?

Hello, Can you help me how to use class defined in CakePHP's /config/database.php file, for my custom scripts? I need to use defined array for db connection. Tnx in adv! ...

PHP: How to layout records horizontally and vertically

I have a users table which I want to display like the stackoverflow users page. So say display 5 records then take a new row, display 5 records, take a new row... What's the best way to achieve this? Thanks, Billy ...

CakePHP AutoComplete Question

I am working on a book review application and I am using autoComplete to search for titles in when creating a review. The review model has an associated book_id field and the relationship is setup as the review hasOne book and a book hasMany reviews. I am trying to pass the Book.id (into the book_id field), but I want to display Book.na...

CakePHP: using models in different controllers

Hello, I have a controller/model for projects. so this controls the projects model, etc, etc. I have a homepage which is being controlled by the pages_controller. I want to show a list of projects on the homepage. Is it as easy as doing: function index() { $this->set('projects', $this->Project->find('all')); } I'm guessin...

cakephp: question about caching cakephp

i use var $cacheAction = '1 hour'; cakephp create file xxx_view_1245.php in cache/views/ , it cached. but if i use var $cacheAction = array( 'view/' => '1 hour' ); cakephp dont cache, i dont know why , please help me ...

Need to have a user in more than one groups in cakePHP

Hello I am trying the ACL component in cakephp for my web application. The example on their website for using their ACL structure has a many to one relationship between groups and users. A user can belong to one group, while a group can have more than one users in it. But I have a situation where I need to have a few users in more than ...

Cakephp returns empty but sql query has results

I have been fighting with this code: function getNextActionFObyBalance($when) { $theQuery = $this->find('first', array( 'fields' => array( 'Contract.id', 'Contract.start_balance' ), 'conditions' => array( 'AND' => array( 'Status.next_action_by' => 'frontoffice', 'Status.status_type' => 'active', ...

Php/Cakephp interface with Python script

I have a webapp, created using CakePhp. I need to interface with a Python script. What is the best way to go about doing that? (I could use pipe etc., but I want to check what the best practices are) Thanks. ...

Configuring Memcache + CakePHP, "Cache not configured properly" error

I'm setting up cacheing for a CakePHP application and having a really hard time getting it to talk to Memcache. I've written the caching code while testing against the File based caching engine, and all the logic is solid. When I watch debug traffic, caches hit, miss, and expire properly. I wanted to switch over to Memcache because the ...

Guidance on Database Design for CakePHP

I'm developing an application using the CakePHP framework and am currently in the process of designing the database. I want to make sure that I design the objects and their associations correctly so that the application performs well, is organized properly, is extensible, and scales well. I will first describe the application in detail, ...

how to create a chain select form in cakephp

Hello My business directory application calls for 3 chained select boxes, and I'm using cakephp to build this application. The hierarchy and order of choices for the sections is this: 1 - business group 2 - business type 3 - city (included in table customer) The relationships are: customer HABTM business types business groups hav...

a framework plugin in another framework (e.g. Symfony)

Is it possible to use a Symfony plugin in a CMS being built with another framework like Cake or Zend? How independent are those plugins? ...

cakephp : validating a login Form using $validate array

Can Any One help me to Validate a login Form in cakePHP? I need to validate the login form just like how we validate a registration form using $validate array in Model. EDIT : Since I am using Auth Component for Authentication. It directly goes to login action in Auth Component with out validating from the user model.So it will only sho...