Re: parseExtensions on Lighttpd

2008-07-11 Thread flashlight
this worked for me, now is solved. url.rewrite-once = ( /(css|files|img|js|stats)/(.*) = /$1/$2, ^/(.+)/?$ = /index.php?url=$1 ) On Jul 10, 5:49 pm, Christian Winther [EMAIL PROTECTED] wrote: Do you use mod_magnet + cleanurl-v6.lua to rewrite on lighttpd? If not

Re: Echo Fields of Article Ceator/Modifer in View

2008-07-11 Thread double07
So the News items should Belong To a user. The problem I see is that you can't seem to define a local key? My code in the News controller should look like this yeah? var $belongsTo = array('Creator' = array( 'className' = 'User',

Re: Request for the Devs to take into consideration concerning print

2008-07-11 Thread Alain Veylit
I'd have to agree: CakePHP is php, not CSS - Having said that, is anyone working on a PDF component ? Alain Lance Willett wrote: Jonathan: In that sense, print stylesheets aren't much of a priority for most projects. This depends heavily on user expectations and type of project. In

Re: MSSQL ntext problem

2008-07-11 Thread bitkidoku
Thank you very much :-) I did a change in the source in a similar way. It is dirty but it works. On Jul 11, 12:32 am, James K [EMAIL PROTECTED] wrote: Oh, PS - I modified the hack so that it only runs when it recognizes an XML type from SQL 2005. If you change my

Re: $html-textarea displaying actual html codes

2008-07-11 Thread Vixy
Thanks, I'll go with the 3rd option. How can I disable it from CakePHP? What files do I need to edit? Thanks, Vix On Jul 10, 3:58 pm, Lance Willett [EMAIL PROTECTED] wrote: Thanks, my question is, how can i stop the script from out putting the html code when its inserted through the comments

Re: parseExtensions on Lighttpd

2008-07-11 Thread flashlight
i found url.rewrite-once = ( /(css|files|img|js|stats)/(.*) = /$1/$2, ^/(.+)/?$ = /index.php?url=$1 ) fixes this On Jul 10, 5:18 pm, flashlight [EMAIL PROTECTED] wrote: Somebody knows how to add support to extensions on lighttpd, maybe its the rewrite rule, but everytime i try to

I encountered a problem

