Re: how to call a function when somebody click a link?

2006-11-03 Thread Adrian Godong
Your second solution (the one setting up a flag) is the best way to do that. Don't forget to set any additional data you need in the session.What you need to understand is like this: the client does not anything about your program. Period. It does not even know the original data (the one that resides in $this->blablabla). This is called stateless. Therefore, the server must maintain the data within the session variable for cross-page functions.
On 11/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
555i want to redirect the userback to the page they were just on,with calling a function in
advance:(maybe i should learn more about basic php?-- Adrian Godong[EMAIL PROTECTED]Microsoft Student Ambassador

--~--~-~--~~~---~--~~
 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]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---


Re: how to call a function when somebody click a link?

2006-11-03 Thread [EMAIL PROTECTED]

555

i want to redirect the user
back to the page they were just on,with calling a function in
advance:(

maybe i should learn more about basic php?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: more validate options

2006-11-03 Thread Grant Cox

There is actually a new Validation class (in cake/libs/validation.php
of Cake 1.2.x.x) with a bunch of new checks.  Things like telephone
numbers, and postcodes have different regexp's per country, but only a
few are currently provided.  If anyone already has these for their own
countries I'm sure the developers would appreciate it posted as a
ticket on https://trac.cakephp.org/ .


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to call a function when somebody click a link?

2006-11-03 Thread Apprentice

Hi,

Obviously they won't work. You are mixing PHP, Javascript and HTML
improperly.

What you want to display when you click the link? Do you intend to use
Ajax?

Apprentice.

On Nov 4, 1:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> i want to creat a link
> when somebody click the link
> the php script calls a function,then display itself :)
>
> i have tried
> text
> but it will call the function whether i click the link
>
> then i tried this (using forms)
> "; echo
> "window.location.href=$_SERVER['PHP_SELF']"; echo '';?>">
> 
> but it didnot work either.
> my browser said there were parse errors,T_STRING expected or
> something:(
>
> now i am thinking using a flag,say,$functioncall,
>  href=$_server[request_url]&functioncall=1
> then if functioncall==1,call that function
> but is it right?
> is there some way simple to do that?
> 
> any suggestion is appreciated :)


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: a problem

2006-11-03 Thread [EMAIL PROTECTED]

i have tried to do this by using forms
action="
but it didnot work out.:(
parse error or something

what is cake action?
would you please explain it :)


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: custom 404 error page

2006-11-03 Thread Grant Cox

And if you do want to use a different layout, just have

$this->layout = 'your_layout'

inside the view .thtml file.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to call a function when somebody click a link?

2006-11-03 Thread bingo

hi Grant

you can use $html->link('title', 'url);
or $ajax->link('title', 'url', array('update'=>'div_name'));

Regards,
bingo


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to call a function when somebody click a link?

2006-11-03 Thread Grant Cox

> any suggestion is appreciated :)


This is a Cake-PHP group, your questions show misunderstanding of basic
PHP and HTML.  I think you will get more help at another group, or from
working through some basic online tutorials.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: a problem

2006-11-03 Thread Grant Cox

PHP is a server side language, not client.  You will need to have the
link requesting a cake action (this can be done with ajax if you don't
want the page to refresh).  The cake action should redirect the user
back to the page they were just on.


On Nov 4, 3:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> well
> actually,i want to call the function only when the link is
> clicked..
> is there anyway to do this without forms?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: a problem

2006-11-03 Thread [EMAIL PROTECTED]

well
actually,i want to call the function only when the link is
clicked..
is there anyway to do this without forms?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



how to call a function when somebody click a link?

2006-11-03 Thread [EMAIL PROTECTED]

i want to creat a link
when somebody click the link
the php script calls a function,then display itself :)

i have tried
text
but it will call the function whether i click the link

then i tried this (using forms)
"; echo
"window.location.href=$_SERVER['PHP_SELF']"; echo '';?>">

