1 answer
4 votes
Managing big applications
Hey guys!
I have an application here that is growing bigger and bigger. The address is this: www.aquitanda.com [brazilian portuguese].
Basically, it's a website where you can buy and sell stuff on your own, which means people can create their own...
2 answers
0 votes
model query
Hii developers,
This is my normal sql query,
select id,title from library_items where library_items.id not in
(select issue_library_items.library_item_id from issue_library_items
where return_date is null);
Can anybody give me the corresponding...
1 answer
2 votes
Allowing __call in AppController
Hi.
PHP5 has a __call magic method that is triggered when invoking inaccessible methods in an object context. I tried using this function as a catch-all for my missing actions, but realized that the Dispatcher checks controller classes for the...
2 answers
2 votes
Ajax Request
How do I know if a request was made from ajax or it was a normal web request?
I just wanted to block off the view, if it wasn't an ajax request.
1 answer
0 votes
How to avoid issues using Models and Components with the same name?
Is there any other solution than renaming the Model Class to avoid model & component name collision on the Controller?
1 answer
0 votes
Passing vars to view
For a long time I used this method of passing variable to view:
public function index(){
$this->set('items', $this->paginate());
$this->set('promos', $this->Promo->getRandomPromos(5));
}
OR
public function index(){
$items =... 2 answers
0 votes
Newb question: Building an index on a DB with crappy naming conventions
I'm trying to understand how to build an index in CakePHP without using scaffolding. Keep in mind that the database I am working with has tables that are in all caps and are not pluralized - example table names would be USER, VISIT, VISIT_DATA,...
1 answer
0 votes
SMTP Issues?
I purchase a pre-made site and it sends user registrations, password reminders and news items to it's users but it will not send the information via SMTP. Here is the array - why isn't working or is a server specific issue? I am on a Linux...
1 answer
-2 votes
edit function +data duplication
I have a member model and a home_addresses model.There is a link in the members index page,which points to the corresponding
home_address.i passed that memberid to the home_adress controller by the following code.
<?php echo...
2 answers
1 vote
$this->Auth->loginAction = 'members/login'; not works
Dear All
I try to change the default users/login to members/login.
I have aded the $this-Auth-loginAction = 'Members/login'; to appController beforeFilter() like:
class AppController extends Controller {
var $components = array('auth');
function...
1 answer
0 votes
findAll and hasMany
Hi,
I have four models, Company, Employee, BusinessUnit and BusinessUnitMember
Company belongsTo Employee
Employee hasMany BusinessUnitMember
BusinessUnitMember belongsTo BusinessUnit
BusinessUnit hasMany ...
2 answers
0 votes
Auth components password issue
When submitting a registration form I have the password field left blank. As this is required for the Auth component (have also set the email address as the username) it appears to be hashing the field value even if there is no value in it.
When...
1 answer
0 votes
unique habtm with additional fields in the join table
Hello.
i'm coding an app to manage some training courses. My app must keep track of the expiration date and the amount paid of every subscription.
here's my guess:
Person habtm Course
but cake doesn't handle HABTM forms with additional fields in join...
1 answer
0 votes
How to call a function in controller when checkbox is checked
I have a checkbox to show if a record is reviewed.
I have written the function to update the DB in the controller class using ajax.
How to call this function when checkbox is checked,Should this be called in onclick event?
~~~~
If checkbox is...
1 answer
0 votes
Fat Models, Skinny Controllers | Where should I put this logic?
I have an old web-game that I'm overhauling completely. The game was not designed with a MVC architecture, so I'm laboring over how to separate the logic as I rebuild it in cakePHP.
In this application, users create and train fighting characters,...
2 answers
0 votes
How to display confirm js message before delete
Also if confirmed,the record should be deleted,and the delete function is written in the controller
1 answer
0 votes
validation and the file upload
Ok, so i've got my validation for file uploading working - awesome-o.
The problem i'm having is that my form doesn't, for whatever reason, want to *show* these errors. Here is my ctp file for the form:
<fieldset>
<legend><?php __('Upload an... 1 answer
0 votes
Has way to fixed the pagination params in navigation, by default?
I'm learn about cakephp and not find properties to set the pagination to keep the params into args url.
Example:
List users, ordered by name and I'm in second page, clicked in edit, data has edited and click to save, data has been saved! I want to...
2 answers
0 votes
How to route IT in one word?
In my application, I want to create d a IT controller.
the structure I'd like to have is:
IT Controller file name it_controller.php,
IT Controller class name:
class ITController extends AppController{
}
the url will be...
1 answer
0 votes
How to read POSTed Apple plist data
Hi !
In the REST section of the cookbook, it says that "if a POST request has an XML content-type, then the input is taken and passed to an instance of Cake's Xml object".
Is there a way to transform an instance of Cake's Xml object into standard...