Re: Trouble with the translate function "__()"

2007-08-17 Thread Aaron Shafovaloff
Any ideas on this folks? On Aug 17, 12:02 am, citrus <[EMAIL PROTECTED]> wrote: > I have the same problem while trying to use __() in my validation > message. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake P

Re: Siloing in cakephp?

2007-08-17 Thread Dr. Tarique Sani
On 8/18/07, Mech7 <[EMAIL PROTECTED]> wrote: > domain/animals/birds/hummingbird/ > > instead of > > domain/articles/view/hummingbird > Have done that with tags in cheesecake it was a bit more difficult as tags is a HABTM relationship and the tags could potentially be in random order eg: photos/20

Re:

2007-08-17 Thread Samuel DeVore
Yea, I think of them as equivalent things in my mind, things to avoid in my code. I like to be as portable as possible. Sam D On 8/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I think what Samuel meant is short tags to true, not asp-tags. They > are two completely different setting

Re: can not view cake sceencasts with VLC

2007-08-17 Thread Chris Hartjes
On 8/17/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > I am using debian sid. Everybody said to use VLC. So I tried that. > > Installed like this: > > aptitude install vlc libdvdcss2 w32codecs mozilla-plugin-vlc vlc-nox > debian-multimedia-keyring > > Still won't play cake screencasts. Dunno what

can not view cake sceencasts with VLC

2007-08-17 Thread walterbyrd
I am using debian sid. Everybody said to use VLC. So I tried that. Installed like this: aptitude install vlc libdvdcss2 w32codecs mozilla-plugin-vlc vlc-nox debian-multimedia-keyring Still won't play cake screencasts. --~--~-~--~~~---~--~~ You received this mes

Re: Cake Bake/PHP CLI problem..

2007-08-17 Thread Walker Hamilton
Heya, Don't use that anymoreyou're using cakephp 1.2 (latest) do this: ../cake/console/cake bake this command will work from the root of your app/ directory if cake core is on the same level as your app dir. --~--~-~--~~~---~--~~ You received this messa

Re:

2007-08-17 Thread [EMAIL PROTECTED]
I think what Samuel meant is short tags to true, not asp-tags. They are two completely different settings. short_open_tag = On Set this in your php.ini and you will be able to use short tags --~--~-~--~~~---~--~~ You received this message because you are subscri

Re:

2007-08-17 Thread Mech7
Yeah so it's better not to use this to keep the code more portable :) On Aug 17, 10:44 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > this only works on servers that have the asp-tags setting to true > > http://us.php.net/manual/en/ini.core.php#ini.asp-tags > > On 8/17/07, michael lucas <[EMAIL

Re: Acl question

2007-08-17 Thread Langdon Stevenson
Hi Nina Glad I could be of some assistance :-) Regards, Langdon Nina wrote: > Hi Langdon > > Your code sent me off in the right direction, so thank you for your > help. However I had to make substantial changes, because you code did > not fit with my user-model (and not with the functions ava

Re: How to make a good use of Elements and DRY principe ?

2007-08-17 Thread gremlin
Somehow lost some of the post. Also in views that dont have a $users variable set you can use the element $this->renderElement( 'users_list' ); Using ajax to return html snippets would work as well. - jquery style - $( '#element' ).load( Url/users/index ); would load the cached element into the #

Re:

2007-08-17 Thread Samuel DeVore
this only works on servers that have the asp-tags setting to true http://us.php.net/manual/en/ini.core.php#ini.asp-tags On 8/17/07, michael lucas <[EMAIL PROTECTED]> wrote: > > I'm pretty sure this problem is related to some basic setting, but I > couldn't solve it myself. > > A lot examples of

Re: How to make a good use of Elements and DRY principe ?

2007-08-17 Thread gremlin
What you need to do is write an index action for your users_controller like you would if you were NOT using ajax or reusing that action at all. Once you have that done, modify that function to check isset( $this- >params['requested'] ) to see if the view action if being called via the requestActio

Re: Problem - sending

2007-08-17 Thread [EMAIL PROTECTED]
Thanks . I will try it !!! On Aug 17, 9:54 pm, "Luiz Paulo Nascimento" <[EMAIL PROTECTED]> wrote: > Try this component: > > http://www.reversefolds.com/articles/show/filehandler > > LP > > 2007/8/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > > > > I want to copy a file on my server. Here is

cake-php@googlegroups.com

2007-08-17 Thread michael lucas
I'm pretty sure this problem is related to some basic setting, but I couldn't solve it myself. A lot examples of valid cakephp templates code use this kind of php openning tag: http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---

Re: Siloing in cakephp?

2007-08-17 Thread gremlin
I have had good success by using a model function to generate a custom query from the url. Search for other posts on nested categories for some solutions. I generally resolve the id of the article/category - whatever is nested - using a recursive function in the model and then pass that along to a

Re: Cake Bake/PHP CLI problem..

2007-08-17 Thread [EMAIL PROTECTED]
Whoops, forgot the ".php". Carry on. :) On Aug 17, 12:53 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm using PHP5 and Cakephp 1.2 (latest) on OS X. When I issue the > command "php cake bake", I get the following output: > > #

