multiple habtm's relations in just one table

2008-11-03 Thread modfather
Is it possible??? i know questions relating to this are posted ad infinitum on this forum - i have searched high and low, far and wide but i have hit the proverbial - i am going to post this and walk away for a while, and in the meantime some generous soul might shed some lighthere

Re: Jquery or Scriptalicious?

2008-11-03 Thread mikeg
vote for jquery! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For

Before filter, the session falls

2008-11-03 Thread mcphisto
Well, I've a big big problem with two applications of mine. I use an authentication method made with before filter. The problem is that, after a login it works correctly. Then, without a reason, the application seems to loose the session and brings me back to the login form. For this reason, I

Re: error message on select box validation

2008-11-03 Thread zwobot
I'm having a similar problem as you two and I found this thread after a quick search: http://groups.google.de/group/cake-php/browse_thread/thread/58c30b3c249dca19/501031b9492346ee?lnk=gstq=validation+message#501031b9492346ee It says you should use $form-input with type=select instead of the

Routing problem

2008-11-03 Thread sebatzke
Hello group, i'm fairly new to cake and now i'm facing a problem with routing. I would like to route a request like /tasks/result.php?valid to / tasks/result/valid. So i was trying the following: Router::connect(/tasks/result.php?valid, array('controller' = 'tasks', 'action' = 'result',

Re: Extending built-in Auth Component?

2008-11-03 Thread [EMAIL PROTECTED]
Hi Nathaniel, Did you get your AuthComponent extension working? If so, would you like to share it? :) I've been looking for LDAP authentication in cake for some time, but I'm not sure how to get to it. -- alx --~--~-~--~~~---~--~~ You received this message

Re: Warning (2): fopen(cakephp/app/tmp/cache/persistent/cake_core_dir_map) [function.fopen]: failed to open stream: Permission denied [CORE/cake/libs/file.php, line 146]

2008-11-03 Thread Malcolm Krugger
Sorry I should have mentioned earlier I set 777 perms for /app/tmp and all of its subdirectories too already Mal On Nov 2, 7:36 pm, Anupom [EMAIL PROTECTED] wrote: I think you need to set writable permission to the /app/tmp directory and its subdirectories.

Re: Before filter, the session falls

2008-11-03 Thread [EMAIL PROTECTED]
There has been scattered reports from people experiencing unpredictable loss of sessions. I have noticed this myself at times. What I understood about it was that the problem stems from the level of security set in Cake's config. When it is set too high you can accidentally be caught hacking

Re: Warning (2): fopen(cakephp/app/tmp/cache/persistent/cake_core_dir_map) [function.fopen]: failed to open stream: Permission denied [CORE/cake/libs/file.php, line 146]

2008-11-03 Thread Novice Programmer
I think that clearing the caches may help... seems like you changed some routes or added some new files but cake is still using its old cache. Thanks. On Mon, Nov 3, 2008 at 3:20 PM, Malcolm Krugger [EMAIL PROTECTED] wrote: Sorry I should have mentioned earlier I set 777 perms for /app/tmp

Re: Cake Debug output?

2008-11-03 Thread Dardo Sordi Bogado
Take a look into cake/libs/view/errors/ On Sun, Nov 2, 2008 at 8:15 PM, 703designs [EMAIL PROTECTED] wrote: I'd like to pass any recommended source code (missing controller, etc.) from Cake through highlight_string(). How can I customize this output beyond simple styling?

Re: Using JQuery and Prototype in same application

2008-11-03 Thread monmonja
Nope, try to use both and insert scriptjQuery.noConflict()/ script documentation at http://docs.jquery.com/Core/jQuery.noConflict Monmonja http://monmonja.com/blog/ On Nov 3, 12:55 pm, si-mon [EMAIL PROTECTED] wrote: Hi all, Is there any problem in using both JQuery and Prototype in the same

Re: Before filter, the session falls

2008-11-03 Thread monmonja
You could probably look at this http://monmonja.com/blog/2008/09/making-cakephp-and-session-work/ On Nov 3, 7:44 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: There has been scattered reports from people experiencing unpredictable loss of sessions. I have noticed this myself at times.

Re: Another pagination problem

2008-11-03 Thread Mathew
You have to add the query to the pagination helper by calling $paginator-options(...) In your controller you're using a POST to get the search query. I recommend changing this to a GET so that it can be passed to other pages as part of the URI I do paginated search using a get like this

Re: Another pagination problem

2008-11-03 Thread [EMAIL PROTECTED]
This has been covered numerous times before. http://groups.google.com/group/cake-php/search?q=search+pagination; If you have a specific issue related to this then please ask again. /Martin On Nov 3, 4:58 am, 0x1A4 [EMAIL PROTECTED] wrote: Hi all im relatively new to Cakephp.Currently im

Re: database is utf-8, page is utf-8, but i get weird characters

2008-11-03 Thread CG
another thing to check is your host provider. I have all the things in utf8 but in my host provider it keeps showing as iso-8859-1, so, after setting database and App.encoding to utf8, i also had to add a: header('Content-Type: text/html; charset=utf-8'); at the beggining of index.php in my

Re: Before filter, the session falls

2008-11-03 Thread mcphisto
Ok, maybe this is the problem. I experienced sessions falling when using live search or when opening blank pages. Now I changed the configuration in core php as in the article suggested by monmonja. Very good and clear article. Now I try and then I'l tell you. Thank you. On 3 Nov, 15:07,

Re: Building Tagging feature in my site

2008-11-03 Thread Marcus Silva
Hi, If i did understand what you are trying to achive you could design your tag relationship in the following way: Tables --- Tags id name model created updated more if needed etc... then you would have a linking table which would link tags to its repective associated model.

Re: database is utf-8, page is utf-8, but i get weird characters

2008-11-03 Thread [EMAIL PROTECTED]
There is also an application-global encoding setting in config/ core.php On Nov 2, 8:33 pm, Dave J [EMAIL PROTECTED] wrote: Not sure why it would show up as a question mark when you generate the form with the helper, however, when connecting to the database, make sure you set the encoding as

Re: Parameter passing in URL

2008-11-03 Thread RyOnLife
Multiple tabs won't inhibit the use of sessions. Feanor's Curse wrote: Thanks for the suggestion, but session variable won't work since the user could have open multiple tabs with different IDs. Best Regards, Daniel Süpke On Oct 27, 4:06 pm, RyOnLife [EMAIL PROTECTED] wrote: Any

Re: hasMany bind on the fly

2008-11-03 Thread luke BAKING barker
Hey Teknoid, you were helping me with this on IRC the other day, thanks for this thread too! Your work is appreciated!!! Luke On Oct 31, 11:23 pm, teknoid [EMAIL PROTECTED] wrote: no, cake can easily build the join that you

Re: Jquery or Scriptalicious?

2008-11-03 Thread Josey
In addition to Samuel's comment jQuery has a wonderful Google Group where you can get a lot of the help you might need. http://groups.google.com/group/jquery-en?hl=en On Oct 31, 2:37 pm, Samuel DeVore [EMAIL PROTECTED] wrote: Here's my take for what little it's worth (note I use scripa/proto)

Using _POST array to route to correct controller/action

2008-11-03 Thread Todd M
I'm a newbie here, but I think I understand the whole url/controller/ action/parm1/parm2 routing convention. However is there a way that you use the _POST array to rout to the correct action/parm's For instance, I'll always be using the www.example.net/my_controller, which takes me to the

Re: Using _POST array to route to correct controller/action

2008-11-03 Thread Marcelo Andrade
On Mon, Nov 3, 2008 at 10:09 AM, Todd M [EMAIL PROTECTED] wrote: I'm a newbie here, but I think I understand the whole url/controller/ action/parm1/parm2 routing convention. However is there a way that you use the _POST array to rout to the correct action/parm's For instance, I'll always be

Re: Jquery or Scriptalicious?

2008-11-03 Thread Marcelo Andrade
On Mon, Nov 3, 2008 at 5:56 AM, mikeg [EMAIL PROTECTED] wrote: vote for jquery! :) +1 Best regards. -- MARCELO DE F. ANDRADE (aka eleKtron) Belem, PA, Amazonia, Brazil Linux User #221105 [EMAIL PROTECTED] ~]# links http://pa.slackwarebrasil.org/

