Acho q nesse caso era melhor vc criar um helper pra fazer isso.
On 8/8/07, Rodrigo Xavier [EMAIL PROTECTED] wrote:
Nope.
Eu estou chamando a função dentro do index.thtml ou seja no view. A
função apenas converte a data no padrão -mm-dd hh:mm:ss vinda de
um campo created para
Olá Galera, blz?
Estou rodando usando o cake pela primeira vez e esbarrei em um bug, que a
princípio parece coisa simples, mas já tem 3 dias que estou agarrado com
isso.
É o seguinte, o code está funcionando direitinho, sem nenhum problema, so
que na primeira linha do código gerado esta
Gostaria de criptografar os dados pessoais do usuário, como medida de
segurança, sei que muita gente nem se preocupa com isso, porém, tenho
interesse em faze-lo.
No cakePHP eu não estou tendo muita produtividade devido estar
aprendendo ainda, mas, utilizando o bake eu consigo render alguma
Hi,
I just look at the cache persistent folder and there's a aro/aco cache
tables. How long does it persist there ? Can we cache per user/group
data before it is being modified in database ? If so it will be great
as it will decrease mysql connection overhead.
Regards,
Feris
Search the group, this has been answered before. It is because you
have a relative link to an image file, and when your browser requests
this it executes your action again.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
For the record, I think you've gone a very much more complicated way
around this than was necessary - I may be wrong, depending on exactly
what you're trying to achieve, but wouldn't it have been simpler to
hook into the SMF login/logout scripts from within your Cake apps?
That way you would
Yes, that is exactly what I wanted to do (use the SMF hooks using the
provided SSI.php) but since SMF relies on the session data for these
to work and Cake created its own session to handle this, the SSI.php
file was not looking at the correct data. In all, the steps I have
taken were not that
For your particlular example you could try count(Post.title) as
`Post`.`count`
In general this sort of thing is done in afterFind(). Just loop over
the results and add the extra keys that you need.
Geoff
--
http://lemoncake.wordpress.com
On Aug 8, 7:08 pm, mithesh [EMAIL PROTECTED] wrote:
hi
If you have renamed the app folder you need to tell Cake where it is.
Look in webroot/index.php.
Same goes for the cake folder, if it is not in the standard location
you need to change the define() in index.php.
Geoff
--
http://lemoncake.wordpress.com
On Aug 8, 4:28 pm, Raul [EMAIL PROTECTED]
You don't need to modify cake. All you have to do is modify config/core.php:
define('CAKE_SESSION_SAVE
http://api.cakephp.org/1.2/app_2config_2core_8php.html#ebaae21321d4c610deade48dcd1f26ef',
'database'); // sets cake to use database sessions
define('CAKE_SESSION_TABLE
Has anyone had much experience on using CakeUrlAlias (http://
www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/) on a site?
It's the perfect solution for my needs as I need something that
catches URLs that don't match up with a controller, passes those URLs
onto another controller, which
Yes, that is pretty much what I have ended up doing (albeit through a
long-winded process). I did actually have to modify Cake's session
functions because the SMF sessions table uses different column
headings and stores some more data. Also, SMF sessions stores session
id in a field session_id
I'm the one who wrote that post. By now there are better solutions
available to handle this problem. I'd suggest to check out the AppError
class and how you can use it to catch the missingController error. You
will however need to take care of recursion yourself.
-- Felix
Hi Geoff did you have any luck with getting this feature to work?
Can I also thank you for your posts in this group on multiple saves as
they've been very helpful.
Coincidentally I am trying to get many RoomsTasks submitted from a
form at once, and I have managed to loop through POSTed data and
Thanks for the pointer Felix. Based on what you are saying the best
solution would be something along these lines:
http://cakebaker.wordpress.com/2006/06/15/writing-a-custom-error-handler/
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi All.
I'm fairly new to coding in Cake and can't find any resource to help
me solve this problem. I appear to be doing the same as all the code
snippets I have seen, but I must be missing something.
The following code
$conditions['AND']['Target.month'] = BETWEEN $startMonth and
$endMonth;
Hello
I want to filter my view by passing a language_id in the view.
( Subcategory can have many categories , category can have many
languages )
Does anyone know why i getting this error?
---
ERROR:
Notice: Undefined index: Language in C:\wamp\www\inz_cake\app\views
sorry I was calling invalidFields wrong way there - think I have fixed
it!
On Aug 8, 12:45 pm, luke BAKING barker [EMAIL PROTECTED] wrote:
Hi Geoff did you have any luck with getting this feature to work?
Can I also thank you for your posts in this group on multiple saves as
they've been
Jim, thanks for the tip. Although that is not a concern in this
scenario, that is definitely good to know.
Samuel, I'm just using a little self-written ajax...no libraries.
That's probably my issue.
Thanks to you both for the help!
--~--~-~--~~~---~--~~
You
This is a problem with the overridding function in
dbdesigner2cake.php. I just found the uses function in the core and
it does use strtolower so no bug with cake. Thanks Grant
Brian
On Aug 8, 2:21 am, Grant Cox [EMAIL PROTECTED] wrote:
If it's still happens in the latest 1.1.x SVN then it is
Try using
var recursive=3 in your model..
On 8/8/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello
I want to filter my view by passing a language_id in the view.
( Subcategory can have many categories , category can have many
languages )
Does anyone know why i getting this error?
Thank you for your answer.
Try using
var $recursive=3 in your model..
Categories Model ? or in each Model ?
Regards
Stanley
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group,
to login I use ajax form and I am trying to setcookie on action
and it just does not set the cookie in this action .
When I redirect the page to different controller , action and set
cookies there its working.
Why cookie does not work on action with ajax form ?
did that
setcookie(remember_me,
On Aug 8, 2007, at 9:51 AM, Michael Augustyniak wrote:
to login I use ajax form and I am trying to setcookie on action
and it just does not set the cookie in this action .
When I redirect the page to different controller , action and set
cookies there its working.
Why cookie does not
On Jul 25, 6:27 pm, Geoff Ford [EMAIL PROTECTED] wrote:
Hmm.. Very interesting. I had not seen that before. I might have a
play later on and see if I can get it to work. I'll let you know how
I go.
Geoff
--http://lemoncake.wordpress.com
I've also been interested in seeing what it would
Hi!
I've come across the same problem, using hasOne associations, but with
an extra problem.
in ModelA:
$hasOne = array('ModelB' = array('foreign_key' = 'model_b',
'conditions' =
array('ModelA.some_field' = 'some_value')));
With this association, if recursive
I changed the name to be #Verbs but when I click it I get redirected
to the URL: /top_tiers/index#Verbs. This page displays exactly like /
top_tiers/index would.
I don't know how I'd implement $html-link() because it asks for a URL
and an array but I want the same array.
Has anyone got any
I want filter my subcategories by language_id ( this is a foreign key
in categories table and primary key in languages table). I use
recursive option ( $this-Subcategory-recursive = 3; ) in my
controller but i'm still getting this error. Which value should i
use ? 3 or 2 ?
Error in my view:
John David Anderson (_psychic_) wrote:
On Aug 8, 2007, at 9:51 AM, Michael Augustyniak wrote:
to login I use ajax form and I am trying to setcookie on action
and it just does not set the cookie in this action .
When I redirect the page to different controller , action and set
cookies
Hello all!
I'm stumped, can anyone take a moment and help me figure out why I'm
getting these errors?
Warning: overload() was unable to locate class 'sarossarg' in \cake
\cake\basics.php on line 233
Fatal error: Cannot instantiate non-existent class: sarossarg in \cake
Hi,
I'm making an Ajax call from the index page of my application to a
simple controller called attachments, to a function named add(). I
have a session variable called User which I can print on the index
page, but which is empty in the attachments controller.
If I do a pr($_SESSION) in
hello.
i defined for some parts of my new project some custom-made urls in
the routes definition, they look like this:
Router::connect('/groups/:group_url/:action/*',array('controller' =
'groups', 'action' = 'show'));
Example:
http://mywebsite.com/groups/the-name-of-a-group/topic/10/
On Aug 8, 2007, at 10:26 AM, simon wrote:
Hi,
I'm making an Ajax call from the index page of my application to a
simple controller called attachments, to a function named add(). I
have a session variable called User which I can print on the index
page, but which is empty in the
class SarosSarg extends AppModel
On 8/8/07, starkey [EMAIL PROTECTED] wrote:
Hello all!
I'm stumped, can anyone take a moment and help me figure out why I'm
getting these errors?
Warning: overload() was unable to locate class 'sarossarg' in \cake
\cake\basics.php on line 233
Fatal
Thank you for looking after this noobie.
Shawn
On Aug 8, 12:58 pm, Samuel DeVore [EMAIL PROTECTED] wrote:
class SarosSarg extends AppModel
On 8/8/07, starkey [EMAIL PROTECTED] wrote:
Hello all!
I'm stumped, can anyone take a moment and help me figure out why I'm
getting these
So did it work, if so you might spend some time learning to love and
live the conventions.
http://manual.cakephp.org/appendix/conventions
in many ways it is the MOST important part of the manual, if you can
live the conventions your life will be so much better (well your life
with cakephp)
Not sure... where is the session id located?
S
On Aug 8, 5:56 pm, John David Anderson (_psychic_)
[EMAIL PROTECTED] wrote:
On Aug 8, 2007, at 10:26 AM, simon wrote:
Hi,
I'm making an Ajax call from the index page of my application to a
simple controller called attachments, to a
On Aug 8, 2007, at 11:19 AM, simon wrote:
Not sure... where is the session id located?
In your cookies - you can also get it by calling session_id().
-- John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
On Aug 8, 2007, at 11:25 AM, John David Anderson (_psychic_) wrote:
On Aug 8, 2007, at 11:19 AM, simon wrote:
Not sure... where is the session id located?
In your cookies - you can also get it by calling session_id().
I should mention that if CAKE_SECURITY is set to 'high' the ID will
Hi all, as a nwbie to CakePHP, I experience problems understanding how
the whole HABTM mechanism work.
So here is the point, I got 2 tables publishers and places related by
a HABTM condition.
First, I save the publisher data and then the place data and then I
try to add the record to the HABTM
Inline editing has more to do with the client-side scripting than the
backend framework (of course they have to work together).
I really like the editing capabilities of the ExtJS library
http://extjs.com/deploy/ext/examples/grid/edit-grid.html
I have had little difficulty integrating it into
Yes, your suggestion did correct the problem. I just had a total
brain dump and didn't see the problem.
Thank a lot, again!
Shawn
On Aug 8, 1:12 pm, Samuel DeVore [EMAIL PROTECTED] wrote:
So did it work, if so you might spend some time learning to love and
live the conventions.
a hint from felix fixed my problem:
in the view:
?php
$paginator-options['url']['action'] = '-whatever';
?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group,
Form::select is 1.2 only, no? I'm using 1.1
On Aug 8, 3:05 am, Geoff Ford [EMAIL PROTECTED] wrote:
Forget generateList(). Create the array yourself to pass to
Form::select() using a custom query if necessary.
Sometimes when you are doing something that is a little bit out of the
ordinary it
Isn't form::select for 1.2? I'm using 1.1 on this project...
On Aug 8, 3:05 am, Geoff Ford [EMAIL PROTECTED] wrote:
Forget generateList(). Create the array yourself to pass to
Form::select() using a custom query if necessary.
Sometimes when you are doing something that is a little bit out
I must be totally confused... I'm trying to create a form using Cake's
view helpers. So I go to the HtmlHelper::formTag function and it says
to use FormHelper::create() instead. Problem is I can't find
FormHelper::create() as it is not in Form.php or helper.php.
Before I get jumped on... I see stuff like this:
form action=?php echo $html-url('/blog/add')? method=post
I'm just looking for the create() method.
Thanks!
Shawn
On Aug 8, 4:31 pm, starkey [EMAIL PROTECTED] wrote:
I must be totally confused... I'm trying to create a form using Cake's
view
Hi all, I'm new to cake but have been playing with php for a while. I
am using Ajax to create a set of select boxes that will create a
simple search. When you select the value in one it will decrease the
number of options to select from in the following boxes until it
finally displays the narrow
I am new to cake. I have two tables, customers, and balances.
balances belongsTo customers, and customers hasMany balances.
customer_id is a foreign key in the balances table.
I baked the models, and then the controller with scaffolding.
Everything worked as expected so far.
Next I baked the
uhmm, ok
On 8/7/07, phpjoy [EMAIL PROTECTED] wrote:
it's just one row in a table, i don't need an increase.. it's always
id=1.
the problem i had was that cakephp wanted an id, and wouldn't send to
edit. if no id is found, it sends to the add method automatically,
so i bypassed it by
Ok - didn't think about the different column names.
Maybe you could extend the SessionComponent as SmfSessionComponent to make
it a bit cleaner and more portable and put that in Cake snippets or the
bakery or somewhere for other people who want to integrate SMF and Cake.
SMF seems to be gaining a
Luke, I did find what you described but could not get it to work for the
input name, only the input value. I recently posted a blog entry on
multi-record forms, including redisplaying the errors, although it sounds
like you got it sorted, using a similar approach to what I have used in my
blog
Links to the same page do not require the full url so why not use straight
html?
a name=Verb/ This is where I want to go
a href=#VerbSend me there/a
Plain and simple.
Geoff
On 8/9/07, mussond [EMAIL PROTECTED] wrote:
I changed the name to be #Verbs but when I click it I get redirected
to
Yeah, I'm struggling with the same issue. It isn't clear as to the
best method for integrating CakePHP and the Facebook API. This is as
far as I've gotten, and I don't think it is the best way because it
gives you access to the $facebook variable in the view and not the
other controller
OK so use HtmlHelper::select() or selectTag() - I can't remember of the top
of my head which one it is. My solutions is still the same - creat the
array that you want to display in the listbox manually.
Again not sure of the exact array format but something like
$data =
Hi Sonic,
Glad I could help - see my comments below.
Geoff
On 8/9/07, Sonic Baker [EMAIL PROTECTED] wrote:
Hey Geoff,
Thanks for second the reply dude, and thanks even more for your level of
detail with your thoughts. The profile stuff is clear to me now and I'll be
adapting my current
Added tierranatal.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
You should use recursive = 2 (0 = just the subcategory, 1 = the
category associaton, 2 = the category's language association).
You will want to access the language in your view through:
echo $filtr_lang['Subcategory']['link'];
echo $filtr_lang['Category']['kategoria'];
I'm using 1.2 and I'm wondering how to fix a minor issue I have. I
have a form with a date field and after the input box I'm displaying a
calendar image that when clicked displays a date picker. This all
works, but if I leave the field blank and hit submit I get the This
field cannot be left
I have a few questions involving ajax.
This is what I have so far:
?php echo $ajax-link('Ajax', '/contact/', array('update' = 'changediv',
'indicator' = 'loaddiv')); ?
My problem is that it uses Element.show. I've seen a slide used on a CakePHP
site before. The output was something like this:
Somehow, this seems on the right track, but I couldn't get things to
work. Played around with a lot of different variations, but
*something* is not quite kosher, yet.
Thanks much for the guidance thus far.
Should the entire
$data = $this-Model-getListData(); // a function in your model that
All the code I outlined would be in the controller. You could put the loop
in the getListData() function in the model if you like to keep the
controller cleaner. The controller would then just be
$this-set('listdata', $this-Model-getListData());
Geoff
On 8/9/07, Beertigger [EMAIL PROTECTED]
Hi all,
How difficult would it be to connect to two databases? They're both on
the same server/instance of MySQL, however due to the nature of the
application I'd like to deploy using Cake, I need to be able to query
two different databases.
Oldschool way would be to just write queries with:
I am getting the following error
You are seeing this error because the component class
RequestHandlerComponent you have set in SalesController can't be found
or doesn't exist.
I feel like I have to be making a huge mistake somewhere because I
can't find anyone else that has this problem. This
I am running CakePHP v 0.2.9, Revision: 4409 and PHP 5
I have a function in a controller whose intent is to read a CSV file
and put the fields from each record into the appropriate database.
Several of the records can have the same Household information, so I
want to only create a new record if
?php echo $ajax-link('Ajax', '/contact/',
array('update'='changediv', 'indicator'='loaddiv',
'loading'=showById('loading'); hideById('changediv');,
'complete'=slidedown
I believe that's how you do it. I can't remember if you need to add
the function() { to it, but I don't have enough time
I want to send data with ajax with jQuery. this data is to be stored
inside my ratings table. how should i send the data to my Rating model?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post
how do I redirect inside of an ajax request?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email
Let's say I have a big site application, should I do these kind of
error checking after component/model loading:
loadComponent('AdminSiteTree');
if(!class_exists('AdminSiteTreeComponent'))
$this-cakeError('internalError', null);
What do you say? What do you do in your projects?
See $useDbConfig (model) in documentation.
On Aug 9, 3:42 am, Steve Finkelstein [EMAIL PROTECTED] wrote:
Hi all,
How difficult would it be to connect to two databases? They're both on
the same server/instance of MySQL, however due to the nature of the
application I'd like to deploy using
You need a serious look to the manual (cakeForge.org). The Controller
should handled your posted form (View) and passed to the Model that is
in charge of the storage. It's an MVC framework, please check the
manual for the basics. Using jQuery or not does not change the way the
controller / model
Hello Friends,
do anyone has list of Contants in Cakephp. i have seen in the manul
but they will not do me good in my task.
What i need is :-
Suppose we have a URL such as
http://mysite.com/insidecake/events/view/28/12/2016
i want to extract URL upto http://mysite.com/insidecake/events; how
72 matches
Mail list logo