I don't seem to be able to use a custom route with pagination. The URL of the blog should be http://www.domain.com/en/page:2. However, the links generated by the PaginateHelper (prev and next), keep adding the controller and action, so that the URL looks like http://www.domain.com/posts/index/en/page:2.
The route config is quite simple...
Reading through the core and looking at nearly all of the helpers/plugins etc. that are available, I notice there are a lot of comments.
CakePHP is structured in such a way that it is very simple to determine where things are and what they are doing. Is it really necessary to comment all of this code? Does it make the source more messy...
Hi.
My CakePHP Folder Structure
1. app / webroot / img
2. cake
3. vendors
4. assets
<?php echo $html->image('cake_logo.png', array('alt' => 'CakePHP'))?>
Is it possible to access my external asset directory with the CakePHP Image helper?
...
Is it somehow possible to create a hasMany Relationship which makes use of an ID outside of the Model? For example one User has many Comments, but I would like to find just the comments of the logged in user:
public $hasMany = array(
'MyComment' => array(
'className' => 'Comment',
'foreignKey' => 'user_id',
...
While serving images through CakePHP, I'm getting
The image
"http://DOMAIN/PLUGIN/images/image.png"
cannot be displayed, because it
contains errors.
There is a bug report already existing, http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/864
As mentioned in the above bug report, whitespace is the culprit here....
I am wondering whether it is possible to create a hasMany Relationship in a Model which makes use of the ID of the logged in user.
Example:
One tip has many votings (from different users). This is easy:
public $hasMany = array(
'TipVoting' => array(
'className' => 'TipVoting',
'foreignKey' => 'tip_id',
'depen...
Hi -
I have a 1.2 app that I'm updating to 1.3. I need to send all top level requests like /foo to a controller action (/sites/view/$1) if they are not a valid controller. So in my 1.2 app I had a route like this (incredibly ugly I know):
Router::connect('(?!admin|billings|carriers|clips|cliptypes|contacts|domains|faqs|leadcomments|...
Hi,
I'm using jQuery to make an AJAX request to some controller action. This request is activated from a button in the view of the edit action in the same controller.
My problem:
The Ajax Request is returning all the code of the edit view (with all the forms and inputs) instead of the expected number. If I put the same ajax button in ...
I have two tables, Pages and Posts that are in HABTM and are joined using pages_posts join table.
My Page model along with the HABTM definition contains a function..
class Page extends AppModel
{
var $name = "Page";
......
......
function callthis()
{
return $this->find('all');;
}
}
From my Posts controller, I'...
i want to know the code for at a time single user login on any browser or computer of a
user.
Can u help me.
Thanxs,
...
Hi,
I have developed a cake php application.
In this there are tables like students,placements,batches,companies
In placements table there is student_id,company_id and in students table there is batch_id column.
In placements index page i have applied jq grid. Here is the screen shot.
I want to give searching on student,company and...
I'm specially looking for a good UI to manage permissions of users/groups based on CakePHP's auth and acl components.
is anyone knows a good plugin (or good working code) to manage users and their permissions?
...
Hello,
I have developed a application in CakePHP, and setup a cron Job with Shell. I have hosted the application in our development server, bluehost and setup the cron Job and its working fine.
The cron Job Command was,
/home4/enventur/public_html/pennystock/cake/console/cake -app "/home4/enventur/public_html/pennystock/app" message_...
Hi,
I want to enable this kind of routing in my site where users can create their vanity urls
test.com/[user-url]
but also dont want to ruin the routing for my existing controllers
test.com/users
test.com/business
test.com/admin
so I added this to my routes.php
Router::connect('/*', array('controller' => 'business', 'action' => 'view...
Dear Cronies,
I had designed the tables and bake the tables but the table named 'banners' baked well but when I insert the values to banners, it shows the following error.. could you please me...
1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synt...
I would like to have categories, and rankings for my content and users respectively, and I am not sure how to go about implementing this using CakePHP conventions?
Do I need to create a model?
...
I'm having problems baking controllers from the console WITH the admin. Whatever I do it just generates the simple actions, no admin_ version...
Tried:
cake bake controller all
cake bake controller all public admin
cake bake controller all admin
I think I'm missing something that is very obvious :)
...
I've been putting this off for almost 6 months now. I kept telling myself that I will upgrade my website to CakePHP and put in a user system. Well, I finally took the first step by installing CakePHP (It's a small step, but I am proud that I finally did it). Anyways, I want a user system, and I don't know where to go from here. I won't m...
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',
...
I've used the following Nginx CakePHP Vhost template for a while now, with success.
http://codepaste.appspot.com/show?id=270121
But now it seems that the newer version of CakePHP (1.3.3) doesn't work at all.
It might be that it has nothing to do with the above Vhost template and that it is an error with FastCGI or Nginx.
The error i...