HABTM saving associations

2008-11-03 Thread FluF
Hello, I have models: class User extends AppModel { public $hasAndBelongsToMany = array( 'Right' = array( 'className' = 'Right', 'joinTable' = 'users_rights', ), ); } class Right extends

Re: Parameter passing in URL

2008-11-03 Thread Daniel Süpke
Thanks for the suggestion, but session variable won't work since the user could have open multiple tabs with different IDs. Best Regards, Daniel Süpke On Oct 27, 4:06 pm, RyOnLife [EMAIL PROTECTED] wrote: Any reason setting a session variable wouldn't work? Feanor's Curse wrote: Hi,

Re: database is utf-8, page is utf-8, but i get weird characters

2008-11-03 Thread Marcelo Andrade
On Mon, Nov 3, 2008 at 8:48 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: There is also an application-global encoding setting in config/ core.php I'm a new at this list and I don't know if it was already covered, but I solve these problems setting UTF-8 as default charset at Apache.

Automatic upload behaviour

2008-11-03 Thread Marcus Silva
Hello, I am trying to create a upload behaviour that does what the system I am building needs it to do. I need to know what would be the proper way to do it and what are the prebuilt functions that the framework uses by order they are called. Hope someone can help. Cheers

Re: Using _POST array to route to correct controller/action