Re: Problem - sending

2007-08-17 Thread Luiz Paulo Nascimento
Try this component: http://www.reversefolds.com/articles/show/filehandler LP 2007/8/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > I want to copy a file on my server. Here is my code. > > My input file button : > ... > file('Language/image'); ?> > > > this make a following html code : >

Cake Bake/PHP CLI problem..

2007-08-17 Thread [EMAIL PROTECTED]
I'm using PHP5 and Cakephp 1.2 (latest) on OS X. When I issue the command "php cake bake", I get the following output: # # Bake is a shell script for running CakePHP bake script # PHP versions 4 and 5 # # ... Licensi

Re: display form results to new layout - no database

2007-08-17 Thread Chris Hartjes
On 8/17/07, bobble-gobble <[EMAIL PROTECTED]> wrote: > > I'm new to Cake and have been searching for this answer for the last > couple days. Can't seem to find anything -- although I'm sure the > problem is easily solved. > > Here's the situation: > > I have a form with validation working perfect

Re: Siloing in cakephp?

2007-08-17 Thread Chris Hartjes
On 8/17/07, Mech7 <[EMAIL PROTECTED]> wrote: > > Yes it is, but how to do it without knowing how deep it goes.. it > could be.. > > /animals > /animals/birds/ > /animals/birds/hummingbird That is the trick, isn't it. :) Part of the problem is that you are trying to do pattern matching on a poten

Re: Siloing in cakephp?

2007-08-17 Thread Mech7
Yes it is, but how to do it without knowing how deep it goes.. it could be.. /animals /animals/birds/ /animals/birds/hummingbird On Aug 17, 9:00 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 8/17/07, Mech7 <[EMAIL PROTECTED]> wrote: > > > > > Is there any article about using siloing in u

display form results to new layout - no database

2007-08-17 Thread bobble-gobble
I'm new to Cake and have been searching for this answer for the last couple days. Can't seem to find anything -- although I'm sure the problem is easily solved. Here's the situation: I have a form with validation working perfectly. No database is being used. After validation, I want to displa

Re: Increasing list views in baked app

2007-08-17 Thread Beertigger
D'oh! Right there at the top of the controller... Must.get.more.sleep. Beertigger On Aug 17, 8:37 am, Beertigger <[EMAIL PROTECTED]> wrote: > How do I get more items to display in a list view in a baked app? I > need to extend the list from the default of 10 > > Thanks! > > Beertigger

Re: Siloing in cakephp?

2007-08-17 Thread Chris Hartjes
On 8/17/07, Mech7 <[EMAIL PROTECTED]> wrote: > > Is there any article about using siloing in url's for cakephp.. by > siloing i mean, creating the tree structure in the url for nested > categories for example... > > domain/animals/birds/hummingbird/ > > instead of > > domain/articles/view/hummingb

Siloing in cakephp?

2007-08-17 Thread Mech7
Is there any article about using siloing in url's for cakephp.. by siloing i mean, creating the tree structure in the url for nested categories for example... domain/animals/birds/hummingbird/ instead of domain/articles/view/hummingbird --~--~-~--~~~---~--~~ Yo

Problem - sending

2007-08-17 Thread [EMAIL PROTECTED]
I want to copy a file on my server. Here is my code. My input file button : ... file('Language/image'); ?> this make a following html code : ... ... Controller: $fileData = $this->data['Language']['image']; copy($_FILES[$fileData]['tmp_name'], $folder.$fileName); if i'm not wrong to

