Re: [with CakePHP *2*]... How Can I Controller::add() content into Cake via Curl on Command Line?

2011-11-09 Thread Matthew Kaufman
Hello everyone, This is what works: root@mkfmnweb:/home/matt# curl -XPOST -d '2002CAKEPHP' http://192.168.1.100/cakephp/central_index_keys/add.xml --header 'content-type:text/xml' The changes I notice from the 1.3 branches of Cake's RequestHandler / REST setups are: 1) the URL must point t

[with CakePHP *2*]... How Can I Controller::add() content into Cake via Curl on Command Line?

2011-11-09 Thread Matthew Kaufman
Hello, Before with Cake 1.3 it was very easy to add content into Cake via command line using curl and HTTP POST: I'd setup as such: */app/Config/routes.php* Router::mapResources('central_index_keys'); Router::parseExtensions('xml'); And obviously have* my controller: *public $components =

Re: bigint datatype in Fixtures

2011-11-09 Thread 100rk
I had similar problem with 'double' type and CakeSchema (therefore with CDC plugin "migrations" as well) - DboSource maps it as "float". Straightforward solution (not DBO-independent, though) was raw sql "ALTER TABLE ... MODIFY COLUMN ..." statement in after() callback. Take it just as possible dir

Re: Are automagic models for HABTM not supported anymore in 2.0?

2011-11-09 Thread euromark
yes, it sure does. only that in your case its part of the form (view) and in my case part of the query building (model). but sth with App::load anyway On 10 Nov., 01:04, rchavik wrote: > Euromark, > > This sounds similar > tohttp://cakephp.lighthouseapp.com/projects/42648/tickets/2223-custom-m.

Re: Are automagic models for HABTM not supported anymore in 2.0?

2011-11-09 Thread rchavik
Euromark, This sounds similar to http://cakephp.lighthouseapp.com/projects/42648/tickets/2223-custom-modelclassname-in-inputs-leads-to-appload-trying-to-load-the-class Been trying to resolve this too. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check o

bigint datatype in Fixtures

2011-11-09 Thread Shukuboy
Hi, I've been spending a few hours trying to work out why my unit-tests don't work, while if I run the same code on the website with the same data works fine. Well, here's the story: - I've got 2 columns of type 'bigint' in one of my database tables, on which I do comparison based lookups. Ther

Re: Cannot log in using CakePHP 2.0