2008-11-03 Thread Todd M
I had already done the google search and read cake's documentation. Thanks for search link though. Perhaps its how I interpret what the routes do. I think I understand how the routes work. Correct me if I'm wrong. The default routing is using the htaccess mod_rewrite. Using the blog tutuorial

tree behavior sorting

2008-11-03 Thread adriaanb
Hey guys, I am using the tree behavior (first time) and got a question about sorting. I am using it for a multilevel menu system with dragdrop sortables. Everything works very nicely, but can't figure one thing out. When I sort items on the same level the parent_id doesn't change and the tree

Re: Jquery or Scriptalicious?

2008-11-03 Thread mark_story
Personally I'm a big fan of mootools. I learned it early on, and really like how it doesn't require you to 'relearn' javascript. Instead it gives you a good cross browser base, with some decent built- in animation effects. Regardless of what library you end up choosing you should learn the

Re: Using JQuery and Prototype in same application

2008-11-03 Thread mark_story
A better question is why? -Mark On Nov 2, 11:55 pm, si-mon [EMAIL PROTECTED] wrote: Hi all, Is there any problem in using both JQuery and Prototype in the same application? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Using _POST array to route to correct controller/action

2008-11-03 Thread Todd M
Looking at the 22 Simple User Authentication in 1.2. Seems they do things simlar with the log in. My prior comment I stated that I would call the dispatcher. It looks from the example that I should do a redirect call instead. -T On Nov 3, 12:57 pm, Todd M [EMAIL PROTECTED] wrote: I had already

Re: Test cakephp mail component in local host

2008-11-03 Thread Adam Royle
I came across this awesome app the other day for testing emails without actually sending to the recipient - saves opens the email locally http://www.toolheap.com/test-mail-server-tool/ Cheers, Adam On Nov 3, 4:08 am, Abhimanyu Grover [EMAIL PROTECTED] wrote: I'm looking for this as well.

Re: database is utf-8, page is utf-8, but i get weird characters

2008-11-03 Thread bartvh
setting the encoding in the database connection was the trick. however, with this problem fixed weird things started up showing in other places. turns out you have to specify UTF-8 when you use htmlentities as well. i solved this by defining my own function utfentities($string) { return

Re: Using JQuery and Prototype in same application

2008-11-03 Thread Samuel DeVore
On Mon, Nov 3, 2008 at 11:48 AM, mark_story [EMAIL PROTECTED] wrote: A better question is why? Maybe if you have an app that uses prototype but one wants to play with your amazing debug kit ;) -Mark On Nov 2, 11:55 pm, si-mon [EMAIL PROTECTED] wrote: Hi all, Is there any problem in

Can't get basic association to work

2008-11-03 Thread farfignugin
Hi, I'm new to cake, and I am following tutorial in the book Apress Beginning CakePHP - july 2008. The chapter is explaining associations, and I understand but the belongsTo side of the association breaks and shows a blank screen when I try and run a list view of it. Here is the models code:

Re: Extending built-in Auth Component?

2008-11-03 Thread Nathaniel Price
I've got it working, yes, though I'm still a bit dissatisfied with the solution I came up with. For one, you can't refer to AuthComponent via $this-Auth inside your controller anymore, it has to be $this- LdapAuth. Not sure how much that will affect things. First an explanation of what this

Re: Jquery or Scriptalicious?

2008-11-03 Thread 703designs
I'd love MooTools if they chose to namespace the library to a MOO or similar object and not change basic prototypes (even String is modified!). Unfortunately, it's hard to trust if you're running it around other scripts. I wonder how much Moo's performance has these dirty tricks to thank...if it

Re: Can't get basic association to work

2008-11-03 Thread Anupom
There should not be any single quotations around the keyword null. //post.php class Post extends AppModel{ var $name = 'Post'; var $belongsTo = array( 'User' = array( 'classname' = 'User',

Re: An OO question

2008-11-03 Thread monmonja
on Q1, Q2 While it sounds logical, you have to find out that you are using static variables. The way i understand it is that when you used self:: $property it reads only as A::$property so extending it should not affect the static variables coz B is not A on static variables. I would suggest you

Re: Using JQuery and Prototype in same application

2008-11-03 Thread monmonja
If your using plugins, check if the plugin has the compatibility to work with other library, if not remember to not use $ for jquery stuff, most of the time you would be mixing them up. I would also suggest to just drop one of them. :) On Nov 4, 3:13 am, Samuel DeVore [EMAIL PROTECTED] wrote:

Re: Jquery or Scriptalicious?

2008-11-03 Thread monmonja
It really depends on how you program your code, if your not a fan of OOP then jQuery is for you, if you believe so much in OOP and codes must be clean even if you have to write 10 line over 1 line to other framework then you should go with mootools or prototype. This is just my opition but the

Re: Using _POST array to route to correct controller/action

2008-11-03 Thread Marcelo Andrade
On Mon, Nov 3, 2008 at 2:57 PM, Todd M [EMAIL PROTECTED] wrote: If I wanted to do something different, such as whenever I get www.example.net/posts/5. I could write some route connection code to translate it to posts/add/5. This is how I understand the cake's routes. However, this is where

AJAX Autocomplete not responding

2008-11-03 Thread amfriedman
Hi folks, I've been working on this for a while now and getting mighty frustrated. I'm trying to use the $ajax-autoComplete method and I'm stuck. Firebug is showing that I am sending the POST successfully to my controller and even getting a response back. When I look at the updated DOM, I see

Paginator: sort + limit saved to session.

2008-11-03 Thread Brenton B
I remember coming across a component of some sort that saves the sort and per page variables to session and thus recalls them when need be, except I can't seem to find it won't be too hard to recreate but would rather not re-invent the wheel. For the life of me I'm coming up dry, all

bindModel not resetting after first find

2008-11-03 Thread validkeys
Hi Guys, I have a clients and a milestone model. A client hasMany milestones. Milestones have many strategies. In one of the finds in my Client model, I unbind the Strategy model from the Milestone model, in order to rebind it but with certain conditions: Client.php: --

Re: Paginator: sort + limit saved to session.

2008-11-03 Thread MattC
I think you're talking about one I wrote: http://bakery.cakephp.org/articles/view/pagination-recall Article seems messed up at the moment. Code is also available at: http://github.com/mcurry/cakephp/tree/master/components/pagination_recall I haven't checked this code in a while so if there are

Re: Question on ACL and plugins ...

2008-11-03 Thread Rob
OK, I got this working, turns out that the plugin controllers needed to be added to the Aco by finding the actual controller files like /** * Get the names of the plugin controllers ... * * @return type */ function _get_plugin_controller_names(){

Creating Multiple model objects from the same method

2008-11-03 Thread Lagg
I apologize if my subject is confusing and I doubly apologize if this issue has been addressed before. I have two tables. Projects have many Tasks Tasks have 1 project I would like set some default Tasks every time I create a new Project. (Such as Clean, Wash, Wax, etc). How would I do

Re: Paginator: sort + limit saved to session.

2008-11-03 Thread Brenton B
Hmm ... that looks familiar and I had stumbled upon it while looking, but figured it might've been taken down for some reason. Cheers. On Nov 3, 3:28 pm, MattC [EMAIL PROTECTED] wrote: I think you're talking about one I wrote:http://bakery.cakephp.org/articles/view/pagination-recall Article

Returning a model variable

2008-11-03 Thread spyros k.
Hi, ive been searching for an answer but i just cant seem to be able to find one. How can i return a variable from a model which is not associated with any fields? For example i define $foo in a function in my model, how can i see what is it's value?

Re: Creating Multiple model objects from the same method

2008-11-03 Thread spyros k.
You can use saveAll, at least that's what i've done for something similar. Here are 2 tutorials on how to do that: http://teknoid.wordpress.com/2008/08/01/practical-use-of-saveall-part-1-working-with-multiple-models/

Re: Returning a model variable

2008-11-03 Thread Marcelo Andrade
On Mon, Nov 3, 2008 at 10:11 PM, spyros k. [EMAIL PROTECTED] wrote: For example i define $foo in a function in my model, how can i see what is it's value? I think it's not possible, cause the scope of the variable is limited to the funcion in which it's defined. Maybe you can use the session

Re: Paginator: sort + limit saved to session.

2008-11-03 Thread Brenton B
github.com webpage isn't working either. On Nov 3, 4:24 pm, Brenton B [EMAIL PROTECTED] wrote: Hmm ... that looks familiar and I had stumbled upon it while looking, but figured it might've been taken down for some reason. Cheers. On Nov 3, 3:28 pm, MattC [EMAIL PROTECTED] wrote: I think

Pagination with HasMany and SQL Aggregation

2008-11-03 Thread mwcbrent
I'm not sure that this is possible but if it is, it would put Cake into a special place in my heart. I have 2 related models Articles and Ratings. Articles hasMany Ratings A Rating has a User ID an Article ID and a Rating #. In order to get an articles rating I need to query all ratings by

Re: Using JQuery and Prototype in same application

2008-11-03 Thread si-mon
Actually, we are a group working on a single project, and each one having expertise in different libraries. So this question... Anyhow, thanks for the very useful information. This will help us a lot... -- si-mon On Nov 3, 5:11 pm, monmonja [EMAIL PROTECTED] wrote: If your using plugins, check

Re: Pagination with HasMany and SQL Aggregation

2008-11-03 Thread David C. Zentgraf
I needed to that a little while ago and got it to work with some slightly ugly hacking that probably doesn't scale too well, but it might work for you too. :) This belongs in the controller: http://bin.cakephp.org/view/1990384829 On 4 Nov 2008, at 13:20, mwcbrent wrote: I'm not sure that

Add-on Domain w/ Cakephp

2008-11-03 Thread Kyle Decot
I have a CakePHP app installed on my primary domain/hosting account. I want to have an add-on domain on the same hosting plan. I have my folders set up as follows: / -- .htaccess -- app -- cake -- (second domain folder) The problem is that is when I go to www.second-domain.com i get an internal

Re: Creating Multiple model objects from the same method

2008-11-03 Thread Lagg
That did the trick, and the magic project_id worked as advertised! Much Thanks! for anyone curious of exactly how I fixed my problem, I did the following in my add() method: $this-data['Task'][0] = array('name'='Wash'); $this-data['Task'][1] = array('name'='ClayBar'); $this-data['Task'][2] =

Rails ActiveScaffold for Cake

2008-11-03 Thread gunung pangrango
Hello is there something like Rails ActiveScaffold for Cake? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from

Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-11-03 Thread David Zentgraf
So, could somebody please, pretty please, post a solution to this ticket if there is one, or reinstate it as a bug? https://trac.cakephp.org/ticket/5502 I have exactly the same problem, multiple databases, and no way to generate the schema for each one of them. Thanks, Dav On Oct 1, 12:01 pm,

AW: Pagination with HasMany and SQL Aggregation

2008-11-03 Thread Liebermann, Anja Carolin
Hi, that sounds like pagination with conditions: http://groups.google.ch/group/cake-php/msg/09277228f45365ac If I understood you correctly: if you want an average rating you have to read first all your datasets and loop though the array and create an average value of the ratings. So paging

Sitemap generation

2008-11-03 Thread Liebermann, Anja Carolin
Hello everybody, At the moment I write my help files for my application as static pages in the pages directory. I wonder if there is a possibility to create an automatic table of contents with cake. I know the tutorial http://bakery.cakephp.org/articles/view/automatically-generate-dynamic-s