but it didnot work either.
my browser said there were parse errors,T_STRING expected or
something:(

now i am thinking using a flag,say,$functioncall,
 href=$_server[request_url]&functioncall=1
then if functioncall==1,call that function
but is it right?
is there some way simple to do that?

any suggestion is appreciated :)


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: a problem

2006-11-03 Thread Kushal Puri
You can't call the function from On 11/4/06, [EMAIL PROTECTED]
 <[EMAIL PROTECTED]> wrote:
hello everyone:)i want to create a linkwhen somebody click the linkthe php calls an function and then display itself again:)i have tried?>">textbut it will call the function_i_want whether i click the link.then i tried to solve this problem by using html formsthe code is like this:; echo
window.location.href="" echo"; ?>">it didnot work either:(my browser shows some parse error,T_SRING expected or something like
that.is there any simple way to do this?nwo i am thinking use a flag,say functioncalled,set functioncalled=1 if the link is clickedthen call function_i_want when functioncalled==1but i think it is too complex..:(
thanks a lot :)-- Thanks,Kushal

--~--~-~--~~~---~--~~
 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]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---


a problem

2006-11-03 Thread [EMAIL PROTECTED]

hello everyone:)
i want to create a link
when somebody click the link
the php calls an function and then display itself again:)

i have tried
text
but it will call the function_i_want whether i click the link.

then i tried to solve this problem by using html forms
the code is like this:
; echo
window.location.href=$_SERVER['PHP_SELF']; echo"; ?>">

it didnot work either:(
my browser shows some parse error,T_SRING expected or something like
that.

is there any simple way to do this?
nwo i am thinking use a flag,say functioncalled,
set functioncalled=1 if the link is clicked
then call function_i_want when functioncalled==1
but i think it is too complex..:(

thanks a lot :)


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to use ACL with permissions

2006-11-03 Thread Apprentice

I've created tables required by ACL. I have 2 models: Users & Posts
(intended for blog).
+ Users consist of Admins, Mods, Ordinary Users
+ Admins & Mods can modify all Posts
+ Only owners among Ordinary Users can modify their posts
+ Unauthorised Users who try to modify will be notified that they can't
do so

I read, read & read again & again but did not understand how to make
the things work together. Please give em a hint. Thank you very much!

Apprentice.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP 1.1.10.3825 Fix

2006-11-03 Thread Larry E. Masters aka PhpNut
After releasing 1.1.9.3815 there was a bug related to bake.php and also in scaffold when using aliased association names. These fixes are needed if you use the bake script to create your controllers and views, or if you use scaffold to prototype your applications.
Upgrading is like all prior releases, just replace the cake directory.Download: http://cakeforge.org/frs/?group_id=23&release_id=156
Change Log: https://trac.cakephp.org/wiki/changelog/1.1.x.x-- /*** @author Larry E. Masters* @var string $userName* @param string $realName
* @returns string aka PhpNut* @access  public*/ 

--~--~-~--~~~---~--~~
 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]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---


Re: Manual translation to Spanish

2006-11-03 Thread John David Anderson (_psychic_)


On Nov 3, 2006, at 3:42 PM, juananruiz wrote:

>
> Hi, I've began the translation to spanish using the source xml files
> from the svn. But I have'nt enough permissions to upload then to a new
> spanish folder or project. I send a couple of mail but i have no
> response. Can somebody help me with this?

Cake Manual translations will be housed in the Translations CakeForge  
project.

http://cakeforge.org/projects/translations/

