Re: output buffering

2009-02-15 Thread mscdex
On Feb 15, 12:41 am, brian bally.z...@gmail.com wrote:                 ob_start();                 system('/usr/bin/file -i -b ' . realpath($filepath));                 //$type = ob_get_clean();                 $type = ob_get_flush(); Have you tried using exec() and passing in a variable for

Re: Rendering a view without layout

2009-02-15 Thread mscdex
If nothing else, you could always create in your layouts directory a plain.ctp or similar file and just include the following in that file: ?php echo $content_for_layout; ? Then for example, you would just do: ?php echo $this-render('/ learning/index','plain',null); ?

Re: Jquery Ajax Form with Model Validations, Nobody knows?

2009-02-15 Thread mscdex
On Feb 15, 2:35 am, 浪漫様 rohmand...@gmail.com wrote: Nobody knows how to send a form's data using Jquery and updating a DIV with a success message or the validation error messages? it was pretty easy to do with Prototype and cake's Ajax Helper... but I can't manage to do it with JQuery. I'm

Re: Scaffolding template for controllers ... ??

2009-02-15 Thread p...@otaqui.com
I haven't done, or tested, this - but a quick peak inside the cake/ directory shows the file: cake/console/libs/tasks/controller.php which is what I think you will want to customise. Messing with Cake's core files is usually best avoided if at all possible. I would guess that you should try

Problem w/ Shells

2009-02-15 Thread Kyle Decot
I'm trying to create a shell but I'm running into some problems. If I add $uses = array(User); to my shell then I get: Error: Missing Database Connection. Try 'cake bake' Any ideas? I'm new to shells so I have no clue. Any help is, as always, appreciated.

Re: IE cache problem

2009-02-15 Thread keymaster
Send a header which prevents caching of images. You're usually better off with client side caching of images, even though you occasionally have to change the image name when the image changes. If you use an Image Model, you can append the id value to the image name. But if that doesn't fit your

cookbook - 81,000 unique visitors this month

2009-02-15 Thread keymaster
Gwoo recently posted that from Jan. 12-Feb. 11/2009, there were 81,000 unique visitors to CakePHP.com. Firstly, that is absolutely outstanding. Wondering why the discussion group membership lags so far behind, though, at only 11,300 members. Do we really have 70,000 people who are reading posts

$paginator-link sorting – Is this a Bug?

2009-02-15 Thread Mike Cook
I had posted about this previously but I guess the title and explanation I used were not very good. Hopefully this will be better. Here is my code; // Controller function index() { $this-paginate['Book'] = array( 'contain' = array('Author', 'Language', 'Genre'), 'order' =

Re: cookbook - 81,000 unique visitors this month

2009-02-15 Thread keymaster
... visitors to CakePHP.com. correction: visitors to book.cakephp.org --~--~-~--~~~---~--~~ 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

Re: Jquery Ajax Form with Model Validations, Nobody knows?

2009-02-15 Thread 浪漫様
Hey! looks promising! thanks for the links! i was making me crazy () hope it can help me do what i wanted. thank again Rohman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

Re: Auth-redirect() always redirects to /

2009-02-15 Thread Sergei
Of course. I always test every important feature in IE/FF/Opera. That was server's fault. On 15 фев, 13:29, mscdex msc...@gmail.com wrote: First of all, HTTP_REFERER is NOT set by my local Apache, or PHP or whatever. It absent. That's why it didn't work. Have you tried different browsers?

Re: example of paginate with search form(type=post)

2009-02-15 Thread Jimmy Bourassa
I didn't read all of the code, but basically I like Mile J's way better (and that's the way I have been doing it myself). The problem with saving stuff in the session is that a) You can't bookmark (but just like you said, oh well ;)) b) You can't have multiple search running in multiple

Re: output buffering

2009-02-15 Thread Martin Westin
I have also had varying success using output buffering so I would also sugger using a shell command that returns the output instead of printing it. Just to save you any further headache. But ob stuff should work and I too would be a little interested in knowing of any dos and don'ts within Cake's

Re: Scaffolding template for controllers ... ??

2009-02-15 Thread Tóth Imre
2009/2/15 p...@otaqui.com p...@otaqui.com I haven't done, or tested, this - but a quick peak inside the cake/ directory shows the file: cake/console/libs/tasks/controller.php the original files are at: cake\console\libs\templates\views\ We have customized it and works fine, we left the

Re: Looking for a good spam - protection Component

2009-02-15 Thread amarradi
Hello. this looks very interessing, i will try it :) Thans a lot, and if i have question, the i ask you :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Multi User Login

2009-02-15 Thread hashmich
Hi there, I'm looking for information to build the following: A possibility to allow more than one user to login my application within different browser-tabs, but sharing only one browser-window on one terminal. The current behavior I have is (I'm using the built in Auth-Comp of 1.2.1.8004),

Re: Pagination order by DESC on field

2009-02-15 Thread websurfshop
var $paginate = array( 'limit' = 25, 'order' = array( 'Hour.date' = 'desc' ) ); Above was the code that worked, note the order option, not sort --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: containable on deep model relationships

2009-02-15 Thread mike
oops, that was I typo, I have that already, with the end paren. I've also tried what Miles suggested, same thing any other ideas? On Feb 14, 5:25 am, WebbedIT p...@webbedit.co.uk wrote: I surprised that find call fetches any data as you have your contain criteria mixed in with your

Re: output buffering

2009-02-15 Thread brian
I might see if shell_exec() works, actually. On Sun, Feb 15, 2009 at 4:04 AM, mscdex msc...@gmail.com wrote: On Feb 15, 12:41 am, brian bally.z...@gmail.com wrote: ob_start(); system('/usr/bin/file -i -b ' . realpath($filepath)); //$type =

Re: Multi User Login

2009-02-15 Thread Henrik Bjørnskov
This sounds Craazzyyy dont do it On Feb 15, 4:10 pm, hashmich hendrik.schm...@web.de wrote: Hi there, I'm looking for information to build the following: A possibility to allow more than one user to login my application within different browser-tabs, but sharing only one browser-window on

Re: containable on deep model relationships

2009-02-15 Thread mscdex
On Feb 15, 12:00 pm, mike mwu...@gmail.com wrote: any other ideas? Did you try specifying a high enough 'recursive' level? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Multiple Fields for HABTM Relationship

2009-02-15 Thread ramonmaruko
The default input type for a HABTM relationship when I bake is the select one where we could select multiple options(CTRL + Click in Windows) in one field. (Am I correct? I can't look at the source code right now since I'm not at home.) But what I want is that the user would be presented with

Re: output buffering

2009-02-15 Thread brian
It works now using shell_exec(), so no buffering necessary. $type = shell_exec('/usr/bin/file -i -b ' . escapeshellarg(realpath($filepath))); On Sun, Feb 15, 2009 at 12:55 PM, brian bally.z...@gmail.com wrote: I might see if shell_exec() works, actually. On Sun, Feb 15, 2009 at 4:04 AM,

Re: output buffering

2009-02-15 Thread brian
On Sun, Feb 15, 2009 at 9:39 AM, Martin Westin martin.westin...@gmail.com wrote: I have also had varying success using output buffering so I would also sugger using a shell command that returns the output instead of printing it. Just to save you any further headache. But ob stuff should work

Re: Multiple Fields for HABTM Relationship

2009-02-15 Thread brian
The reason--I think--this is unlikely to work is that the HABTM select list uses some model's ID to associate with whatever model is the main focus of the form. You cannot have the same foreign key combinations in your join table but this is precisely what you're setting up for. What if a user

Login problem in 8004

2009-02-15 Thread Bjorn
Hi, I just updated to version 8004 from 7296 and now I have problem with logging in. In my beforeFilter in app_controller I have the following $this-Auth-loginAction = array('controller' = 'users', 'action' = 'login'); $this-Auth-logoutRedirect = array('controller' =

Re: Login problem in 8004

2009-02-15 Thread hashmich
Hi Bjorn, I experienced similar strange behavior, when I didn't log out before logging in again. If $this-Session-read('Auth.User.id') is still valid, the login-action seems not to be performed, because it's not necessary. Same happens then to the redirect. Be sure to destroy all sessions and

Re: Multi User Login

2009-02-15 Thread hashmich
Yyyess, you're right. But... I also have a less complicated reason to think about it: If my user has one (or many :o) brother (they haven't got each an own computer), he might open a new tab for him to do what ever he has to do in my app. After that he would be able to edit his big brother's

Re: Multi User Login

2009-02-15 Thread Miles J
Then the brothers should just logout and then log back in. --~--~-~--~~~---~--~~ 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,

Re: cookbook - 81,000 unique visitors this month

2009-02-15 Thread dr. Hannibal Lecter
Hah, maybe the group is so good that all of their questions have already been aswered? :) On Feb 15, 11:47 am, keymaster ad...@optionosophy.com wrote: Gwoo recently posted that from Jan. 12-Feb. 11/2009, there were 81,000 unique visitors to CakePHP.com. Firstly, that is absolutely

Problems with code using cake 1.2

2009-02-15 Thread simon...@gmail.com
Good Night, I'm trying to make this code work but they are 3 problems with it. Here are the 3 errors: Method HtmlHelper::FormHelper does not exist Method HtmlHelper::hiddenTag does not exist Method HtmlHelper::radio does not exist Heres's the file general.ctp that I'm using: I tryied to

Re: how to set css for internet explorer

2009-02-15 Thread Sidney
I recommend switching to a css framework if layout is your problem, such as bluepages or 960 grid. There are lots out there, and lot of reviews too to help you choose. Personally I chose bluepages, and it works well with prototype/scriptalicious. IMO the best way to switch is to load the

Re: Problem w/ Shells

