Thanks guys, that's much nicer.
On Mar 31, 10:55 pm, RyOnLife wrote:
> That's how I handle my deletes.
>
> If you don't want to read the existing relationships before your save
> (meaning you don't want Cake to delete existing relationships before
> inserting new ones), in the models where you
Hi,
I want to use the date select javescript.
so, i want to know that has cakephp this kind of helper?
It's like the input_date_tag in symfony framework.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakeP
My question is, when are you going to enter the user serial?
Is it done manually by you or can it be done automatically?
If automatically, then ensure that you have the new user serial
available when a user is being registered!
Enjoy,
John
On Apr 2, 8:17 am, vanushv wrote:
> Hey i'm trying se
Hey i'm trying set up a fairly simple webapp and so far I've used the
bake script and it worked pretty good to establish a base for me
In my database there is a table of users; each user has a serial
number. i want the serial number to be a primary key -> so i renamed
the serial column to 'id'. B
All editing is in dispatcher.php (APP/cake/dispathcer.php)
On Mar 31, 11:13 pm, Gwoo wrote:
> Did you uncomment App.baseUrl in core.php?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to th
I don't know for CakePHP v1.1.x. However, if you use CakePHP v1.2.2 -
-- Here is the User Model
array(
'foreignKey'=>false,
'type'=>'INNER',
'conditions'=>array('Page.user_id=User.id'),
On Wed, Apr 1, 2009 at 6:39 PM, lsenft wrote:
>
> I'm just learning CakePHP and find these naming conventions hard to
> keep straight. Is there is an easy reference some place that I've
> over looked?
Well... Ahn... Considering the naming conventions about
your db tables, models and controlle
Sorry, the example is not appropriate. How about this?
Tag table:
id | name
Task table:
id | user_id | name
I want get all the tasks of a tag.
On Thu, Apr 2, 2009 at 12:31 AM, francky06l wrote:
>
> Looking at your user/task description Isn'it a simple User hasMany
> Task ? In such case, conta
Hi everybody,
I have a query with inner join that the tables users and pages, the
query is the following:
SELECT users.id, users.name, users.last_name, users.organization_id,
pages.id AS page_id, pages.title AS page_title FROM users inner join
pages on users.id = pages.user_id WHERE users.name i
Ohhh... too bad... I had developed a system for translations (before I knew
there was a behavior), so I will stick to it, although it is not very clean.
Thanks!
On Wed, Apr 1, 2009 at 11:51 PM, jitka (poLK) wrote:
>
> Reason is - behavior callbacks are not called on associated models.
> For pos
Assuming $this is the Post model, I don't think even getting the
"group by" to work would do what you want here. You can force a "group
by" by adding a 'conditions' key with a value of "where 1=1 group by
Post.id" in the contained model array, but you'll get an error. The
reason for this is Contai
It's by design. Always refer to models in the singular. The controller
names are plural because they deal with one or more instances of some
Model, basically. That's kind of the same reasoning for the table
name: each table holds multiple records for Model.
On Wed, Apr 1, 2009 at 5:39 PM, lsenft
Reason is - behavior callbacks are not called on associated models.
For possible solution see
http://groups.google.com/group/cake-php/browse_thread/thread/9b7e60900269643b/e46edc4db31164a5
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
I have a component that needs to access a model with related tables.
The findAll query in the component wasn't returning the related
tables. I realized that in the component I was referencing the model
with a plural name. The controller where everything was working used
a singular name. As soo
There are a couple of ways to do this. Besides using an
element/requestAction, you can grab your data from within the
controller action like so:
$data = ClassRegistry::init('YourModel')->find(...)
or
App::import('Model', 'YourModel');
$YourModel = new YourModel();
$data = $YourModel->find(...)
Thats awesome, Thank you very much, and welcome back :-)
On Wed, Apr 1, 2009 at 4:42 PM, GrumpyCanuck wrote:
>
> I'm back!
>
> Some of you might remember me from my previous stint on the CakePHP
> mailing list, answering questions with my usual grumpy flair. I took
> a step away from the list w
Hey, I was just wondering about you a few days ago when googling
brought me to an old post of yours. Sure, your responses were
sometimes a little ... rough on the ego. But I'd come to realise that
your input was very sound and much appreciated.
I'll certainly check out the book. Moving a legacy a
Ooops, hit enter too quick...
I used the first example in that trac request:
https://trac.cakephp.org/ticket/5702#comment:5
And it did what I hoped. My scaffolded views now give nice, big,
empty dates for NULL dates in the scaffolded "add" and "edit" views.
--~--~-~--~~--
Thanks for getting back to me, just getting to grips witth MVC, so i
wasn't sure adding logic in the view would be the best thing. Thanks
a lot
Ross
PS i will be using css classes, just a quickie function for demo
On Apr 1, 6:36 pm, Jimmy Bourassa wrote:
> Your color really should be a CSS cl
Just to answer myself
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubsc
I'm using Bakesale. After install, I was testing the workflow and when
I ckeckout (if I filled the fields correctly) nothing happens. The
next action (payment form) doesn't appear...
somebody get this difficulty too?!
--~--~-~--~~~---~--~~
You received this message
I'm back!
Some of you might remember me from my previous stint on the CakePHP
mailing list, answering questions with my usual grumpy flair. I took
a step away from the list when I realized I was not being very helpful
or productive. Anyway, I'm back on the list and trying to be a better
communi
Hi! I'm just starting to use the Translate behaviour. It seems to work
all right, but for the associations. The associations are loaded
without it's corresponding translations, which makes absolutely no
sense to me. Is there an easy way to accomplish?
I have searched the group but every message r
I'm pretty new to the MVC paradigm in general, and just started with
this project in CakePHP at my job.
I am trying to figure out how to access a model from another
controller.
>From what I have read, normally, you can do that by setting the
Associations (belongsTo, hasMany, etc) in the Models,
BUMP.
I'm wondering too.
It is pity that DISTINCT not applies to COUNT as well.
I'm trying to solve this issue as well. However if I replace the
paginateCount() method in my model, then it will be replaced for all
my pagination queries, isn't it?
I don't think this is the best solution out there.
Is this what you mean?
http://www.milesj.me/blog/read/24/pre_populating-form-values
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To u
No I am not, im calling it once. This happens on any form I have, it
always calls validation twice.
I know this because I have many custom functions I use in validation,
and I would always debug and get 2 outputs.
--~--~-~--~~~---~--~~
You received this message bec
Is there a way to add a "group by" clause into a "contain"?
$this->find('all', array(
'conditions' => $conditions,
'contain' => array(
'Vote' => array(
En el API yo solo veo charset.
http://api.cakephp.org/class/html-helper#method-HtmlHelpercharset
Aparentemente estas llamando el metodo equivocado.
Saludos,
Alfredo
On Wed, Apr 1, 2009 at 3:44 PM, jotaBKM wrote:
>
> amigos me sale el siguiente error
>
> Warning (512): Method HtmlHelper::char
use the _beforeScaffold callback in your controller
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send
amigos me sale el siguiente error
Warning (512): Method HtmlHelper::charsetTag does not exist [CORE/cake/
libs/view/helper.php, line 143]
cual puede ser la causa
saludos,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
Your color really should be a CSS class. Since you only need the color
in your views, I'd put that bit of logic in a view, where it truly
belongs.
You could just extend your app view with your getStatusColour function
and call this function in whatever kind of loop you'll use in your
views.
I ho
I'd say no.
Supposedly they should be faster but as you have noticed the caching
makes them lessa important. I made a few .mo files at first but I did
not find any significant benefit for my project and since I still
develop the app further (and modify the .po file about once a week) I
like to ha
Justin,
On Mar 31, 9:56 am, Stinkbug wrote:
> I ran into the same problem. I've been told this is a PHP problem,
> not really a Cake problem. The way we ended up handling it is by
> creating a stored procedure and calling that procedure within our
> model. Basically, what the procedure does i
On Apr 1, 11:26 am, kurious oranj wrote:
> How do I find out the value that's been selected in PHP and also, I
> use isset() on the input fields, how do I check if the dropdown value
> is null?
The selected value should be stored in $this->data just like the rest
of the form data. So, it'd be po
On Apr 1, 11:29 am, Smelly Eddie wrote:
> RTFM!!
>
I was RTFCPF (Core PHP File):
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages
redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash
messages halted.
*
Looking at your user/task description Isn'it a simple User hasMany
Task ? In such case, containable can do the job ..
unless I am missing something
On Apr 1, 2:58 pm, joshua wrote:
> Yes, we can use containable to get the task's users. But if there is a user
> , I want to find all the tasks he
Hi
I have a number of posts which can be one of 3 states, pending,
approved, declined. I want to add some colour to my view when
displaying all the posts and i'm not sure how to do it. I have an
$improvement array and a getStatusColor function in the
app_controller. How can i read each item in
There is some good reading on this to be found at
http://book.cakephp.org/view/44/CakePHP-Core-Configuration-Variables
Take some time to get a handle on that things can be found in the book
and you will be much happier. Live the conventions and you will be a
happy camper, fight them and you will
Hi
I have a number of posts which can be one of 3 states, pending,
approved, declined. I want to add some colour to my view when
displaying all the posts and i'm not sure how to do it. I have an
$improvement array and a getStatusColor function in the
app_controller. How can i read each item in
Hi,
I've got this working thanks, and also put a "null" value at the
start.
How do I find out the value that's been selected in PHP and also, I
use isset() on the input fields, how do I check if the dropdown value
is null?
On Mar 31, 8:13 pm, mscdex wrote:
> On Mar 31, 12:18 pm, Kalt wrote:
>
I have something which does that. But it displays all names for a
given letter, rather than using a paging limit. I can't figure out a
clean way to do both.
public function index($letter = null)
{
$letter = is_null($letter) ? 'a' : strtolower((string) $letter);
$this->set
RTFM!!
On Mar 31, 10:56 am, mscdex wrote:
> On Mar 31, 8:11 am, "Sajid.bd" wrote:
>
> > Hello I am learning cake.Can anyone help me how to turn on/off the
> > query that shows at the end of each page?
>
> In your app\config\core.php, set the 'debug' configuration setting to
> 0 or 1.
--~--~
Marcus:
How do the users consume/utilize the categories? Are they presented
with a drop down menu from which they can select categories? How does
the user sees the category?
Assuming the user is presented with for example a combo box or
something along those lines from which they can select, you
Is there a way to do bake all with admin?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
Hello.
i need a simple view with a pair of barcodes (Code39) embedded in it.
for ex:
- i've tried some classes i found on Google but none seems to work
with cake.
- the Bakery's article "Barcode with cake" is outdated and it doesn't
work.
is there any way to achieve this?
--~--~-~--
I have a really weird issue here... I have a supplier update
controller action that checks whether or not the user has update
permission, if not, it displays an error message, and redirects to the
controller index page. Here's the code:
$aroAlias = "User::".$userid;
$acoAl
I created a junction (like symbolic links in Linux) with 'junction
link magic'. Now it works...
On 29 mrt, 16:23, "Dr. Loboto" wrote:
> Sorry, misunderstood your situation. I think you cannot do anything in
> this case at all. Cake retrieve base url as dirname(env('PHP_SELF'))
> and dir is alway
Sorry, forgot to mention: you also need to tell it to use that view
renderer. In your action:
$this->view = 'AppMedia';
Although the way you have it works too, the only thing you lose is the
ability to access the original MediaView, which isn't a big deal since
this one does all the same things.
Yes, we can use containable to get the task's users. But if there is a user
, I want to find all the tasks he owns. How can I do?
User table:
id | name
Task table:
id | user_id | name
We can't count on containable to help us to find the relate tasks. And I
count on 'join' to help me to do this.
I'd do a check-up on the check boxes (no pund intended) when calling
the search function, get those types into an array. I'm going to
assume you are using cake's paginate and then you could do something
like this:
var $paginate = array(
'conditions'=> array('Music.type' => $arrayWithTheTypesSele
thanks for replying ,
when coming back to the articles add page from authors add page , i need to
retain the previous values i entered in articles add page.
On Wed, Apr 1, 2009 at 6:05 PM, Stu wrote:
>
> Hey,
>
> Just a bit confused, when exactly is your data being refreshed? Cake
> usually ha
Hey,
Just a bit confused, when exactly is your data being refreshed? Cake
usually handles all the edit functions (add, edit, delete) very
easily.
Ps: Might want to change your subject to attract more answers.
Something like "Issues with the add function" might work better.
--~--~-~--~-
Thank you that helped!
Now I get errors out of my script wich is fine so far, since it tells me that
the script is called and doing something!
Anja
-Ursprüngliche Nachricht-
Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag
von Martin Westin
Gesendet: Mittwo
How are you actually saving the data? Is it possible that you are
calling validate and then save?
On Apr 1, 12:32 am, Miles J wrote:
> For now I had to manipulate the sessions to make sure the first value
> is used and not over written.
>
> /**
> * Validate recaptcha
> * @param array $data
>
Hi!!
Sorry, I don't know a proper subject for my problem.
So here is an example: In my website I have categories. These
categories are managed by the administrator and then used inside the
"frontend" for the normal user. The user can not change these
categories.
Now I have a lot of categories an
i need help to solve the following issue.
how to retain form element values after reloading the page.
i have one form,in article add page, in that form , it has Add author
button,
when clicking on add author button i will go to add author page,
and after adding author, it navigates back to the ar
The only way I see is to hack Configure::corePaths() function. Cake
team finally added there support for open_basedir, but not safe_mode
one.
On Mar 31, 8:10 pm, almasty wrote:
> The set-up I had was to have the shared cake libraries in
>
> /usr/local/cake_1.2.2.8120
>
> I had my app folder in
>
Just for more clarification of a problem: this is needed only and
always when root dir of cake installation is under Apache alias.
On Mar 31, 6:25 pm, Martin Westin wrote:
> For public knowlegde in case anyone does a search for similar
> problems:
>
> The problem jmdesign was experiencing was du
You would have to do it yourself in the conditions of the $paginate
property. Im not sure if this will work, but something like:
$this->paginate['Model']['conditions']['Model.name LIKE'] = '%'.
$letter;
--~--~-~--~~~---~--~~
You received this message because you ar
do I need to generate the .mo file from my locale?
cakephp seems to cache the language file in a cake_core_default_eng
file in the cache directory.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
T
Since you are talking of a cronjob it might be best to use the full
paths for both cake and the app:
/path/to/cake/console/cake -app /path/to/app shelltaskname
That way your cron task does not need to cd to any particular
directory to work.
I have found that any tweaks you might do to webroot/i
hi,
if i have an application with a list of 1000 items and want to jump to
the page of the items starting with M. how could y do that?
do i have to implement that by my self?
if you would do it by yourself, how would you do it?
create a loop for every letter and an sql that counts the items bef
Hello everybody,
In my installation I have different locations for cake, the app and the
webroot. Now I want to write my own shell in /app/vendors/shells
following
http://book.cakephp.org/view/110/Creating-Shells-Tasks
So that I can start something via a cronjob without having to log in.
What I
64 matches
Mail list logo