A base English manual will be provided in that project as a reference  
(please don't modify the English copy). If you'd like to begin a  
manual translation, please apply to join that project.

Thanks for being willing to translate - we really appreciate any  
effort there.

-- John

--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Manual translation to Spanish

2006-11-03 Thread juananruiz

Hi, I've began the translation to spanish using the source xml files
from the svn. But I have'nt enough permissions to upload then to a new
spanish folder or project. I send a couple of mail but i have no
response. Can somebody help me with this?

Thanks a lot,
Juanan Ruiz


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



dynamic table names in wordpress

2006-11-03 Thread mozey

i'm working on writing plugins for the multiuser version of wordpress.
Which creates a whole bunch of new tables for everyuser. By default, it
produces 8 tables for each user, my plugin will add two more, but lets
assume, that the number of tables per user is m, and we have n users.


wp-1-firsttable1, wp-1-table2,wp-1-tablem

wp-2-firsttable1, wp-2-table2,,wp-2-tablem

..

wp-n-firsttable1, wp-n-table2,,wp-n-tablem


I cant make cakephp work for that!, any input.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: local configuration file

2006-11-03 Thread Mikee Freedom

hey Felix,

I actually have included some config tables (config groups, config
options, and config choices) in my installation that I have given my
users access to. I define what values they can configure and then I
include my ConfigOption model in any controller that I might require
it.

this way I allow my users to change certain values that i then use
throughout my application. for the moment it is purely including those
models which makes it possible, but down the track it would be cool to
turn it in to a plugin. i haven't broached that area yet so look
forward to it.

this might be something you could do if you would like configuration
values that are modifiable by your end user.

HTH
mikee

On 04/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I would like to have the config file toplevel, so that the user can
> access the variables very easily in that config file.
>
> Is it possible to put a config file ito that folder and does that make
> sense thinking about the cakePHP idea?
>
> Thanks,
> Felix
>
>
> >
>

--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



A strange but very critical bug in my app using cake ajax

2006-11-03 Thread PD

Hi guys,

I have built the site on cakePHP. It was really a great experience. I a
having this very strange but extremely critical bug in it.

Here is the structure.
Categories hasMany subCategories hasMany Products... simple right?

Now I have built my category/subcategory management page using ajax
helper.

What happens 'some random times' is that while I am adding a category
or updating a categry, some of the categories gets deleted
misteriously. I am not able to track down the cause of the problem. Did
anyone have any such problem? Do you have any recommendations on how to
go about debuggin this one. I have tried a lot, but as I said, as it
only happens 'some random times', I am just not able to reproduce it
upon wish.

Thanks in advance. I would really appreciate any bit of help on this
one.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: more validate options

2006-11-03 Thread Grant Davies

I'm not very good at reading regex so will that string support domestic
numbers only or international too ?

Grant.

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rubo77
Sent: Friday, November 03, 2006 7:05 AM
To: Cake PHP
Subject: more validate options


i added another validate option to the scripts/bake.php  script:
line 421:
$prompt .= "6- VALID_TELEPHONE\n";
line 443:
case '6':

$validate[$field['name']] = 'VALID_TELEPHONE';
break;


and in
app/app_model.php:

define('VALID_TELEPHONE', '/^[\(\+0][\/\(\)0-9 \-]+$/');

if you have more ideas for more validate options post them here




--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: othAuth Missing Component File

2006-11-03 Thread funksplutter

No I didn't solve it  - I just disabled it al together so if anyone has
any clue as to what is happening with this code their help would be
much appreciated.

On Nov 3, 10:01 am, "funksplutter" <[EMAIL PROTECTED]> wrote:
> Solved it - and annoyed at myself for not having spotted it before.
>
> othAuth.php on my local server had to be renamed to othauth.php on the
> remote. Once this was done everything worked.
>
> On Nov 2, 8:11 am, "funksplutter" <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the reply Eric.
>
> > The odd thing is that othAuth works great on my local machine - in fact
> > I'm really pleased with it. It's only on the remote server I seem to
> > have a problem which I'm guessing has something to do with a file path.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SmartyView+SmartyHelpers

2006-11-03 Thread sbarre

That's pretty slick actually..  I never really thought about extending
the compiler to accept some sort of native array parameter..

I'm a broken record on this, but I would have to extend this to support
nested arrays like:

{helper html->select('Model/field', Array('tabindex' => 1, 'options' =>
Array(0 => 'No', 1 => 'Yes'), 'class' => 'selector' ))}

It's not my fault I like run-time multi-dimensional data structures..
:-)   I just find them clean and easy to understand for template
designers..

