Hi All,
I am using cakePHP pagination component for pagination.
Suppose my table has 2 fields name and company. I want that when the user
sorts by company (for example), it should be sorted by 2 fields "company"
and "ID".
Basically i want the fields to sorted by multiple fields when user clicks
Hi everyone,
I'm new to cake. I've installed Cake into a subdirectory
(http://server.com/my-admin/), and it's all working well! However, when I
access the site via https instead of http I get an error:
Missing Controller
*Error: **My-adminController* could not be found.
*Error: *Create the cl
Hello cakephp team
i need to make website with admin panel
but ican't do that
i need to know who can make admin panel ??
with session and site and make admin in split section
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questio
Then you should only need to do:
return $this->Following->find('count');
That's if the method is in your model. If in the controller,
$this->User->Following ...
On Wed, Jul 4, 2012 at 5:43 PM, JonStark wrote:
> My User Model :
>
>> class User extends AppModel {
>> public $name = 'User';
>>
My User Model :
class User extends AppModel {
> public $name = 'User';
>
> public $hasAndBelongsToMany = array(
> 'Following' => array(
> 'className' => 'User',
> 'joinTable' => 'users_users',
> 'foreignKey' => 'follower_id',
> 'associatio
No wait -- that won't work.
Which table has the follower_id column? And what do your associations look like?
On Wed, Jul 4, 2012 at 5:32 PM, lowpass wrote:
> Is your User model associated with UserUsers? You said that User HABTM
> User. What is the alias you're using for that? UserUsers?
>
> And
Is your User model associated with UserUsers? You said that User HABTM
User. What is the alias you're using for that? UserUsers?
And is this function in the controller or model? If model, then
$this->UserUsers->find()
On Wed, Jul 4, 2012 at 5:12 PM, JonStark wrote:
> Thanks for the advice, but w
Thanks for the advice, but when I tried this, it returned :
Call to a member function find() on a non-object
for this code :
public function countFollowing($id) {
> $user = $this->User->UserUsers->find('all', array(
> 'conditions' => array(
> 'follower_id' => $id
> ),
> ));
> debug($user);
>
I would create two elements, menu.ctp and login_form.ctp, and load
either based on whether the person is logged in.
if ($this->Session->read('Auth.User'))
{
echo $this->element('menu');
}
else
{
echo $this->element('Users/login_form');
}
On Wed, Jul 4, 2012 at 3:01 PM, Chris wrote:
> I a
oops, my message was meant to you Bob, sorry
* *
*Hi. Recently I had to face this same issue, but with cakephp 1.3 *
*Did you read the README.txt that came along cakedc search plugin? with
> that as a starting point, I was able to build a search box where I ask not
> only fields related to
Just want to say: Many thanks guys!!!
Le mardi 29 novembre 2011 11:03:06 UTC+1, Florin Trifu a écrit :
>
> Hi
>
> I need to implement a date picker into my application. I have found
> this tutorial:
> http://bakery.cakephp.org/articles/agusti/2010/02/02/transparent-datepicker-with-jquery
> but un
I am the beginer in cakePhp. I have a problem. My website has one div, and
inside of it it has to show menu or login form (depends on user login).
Where can I do it? It is repeated in all pages. I think, that I should
create this in layout, to not repeat it in every view, but really havo no
ide
Because your User table has no such column. Try running the find on
the associated model.
$this->User->UserUsers->find(...)
On Wed, Jul 4, 2012 at 2:38 PM, JonStark wrote:
> Hi everyone !
>
> I have a question that shouldn't be that hard but I really can't manage it :
>
> In my app, User HABTM
Hi everyone !
I have a question that shouldn't be that hard but I really can't manage it :
In my app, User HABTM User
users_users table is : id, following_id, follower_id
I want to count every user where follower id is $id.
This is my function :
public function countFollowing($id) {
> $user =
Try this
function beforeFilter() {
$this->RequestHandler->setContent('kml', 'text/xml');
// $this->RequestHandler->setContent('kml',
'application/vnd.google-earth.kml+xml');
}
On Thursday, September 24, 2009 7:01:18 AM UTC+2, Kyle Decot wrote:
>
> I am attempting to create KML pages for my site
I think this is what you want:
http://api20.cakephp.org/class/cake-request#method-CakeRequestaddDetector
On Wed, Jul 4, 2012 at 4:25 AM, Tom Cowle wrote:
> Thanks Max, this is the first thing I tried, but it didn't seem to work.
>
> On Tuesday, 3 July 2012 17:10:38 UTC+1, Max Dörfler wrote:
>>
>
Cake has nothing to do with the domain, that's Apache's business.
On Wed, Jul 4, 2012 at 3:46 AM, tigr wrote:
> I would think that since your host name is just a single word, perhaps cake
> may get confused by your urls sometimes. Why don't you try to rename the
> host into 'ServerName mysite.loc
Hi,
i plan to implement data caching in my project,
please suggest me, which to use Memcached or Redis
(with simple comments)
thanks in advance
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org a
although each *product* shows data for *category*, cake makes only 1 db
request for the whole page upon *paginate*(). so i wouldn't worry about it.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.or
Hi!
There is something I do not understand. I have a plugin where I save some
data into related models. When I do it with a Save, everything works fine.
As soon as I try to use SaveAssociated, I get this error (and it is
interfering of course with the headers). Can someone confirm that this is
Thaks. Solved
Em terça-feira, 3 de julho de 2012 18h32min58s UTC-3, cricket escreveu:
>
> On Tue, Jul 3, 2012 at 8:31 AM, Lucas Simon Rodrigues Magalhaes
> wrote:
> > The error appear in this line:
> > 'scope' => array('User.status' => Configure::read('User.ACTIVE')),
>
> And on that line you
This is what I have going on.
$con_period = ceil($d['Option']['con_period']);
$ebegin_date = strtotime("+$con_period months", strtotime($d['Project'][
'begin_date']));
$ebgin_date = date('Y-m-d', $ebegin_date);
$d['Expense']['0']['begin_date'] = $ebegin_date;
This is what $d looks like
All the interface stuff you described is going to be JavaScript. All the
backend stuff can be most anything you like. I suspect the Javascript
Framework that fits best with what you describe is EXTJS, though perhaps
someone else has a better suggestion. If you want to use cakephp as the
backend,
hi
i want to add a multiple lines (ita & eng) in i18n for one record in jewel
so i add a afterSave in model
cause i want to add multiple lines only for a new record and not for a
modify one
i add this
public function afterSave($created) {
if ($created) {
if (isset ($this->data['Jewel']['eng'])
Hum, right. I checked and this is the correct.
But the problem remains. Aparently i have to keep reading the most recent
docs. Must be something like that.
2012/7/4 tigr
> Accordsing to documentation, it should be
>
> array('authorize' => 'Controller'),
>
>
> and not
>
> 'authorize'=>array('Con
On Wed, Jul 4, 2012 at 6:29 AM, Steven Scaffidi wrote:
> I want to be able to add a certain amount of months to date. Basically I
> have a from in order to start a new product. In the form, there is a begin
> date that the user select (this is a date). I want to add a variable amount
> of months t
Thanks Stork - looks good to me - will give it a try - thanks very much.
Tom
On Tuesday, 3 July 2012 17:26:25 UTC+1, stork wrote:
>
> Just change last line of APP/webroot/index.php and call dispatcher with
> your custom request class.
>
> #APP/Lib/Network/AppRequest.php
> App::uses('CakeRequest'
Thanks Max, this is the first thing I tried, but it didn't seem to work.
On Tuesday, 3 July 2012 17:10:38 UTC+1, Max Dörfler wrote:
>
> Hi,
>
> have you tried copying the core "CakeRequest.php" to
> "app/Lib/Cake/Network/CakeRequest.php" and do your changes there? I
> think I remeber doing some
Accordsing to documentation, it should be
array('authorize' => 'Controller'),
and not
'authorize'=>array('Controller'),
Could this be the problem?
On Tuesday, July 3, 2012 5:34:51 PM UTC+2, Paulo Victor wrote:
>
> I don't know what do do anymore. My login system is up and runnig, but no
> ma
vim is your friend :)
On Tuesday, July 3, 2012 3:45:48 PM UTC+2, David Lozzi wrote:
>
> Holy sucky-IDE Batman! That worked!! GAH that's frustrating. I'm using
> Komode Edit for my IDE, which obviously didn't pick up on that. What IDE do
> you use?
--
Our newest site for the community: CakePHP
I would think that since your host name is just a single word, perhaps cake
may get confused by your urls sometimes. Why don't you try to rename the
host into 'ServerName mysite.local'? That would make the urls look much
more 'normal'...
On Tuesday, July 3, 2012 7:34:55 PM UTC+2, c05min wrote:
31 matches
Mail list logo