2009-02-15 Thread Kyle Decot
Anyone have any ideas? --~--~-~--~~~---~--~~ 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

Re: Problem w/ Shells

2009-02-15 Thread Adam Royle
Have you checked your database connection? (Just a thought) Also, with shells you need to ensure you execute the shell from the app folder, or specify the path to your app in -app Cheers, Adam Kyle Decot wrote: I'm trying to create a shell but I'm running into some problems. If I add $uses

Re: Problems with code using cake 1.2

2009-02-15 Thread Adam Royle
Your syntax is not valid. Try reading up on the new form helper on the cookbook. http://book.cakephp.org/view/183/Creating-Forms Cheers Adam simon...@gmail.com wrote: Good Night, I'm trying to make this code work but they are 3 problems with it. Here are the 3 errors: Method

Re: Problem w/ Shells

2009-02-15 Thread Kyle Decot
I figured out what the problem was. I was incorrectly specifying the path to my app. --~--~-~--~~~---~--~~ 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

News from mambo

2009-02-15 Thread kiang
Just a notice that mambo had finally opened their SVN of mambo5, a refactoring version based on cakephp. Have a look at following message: http://mambo-developer.org/pipermail/developer_mambo-developer.org/2008-November/50.html ps. This is an old news, but new for me. :) --- kiang

cake:nocache and uncached views

2009-02-15 Thread brian
I have the following in my main layout: div id=content cake:nocache?php if ($session-check('Message.flash')) $session-flash(); ?/cake:nocache ?= $content_for_layout ? /div Because it's in the layout, views that I don't want cached won't have the cake tags stripped This is

Re: cake:nocache and uncached views

2009-02-15 Thread Alfredo Quiroga-Villamil
I wonder what will happen if you wrap the cake:nocache tags with a comment !-- -- Have you tried that? Regards, Alfredo On Sun, Feb 15, 2009 at 8:35 PM, brian bally.z...@gmail.com wrote: I have the following in my main layout: div id=content cake:nocache?php if

Re: cake:nocache and uncached views

2009-02-15 Thread brian
Then I would never see what's inside. On Sun, Feb 15, 2009 at 8:40 PM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I wonder what will happen if you wrap the cake:nocache tags with a comment !-- -- Have you tried that? Regards, Alfredo On Sun, Feb 15, 2009 at 8:35 PM, brian

Re: cake:nocache and uncached views

2009-02-15 Thread Alfredo Quiroga-Villamil
I meant something like this. div id=content !-- cake:nocache -- ?php if ($session-check('Message.flash')) $session-flash(); ? !-- /cake:nocache -- ?= $content_for_layout ? /div I am trying to imagine how both FF and cake would be parsing the content of the view to determine

Re: cake:nocache and uncached views

2009-02-15 Thread brian
Oh, of course! Sorry, a little slow this evening. That works like a charm. I think this tip should be included in the cookbook section about caching. But I'd actually just fixed it another way. It turned out that FF is ignoring the tags. The problem was that I have this bit of javascript that

Re: cake:nocache and uncached views

2009-02-15 Thread Alfredo Quiroga-Villamil
Awesome, I am glad you figured it out. Regards, Alfredo On Sun, Feb 15, 2009 at 9:38 PM, brian bally.z...@gmail.com wrote: Oh, of course! Sorry, a little slow this evening. That works like a charm. I think this tip should be included in the cookbook section about caching. But I'd

Creating HasAndBelongsToMany Checkboxes in the View

2009-02-15 Thread Aurelius
Hi! I've writen checkboxes for a HasAndBelongsToMany Association (without form helper) checkboxname = data[languages][languages][], the value are the language_ids so adding new checked languages works fine, but they doens't automaticly get deleted when they are unchecked, what do I have to

Variables in strings and I18n

2009-02-15 Thread Gonzalo Servat
Hi All, I normally use __('string here') in my views, however in one particular case it just made sense to use a foreach so I ended up with something like: __($type); Of course cake i18n extract doesn't like that, and I don't mind adding them manually as it's a special one-off case, but how? I

Re: Multiple Fields for HABTM Relationship

2009-02-15 Thread ramonmaruko
Whew! I got it working. I changed the name of the select tags from 'data[Member][Member]' to 'data[Member][Member][]' On Feb 16, 3:38 am, ramonmaruko ramonmar...@gmail.com wrote: The default input type for a HABTM relationship when I bake is the select one where we could select multiple

Re: Variables in strings and I18n

2009-02-15 Thread Miles J
I do __($var) all the time, just make sure the value of var exists in default.po. $var = 'name'; msgid name msgstr Name --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

ACL throwing self-joined model into infinite recursion

2009-02-15 Thread benjam
I have just com across a very strange issue with Cake. I have ACL installed in my app, and I havre a self-referencing table in that app as well (Parent-Child). In my app_controller, I pull data for the self-referencing model for every page load (it runs the menu), and it works fine for all the