On Nov 3, 9:29 am, "René" <[EMAIL PROTECTED]> wrote:
> I'm using Smarty for a while now and got around the array issue by this
> compiler helper:
>
> function smarty_compiler_helper($tag_attrs, &$compiler)
> {
> $args = explode('->', $tag_attrs);
> $arg0 = $args[0];
> unset($args[0]);
> $arg1 = implode('->', $args);
> $arg1 = preg_replace('/\$(\w+)/', '$this->_tpl_vars[\'\1\']', $arg1);
> return('echo $this->_tpl_vars[\'' . $arg0 . '\']->' . $arg1 .';');
>
> }With this SmartyPlugin you can use CakePHP helpers like this:
> {helper html->input('Model/field', Array('tabindex' => 1))}
>
> I know this is neither perfect nor clean, but it does the job.
> 
> Greetings,
> René


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



more validate options

2006-11-03 Thread rubo77

i added another validate option to the scripts/bake.php  script:
line 421:
$prompt .= "6- VALID_TELEPHONE\n";
line 443:
case '6':
$validate[$field['name']] = 
'VALID_TELEPHONE';
break;


and in
app/app_model.php:

define('VALID_TELEPHONE', '/^[\(\+0][\/\(\)0-9 \-]+$/');

if you have more ideas for more validate options post them here


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SmartyView+SmartyHelpers

2006-11-03 Thread Erich C. Beyrent

Travis Cline wrote:
> I fixed up the issues I mentioned and had added defaultparameter passing.
> I'll post the new version up there in a bit (away from my dev
> environment right now).
>
> I'd like to figure out a way to combine the ideas.
>
> >
>   
So if I want to use Smarty with CakePHP, I must be using PHP5, or I am 
stuck with the thtml solution?  Do you plan on making this PHP4 compatible?

-Erich-

--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACLs and multiple access levels

2006-11-03 Thread Synchro

I think I've got a solution for this: Users are not AROs. I've
introduced an intermediate class called an accountuser that represents
a particular user's existence within a given account, and that seems a
good candidate for an ARO, as they can different have access to
different ACOs in different accounts, while sharing authentication data
across all of them.

Potentially, some specific users could still be AROs, such as
superusers that have access to everything in all accounts.

Does this sound like a good idea?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: custom 404 error page

2006-11-03 Thread Andrew McCafferty

Felix,

In my /app/views/errors directory, i've created the following files

error404.thtml
missing_action.thtml
missing_controller.thtml
missing_view.thtml

These override the default cake error pages (which you can find in
/cake/libs/view/templates/errors)

Perhaps I misunderstand your question though - are you looking to use a
layout template other than default.thtml for your errors?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP 1.1.9.3815 Frozen Cake

2006-11-03 Thread mariano.iglesias

Thanks for the update! I agree, foreign_key is more flexible than
user_id.

For whoever asks, I updated prior CakePHP 1.1.8.3544 into new CakePHP
1.1.9.3815 by overwriting Cake's core files (cake/) and running ACL
script without any problems.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: custom 404 error page

2006-11-03 Thread Ismael S. Kafeltz


[EMAIL PROTECTED] wrote:
> Hi there,
>
> I would like to build my own custom Error pages, with my own layout
> template.
> In the manual I've read, that you have to put the pages into the
> folder:
> /app/views/errors
>
> But how can I call those files and not the cake ones? I use my app in
> debug level 0.
>
>
> Thanks
>
> Felix

Good question, i am trying to do exactly the same thing...
tutorial could avoid thousand of doubts and new topics


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Re: Problem with underscores

2006-11-03 Thread Samuel DeVore

findBy I think you still have to findByCamel_case  if your model name
is CamelCase  in php4  (at least I do in my version)

see last comment in this thread