Re: HABTM Does not select extra table :(

2007-08-17 Thread Mech7
Thanks but i am not really sure what you mean by query the menu model ? On Aug 16, 1:39 am, Grant Cox <[EMAIL PROTECTED]> wrote: > You cannot query across a HABTM like that - the relationships are > generated through multiple SQL queries so your WHERE does not get put > in the right part (and the

Re: How to write codes in Vendor to save time?

2007-08-17 Thread citrus
vendor directory is used for third-party app that you want to integrate with your Cake app. in this case, you can use Cake's built-in function wrapper: pr(); which does the same thing as you want. check out basics.php for more stuff like that: a(), aa(), up(), etc. happy baking! On Aug 17, 11:

How to write codes in Vendor to save time?

2007-08-17 Thread Steveston
Very frequently, I need to use codes like this to see output clearly: $a=print_r($var,true); echo "$a"; How can convert this piece of code to a program in Vendor so that I can reuse it? Thanks, --~--~-~--~~~---~--~~ You received this message because you are sub

Re: $html->checkboxTag

2007-08-17 Thread Max
There's an error with your PHP code checkboxTag("customer/ f_name",'',array("id"=>"f_name","onclick"=>"enableField()")); ?> Above should work... Here's the syntax: checkboxTag ($fieldName, $title=null, $htmlAttributes=null, $return=false) On Aug 17, 7:33 pm, Unite <[EMAIL PROTECTED]> wrote: >

Re: Lots of disk activity, caching gone mad?

2007-08-17 Thread [EMAIL PROTECTED]
Sorry Luke I did read your message. My posts seem to take a while to appear so there is a bit of a time delay. > define("DISABLE_CACHE", true); I tried this. As soon as I added it to core.php my disk writing rocketed up to 140MBps and the top half a dozen httpd processes were using around 30% pr

Re: Acl question

2007-08-17 Thread Nina
Duh... I posted to soon, this is the function: function _getAllowedIds ($model, $access_type) { //this function returns a comma delimited string of id's that the logged in user has access to in the model given. $aro = new Aro(); // Get the username. It may be b

Increasing list views in baked app

2007-08-17 Thread Beertigger
How do I get more items to display in a list view in a baked app? I need to extend the list from the default of 10 Thanks! Beertigger --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post

Re: Acl question

2007-08-17 Thread Nina
Hi Langdon Your code sent me off in the right direction, so thank you for your help. However I had to make substantial changes, because you code did not fit with my user-model (and not with the functions avalible in cake 1.2). Allow me to explain (for general edification): I have a user model wh

Re: $html->checkboxTag

2007-08-17 Thread Unite
function enableField() { alert("hello"); } checkboxTag("customer/ f_name",array("id"=>"f_name","onclick"=>"enableField()")); ?> This onclick isnt even calling the javascript function. plz help! --~--~-~--~~~---~--~~ You received this message because yo

Re: $html->checkboxTag

2007-08-17 Thread Unite
Just a bit of further information after testing looks like "onclick"=>"enableField()" doesnt call enableField so onclick isnt working :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to t

$html->checkboxTag

2007-08-17 Thread Unite
Hi. What I basically want is to when a checkbox is ticked a input field becomes enabled. Its working if i use a button onclick routine but has no effect when i onclick the checkbox. Any help greatly appreciated. function enableField() { if (document.forms['customer'].f_name.checked=tr

Re: setting the base url for url language support

2007-08-17 Thread Chowsapal
Not sure if this is the best way, but ff you're using Cake 1.2, you could setup routes to map /:language/:controller/:action. Then, you could either (1) override the helpers you need to automatically include the language (either from the session, if you keep it there, or from $params) or (2) manu

RE: where to put independent functions

2007-08-17 Thread David Cole
>From my understanding, independent functions should go into their respective model file. That way you can call the function from the controller like $this->Model->func(). Right? Dave -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of luke BAKING ba

A problem with paths

2007-08-17 Thread ifcanduela
Hello there, I have developed a fairly simple application, and it works flawlessly... on my local server. When it has come the time to upload the files to the client's host, only the 'home' page is displayed, without CSS styling, and the links lead to 404s. When I try to reach another model/actio

setting the base url for url language support

2007-08-17 Thread Charlie
Hi, I searched but didn't found my answer on this topic: I want to use the language ISO code on my url like: www.example.com/en/ or www.example.com/nl/ This is working fine when I manual add these codes in the url and I completed also a check in the beforeFilter() if a language was provided in th

Re: Lots of disk activity, caching gone mad?

2007-08-17 Thread luke BAKING barker
did you read what I wrote? NAte in another post on this group: "Hi zipman, there's an undocumented "feature" that allows you to completely disable Cake's caching by adding this: define("DISABLE_CACHE", true); to app/config/core.php. However, this is only recommended in the most extreme unusual

Re: Lots of disk activity, caching gone mad?

2007-08-17 Thread [EMAIL PROTECTED]
> Maybe excessive logging with $this->log()? As far as I can see we aren't using any logging function. As I mentioned, disk space isn't being eaten up so it must be temp files of some sort > Or is the kernel swapping to/from disk? There is plenty of RAM on this Mac (and plenty spare) top says..

Re: css menu helper

2007-08-17 Thread rtanz
nevermind, ctp seems to be for 1.2, so for anyone using 1.1 like me u have to use .thtml. regarding second problem, i had overriden the beforeFilter that's why the one in the AppController wasnt working. solution is to include parent::beforeFilter --~--~-~--~~~---~--

Re: find articles of active users<-authors (bind model)

2007-08-17 Thread jyrgen
the User model is not directly associated to Articles, but via the Author model. Articles have a foreign "author_id", same does the User model. When i add an association in the Article model between User and Article like this: (i could do this on the fly with bind model also) 'U

Re: find articles of active users<-authors (bind model)

2007-08-17 Thread jyrgen
here's the crucial part of the sql generated: ... FROM `articles` AS `Article` LEFT JOIN `authors` AS `Author` ON `Article`.`author_id` = `Author`.`id` LEFT JOIN `users` AS `somestring` ON `Article`.`user_id` = `somestring`.`id` ... the problem is that `Article`.`user_id` doesn't exist.. -

Re: find articles of active users<-authors (bind model)

2007-08-17 Thread jyrgen
to put it in other words : i try to find model values of a "deep" or "remote" association. Article -> Author -> User While it's easy to find articles with Author.name LIKE %bla% i don't know how to test for values in the User model, because the Author model sits *in between* Article and User.

find articles of active users<-authors (bind model)

2007-08-17 Thread jyrgen
In my article search three models are involved: Article -> belongsTo Author Author -> hasMany Articles Author -> hasOne User User -> belongsTo Author the User model separates web account data from the personal author information, it holds login/password, as well as a flag telling if a User is a

Re: How can I updated table using checkboxes and button

2007-08-17 Thread nirmal
please tell me how can i send checkbox values from template to controller. template: (its related to site model) hidden('Site/id', array('value' => $site['Site'] ['id']));?> (from this line i am geeting site id) hidden('Campaign/id', array('value' =>$campaign[] []));?> (from this line i want to

Re: admin section protection

2007-08-17 Thread francky06l
You can check in ACL, there are plenty of articles for using ACL with controller-action access. Check in the Frequent Discussion in the Pages section. On Aug 17, 10:53 am, rtanz <[EMAIL PROTECTED]> wrote: > hi i am using the tutorial for simple user authentication for general > login to my site,

Re: where to put independent functions

2007-08-17 Thread luke BAKING barker
why not jsut create an empty model? I was sure there was something also in the controller you could put like $uses = null or On Aug 16, 2:42 pm, rtanz <[EMAIL PROTECTED]> wrote: > yep i understood perfectly, managed to implement it thanks --~--~-~--~~~---~--~~ Yo

Re: css menu helper

2007-08-17 Thread rtanz
bdw do i need to add something to the admin actions themselves? coz right now this is not working when i just put that in the AppController class. thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" gr

Re: Best Practices - "Modular Blocks & Actions"

2007-08-17 Thread dft
hi Alan, That's true. I'll look into using requestAction to preload, and then try out the caching. Thanks for the link, looking at it right away. Thanks Femi TAIWO On Aug 16, 3:13 pm, alan <[EMAIL PROTECTED]> wrote: > You might consider initially loading all of your content serverside > instead

Re: css menu helper

2007-08-17 Thread rtanz
thanks, is the .ctp for 1.1 or 1.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 [EMA

Re: Lots of disk activity, caching gone mad?

2007-08-17 Thread luke BAKING barker
there is another flag (see basics.php) which is called DISABLE_CACHE, that might help? On Aug 16, 7:02 pm, Marcus <[EMAIL PROTECTED]> wrote: > Maybe excessive logging with $this->log()? > > Or is the kernel swapping to/from disk? > > Take a look at the fs_usage(1) tool, it's used to monitor the f

admin section protection

2007-08-17 Thread rtanz
hi i am using the tutorial for simple user authentication for general login to my site, now i am also using cake's admin routing for the admin part of the site, and i would like to make an additional check so that only the administrator can go into that part, any advice how to achieve this? I was

hasMany optimizations

2007-08-17 Thread Kusok
Does anyone know how to optimize a hasMany query. For me it always does at query like select ... from TABLE where id in(NUMBER) for every item in the parent table. How do I tell it to just select everything with 1 query? --~--~-~--~~~---~--~~ You received this mes

Re: Many to Many relations - How to?

2007-08-17 Thread luke BAKING barker
Andrea, there is also the 'with' parameter in 1.2: worth searching for also, essentially does similar stuff. Not sure which is more 1.2 "way" of doing things. Luke On Aug 17, 8:29 am, Andrea <[EMAIL PROTECTED]> wrote: > Thanks to everybody! I've try it and I'm able to implements what I > wants..

Debug causing error

2007-08-17 Thread Langdon Stevenson
I am in the process of moving a number of Cake sites onto a new dedicated server (hosted with Superb Hosting). This server runs the Plesk control panel. I have already dealt with the known "open_basedir" issue and fixed that. However I am now getting the following error when I call a page: W

Re: so many memory used when runing CAKEPHP

2007-08-17 Thread [EMAIL PROTECTED]
dear Hartjes thanks for you help. Chris Hartjes 写道: > On 8/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > hi > > > > thanks for you reply. > > > > but it do not happend in the other PHP application. > > > > There is nothing inherent in CakePHP that causes it to use up all > sorts o

Re: css menu helper

2007-08-17 Thread Adam Royle
I accomplish this by setting a different layout in app_controller.php Of course you need to make a new layout in views/layouts/admin.ctp, which would implement your admin menu class AppController extends Controller { // add helpers, components, etc in here function beforeFilter()

Problem with page's path

2007-08-17 Thread Andrea
Hi everybody! I have this kind of problem with cake: When I want to access to a specific view I use this path format: http://localhost/APPNAME/index.php/CONTROLLER/VIEW/PARAMETERS but when I navigate into the page created for example with the bake, the format is like this: http://localhost/books

Re: Many to Many relations - How to?

2007-08-17 Thread Andrea
Thanks to everybody! I've try it and I'm able to implements what I wants... Thanks! Bye Andrea On 17 Ago, 09:07, Andrea <[EMAIL PROTECTED]> wrote: > Thanks to everybody I try this thing that suggests Nate in this > posthttp://groups.google.com/group/cake-php/browse_thread/thread/bef70558... >

Re: Practical effect of Mambo going with CakePHP?

2007-08-17 Thread keymaster
Not to pour water on anyone's enthusiasm... but, taking a realistic point of view I don't think we are going to be impacted much in the next little while. Firstly, mambo hasn't started working on their 5.0 release yet. They are still planning on releasing another 4.x release after the current one

Re: Newbie: Is there a manual for Bake?

2007-08-17 Thread Dr. Tarique Sani
On 8/17/07, Aaron Roberson <[EMAIL PROTECTED]> wrote: > > What is the syntax in the console? > Ah! may be you can help me :) I am supposed to write the documentation about Bake - tell me where did you get stuck, what did you try and I will answer those questions and ultimately incorporate th

Re: Many to Many relations - How to?

2007-08-17 Thread Andrea
Thanks to everybody I try this thing that suggests Nate in this post http://groups.google.com/group/cake-php/browse_thread/thread/bef70558f7854732/6363603e04fcee68?lnk=st&q=&rnum=10#6363603e04fcee68 Chris, I am so glad you asked, because this is why Cake Owns: The solution to your problem require