I've been researching this for the past few hours, and didn't really
find a solid solution. I want to run this by anyone who has
experienced this and get their opinion.
Here is the Theory I'd like to verify with you..
Anytime a row is created or modified it should use
"date_default_timezone_set(G
hello jas, i m little confused are you saving your data in GMT or converting
it into user's timezone and then saving it
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe fro
Well I'd like to save it as a common timezone (GMT 0) for all users no
matter what timezone they have set themselves.
Then when retrieving the data I apply their timezone
And if DST is in play minus 1 hour before saving (GMT -1)
On Nov 23, 8:35 pm, Amit Rawat wrote:
> hello jas, i m little conf
ok so whats your main problem?
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com.
For more options, vis
I'd like to know the best way to store records on a server in another
country. Some of the users will be in other countries. when they view
their own records (they cant see records of the other users) the dates
need to display in their local timezone.
I don't want to store the date as their local t
Hi,
1. Is that a gap (space) at the '/mufti ali/'? Possibly this cause the problem.
2. Good info for installing cake on mac with MAMP
http://planetcakephp.org/aggregator/items/1732-installing-cakephp-with-mamp
Cheers.
Amirul.
From: mupet
To: CakePHP
Sent
amit, overriding render() function sounds just right, didn't tought of
that.. :) thanks for the idea!
walther, thanks. saw that at the very start of my research of this
problem, but as i said in the first post, sounds like an overkill to
me. IMO, what i need should be as easy as setting some varia
I had the same issue and now use gmdate everywhere.
Tested it on two servers in different timezones, and it worked
alright.
On Nov 23, 11:29 am, Jas wrote:
> I'd like to know the best way to store records on a server in another
> country. Some of the users will be in other countries. when they vi
Hey All,
I am wanting to create a login page for a cake app that allows a user to add
products/pictures to their pages. I have the app worked out, but not sure on
how to create the login. Any links or advice someone could give me to get me
started?
Thanks
--
You received this message because you
take a look at: http://book.cakephp.org/view/172/Authentication
On Nov 23, 3:18 pm, Dewayne Pinion wrote:
> Hey All,
> I am wanting to create a login page for a cake app that allows a user to add
> products/pictures to their pages. I have the app worked out, but not sure on
> how to create the lo
Great! Thank you
On Mon, Nov 23, 2009 at 9:47 AM, ddaffy wrote:
> take a look at: http://book.cakephp.org/view/172/Authentication
>
> On Nov 23, 3:18 pm, Dewayne Pinion wrote:
> > Hey All,
> > I am wanting to create a login page for a cake app that allows a user to
> add
> > products/pictures t
Hi, there,
looks like all API docs generated in the database, but how can I view
them?
sorry but am a newbie.
Green
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from
Good afternoon
I'm using CakePHP to develop a system and would like to know how can I
use the ClassResitry: init () instead of $uses.
Currently the model of paper is as follows:
array
( 'className' => 'Categoria',
能看下代码吗?
2009/11/22 Pedro Nascimento
> It seems it works, would you mind sharing the code?
>
>
> On Thu, Nov 19, 2009 at 09:14, NRV wrote:
>
>> Hi ALL,
>>
>>
>> I have implemented
>>
>> http://www.croyantdebridiers.com/CakePHP_AJAX_selectbox_demo/ajaxcombobox/users/add
>> locally.
>>
>> Its work
Hi there,
I've been using CakePHP since 6 months and never had a single problem
BUT now I have one issue I can't solve. Here it is:
I need to Preload some images for my website. I did it using JQuery
and it perfectly works:
CODE
$(document).ready(function(){
// Preload
$.preloadImages("img/butt
I need them as GET variables.
My form is at /Accounts/Manage/?var=b73cr6xzr6z&var2=somethingelse and
when i submit the form, the GET variables will be gone but i want them
to stay.
On Nov 22, 11:39 pm, Amit wrote:
> Is there a reason you can't just include the vars in the form?
>
> $form->input('
Hi there,
One month ago, I did a multilanguage website using CakePHP but putting
all the multilangual content in my dB.
>From what I read today, this was the right way to display short
messages in various languages with CakePHP :
http://book.cakephp.org/view/162/Internationalizing-Your-Applicatio
I read this...
"The authentication key is regenerated every time a form is evaluated
with requireAuth. This means that if a user submits a form with a key
that has already been used, the form submission will be considered
invalid. There are several cases in which this could occur, including
but no
Hi All,
I have PHP 5.1.6 with CakePHP 1.2.5 and I am having problems with
validating user entry using the alphaNumeric rule. All other rules
seem to work ok, so I am guessing it is an issue relating to how my
version of PHP handles regex.
Does anyone have any pointers or resources that could help
What is the problem you are having? Are there spaces in the input, because
I believe this will cause it to fail.
You may have already seen this but you can create your own validation rules
as well. Here is a link to the cookbook describing this:
http://book.cakephp.org/view/150/Custom-Validation
hello
i have a form like this:
echo $form->create("Order");
echo $form->input("code")
for($i=0,$i<10,$i++) {
echo $form->input("Item.$i.code");
echo $form->input("Item.$i.quantity");
}
echo $form->end();
i'm saving this form using saveAll with "validate" option set to
"first"
problems
So I'm still learning the Security Component but here's one
suggestion. Put the following in your app_controller.php or specific
controlle:
if(!empty($this->data)) {
$this->Security->requirePost('add');
$this->Security->requirePut('edit');
}
This will let you use the Security component on actio
I can't seem to find the article but I am fairly certain I have read the
requireAuth is pretty much dependent on requirePost. I believe even if they
work separately, you lose all benefits without requirePost. I apologize
because I cannot remember why or where I read this, so hopefully someone
wit
Something like this should work
echo $form->create('YourForm',array('url'=>YOURURL . '?' .
$this->passedArgs));
On Mon, Nov 23, 2009 at 10:22 AM, Ragnis wrote:
> I need them as GET variables.
> My form is at /Accounts/Manage/?var=b73cr6xzr6z&var2=somethingelse and
> when i submit the form, the
If you have the javascript in your php file you can interject php syntax
just like html
ie. $.preloadImages("", "img/
if your javascript is in a separate .js file you have two options
1. Change the javascript function to allow you to specify anything dynamic
(ie. the images that will need to be
Hello.
i have a form like this one:
echo $form->create("Order");
echo $form->input("code")
for($i=0,$i<10,$i++) {
echo $form->input("Item.$i.code");
echo $form->input("Item.$i.quantity");
}
how do you show errors if more than 1 row fails validation?
div @ the end of the form?
--
You
Ignore this section in the manual it in incorrect:
"Remember that po files are useful for short messages, if you find you want
to translate long paragraphs, or even whole pages - you should consider
implementing a different solution. e.g.:"
http://cakedc.com/ uses entire paragraphs.
http://cakeq
Hi dudes,
is there a way to paginate cached data? I wanna cache the result from
a $controller->paginate() request an use it the next time the page is
requested. But i've i bind the cached data for the view, i've the
problem that paginate() wasn't called so the paginate-helper functions
in the view
Thanks for your answer.
I tried by putting the javascript inside the PHP script and it works
fine, thanks.
Nevertheless, I would like to know how to do that by using an external
javascript. The solution you propose is fine as long as you call the
function somewhere but in my case, I just call inc
On Mon, Nov 23, 2009 at 6:51 AM, timstermatic wrote:
> Hi All,
>
> I have PHP 5.1.6 with CakePHP 1.2.5 and I am having problems with
> validating user entry using the alphaNumeric rule. All other rules
> seem to work ok, so I am guessing it is an issue relating to how my
> version of PHP handles r
Instead of pre-loading images, just use css rollovers.
On Nov 23, 9:20 am, thomaus wrote:
> Thanks for your answer.
>
> I tried by putting the javascript inside the PHP script and it works
> fine, thanks.
>
> Nevertheless, I would like to know how to do that by using an external
> javascript. The
You dont place it in $uses, thats completey wrong PHP in general.
Just set $uses = array() and then use ClassRegistry::init() within
your action.
On Nov 20, 11:43 am, Franze wrote:
> Good afternoon
>
> I'm using CakePHP to develop a system and would like to know how can I
> use the ClassResitry:
Hi guys...
Sorry for any typos, I'm from Brazil.
I'm new on cakePHP and I'd like to now one little thing.
When I start one project, do I have to create a folder in the cake
directory? Or the cake directory is my project folder?!
I tried to watch a screencast on the Blog tutorial but I'm having
Hello!
We are running quite growing social network in Poland for students at
CakePHP, now 70k users and 0.5M hits a day.
We have 3 app servers for it with CakePHP 1.2.5 installed on each.
Servers are Quad Core i7 920 + 8G RAM, so rather good machines.
DB on separate box + nginx frontend for stati
On Mon, Nov 23, 2009 at 12:29 PM, Ernesto wrote:
> (..)
> A - user can insert just 2 or 3 rows, it's not necesasry to fill all
> the 10 "Item" rows. saveAll tries to save even empty insertions. Blank
> rows = validation errors. is there any way to avoid this?
You'll have to loop $this->data and u
Haha funny you ask. The mozilla addons site actually runs CakePHP 1.1
and they recently announced they are switching to Django.
All I can say is use APC for opcode caching and memcache for user
caching.
On Nov 23, 11:02 am, Balrog wrote:
> Hello!
> We are running quite growing social network in
Yes, APC and Memcache is a must if you want good performance.
Regards,
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://needish.com
On Mon, Nov 23, 2009 at 5:58 PM, Miles J wrote:
> Haha funny you ask. The mozilla addons site actually runs CakePHP 1.1
> and they recently
http://book.cakephp.org/view/19/CakePHP-Folder-Structure
On Nov 23, 7:32 pm, Daniel wrote:
> Hi guys...
>
> Sorry for any typos, I'm from Brazil.
>
> I'm new on cakePHP and I'd like to now one little thing.
>
> When I start one project, do I have to create a folder in the cake
> directory? Or t
I could do that but in my case, the images names must be dynamic so
the problem would be the same.
On Nov 23, 6:36 pm, Miles J wrote:
> Instead of pre-loading images, just use css rollovers.
>
> On Nov 23, 9:20 am, thomaus wrote:
>
> > Thanks for your answer.
>
> > I tried by putting the javascr
date_default_timezone_set() sets the timezone for all other date and
time functions used in the same script, so you wont have to keep
specifying it.
In what timezone do you store your records that have dates? Do you use
a common one like GMT 0, Then use the users preferred timezone when
displaying
date_default_timezone_set() sets the timezone for all other date and
time functions used in the same script, so you wont have to keep
specifying it.
In what timezone do you store your records that have dates? Do you use
a common one like GMT 0, Then use the users preferred timezone when
displaying
date_default_timezone_set() sets the timezone for all other date and
time functions used in the same script, so you wont have to keep
specifying it.
In what timezone do you store your records that have dates? Do you use
a common one like GMT 0, Then use the users preferred timezone when
displaying
You must add one of the following at the begining of your router.php
configuration file in order to use the 'page' parameter in url and get your
url parsed by the router.
This comment come from the Router class itself:
* Do not parse any named parameters:
* {{{ Router::connectNamed(false); }}}
You must add one of the following at the begining of your router.php
configuration file in order to use the 'page' parameter in url and get your
url parsed by the router.
This comment come from the Router class itself:
* Do not parse any named parameters:
* {{{ Router::connectNamed(false); }}}
I have a select drop down for user to select a year.
In before save I have:
$this->data['Award']['year'] = $this->data['Award']['year']['year'];
since when I insepect the request the data looks like
[year] => Array
(
[year] => 2009
)
validatio
I am facing some problem to use Image Actas Behavior where I want to
add multiple
data for a model. I have Business and Bizimage model. From a single
form, I have to add an single entry for Business and multiple entry
for Bizimage. When there is no image,it is working fine. But when i
want to add
You can set form action as:
array ('controller' => 'Accounts', 'action' => 'Manage', '?' => array
('var' => 'b73cr6xzr6z', 'var2' => 'somethingelse'))
On Nov 23, 9:22 pm, Ragnis wrote:
> I need them as GET variables.
> My form is at /Accounts/Manage/?var=b73cr6xzr6z&var2=somethingelse and
> when
alphaNumeric rule accepts only latin letters and digits, nothing more.
No spaces, no special symbols, no any non-latin letters.
On Nov 23, 3:51 pm, timstermatic wrote:
> Hi All,
>
> I have PHP 5.1.6 with CakePHP 1.2.5 and I am having problems with
> validating user entry using the alphaNumeric ru
Its because when you upload a image contoller recieves it as an array with
information like file name, size, type etc. you will have to extract then
name of file before inserting it
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this grou
Hi,
You could always first include a short inline javascript defining your
variables and after that include the external scripts. Something like
this
codeblock("
var someJsArr = " . $someArraySetByCake . "
"); ?>
link('someExternalJsScript.js'); ?>
This way you can use you variables inside
- Clone all of your application files/code (anything besides /app/
webroot but including /app/webroot/index.php) to a ram based file
system on your *nix host.
- Try lazyloader: http://github.com/mcurry/lazy_loader
- Never use recursive > -1, make sure containable does not do multiple
queries, if it
In normal insertion case, it is all done by the behavior, no extra
code is needed for that. But in the specific case where one form is
used to enter multiple entry in hasmany relation, it is not working.
What is solution for it.
On Nov 24, 11:19 am, Amit Rawat wrote:
> Its because when you upload
What is wrong with using Accounts/Manage/var:b73cr6xzr6z/
var2:somethingelse ?
It looks neater, and is just as easy to use from an application
perspective.
On Nov 22, 8:54 pm, Ragnis wrote:
> So how can i do that?
> And i don't want to use /Accounts/Manage/var:b73cr6xzr6z/
> var2:somethingelse
Judging by your setup I believe you should start using a profiler, and
optimize your code a bit or take a better look at why your machines
perform poorly.
I run a site that has around 250k hits/day and it's on one box
(Core2Quad 8800 8GB RAM) with the db on the same machine + .
It runs on average
I am using saveall function to save a user details and its multiple
job details(user and job details is in hasmany-belongsto relatiobship)
from a single form. I have written a behavior for job details. But
when I am using saveall from user controller, the behavior for job
details is not called. How
is there any example?
i can't figure out where and when loop through $this->data
On 23 Nov, 20:52, Marcelo Andrade wrote:
> On Mon, Nov 23, 2009 at 12:29 PM, Ernesto wrote:
> > (..)
> > A - user can insert just 2 or 3 rows, it's not necesasry to fill all
> > the 10 "Item" rows. saveAll tries to
This helped me, thanks!
On Nov 23, 4:32 pm, Amit wrote:
> So I'm still learning the Security Component but here's one
> suggestion. Put the following in your app_controller.php or specific
> controlle:
>
> if(!empty($this->data)) {
> $this->Security->requirePost('add');
> $this->Security->requi
57 matches
Mail list logo