On 11/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> i don't have php4 so i can't check, but are you saying that putting var
> $name = 'CamelCase' thing in your controllers/models/components etc
> will suffice?
> so you can call $this->Zebra->findByCamelCase in php4 as long as you do
> the $name thing?
>
> (better to make this sure, once and for all ;)
>
> and if your ZebraController has var $uses = array('CamelCase','Zebra');
> you only need to put the 'Zebra' in the $name var, right? not the other
> models that the controller uses?
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SmartyView+SmartyHelpers

2006-11-03 Thread René

I'm using Smarty for a while now and got around the array issue by this
compiler helper:

function smarty_compiler_helper($tag_attrs, &$compiler)
{
$args = explode('->', $tag_attrs);
$arg0 = $args[0];
unset($args[0]);
$arg1 = implode('->', $args);
$arg1 = preg_replace('/\$(\w+)/', '$this->_tpl_vars[\'\1\']', $arg1);
return('echo $this->_tpl_vars[\'' . $arg0 . '\']->' . $arg1 .';');
}

With this SmartyPlugin you can use CakePHP helpers like this:
{helper html->input('Model/field', Array('tabindex' => 1))}

I know this is neither perfect nor clean, but it does the job.

Greetings,
René


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread Felix Geisendörfer




Ok, I resolved the issue by replacing my afd.sys with a newer version I
got from a friend via email. Big thanks to everybody who has looked
into the issue, especially meek!

In order to save others from having this nightmare in future I did a
little blog
post that describes the symptoms I had together with the solution
that helped me.

--Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



Bert Van den Brande schrieb:

  Good to know, seems our educated guess that this was a Windows problem
was completely correct :)

On 11/3/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
  
  
 Hey meek,

 I think you found the exact bug. It's Microsoft to blame:
http://support.microsoft.com/default.aspx?scid=kb;en-us;317949



SYMPTOMS Data loss may occur if all of the following conditions exist:


A bind of a listen socket is completed in a parent process.
An accept is completed in a child process.
Fast sends are happening. This is exactly what I experience, and this
explains why putting some usleep() statements in when outputting the image
via a fread loop seems to have a positive effect (slows down the send
process)!

 However, I'm not sure if I like the solution:


RESOLUTION To resolve this problem, obtain the latest service pack for
Windows XP. For additional information, click the following article number
to view the article in the Microsoft Knowledge Base:
 The problem is that I have had a really bad time installing a service pack
on my system in the past, but maybe that was because I tried to install from
a different windows cd (I got an OEM version) with SP 2 instead of
Downloading the patch (which is a bad option since I'm on 64 kbit) ...

 Hmm but they a Afd.sys file that seems to be problematic, maybe I can
simply replace this with a SP 2 version. (Yeah, I know it's a bad idea ^^).

 Thanks to all the others who have looked into this as well. I'll see if I
can fix my system somehow without going through some major pain ...

 --Felix Geisendörfer aka the_undefined

--
 http://www.thinkingphp.org
 http://www.fg-webdesign.de

 meek schrieb:
 I found a couple of things which might be relevant:

The section 'Problems Installing or Running Apache 2' on this page:

http://www.apache.org/dist/httpd/binaries/win32/README.html

- which I got to from this:

http://marc2.theaimsgroup.com/?l=apache-bugdb&m=101484400413021&w=2






 >


  
  


  


--~--~-~--~~~---~--~~
 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]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---





Re: Problem with underscores

2006-11-03 Thread [EMAIL PROTECTED]

i don't have php4 so i can't check, but are you saying that putting var
$name = 'CamelCase' thing in your controllers/models/components etc
will suffice?
so you can call $this->Zebra->findByCamelCase in php4 as long as you do
the $name thing?

(better to make this sure, once and for all ;)

and if your ZebraController has var $uses = array('CamelCase','Zebra');
you only need to put the 'Zebra' in the $name var, right? not the other
models that the controller uses?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: local configuration file

2006-11-03 Thread [EMAIL PROTECTED]

I would like to have the config file toplevel, so that the user can
access the variables very easily in that config file.

Is it possible to put a config file ito that folder and does that make
sense thinking about the cakePHP idea?

Thanks,
Felix


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



custom 404 error page

2006-11-03 Thread [EMAIL PROTECTED]

Hi there,

I would like to build my own custom Error pages, with my own layout
template.
In the manual I've read, that you have to put the pages into the
folder:
/app/views/errors

But how can I call those files and not the cake ones? I use my app in
debug level 0.


Thanks

Felix


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with underscores

2006-11-03 Thread AD7six

On Nov 3, 9:59 am, "Christian" <[EMAIL PROTECTED]> wrote:
> So for the moment I conclude that CakePhP is working better under PhP5.
>
> c.

That or  that it works perfectly fine on Php4 (which is case
insensetive for class & function names) SO LONG AS you put var $name =
'CamelCase';  in your controllers/models/components etc. as _psychic_
put in the first thread of this reply ;).