2011-11-09 Thread Sandy
Not sure if this will work, but remember to add this to your AppController file, since your password field is not "password" but "key". var $components = array('Session', 'Auth'=> array( 'authenticate' => array( 'Form' => array(

Re: Multilingual Projects and Jquery

2011-11-09 Thread Miles J
No there isn't really. This is also a problem for any language, and unless you have back-end parsed JS files it's not possible. The only solution is so place a JS literal object in your page source containing the message strings: var Msg = { username: '',

Re: Trying to re-use a method in the controller by different inputs/buttons in the view

2011-11-09 Thread Yves S. Garret
Thanks, Jeremy, I got it working just the way that I wanted with your help. On Tue, Nov 8, 2011 at 1:11 PM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > What we are trying to show you is that you don't need to go to the > overhead of using loads of forms; simple links will

Console/cake schema not working a 100%?

2011-11-09 Thread flosky
Hi guys, I'm on cake 2.0.2 and using the Console to backup my schema. But I thing its not working a 100%. 1. When I try to use 'Console/cake schema create' I get an error message saying: 'schema.php could not be loaded' 2. The generated files (by 'generate' and 'dump') do not contain the table 'c

Are automagic models for HABTM not supported anymore in 2.0?

2011-11-09 Thread euromark
After upgrading a larger project to 2.0 i got hundreds of errors that need manual "corrections". But some bug me more than others. If you have User and Hotel models and you got HABTM between them you sometimes want to use the join table to in order to get better queries (left join etc). In 1.3 this

Re: extracting Model and Field from a Set compatible path

2011-11-09 Thread AD7six
On Nov 9, 1:43 pm, Ernesto wrote: > hi jeremy. thanks for the response. > > Set::extract extracts data from an arary. > > i wan to extract Model and field from the Path itself you mean extract a string and another string from a string? sounds like you need: preg_match AD -- Our newest site f

Themed assets not loading on production server

2011-11-09 Thread Corie
I'm using the Theme viewClass and loading assets through a Themed folder and everything is working well on my local development server, but when taking it online nothing is being loaded from the Themed folder and it's getting a 404 when trying the default locations. Here's the folder structure: V

Re: Problem Auth Component | CakePHP 2.0.2

2011-11-09 Thread Serkan Sipahi
hi all, its work; i changed the form fields to username and password. could it be possible that may not use usr and pwd?     public $components = array(     'Auth'=> array(     'authenticate' => array(     'Form' => array(     'fields'

Re: extracting Model and Field from a Set compatible path

2011-11-09 Thread Ernesto
hi jeremy. thanks for the response. Set::extract extracts data from an arary. i wan to extract Model and field from the Path itself -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help othe

Re: extracting Model and Field from a Set compatible path

2011-11-09 Thread Jeremy Burns | Class Outfit
Have you looked at Set::extract? Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Nov 2011, at 10:59, Ernesto wrote: > Hi all > > i have an array containing a series of set compatible paths > > array( > [0] => "Article.code", > [1] => "{n}.Piece.code", > [2] => "Note.{

extracting Model and Field from a Set compatible path

2011-11-09 Thread Ernesto
Hi all i have an array containing a series of set compatible paths array( [0] => "Article.code", [1] => "{n}.Piece.code", [2] => "Note.{n}.text" ) is there any built-in function that extracts the Model and the field those paths are referencing? -- Our newest site for the commun

Re: Need a little help with HABTM joins

2011-11-09 Thread Ernesto
nothing happens. users cannot de-associate Articles and Pieces -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this gr

Re: Help: how to use cakephp for subdomains

2011-11-09 Thread AD7six
On Nov 9, 11:48 am, AD7six wrote: > On Nov 9, 9:18 am, WebbedIT wrote: > > > At the risk of Andy slapping me down, this does sound like a rewrite > > issue that is not allowing /app/webroot to function normally and a > > request for /css/style.css is looking for a css controller. > > New inform

Re: Help: how to use cakephp for subdomains

2011-11-09 Thread AD7six
On Nov 9, 9:18 am, WebbedIT wrote: > At the risk of Andy slapping me down, this does sound like a rewrite > issue that is not allowing /app/webroot to function normally and a > request for /css/style.css is looking for a css controller. New information - new answer :) AD -- Our newest site f

Re: Get controllers name and action to javascript without passing as variable in cake PHP

2011-11-09 Thread AD7six
On Nov 9, 10:17 am, WebbedIT wrote: > $this->params is available in the view too, simply echo the values > into your javascript within the view: > var controller = params['controller']; ?>; > var action = params['action']; ?>; personally I use allows css or js to know where you are. AD --

Re: Trying to get REST working Properly in Cake 2.0

2011-11-09 Thread Andras Kende
Matt, xml->serialize looks cakephp 1.3, http://book.cakephp.org/2.0/en/core-utility-libraries/xml.html?highlight=rss You could also just do a foreach on the array to manually output at the view… Andras Kende On Nov 8, 2011, at 11:27 PM, Matthew Kaufman wrote: > Hello, > > Setting up REST i

Re: Cannot login in cake 2.0 app

2011-11-09 Thread Reggie
Ernesto, What was your typo? I am having trouble with logging in as well. On Oct 12, 5:28 am, Ernesto wrote: > nvm. > found the typo, now it's all working ok -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http:/

Re: cant use css() method for my subdomain

2011-11-09 Thread WebbedIT
ROFL On Nov 8, 9:45 am, AD7six wrote: > On Nov 8, 6:55 am, Mamdoohi wrote: > > > the css() method from html class work not correctly and when I use this > > method for my subdomain it cant load css file correctly > > Have a talk to this > guy:http://groups.google.com/group/cake-php/browse_threa

Re: Get controllers name and action to javascript without passing as variable in cake PHP

2011-11-09 Thread WebbedIT
$this->params is available in the view too, simply echo the values into your javascript within the view: var controller = params['controller']; ?>; var action = params['action']; ?>; HTH, Paul. On Nov 8, 8:51 am, jusnit wrote: > Is it possible to get controllers name and action to javascript > w

Re: Need a little help with HABTM joins

2011-11-09 Thread WebbedIT
What happens if when the edit form first shows you unassociate all pieces, what happens the next time you load the edit form? I suspect the way you've done it you will get no pieces again. As mentioned earlier you should be using: $this->Article->Piece->find('all'); or $this->Article->Piece- >fin

Re: Need a little help with HABTM joins

2011-11-09 Thread WebbedIT
So by default you are associating all Articles to Pieces? I really suspect you're going about things in the wrong way here. Paul. On Nov 8, 10:04 am, Ernesto wrote: > Thanks for the effort, i solved this way: > > - in both articles/add and pieces/add users can enter just code and > description,

Re: Ho to register a newsletter link and redirect to a popup?

2011-11-09 Thread WebbedIT
redirect to: array('controller'=>'pages', 'action'=>'home', 1) or array('controller'=>'pages', 'action'=>'home', 'popupQuestionnaire'=>1) Or save a value to the session. Using any of the above will allow you to check for a value within your home page view and run some javascript. HTH, Paul. On

Re: how can i check the session´s Auth for show html (login & logout)

2011-11-09 Thread WebbedIT
@Ogalov: The correct way to check if a user is logged in within the view is: $session->check('Auth.User.id'); The point is you are not wanting to read a value as you are not then using the value, you simply want to check if it exists and perform some other logic. Jeremy gave you this answer and

Re: mod_rewrite in cake

2011-11-09 Thread Sathia S
> > > > >Options FollowSymLinks >AllowOverride ALL > > > Options FollowSymLinks AllowOverride All You have used "ALL" instead of "All" Regards sathia http://lquery.com/ -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new C

Multilingual Projects and Jquery

2011-11-09 Thread heohni
Hi, I have a multilingual project and I am using the P28n and methods. But I am also doing a lot of Ajax stuff and from time to time I have the need to output text via my javascript files. Is there anyhow a way / a trick ( how to use the cakephp translation () in my js files? Thanks! I look

Re: cant apply cakes contain function to this array structure

2011-11-09 Thread WebbedIT
I would substitute 'pioneer' for 'non-conventional' :) By falling back on the fields array you are only putting off the situation where you need contain fields from models more than 1 level deep. It's great that you can move forward, but I would still recommend getting to grips with contain .. it

Re: Help: how to use cakephp for subdomains

2011-11-09 Thread WebbedIT
At the risk of Andy slapping me down, this does sound like a rewrite issue that is not allowing /app/webroot to function normally and a request for /css/style.css is looking for a css controller. Do your CSS files load OK in the main domain? You mention sub-domains are not working, but is your ma

Re: CSS not displaying Form elements correctly

2011-11-09 Thread WebbedIT
Yves, You're obviously using code when you have no idea what it does ... this is all basic CSS stuff (which is nothing to do with CakePHP by the way) I suggest you get a book or read some online tutorials about CSS to get a good grip on that rather than asking these questions in this group. * {..

Re: i didnt understund ajax in cakephp

2011-11-09 Thread WebbedIT
Duplicate thread: http://groups.google.com/group/cake-php/browse_thread/thread/cd89348af99eab75 http://groups.google.com/group/cake-php/browse_thread/thread/d0ad832f413261e4 On Nov 9, 2:30 am, thom wrote: > On Wed, Nov 9, 2011 at 8:54 AM, kika wrote: > > Hello everyone! > > > at the beginning I

Re: i didnt understund ajax and jquery

2011-11-09 Thread WebbedIT
Pedro, I did give you an answer to your last post showing you that there are existing tutorials showing how to do this in CakePHP found within this group or via Google. Because this topic has been covered many times before and there are already guides out there I doubt anyone is going to write yo