2008-07-11 Thread 软件梦工厂
I encountered a problem,if I add a plugin whose name is a substring of the path string,the function strip_plugin will return a wrong $base string. strip_plugin(/cakemanager/index.php/manager,manager) should return /cakemanager/index.php but it returns /cake/index.php

Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread XuMiX
one more thing here, how can I save this additional data into the relation table? On 4 июл, 12:14, XuMiX [EMAIL PROTECTED] wrote: thx, i'll have a try On 2 июл, 23:23, James K [EMAIL PROTECTED] wrote: CakePHP has no problem reading extra fields in your join table. As long as you're

Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread XuMiX
and one more thing according to this code in model.php if (!empty($newValues)) { $fields = join(',', array( $db-name($this-hasAndBelongsToMany[$assoc]['foreignKey']),

help with layout error message

2008-07-11 Thread .
I need help with this error message please. I do not have any Array.ctp layout file. Why am I getting this all of a sudden? Missing Layout *Error: *The layout file *C:\xampp\htdocs\app\views\layouts\Array.ctp* can not be found or does not exist. *Error: *Confirm you have created the file: *

Re: help with layout error message

2008-07-11 Thread .
I am not referring to any Array.ctp whatsoever. Why do I get this error? Thanks On Fri, Jul 11, 2008 at 12:42 AM, . [EMAIL PROTECTED] wrote: I need help with this error message please. I do not have any Array.ctp layout file. Why am I getting this all of a sudden? Missing Layout *Error:

the questions rarely answered. why?

2008-07-11 Thread polutan
Hello :) i'am so sorry before if this post sounds insulting :) i just want to know, why most of questions here is rarely answered? is all happier using #cakephp instead of cake's google group? why cake's mailing list was not as crowded as in #cakephp irc channel? Thank you :)

Re: help with layout error message

2008-07-11 Thread Marc MENDEZ
Hi, Look in the controller containing the action which raised this error, if you don't use a $layout variable or call setLayout() ? . a écrit : I am not referring to any Array.ctp whatsoever. Why do I get this error? Thanks On Fri, Jul 11, 2008 at 12:42 AM, . [EMAIL PROTECTED]

Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread duRqoo
Hey XuMiX, with cake u are able to save meta data within join table, but it's somehow a tricky part. I suggest you to read (http://cricava.com/blogs/ index.php? blog=6title=modelizing_habtm_join_tables_in_cakephp_more=1c=1tb=1pb=1) to get the point. First of all when saving habtm related data

Re: help with layout error message

2008-07-11 Thread .
Hi I do not have a var $layout or any setLayout in the controller. The wierd thing is this was working just yesterday... On Fri, Jul 11, 2008 at 1:00 AM, Marc MENDEZ [EMAIL PROTECTED] wrote: Hi, Look in the controller containing the action which raised this error, if you don't use a

Re: help with layout error message

2008-07-11 Thread .
This seems to happen in all of my controllers where the view has a form submit. after I submit the form (any form) i get this error. On Fri, Jul 11, 2008 at 1:07 AM, . [EMAIL PROTECTED] wrote: Hi I do not have a var $layout or any setLayout in the controller. The wierd thing is this was

Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread XuMiX
thanks a lot! this was the most helpful and friendly post i've ever recieved :) BTW: the thing i needed is only: array( 0 = array( person_id = XYZ, year = 123541, amount = 123123 ), 1 = array( person_id =

Re: help with layout error message

2008-07-11 Thread .
I just restarted the Apache server and mysql server, and it worked! I am still curious why this though. Any ideas? I am using XAMPP. On Fri, Jul 11, 2008 at 1:12 AM, . [EMAIL PROTECTED] wrote: This seems to happen in all of my controllers where the view has a form submit. after I submit the

Re: Best way to include functionality in models

2008-07-11 Thread CrazyDave
@AD7Six, I'm still not clued up enough on behaviours to start creating my own. It'd help if the cakephp book had some information on creating them and an example http://book.cakephp.org/view/88/behaviors Also the content being saved shouldn't ever be edited so I figured using Geshi before

Re: Best way to include functionality in models

2008-07-11 Thread Jon Bennett
Hi CrazyDave, @AD7Six, I'm still not clued up enough on behaviours to start creating my own. It'd help if the cakephp book had some information on creating them and an example http://book.cakephp.org/view/88/behaviors Also the content being saved shouldn't ever be edited so I figured

Re: Best way to include functionality in models

2008-07-11 Thread AD7six
On Jul 11, 10:20 am, CrazyDave [EMAIL PROTECTED] wrote: @AD7Six, I'm still not clued up enough on behaviours to start creating my own.  It'd help if the cakephp book had some information on creating them and an examplehttp://book.cakephp.org/view/88/behaviors Why not look at examples

Re: the questions rarely answered. why?

2008-07-11 Thread Helder Oliveira
well many times the answer is in the docs / api / google. People should use this list for weird things and strange problems, not about the ajax api or about the form that doesn't submit or whatever base knowledge problem people have. On Fri, Jul 11, 2008 at 8:57 AM, polutan [EMAIL PROTECTED]

Re: Cake 1.2 App::import(vendor) isn't finding the file

2008-07-11 Thread RichardAtHome
I did it the other way round - Auth the user in cake and set the cookies as expected by PHPBB - seemed like much less work That was the direction I was veering towards too (if the phpBB class doesn't work...) Will definitely post my results when (if?) I get it to work... On Jul 11, 5:27 am,

Re: Cake 1.2 App::import(vendor) isn't finding the file

2008-07-11 Thread RichardAtHome
Just tried: App::import(Vendor, PHPBB_Login, false, null, 'phpbb.php'); And I'm still getting the same error: Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects \archimbolo\app\controllers\users_controller.php on line 42 On Jul 10, 9:15 pm, b logica [EMAIL PROTECTED] wrote: try

Re: help with layout error message

2008-07-11 Thread Marc MENDEZ
Absolutely no idea, and it may be hard to find why since this kind of behavior is difficult to reproduce Happy it works again ! . a écrit : I just restarted the Apache server and mysql server, and it worked! I am still curious why this though. Any ideas? I am using XAMPP. On Fri, Jul

Re: Use localization in model validation

2008-07-11 Thread Alessandro Daducci
Sorry, You're right! I confused my code with the one that was in your old post you cited about __contruct(...). I used that trick, it was great! But I don't understand: you told that in Changeset 5815 that problem was fixed, but I still have it in my 1.2 RC2 version. What's wrong? Sorry for my

Re: Use localization in model validation

2008-07-11 Thread Alessandro Daducci
Sorry, you're right! I confused my code while I rewrite it to adapt to Emilio's case. I just used the trick you cited in yout post (about __contruct(...) method). It was a very nice solution! But I still understand one point: you told that in Changeset 5818 that problem was fixed. But I still

Re: the questions rarely answered. why?

2008-07-11 Thread Adam Royle
People (including me) get sick of answering the same questions over and over again, often from people with little self-initiative. I think some people (especially php noobs) find it easier to post a question on google groups rather than spend the time poring over the manual, api, blogs, google

Re: the questions rarely answered. why?

2008-07-11 Thread grigri
Hello :) i'am so sorry before if this post sounds insulting :) i just want to know, why most of questions here is rarely answered? People (including me) get sick of answering the same questions over and over again, often from people with little self-initiative. I think some people

British pound sign in 1.2 form helper

2008-07-11 Thread Adrian
Hi, I am developing a simple job search site in CakePHP 1.2 and I have a problem with the text form helper. When editing a job I have a text box to enter a salary e.g. £24,000-£30,000 a year so I have used the form helper in my edit view like this: [code] ?php echo $form-text('Job.salary',

Re: British pound sign in 1.2 form helper

2008-07-11 Thread dr. Hannibal Lecter
Did you try putting the pound sign as an entity? i.e. pound; ? Adrian wrote: Hi, I am developing a simple job search site in CakePHP 1.2 and I have a problem with the text form helper. When editing a job I have a text box to enter a salary e.g. �24,000-�30,000 a year so I have used the

Special flavor of the tree behaviour

2008-07-11 Thread hinge
Hi I have a question... I have tow models : class Bankpost extends AppModel { var $name = 'Bankpost'; var $belongsTo = 'Category'; var $recursive = 0; } And class Category extends AppModel { var $name = 'Category'; var $actsAs = array('Tree');

Re: New to PHP - Want to Create Blog From Scratch

2008-07-11 Thread jamslug
I just finished an exercise as the one you proposed, I suggest you to look this tutorial: http://book.cakephp.org/view/219/blog but once you finish it for the first time, try to do it again, by yourself and usign this: http://book.cakephp.org/view/113/code-generation-with-bake. I have using PHP

Re: British pound sign in 1.2 form helper

2008-07-11 Thread Adrian
Hey, thanks for the reply I tried this but it is rendered as pound; when used as a form element value. On Jul 11, 11:23 am, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Did you try putting the pound sign as an entity? i.e. pound; ? Adrian wrote: Hi, I am developing a simple job search

Re: British pound sign in 1.2 form helper

2008-07-11 Thread Adrian
For now I have settled with: [code] input name=data[Job][salary] type=text value=?php echo $job['Job']['salary']? id=JobSalary / [/code] This works but if validation fails the elements value is not filled in. :S On Jul 11, 12:16 pm, Adrian [EMAIL PROTECTED] wrote: Hey, thanks for the reply

Re: Special flavor of the tree behaviour

2008-07-11 Thread AD7six
On Jul 11, 12:26 pm, hinge [EMAIL PROTECTED] wrote: Hi I have a question... I have tow models : class Bankpost extends AppModel {         var $name = 'Bankpost';         var $belongsTo = 'Category';         var $recursive = 0; } class Bankpost extends AppModel { var $name

Re: British pound sign in 1.2 form helper

2008-07-11 Thread Sam Sherlock
what about the number helper currency? http://book.cakephp.org/view/215/number the following e($number-currency('12887.57','GBP')); outputs the following (with ncr) #163;12,887.57 2008/7/11 Adrian [EMAIL PROTECTED]: For now I have settled with: [code] input name=data[Job][salary]

Re: British pound sign in 1.2 form helper

2008-07-11 Thread Adrian
Hi It's a nice idea, but I would like to keep the text field as free text so anything can be entered e.g. Up to £10 an hour or £24k a year plus benifits it's stored as a VARCHAR in the database, I have tried putting pound signs in other text and textarea fields and the same thing happens, the

Re: the questions rarely answered. why?

2008-07-11 Thread Siebren Bakker
I think that at one point or another, we've all started answering a question before realizing that it wasn't actually a question, but actually a demand. For the most part, if anyone takes the time to first do some research, and still can't find an answer, if they phrase it as a polite question,

Re: British pound sign in 1.2 form helper

2008-07-11 Thread Marc MENDEZ
Hi, Just an idea : it seems that it does not work when it's display (since you say you can store it in the database) Check if you have the same trouble with any other non alaphabetic character (dollar, ...) Check as well in the core.php, the value of App.encoding parameter. Try to use ISO

Re: British pound sign in 1.2 form helper

2008-07-11 Thread Adrian
Hi Marc, Changing encoding to ISO worked perfectly Thanks a bunch :D On Jul 11, 1:23 pm, Marc MENDEZ [EMAIL PROTECTED] wrote: Hi, Just an idea : it seems that it does not work when it's display (since you say you can store it in the database) Check if you have the same trouble with any

Re: British pound sign in 1.2 form helper

2008-07-11 Thread Marc MENDEZ
Adriatique a écrit : Hi Marc, Changing encoding to ISO worked perfectly Thanks a bunch :D I have a thread on an other group about this, and we are dealing with how to create a file in utf-8 with an editor --~--~-~--~~~---~--~~ You received this

Re: MSSQL ntext problem

2008-07-11 Thread Nate
You don't need to change the source. Just extend the driver and override the correct method. On Jul 10, 8:45 pm, bitkidoku [EMAIL PROTECTED] wrote: Thank you very much :-) I did a change in the source in a similar way. It is dirty but it works. On Jul 11, 12:32 am, James K [EMAIL PROTECTED]

Re: Mod_Rewrite problem...

2008-07-11 Thread Hitsugaya
Hey there, im been working on this problem for some time now and i solved it. It turns out mod_rewrite was working properly from the verry start accept somehow it is was not property sending me to the CakePHP mainpage on http://localhost/, i still get the directory listing. But when i dit

Re: Cake 1.2 App::import(vendor) isn't finding the file

2008-07-11 Thread clrockwell
If you happen to come by a solution, please post it here. I am having the same issue. Using RC2, build 7296 On Jul 11, 4:47 am, RichardAtHome [EMAIL PROTECTED] wrote: Just tried: App::import(Vendor, PHPBB_Login, false, null, 'phpbb.php'); And I'm still getting the same error: Fatal

Re: Cake 1.2 App::import(vendor) isn't finding the file

2008-07-11 Thread clrockwell
If forgot to mention that I am importing a different class, lastrss.php Code: App::import('Vendor','lastrss'); On Jul 11, 9:29 am, clrockwell [EMAIL PROTECTED] wrote: If you happen to come by a solution, please post it here. I am having the same issue. Using RC2, build 7296 On Jul 11,

Re: Mod_Rewrite problem...

2008-07-11 Thread Claudia
Just for explanation - I think the following happened: Your original htaccess: IfModule mod_rewrite.c RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] /IfModule This means that - if the

Re: need some help in data saving using cake's own functions.

2008-07-11 Thread KiANIi
I've tried the solution you have suggested but its not working the problem is not with saving of data but when I try to search data at the start of each iteration data is not found in table so it returns an empty array. is there any other solution to that problem Samuel DeVore wrote: before

Re: Cake 1.2 App::import(vendor) isn't finding the file

2008-07-11 Thread clrockwell
Got it working. First I tried deprecated way of vendor('lastrss') and it worked fine. So I tried App::import('vendor', 'lastrss') and it also worked fine. Did not think it would be case sensitive, but in my case (and maybe yours) it is. On Jul 11, 9:31 am, clrockwell [EMAIL PROTECTED] wrote:

Re: Translate behaviour documentation

2008-07-11 Thread bitkidoku
I have the same problem, I think it is missing. I am trying to solve the mystery from the API reference, which is not very easy. On Jul 9, 4:05 pm, boyracerr [EMAIL PROTECTED] wrote: I've been searching using whatever terms I can think of, and I can't find anything about the use of the

Re: MSSQL ntext problem

2008-07-11 Thread bitkidoku
Thanks, good idea indeed. I added that to my todo list. On Jul 11, 3:38 pm, Nate [EMAIL PROTECTED] wrote: You don't need to change the source.  Just extend the driver and override the correct method. On Jul 10, 8:45 pm, bitkidoku [EMAIL PROTECTED] wrote: Thank you very much :-) I did a

Re: Cake 1.2 App::import(vendor) isn't finding the file

2008-07-11 Thread NOSLOW
I think the second paramter, PHPBB_Login, should be all lower case just to get the file to load. Then when instantiating the class PHPBB_Login, keep the case as it's defined inside the file. Based on the examples here: http://book.cakephp.org/view/499/the-app-class, it looks that as soon as you

Controller Tests and fixtures

2008-07-11 Thread neverlosty
Hi guys, I can't seem to get fixtures working with Controller tests. I tried the examples from the cakephp docs but it seemed to not be working: $result = $this-testAction('/controller/action', array('fixturize' = 'MyObject')); Could anyone please show me an example of a controller test file

Re: need some help in data saving using cake's own functions.

2008-07-11 Thread simonb
for ($i =0 ; $i4;$i++) { echo 'Iteration # '.$i; $this-model-save($distributedImp); $res = $this-model-findAll(); print_r($res); } for($i=0;$i 4 ; $i++) { $data = $this-Model-create(); $this-Model-save($data); }

Re: need some help in data saving using cake's own functions.

2008-07-11 Thread simonb
you need to use $data = $this-ModelName-create(); this populates the model with the default data and created the structure for the data. For example if you have a table model with the following structure id int name varchar(100) defaul 'My Name' age int(3) default 12 Then using $data =

Re: Best way to include functionality in models

2008-07-11 Thread mbavio
Also, Mariano´s presentation in CakeFest in available for download in the official website, it is about behaviors and is a really good one. Cheers, mbavio On Jul 11, 5:42 am, AD7six [EMAIL PROTECTED] wrote: On Jul 11, 10:20 am, CrazyDave [EMAIL PROTECTED] wrote: @AD7Six, I'm still not clued

Re: the questions rarely answered. why?

2008-07-11 Thread mbavio
There is a reason why Google exists, and I really hate when users post something that can be founded in 20 seconds of Google. Feels like you are wasting my time and yours too. Cheers, mbavio On Jul 11, 9:13 am, Siebren Bakker [EMAIL PROTECTED] wrote: I think that at one point or another, we've

Re: Basic help with render() function

2008-07-11 Thread mark_story
On Jul 10, 12:52 pm, Sir Tabs [EMAIL PROTECTED] wrote: Now I think I have the feel for the process: each action that is called attempts, through automagic, to render the screen with it's particular view file. If I use Ajax to call the particular action, and use the 'update' option and specify

Re: ajax-link after ajax.updater

2008-07-11 Thread mark_story
This is a javascript problem and has nothing to do with cake. Basically when your HTML response is injected into the page, the script tags are not parsed and evaled. There is an option to turn on scriptEval or parseScripts for this somewhere in prototype. I don't know prototype well enough to

Re: Cake 1.2 App::import(vendor) isn't finding the file

2008-07-11 Thread mark_story
On Jul 11, 11:07 am, NOSLOW [EMAIL PROTECTED] wrote: I think the second paramter, PHPBB_Login, should be all lower case just to get the file to load. Then when instantiating the class PHPBB_Login, keep the case as it's defined inside the file. Based on the examples

Re: the questions rarely answered. why?

2008-07-11 Thread francky06l
Yes guys you right .. after a while you think sometimes if I answer this, it will take ages and probably more following questions will raise and I have also a full job, a girlfriend etc ... At the very beginning, I was reading a lot the list mainly before questionning, then I began to

calling helper functions from within the controller

2008-07-11 Thread Siegfried Hirsch
Hello, the subject says it all: is it possible to call a helper function from within the controller. Of course the helper is included in the var $helpers = array('Myhelper'); class MyController extends AppController { function index() { $this-Myhelper-function_to_call(); // DOES NOT

Re: calling helper functions from within the controller

2008-07-11 Thread Chris Hartjes
On Fri, Jul 11, 2008 at 3:39 PM, Siegfried Hirsch [EMAIL PROTECTED] wrote: Hello, the subject says it all: is it possible to call a helper function from within the controller. Of course the helper is included in the var $helpers = array('Myhelper'); Helpers are called within views, not

Re: calling helper functions from within the controller

2008-07-11 Thread Siegfried Hirsch
Hello Chris, yes I know. Maybe I need a hint for my problem. I have written a new Helper. Now I want to set some variables, that I can use from within the helper (yes I know I could handle this with parameters), but I am trying to save some parameters, cause the values are always the same.

Re: Good practice - Ajax action views?

2008-07-11 Thread francky06l
In case of ajax, a view can be considered as an element since there is no layout in it.. Now, if you observe every single field on the form and make a server call everytine, it might get slow. Why not submit the complete form, validate all and render the form again (if error), you could also use

HTTP Authentication and Security Component Redirect

2008-07-11 Thread daphonz
Hey Folks, I'm trying to use the Security component for a simple HTTP authentication on a single item in my Cake App, and I'm having trouble getting a proper error message to display upon incorrect login or when I cancel the login. At the moment, I just a blank page when I would expected a

Re: calling helper functions from within the controller

2008-07-11 Thread francky06l
Maybe parameters that do not change often can be in a config file .. ? Then use Configure::read where ever you are ... just a hint On Jul 11, 9:56 pm, Siegfried Hirsch [EMAIL PROTECTED] wrote: Hello Chris, yes I know. Maybe I need a hint for my problem. I have written a new Helper. Now I

Re: the questions rarely answered. why?

2008-07-11 Thread Wayne Fay
Polutan, are you looking at the same CakePHP email list archive that I am looking at?? Gmail shows me the following # of responses for the most recent ~30 email threads: 3, 0, 1, 6, 10, 4, 5, 9, 5, 0, 5, 1, 9, 8, 1, 2, 4, 6, 6, 0, 3, 5, 9, 2, 3, 0, 0, 2 I see a few with 0 responses, some with 2

Re: the questions rarely answered. why?

2008-07-11 Thread aranworld
I agree with Wayne. More often than not a question is answered on this group. I would go so far as to say that the high quality of the community in this group is a selling point for CakePHP. Most often, I would say that a question doesn't get answered, because either: 1) it is about quite an

Re: calling helper functions from within the controller

2008-07-11 Thread Daniel Hofstetter
Hi Siegfried,  the subject says it all: is it possible to call a helper function from within the controller. Of course the helper is included in the var $helpers = array('Myhelper'); class MyController extends AppController {    function index() {        

Setting the years

2008-07-11 Thread Vixy
Hi, In the HTML Helper, I found this code: function yearOptionTag($tagName, $value = null, $minYear = null, $maxYear = null, $selected = null, $selectAttr = null, $optionAttr = null, $showEmpty = true) { if (empty($selected) ($this-tagValue($tagName))) {

Re: $html-textarea displaying actual html codes

2008-07-11 Thread Vixy
No one knows the answer to this? i really need help people. On Jul 10, 4:14 pm, Vixy [EMAIL PROTECTED] wrote: Thanks, I'll go with the 3rd option. How can I disable it from CakePHP? What files do I need to edit? Thanks, Vix On Jul 10, 3:58 pm, Lance Willett [EMAIL PROTECTED] wrote: