Re: saveField

2007-12-13 Thread Augusto Ferreira
Mistério, coloquei o create e continua a mesma coisa... Em 12/12/07, Lucas Ferreira [EMAIL PROTECTED] escreveu: tenta por um create() antes... //Atualiza o número de visualizações da páginas $this-Pagina-create(); $this-Pagina-id = $id; $hits =

Re: Setting path to cake core windows xp

2007-12-13 Thread AD7six
Comida411, I'm sorry you don't like my answers, you'll find on reflection (maybe) that they are very relavent to whatever problem it is you have that you are not explaining clearly (in each case). I don't really see any ambiguity here:

Re: loadModel function

2007-12-13 Thread lordG
This is interesting indeed... As far as I could establish, I was not requesting the file to be loaded twice. What is further interesting though is even if I did run loadModel twice with the same instruction, the class_exists function call within loadModel should have prevented this anyway. Any

Re: Multiple OR Likes

2007-12-13 Thread AD7six
On Dec 13, 12:20 am, Mr-Yellow [EMAIL PROTECTED] wrote: Was this typed right? array( 'Foo.Cat' = 'LIKE a%', array( 'Foo.Cat' = 'LIKE b%' ), array( 'Foo.Cat' = 'LIKE c%' ) ); They have to be nested like that or

Re: Multiple N to Distinct N Model

2007-12-13 Thread zonium
Santa, First I am using 1.2 so there might be some differences some where with the way generateList / scaffold work. However, I guess the key functionality and the end result should be the same. So why would I need a completely new model for each section? By defining the Letter model as you /

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread ProFire
I think you are right! I have checked out the session folder and duplicated the error again. This is what I found: First Ajax Call(Dummy Data): Config|a:3:{ s:9:userAgent; s:32:7a98565405c4c8c1b17961f9f9edd2fd; s:4:time; i:1197535939; s:4:rand;

Re: Selection jump function / menu

2007-12-13 Thread francky06l
You could set your text field as an hidden field at first. Then handling onChange in the select box, with a small javascript you would show the text box when the is other and hide it otherwise.on Something like : $js = 'if(this.value == other) $(\'inpbox\').show(); else $(\'inpbox \').hide();';

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread majna
Hint: You can disable UA check for session. Configure::write('Session.checkAgent', false) or put this in config.php somehow... On Dec 13, 9:44 am, ProFire [EMAIL PROTECTED] wrote: I think you are right! I have checked out the session folder and duplicated the error again. This is what I

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread lordG
Hi ProFire, Just popped in. You're spot on there with reducing the security level on your sessions. I have the exact same problem happening with me, even posted a ticket with the cake guys, as I thought it was a bug, yet it was just what was intended to happen when the security is set to high.

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread Krovosos
What I've figured with ver. 1.2 pre-beta is that if the session is set to HIGH (I use db-session mode) then for each and every request I can observe in the SQL-dump that my session is deleted and a new one is created. I consider that a bug but since I do not have any restrictions on the session

Re: findAllThreaded Returning Empty

2007-12-13 Thread AD7six
On Dec 12, 3:08 am, AJ [EMAIL PROTECTED] wrote: I searched through the list and could not find anyone having this specific issue. I am using 1.2 (not exactly sure what version, but not pre-beta). I have a table of content pages, which includes a parent_id field. I am trying to pull a

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread ProFire
Alright, the problem is solved! For those who encounter the similar problem and reading this to get the problem solved, here's what I did. My initial settings was that my cake session security is set to HIGH. What appears to me is that everytime the user browse around, a new Session ID is

Re: 2 Models 1 Layout

2007-12-13 Thread MrTufty
At a guess, I'd say that your /posts/index action isn't returning the data correctly. This is roughly what it should look like: excuse the dodgy formatting. class PostsController extends AppController { ... snipped ... function index() { $posts = $this-Post-findAll();

Re: Has and belongs to many, with extra columns

2007-12-13 Thread zonium
Some info on how 'with' is used can be found here: http://www.cakephp.org/files/OCPHP.pdf Note: - using 'with' is optional, - scaffold controller methods and views built with bake wont take care of extra fields On Dec 12, 3:43 pm, Mr-Yellow [EMAIL PROTECTED] wrote: Went looking for the code I

Re: CakePHP and VBulletin

2007-12-13 Thread oPless
On Dec 13, 3:09 am, Lakshmi S [EMAIL PROTECTED] wrote: Hi All, We are trying to integrate vBulletin with a CakePHP application. [snip] As it happens, I have recently done this. I'll send an email off list for you to contact me. -Simon --~--~-~--~~~---~--~~

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread zonium
Solution? Set the Cake Session Security to Medium. This is what I did. Yeap, that set to Medium would solve the problem. I'm not sure if this is how the entire Session Process is It's how it is designed to work. When security is set to high, session id changes each time cake is reached.

Select Menu List

2007-12-13 Thread pepejose
hello I am trying to do something like this, but there is no way http://blazonry.com/javascript/selmenu.php form name=form action=?php echo $html-url('/users/add'); ? method=post ?php echo $html-selectTag('User/LanguagesList', $languages, null, array('multiple' = 'multiple','size' =

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread zonium
Solution? Set the Cake Session Security to Medium. This is what I did. Yeap, setting to Medium would solve the problem. I'm not sure if this is how the entire Session Process is It's how it is designed to work. When security is set to high, session id changes each time cake is reached.

View this page Cake Apps/Sites In The Wild

2007-12-13 Thread huisman.peter
Het geheugen van Nederland (The Memory of the Netherlands) is an extensive digital collection of illustrations, photographs, texts, film and audio fragments, all of Dutch making. It use Cake and Oracle database, the site is running on IIS. Click on

strange $session-flash() output [1.2.x]

2007-12-13 Thread dr. Hannibal Lecter
Hi everyone, here's my problem. I've started doing a private CMS to learn Cake. Now, at first I was working with the pre-beta download of 1.2 branch, and everything was going fine until I wanted to write my first flash().. All I did was: $this-Session-setFlash('Article saved'); And in the view:

Re: Session Sudden Expire during Ajax call

2007-12-13 Thread zonium
Solution? Set the Cake Session Security to Medium. This is what I did. Yeap, setting to Medium would solve the problem. I'm not sure if this is how the entire Session Process is It's how it is designed to work. When security is set to high, session id changes each time cake is reached.

Re: strange $session-flash() output [1.2.x]

2007-12-13 Thread grigri
The Session Helper's flash method outputs the content, it doesn't return it. It returns true if it has something to output, false if it doesn't. Your trailing '1' is you echoing the return value of flash, which you shouldn't do - look in /libs/view/templates/layouts/default.ctp :

(Cake)PHP programmer needed urgently!

2007-12-13 Thread simon
Hi all, Hope you don't mind me posting a job ad here! I'm working in a small web team at work and we quite urgently need a PHP programmer. Here's what we're looking for: We are looking for a enthusiastic and experienced Web Developer for 3 months to help develop a large internal business system

Re: CakePHP and VBulletin

2007-12-13 Thread Marcin Domanski aka kabturek
As it happens, I have recently done this. I'll send an email off list for you to contact me. -Simon Hey Simon - don't be shy - share Your solution here:) not that i'm interested but many people would find it usefull. You can also get feedback about your solution. As for the integreation i

Re: strange $session-flash() output [1.2.x]

2007-12-13 Thread dr. Hannibal Lecter
Wow..I can't believe I missed that 0_o Thanks grigri! --~--~-~--~~~---~--~~ 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,

Frustration with FileHandler snippet and saving returned value, any advice?

2007-12-13 Thread designvoid
Hi there, I'm currently playing with the FileHandler snippet by Chris Partridge (http://cakeforge.org/snippet/detail.php?type=snippetid=52) and I've hit a problem! I can get the file to upload correctly and saved in the correct location, but I cannot for the life of me get the filename back

Re: CakePHP and VBulletin

2007-12-13 Thread Richard Kelly II
I'm interested also as I am trying to do this with phpbb and may consider switching to vbulletin. Please share! Rich On Dec 13, 2007, at 6:33 AM, Marcin Domanski aka kabturek wrote: As it happens, I have recently done this. I'll send an email off list for you to contact me. -Simon

Re: (Cake)PHP programmer needed urgently!

2007-12-13 Thread simon
PS Forgot to mention: we are based in London, and the person we are looking for needs to be able to come to our office and work for the vast majority of the duration of the contract. simon wrote: Hi all, Hope you don't mind me posting a job ad here! I'm working in a small web team at work

Re: findAllThreaded Returning Empty

2007-12-13 Thread AD7six
On Dec 13, 1:46 pm, AJ [EMAIL PROTECTED] wrote: Youd be better off IMO getting familiar with and using the tree behavior though Actually, I am. Rather, that model is set up for it. I use generateTreeList other places for dropdowns, but didn't think I could have it generate an unordered

Re: findAllThreaded Returning Empty

2007-12-13 Thread AJ
Youd be better off IMO getting familiar with and using the tree behavior though Actually, I am. Rather, that model is set up for it. I use generateTreeList other places for dropdowns, but didn't think I could have it generate an unordered list. So far I can't see how to use the tree behavior

Re: cake 1.2.x.x console problems

2007-12-13 Thread Chris Hartjes
On Dec 13, 2007 2:09 AM, Adam D. [EMAIL PROTECTED] wrote: I can't run the bake command, or any of the commands from the console. I viewed the screencasts, but still, no luck. If I execute /usr/bin/php cake/console/libs/bake.php ...and I get the output from the console, with paths,

Re: cake 1.2.x.x console problems

2007-12-13 Thread Samuel DeVore
I think this is fairly upto date for Bake'n http://tempdocs.cakephp.org/#TOC108142 HTH Sam D On Dec 13, 2007 6:47 AM, Chris Hartjes [EMAIL PROTECTED] wrote: On Dec 13, 2007 2:09 AM, Adam D. [EMAIL PROTECTED] wrote: I can't run the bake command, or any of the commands from the

Problem with html helper

2007-12-13 Thread Unite
Fatal error: Call to undefined function ife() in /*/public_html/cake/ libs/view/helpers/html.php on line 1020 I get this error. I am using PHP ver 5. Any suggestions as to what can be wrong? Thanks Wade --~--~-~--~~~---~--~~ You received this message because you

Re: findAllThreaded Returning Empty

2007-12-13 Thread AJ
Something to play with:http://bin.cakephp.org/view/375925194 $data would be flat findAll sorted by lft. Thanks a ton, but I'm having some issues. Here is what's in my controller: var $helpers = array('Tree' ); $this-set('navContent', $this-Content- findAll(null,null,'Content.lft ASC'));

Re: Has and belongs to many, with extra columns

2007-12-13 Thread MonkeyGirl
Thank you very much, both of you. This is exactly what I was looking for! --~--~-~--~~~---~--~~ 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

Re: CakePHP and VBulletin

2007-12-13 Thread cakeFreak
DUnno if you are interested but I integrated SMF forum (http:// www.simplemachines.org/) as explained here: http://4webby.com/blog/posts/view/2/smake_smf_cakephp_integration Maybe you can use the same method to integrate vBullettin. Dan --~--~-~--~~~---~--~~

Re: i18n: static language references with __(My lang key, true) in models and controllers

2007-12-13 Thread cakeFreak
Cheers for the help francky06l ! Dan --~--~-~--~~~---~--~~ 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

Access cake data from external php script

2007-12-13 Thread Paolo
Hi all! I created a website for a real estate agency using cake. I used cake to create the management part of the website, now I'm creating the remaining part, that one that will be available to the user. I wouldn't like to use cake for this, but would it be possible to query some page or

Re: How do I retrieve this model's alias?

2007-12-13 Thread [rob desbois]
Bah - can't upgrade as this is part of a product :( Thanks for that though. --rob On Dec 12, 10:03 am, grigri [EMAIL PROTECTED] wrote: You should upgrade more often :) This was sorted in revision 5904 :https://trac.cakephp.org/changeset/5904#file13 From then onwards, Model::alias is a

Re: Problem with html helper

2007-12-13 Thread dr. Hannibal Lecter
Which version of Cake would this be? In 1.2.x branch, function aliases like ife() seem to be deprecated: http://groups.google.com/group/cake-php/browse_thread/thread/14f2b68e6dd039a/61b340f0070c66cc?lnk=gst Hope that helps, dr. H. --~--~-~--~~~---~--~~ You

Re: Access cake data from external php script

2007-12-13 Thread francky06l
if you want only to retrieve data you could use your cake application as web service returning xml for example. Now if you want to return a view or part of a view, I guess you should make an $ajax request from your external application..(take care if you have links in the returned views).. hth

Re: Access cake data from external php script

2007-12-13 Thread Paolo
No I just want to return data, I think the xml solution could be great! How can I tell cake not to render the page? Is there a method to create xml or should I create it by myself? Thanks On 13 Dic, 18:14, francky06l [EMAIL PROTECTED] wrote: if you want only to retrieve data you could use your

Re: 2 Models 1 Layout

2007-12-13 Thread Fabian
oh yeah I just left my post controller as it was doh! Thanks a lot!! On Dec 13, 3:23 am, MrTufty [EMAIL PROTECTED] wrote: At a guess, I'd say that your /posts/index action isn't returning thedatacorrectly. This is roughly what it should look like: excuse the dodgy formatting. class

Re: Access cake data from external php script

2007-12-13 Thread Martin Wood-Mitrovski
What I have done when faced with a similar situation (existing php site / scripts needs stuff from my cake app) is to generate the required page fragments in cake and pull them in using file_get_contents($url_to_piece_of_cake) works fine. You'll probably want to create and use a layout just

Re: findAllThreaded Returning Empty

2007-12-13 Thread AJ
The code does not know the name of the model (array key) to loop on, look at the example usage in the comments (you need to pass something in the 2nd parameter) PS. there /is/ a typo $itemReturn should just be $return. Both changed, but still getting the $node error. Where is that variable

Re: findAllThreaded Returning Empty

2007-12-13 Thread AJ
Ah, $node should also be $return. It works now! The ul and li structure doesn't seem to be building quite right, but that's the least of my worries now. I'm sure I can figure that out. Thanks again! AJ http://atlantajones.com --~--~-~--~~~---~--~~ You received

Re: Upload behavior does not work

2007-12-13 Thread Dardo Sordi Bogado
What version of cake are you using? Behaviors are for 1.2, and creating forms using HtmlHelper is deprecated in 1.2. Hint, try pr($_FILES); in your controller. On Dec 11, 2007 5:19 PM, Anna [EMAIL PROTECTED] wrote: Hi guys I'm a new baker, I guess I'm better at cooking. I tried to use

How does one use $this-render in plugins in the latest SVN build?

2007-12-13 Thread Aaron Shafovaloff
I'm getting Missing View and it's looking for the view file in the main app. This wasn't so about a week ago. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

1.2 Session variable disappears

2007-12-13 Thread dw
My login function sets a session variable which contains user data. It then redirects to an index page. Using Firecake, i see that the session data is there: 5fbout['Sessions'] = {Config: {userAgent:25fed2e5facba72bdb68484b4b19538b,time: 1197579960,rand:2113374583},User:{id:

ACL commandline prompts fail on 1.2

2007-12-13 Thread KellyBelly
I am trying to configure my CakePHP 1.2 for ACL. When I run the commandline prompt php acl.php initdb from the cake/scripts directory I get an error stating that acl.php failed at line 90 because cake/ basics.php was not found. But it's there. Is my webroot configuration wrong?

Re: CakePHP 1.2. pre-beta with CakeAMFPHP

2007-12-13 Thread Gwoo
I have not been working too much on the CakeAMFPHP mainly because I wanted something simple and easy to move around. Plus, with the new AMFEXT, it made sense to write something new. So, we put together the AMF plugin. AMFPHP is not required and working with AMF is a little more Cake. You can

Re: CakePHP 1.2. pre-beta with CakeAMFPHP

2007-12-13 Thread John David Anderson
On Dec 13, 2007, at 1:37 PM, Gwoo wrote: I have not been working too much on the CakeAMFPHP mainly because I wanted something simple and easy to move around. Plus, with the new AMFEXT, it made sense to write something new. So, we put together the AMF plugin. AMFPHP is not required and

DESCRIBE happening too often

2007-12-13 Thread Olexandr Melnyk
Hello bakers, in one of applications I'm working on, I have noticed DESCRIBE queries being executed on every page for all used models. With a load of page views, this only creates problems. As far as I know, such queries should be cached if application is in production (DEBUG = 0), but I still

Re: Access cake data from external php script

2007-12-13 Thread francky06l
Paolo, If you use cake 1.2, you can set Router::parseExtension('xml') in core.php. If you call your action from external application, using http:// myhost. com/app/controller/action.xml, cake will look for a ctp in this form view/xml/action.ctp (note the subfolder xml). In this view you can just

Re: How does one use $this-render in plugins in the latest SVN build?

2007-12-13 Thread francky06l
Seems the render() does not look into the pluginPath. I think the refactoring of the cake_core_path etc.. with persistent caching is on the way and not completed yet. A solution is to have the view name being the same as your action, but probably you needed a different name (for different

Re: 1.2 Session variable disappears

2007-12-13 Thread francky06l
If it's works under development and not on production, this seems a configuration problem to me .. Did you check if the directory where sessions are stored is present en writable on production server (if you store in file of course)? Are the settings for cake (and version, Security level etc ..)

Re: findAllThreaded Returning Empty

2007-12-13 Thread AD7six
On Dec 13, 3:34 pm, AJ [EMAIL PROTECTED] wrote: Something to play with:http://bin.cakephp.org/view/375925194 $data would be flat findAll sorted by lft. Thanks a ton, but I'm having some issues. Here is what's in my controller: var $helpers = array('Tree' ); $this-set('navContent',

Re: findAllThreaded Returning Empty

2007-12-13 Thread AD7six
On Dec 13, 8:24 pm, AJ [EMAIL PROTECTED] wrote: Ah, $node should also be $return. It works now! The ul and li structure doesn't seem to be building quite right, but that's the least of my worries now. I'm sure I can figure that out. Thanks again! AJhttp://atlantajones.com $node should

Re: 1.2 Session variable disappears

2007-12-13 Thread zonium
One thing you can check: The location where session is saved. If 2 pages are from 2 different applications and if they share session the paths (locations) need to be identical Good luck, Zonium On Dec 13, 1:35 pm, francky06l [EMAIL PROTECTED] wrote: If it's works under development and not on

Incomplete query result

2007-12-13 Thread wetmonkey
I am running CakePHP 1.1.18.x on Windows 2003 Server, IIS, and MS SQL 2000. I'm querying a table with a column defined as varchar(2000) and the query result only returns 256 chars for that column. I tried the page on a Linux, Apache, and MS SQL environment and I get the proper result. Anyone

A question about MVC

2007-12-13 Thread Steveston
Shall I put more database operations in model or in controller. For example, suppose I need to get all students (name and ID) who registers in course 101 but did not pay mandatory lab fee. It requires at least three tables, students, course_registration, and lab_fee_payment. I can do this in

Re: A question about MVC

2007-12-13 Thread Baz
You _can_ do whatever you like. It really doesn't matter. However, generally speaking models, views and controllers should be equally sized with appropriate content. What I usually use to judge (btw, no one says I'm right) is this: - I start with the view. Generally they shouldn't have much

Re: Frustration with FileHandler snippet and saving returned value, any advice?

2007-12-13 Thread kiang
Maybe your are using cake 1.2 ? Try this one instead: http://bin.cakephp.org/saved/22195 --- kiang On 12月13日, 下午8時07分, designvoid [EMAIL PROTECTED] wrote: Hi there, I'm currently playing with the FileHandler snippet by Chris Partridge

Re: Incomplete query result

2007-12-13 Thread wetmonkey
Nevermind I just found the solution from the PHP manual page... http://us2.php.net/manual/en/function.mssql-query.php#69695 It wasn't a cake issue but rather a PHP + Windows issue. On Dec 13, 3:02 pm, wetmonkey [EMAIL PROTECTED] wrote: I am running CakePHP 1.1.18.x on Windows 2003 Server,

Recursively return SOME attached model data

2007-12-13 Thread Miguel XT
Hi, Let's say I have two models Property and Picture. One Property can have many Pictures. So I make two models like this: class Property extends AppModel { var $name = Property; var $hasMany = array('Picture' = array('className' = 'Picture',

Re: Access cake data from external php script

2007-12-13 Thread zonium
Paolo, This has been discussed here: http://groups.google.com/group/cake-php/browse_thread/thread/8e5f487a944abeaf/e284ffdecdab0c69?lnk=gstq=+cakephp+structure#e284ffdecdab0c69 A note : - if you use $Dispatcher-dispatch($action) you need to use output buffering On Dec 13, 8:29 am, Paolo

Re: Recursively return SOME attached model data

2007-12-13 Thread chad
in your Property model $hasMany add: var $hasMany = array('Picture' = array('className' = 'Picture', 'foreignKey' = 'property_id'), 'fields' = array('id', 'name'), ); replacing 'id', and 'name' with whatever you

Re: A question about MVC

2007-12-13 Thread Grant Cox
It should be in the model - as should all data retrieval functions. Put as much stuff in the model as you can - the controller should just parse the request to see what model functions should be called, then set() this for the view. While some processing in the controller is inevitable, models

Helper Error, point me in the right direction...

2007-12-13 Thread [EMAIL PROTECTED]
I'm trying to implement the excel output helper from this article: http://bakery.cakephp.org/articles/view/generate-excel-spreadsheets-from-your-database But, I'm getting the following errors: Notice (8): Undefined property: ExcelHelper::$helpers [CORE/cake/libs/ view/view.php, line 868]

Re: Helper Error, point me in the right direction...

2007-12-13 Thread zonium
Look closely..., these are not errors, just notices. Some variables have not been properly set for views. Check your the controller logic. Zonium On Dec 13, 5:52 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm trying to implement the excel output helper from this

Re: Selection jump function / menu

2007-12-13 Thread rocky
Hey, Thank you very much for all of you! Blessings, Rocky On Dec 13, 5:24 pm, MrTufty [EMAIL PROTECTED] wrote: That's exactly how I'd do it too. With the exception that I'd put the code in via a touch of jQuery in the view instead, but that's a matter of style. Tufty On Dec 13, 9:02

Trac Bug #3537

2007-12-13 Thread James S
I encountered a problem with using paginator with: https://svn.cakephp.org/repo/trunk/cake/1.2.x.x/cake r6147 For some reason all the table sort links and paging links are coming out like so: /admin/faqs/admin_index/page:2 That extra /admin_index/ should really be /index/. It appears there's

Re: CakePHP and VBulletin

2007-12-13 Thread Lakshmi S
Hi Dan, We had already integrated Phpbbbut when we tried integrating VBulletin we encountered problems. It is a problem of VBulletin handling the object in CakePHP. Thanks for the help. Regards, Lakshmi On Dec 13, 2007 8:34 PM, cakeFreak [EMAIL PROTECTED] wrote: DUnno if you are

Re: A question about MVC

2007-12-13 Thread zonium
@Grant Cox I agree with you. However, I find myself putting a lot of code into controllers. In many cases my models are quite thin while controllers are rather thick. One reason my controllers become thick is that it's easy for me to test out new methods while developing them. Just access them

Re: DESCRIBE happening too often

2007-12-13 Thread Grant Cox
How are you checking that you are getting a lot of DESCRIBE queries with DEBUG set to 0? On Dec 14, 7:09 am, Olexandr Melnyk [EMAIL PROTECTED] wrote: Hello bakers, in one of applications I'm working on, I have noticed DESCRIBE queries being executed on every page for all used models. With a