HTH,

AD7six
 Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :)
You may get your answer quicker by asking on the IRC Channel (you can
access it with just a browser here: http://irc.cakephp.org).

On Oct 31, 10:21 am, "georgeL" <[EMAIL PROTECTED]> wrote:


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread Bert Van den Brande

Good to know, seems our educated guess that this was a Windows problem
was completely correct :)

On 11/3/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
>
>  Hey meek,
>
>  I think you found the exact bug. It's Microsoft to blame:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;317949
>
>
>
> SYMPTOMS Data loss may occur if all of the following conditions exist:
>
>
> A bind of a listen socket is completed in a parent process.
> An accept is completed in a child process.
> Fast sends are happening. This is exactly what I experience, and this
> explains why putting some usleep() statements in when outputting the image
> via a fread loop seems to have a positive effect (slows down the send
> process)!
>
>  However, I'm not sure if I like the solution:
>
>
> RESOLUTION To resolve this problem, obtain the latest service pack for
> Windows XP. For additional information, click the following article number
> to view the article in the Microsoft Knowledge Base:
>  The problem is that I have had a really bad time installing a service pack
> on my system in the past, but maybe that was because I tried to install from
> a different windows cd (I got an OEM version) with SP 2 instead of
> Downloading the patch (which is a bad option since I'm on 64 kbit) ...
>
>  Hmm but they a Afd.sys file that seems to be problematic, maybe I can
> simply replace this with a SP 2 version. (Yeah, I know it's a bad idea ^^).
>
>  Thanks to all the others who have looked into this as well. I'll see if I
> can fix my system somehow without going through some major pain ...
>
>  --Felix Geisendörfer aka the_undefined
>
> --
>  http://www.thinkingphp.org
>  http://www.fg-webdesign.de
>
>  meek schrieb:
>  I found a couple of things which might be relevant:
>
> The section 'Problems Installing or Running Apache 2' on this page:
>
> http://www.apache.org/dist/httpd/binaries/win32/README.html
>
> - which I got to from this:
>
> http://marc2.theaimsgroup.com/?l=apache-bugdb&m=101484400413021&w=2
>
>
>
>
>
>
>  >
>

--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread Felix Geisendörfer




Hey meek,

I think you found the exact bug. It's Microsoft to blame: http://support.microsoft.com/default.aspx?scid=kb;en-us;317949


  SYMPTOMS
Data loss may occur if all of the following conditions exist:
  
A bind of a listen socket is completed in a parent process.
An accept is completed in a child process.
Fast sends are happening.
  

This is exactly what I experience, and this explains why putting some
usleep() statements in when outputting the image via a fread loop seems
to have a positive effect (slows down the send process)! 

However, I'm not sure if I like the solution:

  RESOLUTION
  To
resolve this problem, obtain the latest service pack for Windows XP.
For additional information, click the following article number to view
the article in the
Microsoft Knowledge Base:

The problem is that I have had a really bad time installing a service
pack on my system in the past, but maybe that was because I tried to
install from a different windows cd (I got an OEM version) with SP 2
instead of Downloading the patch (which is a bad option since I'm on 64
kbit) ...

Hmm but they a Afd.sys file that seems to be problematic, maybe
I can simply replace this with a SP 2 version. (Yeah, I know it's a bad
idea ^^).

Thanks to all the others who have looked into this as well. I'll see if
I can fix my system somehow without going through some major pain ... 

--Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



meek schrieb:

  I found a couple of things which might be relevant:

The section 'Problems Installing or Running Apache 2' on this page:

http://www.apache.org/dist/httpd/binaries/win32/README.html

- which I got to from this:

http://marc2.theaimsgroup.com/?l=apache-bugdb&m=101484400413021&w=2




  


--~--~-~--~~~---~--~~
 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]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---





Re: CakePHP 1.1.9.3815 Frozen Cake

2006-11-03 Thread Daniel Hofstetter

No, the book has not been published yet, see
http://www.amazon.com/CakePHP-Recipes-Fabio-Cevasco/dp/0321497732/sr=11-1/qid=1162550796/ref=sr_11_1/104-4016874-1147904

-- 
Daniel Hofstetter
http://cakebaker.42dh.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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: othAuth Missing Component File

2006-11-03 Thread funksplutter

Solved it - and annoyed at myself for not having spotted it before.

othAuth.php on my local server had to be renamed to othauth.php on the
remote. Once this was done everything worked.


On Nov 2, 8:11 am, "funksplutter" <[EMAIL PROTECTED]> wrote:
> Thanks for the reply Eric.
>
> The odd thing is that othAuth works great on my local machine - in fact
> I'm really pleased with it. It's only on the remote server I seem to
> have a problem which I'm guessing has something to do with a file path.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with underscores

2006-11-03 Thread Christian

So when calling:
/my_controller/function.

And then if in my function I would try to do something like that:
$this->MyController->DoSomething()

I would then get his error message:
cakephp Call to a member function on a non-object

If I try to print_r on $this I would see that the object MyController
object was not created.

Then I changed the model and renamed the controller name to
Mycontroller and everything is fine. I.e. the object is created.

So for the moment I conclude that CakePhP is working better under PhP5.

c.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread meek

I found a couple of things which might be relevant:

The section 'Problems Installing or Running Apache 2' on this page:

http://www.apache.org/dist/httpd/binaries/win32/README.html

- which I got to from this:

http://marc2.theaimsgroup.com/?l=apache-bugdb&m=101484400413021&w=2


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread meek

Also maybe a screenshot of what you get - and do you have the same
problem with other filetypes like a .png for example?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread meek

Hi Felix,
Maybe you could post your php.ini and httpd.conf.
My development setup is very similar to yours and I can't reproduce the
problem with your script and image.
Couldn't have anything to do with your WLAN .jpg hack could it?


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to pass parameter to $ajax->link ??

2006-11-03 Thread leo.cacheux

I did something like this with an autocompleter, it should not be very
different with an Ajax link.

Use a fixed Id for your link (called MyLinkId in the example) and for
your input (MyTextId), and in the "onchange" property for your input,
try this :

lnk = document.getElementById('MyLinkId');
txt = document.getElementById('MyTextId');
lnk.url = '/umanager/addTag/' + txt.value;

I didn't tried this code but something like this should work.


--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread Gustavo Carreno

Hey Felix,

Just remembered something, have you tryed with the GD functions yet?
I know it could a bit more work since you are not doing any image
manipulation, but could you try and use ImageJPG/GIF/PNG to output
your images, just to exclude a general output problem and focusing on
the fread, fpassthru problem ?

-- 
Gustavo Carreno
---
< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >

--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP 1.1.9.3815 Frozen Cake

2006-11-03 Thread Olivier Percebois-Garve
And Fabio Cevasco's book on cakephp is also out !Did I missed the announcement ? Is there a pitch on what is inside ?On 11/3/06, Larry E. Masters aka PhpNut
 <[EMAIL PROTECTED]> wrote:We're excited to see so many people enjoying Cake. To show our appreciation, we are releasing CakePHP 
1.1.9.3815[1] Check out the changelog[2] to see what's new, and what you need to know before upgrading. This is another bug fix for the 
1.1 series and marks the last release before 1.2.  To those who submitted tickets, we'd like to thank you for your patience while we worked through them.  We work really hard on making CakePHP the most complete and developed framework, and we appreciate your support in making that happen.
There is one major change in this release pertaining to ACL. If you are working with the provided database tables for ACL, we changed the user_id column to be called foreign_key. This makes more sense in a broader context and allows aros to relate to different tables more easily.
Run this: ALTER TABLE aros CHANGE user_id foreign_key INT( 10 ) UNSIGNED NULL DEFAULT NULL; Alternatively, an upgrade command has been added to the acl.php cli script to run this query for you.php scripts/acl.php upgrade [-app /path/to/app_directory]
There has been a lot of excitement around 1.2. We are working hard to get all the new features to a point where we feel it is stable and ready for production use. We will not set a release date, but we are putting all our efforts into getting it ready as soon as possible.
We would also like to thank everyone who has donated to the Cake Software Foundation. We finalized a page at 

http://cakefoundation.org/donors/thanks. The Super donors have a link to their website, if one was provided. If you are a Super and your name or website link is missing please let us know via the contact form at 
http://cakefoundation.org/pages/contact. Some people have made multiple donations, which is really helpful and they should see themselves move up the donor ladder. Go to 
http://cakefoundation.org/donations to learn how you can contribute or click on one of the buttons that appear on the CakePHP sites.
Also, PhpNut has put together a list of books which are valuable to developers who want to improve there skills and learn how they can be ninjas like Him. 
http://astore.amazon.com/cakesoftwaref-20 . Remember, do not try the nail-through-the-finger trick at home. That is for trained professionals.
[1] Download: http://cakeforge.org/frs/?group_id=23&release_id=155
[2] 

https://trac.cakephp.org/wiki/changelog/1.1.x.x-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public

*/ 





--~--~-~--~~~---~--~~
 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]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---


Re: OT: Heisenbug with binary data output in PHP

2006-11-03 Thread Bert Van den Brande

Have you tried reading the image with a buffer in php ?

On 11/3/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
>
>
>  Hi Bert,
>
>  I can't get the service packs, they are incompatible with my hardware. I
> spent 12 hours at a LAN party once trying to get them on my machine and
> besides loosing data, cursing a lot and seeing more blue screens of death
> then I thought WinXP to have I decided to not ever try this again.
>
>  I tried it with different browser (FF 1.5, IE 6, Opera 9) and they all show
> the same / similar behavior.
>
>  Turning of my virus scanner is something I haven't tried yet. I'll do that
> together with the firewall, but I can't see why either one of them would
> randomly swallow the last packages of pictures provided via php ... I'll let
> you know what happens.
>
>  Best Regards,
>  Felix Geisendörfer
>
> --
>  http://www.thinkingphp.org
>  http://www.fg-webdesign.de
>
>  Bert Van den Brande schrieb:
>  Did you try it with different browsers ?
>
> Since it works fine on you webhost I'm guessing this is a weird
> windows related problem, so those service packs might not be a bad
> idea ...
>
> Do you have a virus scanner or something ? Maybe the scanner has
> problems with Apache or Php ...
>
> This is by far one of the weirdest php-related problems I've heard of :)
>
> On 11/3/06, Dr. Tarique Sani <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> wrote:
>
>
>  Can you give the URL of the offending image? I will try and look into
> it
>
> Cheers
> Tarique
>
>
>
>
>
>
>
>
>  >
>

--~--~-~--~~~---~--~~
 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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---