Re: Undefined variable: ... CORE\app\views\layouts\default.ctp

2007-11-21 Thread Repsah
1) Constants should be defined in app/config/bootstrap.php, not in the
controller class

2) debug the view variables, if defined in app_controller that variable
should be available to views, also check that you don't unset it.

On Nov 22, 2007 8:48 AM, FoxMaSk <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I meet 2 issue :
>
> A) Constantes
> B) Array and undefined index
>
> A) Constantes
> When i define a constante in the __construct of the app_controller.php
> cakephp try to define it twice ...
>
> one for each controllor ? (app_controller.php and one for
> [myapp]_controller.php ) ?
>
> if so ; do i have to define my constantes in bootstrap.php instead ?
>
> B) Undefined index
>
> when i instanciate my $foxtal in __construct of the my
> app_controller.php
>
> class AppController extends Controller {
>
>public function __construct() {
>$foxtal = & new foxtal();
>$this->set('foxtal', $foxtal);
>}
> }
>
> and access to http://localhost/ and do  > in the  layout
> everything goes well
>
> BUT as soon as i do  http://localhost/article/index
>
> the same echo in my the view give a NOTICE undefined index ...
>
> Why ?
> Kind Regards
>
> On 21 nov, 13:54, FoxMaSk <[EMAIL PROTECTED]> wrote:
> > Thanks you very much !
> > i'm starting to see how to rethink a complet CMS which did not use
> > MVC ; its a real pain, but that's come slowly  ;)
> >
> > On 21 nov, 13:17, Repsah <[EMAIL PROTECTED]> wrote:
> >
> > > because you have to put that declaration in the constructor, not in an
> > > index() method that you probably won't call.
> >
> > > On Nov 21, 2007 1:09 PM, FoxMaSk <[EMAIL PROTECTED]> wrote:
> >
> > > > i tried :
> > > > class AppController extends Controller {
> >
> > > >public function index() {
> > > >$foxtal = & new foxtal();
> > > >$this->set('foxtal', $foxtal);
> > > >}
> > > > }
> >
> > > > and then in default.ctp i still have :
> > > > 
> > > >  > > > echo "foobar";
> > > > print_r($foxtal); ?>
> > > > 
> > > > which give the error Undefined variable: foxtal
> >
> > > > where is the mistake ?
> > > > Kind Regards.
> >
> > > > On 21 nov, 12:29, Repsah <[EMAIL PROTECTED]> wrote:
> > > > > Inizialize the class in your app_controller and export it to views
> using
> > > > the
> > > > > set() method.
> >
> > > > > On Nov 21, 2007 12:18 PM, FoxMaSk <[EMAIL PROTECTED]> wrote:
> >
> > > > > > Hi,
> > > > > > in the boostrap.php i call a vendor script that does a lot of
> stuff
> >
> > > > > > one of them is to get the punbb (a BB sofware) config
> >
> > > > > > class foxtal
> > > > > > {
> > > > > > public $pun_config;
> > > > > > {
> > > > > > public function __construct()
> > > > > ># Load cached config
> > > > > >if
> (file_exists(PUN_ROOT.'/cache/cache_config.php'))
> > > > > >require
> PUN_ROOT.'/cache/cache_config.php';
> >
> > > > > >if (!defined('PUN_CONFIG_LOADED') && $this-
> > > > > > >_generate_config_cache())
> > > > > >require
> PUN_ROOT.'/cache/cache_config.php';
> >
> > > > > >$this->pun_config =& $pun_config;
> > > > > > }
> > > > > > [...]
> > > > > > }
> >
> > > > > > so i do $foxtal = & new foxtal();
> >
> > > > > > now in the layout and everywhere in my application i'd like to
> be able
> > > > > > to do use $foxtal
> > > > > > for example : echo $foxtal['o_cur_version'] in the defailt.ctpfile
> >
> > > > > > Is it possible ?
> >
> > > > > > What do i need to do ?
> >
> > > > > > Kind Regards.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Undefined variable: ... CORE\app\views\layouts\default.ctp

2007-11-21 Thread Repsah
because you have to put that declaration in the constructor, not in an
index() method that you probably won't call.

On Nov 21, 2007 1:09 PM, FoxMaSk <[EMAIL PROTECTED]> wrote:

>
> i tried :
> class AppController extends Controller {
>
>public function index() {
>$foxtal = & new foxtal();
>$this->set('foxtal', $foxtal);
>}
> }
>
> and then in default.ctp i still have :
> 
>  echo "foobar";
> print_r($foxtal); ?>
> 
> which give the error Undefined variable: foxtal
>
> where is the mistake ?
> Kind Regards.
>
>
> On 21 nov, 12:29, Repsah <[EMAIL PROTECTED]> wrote:
> > Inizialize the class in your app_controller and export it to views using
> the
> > set() method.
> >
> > On Nov 21, 2007 12:18 PM, FoxMaSk <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi,
> > > in the boostrap.php i call a vendor script that does a lot of stuff
> >
> > > one of them is to get the punbb (a BB sofware) config
> >
> > > class foxtal
> > > {
> > > public $pun_config;
> > > {
> > > public function __construct()
> > ># Load cached config
> > >if (file_exists(PUN_ROOT.'/cache/cache_config.php'))
> > >require PUN_ROOT.'/cache/cache_config.php';
> >
> > >if (!defined('PUN_CONFIG_LOADED') && $this-
> > > >_generate_config_cache())
> > >require PUN_ROOT.'/cache/cache_config.php';
> >
> > >$this->pun_config =& $pun_config;
> > > }
> > > [...]
> > > }
> >
> > > so i do $foxtal = & new foxtal();
> >
> > > now in the layout and everywhere in my application i'd like to be able
> > > to do use $foxtal
> > > for example : echo $foxtal['o_cur_version'] in the defailt.ctp file
> >
> > > Is it possible ?
> >
> > > What do i need to do ?
> >
> > > Kind Regards.
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Undefined variable: ... CORE\app\views\layouts\default.ctp

2007-11-21 Thread Repsah
Inizialize the class in your app_controller and export it to views using the
set() method.

On Nov 21, 2007 12:18 PM, FoxMaSk <[EMAIL PROTECTED]> wrote:

>
> Hi,
> in the boostrap.php i call a vendor script that does a lot of stuff
>
> one of them is to get the punbb (a BB sofware) config
>
> class foxtal
> {
> public $pun_config;
> {
> public function __construct()
># Load cached config
>if (file_exists(PUN_ROOT.'/cache/cache_config.php'))
>require PUN_ROOT.'/cache/cache_config.php';
>
>if (!defined('PUN_CONFIG_LOADED') && $this-
> >_generate_config_cache())
>require PUN_ROOT.'/cache/cache_config.php';
>
>$this->pun_config =& $pun_config;
> }
> [...]
> }
>
> so i do $foxtal = & new foxtal();
>
> now in the layout and everywhere in my application i'd like to be able
> to do use $foxtal
> for example : echo $foxtal['o_cur_version'] in the defailt.ctp file
>
> Is it possible ?
>
> What do i need to do ?
>
> Kind Regards.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bugs on Site

2007-11-15 Thread Repsah
Yes, ok, all true, the framework works fine, butno need to flame who
points out some website failure, I would rather thank him and look at it.
As a matter of fact appearing nice does count toward new public, and if
developers don't have time for that particular functionality then maybe it's
better to simply take it offline, doesn't add much anyway.

On Nov 15, 2007 5:11 PM, Gonzalo Servat <[EMAIL PROTECTED]> wrote:

> On Nov 15, 2007 12:47 PM, [EMAIL PROTECTED] <
> [EMAIL PROTECTED]> wrote:
>
> >
> > I am trying to encourage colleagues to check out Cake and one was put
> > off by these two issues:
> >
> > http://cakephp.org/maps : no map and a Javascript error
> > http://cakephp.org/maps/markers : most of the recent entries are spam
> >
> > He's right, too. :(
> >
>
> Maybe the developers are too busy working on the product rather than
> worrying about petty things like showing the location of CakePHP'ers?
>
> Perhaps you and your colleagues should look at the product, instead of
> worrying about stuff like that. Remember, this is not a paid product
> (although they will gladly accept well deserved donations). I personally
> would make a claim like that against a company if I was considering
> purchasing their product, but this is an open source project and if you look
> at the product itself, it's better quality than a lot of other commercial
> products out there.
>
> Just my POV.
>
> - Gonzalo
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cake php causes bad programming

2007-10-26 Thread Repsah
disagree and I shouldn't add a word but

1) I just coded a web application for a small company, they didn't know
cake, I showed it to them, the coding took half time the time they expected
the project to be done and I worked on it part time instead than full time
like they wanted to. They were able to touch my application without having
to figure out everything behind it, they now use Cake on all their new
projects
2) Cake is the core of object oriented, not knowing how to handle it is
probably the biggest problem when first approaching cake.
3) With a proper framework behind you can benefit the use of MVC (and if you
don't know MVC you can learn why is it so good),  implementing  an MVC
application from scratch... sure... ask your friend how faster that is going
to be.

On 10/26/07, carSign <[EMAIL PROTECTED]> wrote:
>
>
> So today I was having a discussion with a coworker who is not a fan of
> using CAKEphp.
>
> He is in favor of building his sites from scratch and clams that he
> gets a faster development time (though I argue that he is writing puny
> sites)
>
> He also claimed that use of a framework like CAKE will result in
> programmers that don't know how to write object oriented code.  Anyone
> agree - disagree?
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: file_put_contents(/var/www/.../app/tmp/cache/...) [function.file-put-contents]: failed to open stream:

2007-10-05 Thread Repsah
Don't know if it helps, but from what I see there it's not 777, it's 775

On 10/5/07, Kaj Kandler <[EMAIL PROTECTED]> wrote:
>
>
> Gee! This is an ugly monster.
>
> I have done my homework (googled) and found the supposed solution is
> to give 777 permission to the app/tmp dir. Didn't help! What helped
> was to set the ownership of the directory also to the process that
> runs apache2 (www-data on Ubuntu).
>
> But now I copied another virtual machine (for user/customer testing)
> and all parameters are the same and I get this error again. What to
> do?
>
> pfennig:/var/www/.../app$ ls -l
> total 36
> drwxr-xr-x  4 user www-data 4096 2007-09-18 08:41 config
> drwxr-xr-x  4 user www-data 4096 2007-09-18 09:56 controllers
> -rw-r--r--  1 user www-data  953 2007-02-02 08:20 index.php
> drwxr-xr-x  3 user www-data 4096 2007-09-18 09:50 models
> drwxr-xr-x  3 user www-data 4096 2007-09-18 08:41 plugins
> drwxrwxr-x  2 www-data www-data 4096 2007-10-04 09:10 tmp
> drwxr-xr-x  3 user www-data 4096 2007-09-18 08:41 vendors
> drwxr-xr-x 16 user www-data 4096 2007-09-30 16:29 views
> drwxr-xr-x  7 user www-data 4096 2007-09-18 08:41 webroot
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Ajax form - multipart/form-data

2007-07-02 Thread Repsah
I have an Ajax form with a "file" input field but apparently, when I submit
the form, the file field is considered as a text-field.

the definition of the form should be correct (and the source code generated
is too)

$ajax->Form('Product', null, array('action' => 'add/'.$supplierId, 'enctype'
=> 'multipart/form-data', 'update' => 'products'));

I have looked in the group for some similar problem but I haven't found
anything related, can someone point me to the right direction?

Thank you

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best method for extending existing models/controllers?

2007-06-22 Thread Repsah
It looks to me that you are trying to build a controller...

That business should be in your ContentController which $uses  all the
models that you want,  although I'm not a great fun of "generic"
controllers.

On 6/22/07, Jonathan Langevin <[EMAIL PROTECTED]> wrote:
>
> I'm building a generic Content model, and I would like to build extensions
> such as Posts, News, etc, that would use Content for processing/storing the
> main posted content, while additional information for each item would be
> stored in it's own model ( i.e.- a forum post would include info like the
> user signature, if I wanted to keep a per-post signature record, etc)
>
> What would be the best way to implement this? using extend, or $actsAs, or
> $uses, etc?
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginator problem

2007-06-17 Thread Repsah
In addition to this, I found out a few more informations about it that might
be useful.

Both the Suppliers controller and the Products controller use the Paginator
helper, when dumping the data related to the paginator helper in the
element, the data dumped belongs to the Supplier's one.

On 6/18/07, Repsah <[EMAIL PROTECTED]> wrote:
>
> I have been following the instruction reported here:
> http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-
> requestaction
> Checked the google group for possible answers for my problems, one matched
> but the solution didn't work.
>
> Basically, I'm using an element in a view, this element makes use of the
> Paginator helper, but the output is not as desired:
>
> 1) a few notices like - Undefined index: count [*CORE\cake
> \libs\view\helpers\paginator.php*, line *385*]
> 2) prev and next url not working
> 3) sorting url pointing to: suppliers/view/page:1/sort:id/direction:asc
> instead than products/index/page:1/sort:id/direction:asc
>
> suppliers/view is the action I'm calling which includes an element based
> on products/index.
>
> Any idea about where I am going wrong?
>
> Details of the code can be found here:
> http://bin.cakephp.org/view/1461716578
>
> Thank you
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Paginator problem

2007-06-17 Thread Repsah
I have been following the instruction reported here:
http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction
Checked the google group for possible answers for my problems, one matched
but the solution didn't work.

Basically, I'm using an element in a view, this element makes use of the
Paginator helper, but the output is not as desired:

1) a few notices like - Undefined index: count [*
CORE\cake\libs\view\helpers\paginator.php*, line *385*]
2) prev and next url not working
3) sorting url pointing to: suppliers/view/page:1/sort:id/direction:asc
instead than products/index/page:1/sort:id/direction:asc

suppliers/view is the action I'm calling which includes an element based on
products/index.

Any idea about where I am going wrong?

Details of the code can be found here:
http://bin.cakephp.org/view/1461716578

Thank you

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: component or helper or both or... ?

2007-06-14 Thread Repsah
I solved it with an helper and some trick.

Every day, I run from crontab a script that produces a config file (included
in cake) fetching the possible banners from the DB and creating a php file
with the banner definitions...

Something like:

define('BANNER1', serialize(array('3.jpeg' => 'http://www.example.com', '
125x600.jpg' => '/banners')));
define('BANNER2', serialize(array('4.jpg' => 'http://www.example2.com', '
125x600.jpg' => '/banners')));

( in my case the array contains the banner image and its destination and the
default image + destination in case the banner doesn't have to be
displayed).

Then in my helper I just random pick the constant to show.

Might not be the best solution if you have highly dynamic banners, but in
that case you could lower the intervals on your crontab and you would have
just a small delay between the time the banner is uploaded and the time it
starts showing.
Works fine for me.

Hope it helps.

On 6/14/07, Katarzyna Gogolek <[EMAIL PROTECTED]> wrote:
>
> hi
>
> I want to write a snippet that would select a random banner from the
> database and display it on screen. banners belong to different size
> categories, and I would like the person who will be using this website to
> decide where the banners would appear easily. Therefore i would like them to
> be able to insert a code like:
>
>  in any part of a view file that they
> select, and then the script to randomly choose a banner of the defined size.
>
> and here's where the problem is.
> I don't quite understand what how should I define the script, as:
>
> a) if I choose it to be component - I can't execute it from the view level
> b) if I choose it to be helper and gather all banners from the database in
> e.g. app_controller, then it's not very efficient as with every load of
> any page, it will run a search through the mysql database, even if there's
> no need for the banner on that page. as well es I would have to execute the
> code this way  where $banners is an
> array of all my banners available.
>
> sorry if the question is daft, but I'm new to cakePHP and still have some
> problems with understanding how it works.
>
> many thanks
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: highly customized web sites

2007-06-12 Thread Repsah
requestAction sounds about right to me, otherwise you can try ajaxing
completely the left part and make ajax calls that update only that side (do
that, so you'll kill the bosses).

>From the talk I'd say Fastweb, by I won't leave Vodafone out, who are you
working for?

Another north italian like you ;)

On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> hi all, my first post here!
> im an italian guy, 25yo developing since '98, still underpaid and
> bored
> of my area very weird business solutions..
>
> i live in the north-italy, so if this post seems strange, just think
> about that here, the politicians, rule
> also the technical aspects of a web project (and they dont know
> anything about web..) and a poor
> web developer is obliged to tailor "Web 0.2" (yes, its correct 0.2)
> apps for them to survive...
> oh, sorry for my poor english, have i said i'm from italy? ;-)
>
> So, i've added another layer to the cake, writing a specific domain
> language for developing
> plugins really fast. (it inherits the features from my previous own
> framework/system..)
>
> And now im stuck into a problem:
> how to show 2 different behaviors (speaking in general) into the same
> page.
> for example in a Cms i want to display, on the left, a tree like
> structure with
> its commands and when clicking a leaf it must produce a list of
> contents
> with their actions ( add / modify / delete / publish ) on the right.
> i mean, like 2 controllers into the same view. this will be really
> flexible for me..
>
> i've already read about requestAction trick but it seems to me a
> little too much a "trick", actually.
> or thats the right way?
>
> and moreover, can all this be done within a plugin?
>
> ZendFramework 0.9 nor CodeIgnite can do it.. i trust in cake..
> my system now have plugins with autoinstaller (zip + sql) an auth
> module with granular acl
> multilanguage support and some plugins already made, i really hope a
> solution can be found :-)
>
> thank you all in advance
> michele
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Downloading CakePHP

2007-06-08 Thread Repsah
Does the word "optional" in "optional donation" sound like interesting to
you?

On 6/8/07, Simunza S. Muyangana <[EMAIL PROTECTED]> wrote:
>
>
> Thank you,
>
> Unfortunately I am in South Africa and my demit crd can not be used
> for internet transactions. I do not have a credit card either.
>
> Best regards,
>
> Simunza
>
> On 6/8/07, AD7six <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > On Jun 8, 1:50 pm, Simunza <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I am having a problem downloading he cakephp installation files. The
> > > Zips and Tars I am getting are all a 6.4kb and opening them gives me
> > > an error. Is there an alternative download site?
> >
> > By a strange coincidence, the download pre-confirmation pages are
> > 6.4kb
> >
> > http://cakeforge.org/frs/download.php/412/cake_1.1.15.5144.zip
> > http://cakeforge.org/frs/download.php/410/cake_1.1.15.5144.tar.bz2
> >
> > Read the page, make an optional donation and download the file, not
> > the pre-confirmation page ;).
> >
> > hth,
> >
> > AD
> >
> >
> > >
> >
>
>
> --
> Simunza S. Muyangana
>
> "Trust steadily in God, hope unswervingly, love extravagantly"
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session Problem for more than 1 variable

2007-06-08 Thread Repsah
No, nevermind, I read what you were doing wrong.

On 6/8/07, ErreUve <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm new with cakephp and I try to write all the User model in the
> session.
> Why is better serialize? Is there any problem with the data? The read
> and write works properly.
>
> Thanks
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session Problem for more than 1 variable

2007-06-08 Thread Repsah
ErreUve, you're writing an array in session, I think you need to serialize
it (check the php functions serialize and unserialize).

On 6/8/07, ErreUve <[EMAIL PROTECTED]> wrote:
>
>
> Hello all,
>
> I had the same problem. And I try wthis this: I put the 'User' in the
> session and I read this at index.thml.
> I've a WAMP and my login controller is like yours:
>
> function login()
> {
> // If a user has submitted form data:
> if (!empty($this->data))
> {
> $someone =$this->User->findByid($this->data['User']['id']);
> if(!empty($someone['User']['password']) &&$someone['User']
> ['password'] == $this->data['User']['password'])
> {
> $this->Session->write('User', $someone['User']);
> $this->redirect('users');
> }
> // Else, they supplied incorrect data:
> else
> {
> // Remember the $error var in the view? Let's set that to
> true:
> $this->set('error', true);
> $this->redirect('users');
> }
> }
> }
>
> But the difference is in the index.thml (In Spanish, sorry)
> Bienvenid@ 
>  if (!$log)
> {
> echo "Registrate si quieres guardar tu historial de
> ejercicios.
> Gratis y fácil.";
> }
> else
> {
>  //I read the 'User', who has 4 variables: id, intentos, aciertos
> and
> fallos.
> $user=$session->read('User');
> echo $user['id']." has hecho ".$user['intentos']."
> ejercicios con ".
> $user['aciertos']." aciertos y ".$user['fallos']." fallos";
>
> }
> ?>
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: このページを表示:「 Cake Apps/Sites In The Wild」

2007-06-05 Thread Repsah
Layout not working fine on FF

On 6/5/07, 浪漫様 <[EMAIL PROTECTED]> wrote:
>
>
> I added my new CakePHP website.
> http://www.rohmansama.com
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Edit

2007-06-01 Thread Repsah
which one is the edit function?

If it's the second one try with

$this->Client->id = $this->Session->read('client_id');

before saving.

On 6/1/07, cake_learner <[EMAIL PROTECTED]> wrote:
>
>
> When i try to update record, its inserting a new record.
>
> I have a registration page, containing 6 pages. I am inserting the
> data in same table.  After the first page is saved, the insertid is
> retrieved and stored in a session.
>
> Code:
> controller:
>
> function index()
> {
> if(!empty($this->data['Client'])){
> $this->Client->save($this->data);
>  $this->Session->write('client_id', $this->Client-
> >id);
>  $this->redirect('/clients/register2');
> }
>
> function register2()
> {
>if(!empty($this->data['Client']))
>   {
>   $client_id=$this->Session->read('client_id');
>   $this->cleanupFields();
>   $this->Client->save($this->data);
>   }
> }
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how can a controller access another model

2007-05-30 Thread Repsah
In your controller:

var $uses = array('Vote', 'Object');

Then access the object model like you do form your objects controller

On 5/30/07, Ita <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
> In my DB I have 3 tables
> objects, users & votes
>
> as you probably guessed a user can vote for an object.
> I've created models, controllers and views for all 3.
> I've also made a user login and saved him on the session object.
>
> Now I want him to be able to vote.
> so on the objects view I created a form that calls the votes
> controller
> votes/castVote
> and sent the object ID via hidden form field.
>
> before I add the data to the DB I want to check that the object exists
> in the objects table.
> the problem is that I'm in the votes controller - how do I gain access
> to the objects model from a controller that is not his?
> What am I missing?
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue

2007-05-23 Thread Repsah
Yes, I was thinking as well about using a component but I wanted to make
sure this was the wisest choice.
I'll need a whole lot of them ;)

On 5/23/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
>  What about components?
>
>
>
> http://manual.cakephp.org/chapter/components
>
>
>
> "Components are to controllers what helpers are to views. The main
> difference is that components encapsulate *business logic* whereas helpers
> encapsulate presentation logic"
>
> -MI
>
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog: http://www.MarianoIglesias.com.ar
>   ------
>
> *De:* cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] *En
> nombre de *Repsah
> *Enviado el:* Miércoles, 23 de Mayo de 2007 10:14 a.m.
> *Para:* cake-php@googlegroups.com
> *Asunto:* requestAction issue
>
>
>
> In a situation like mine, what would be the best way to access another
> controller's logic? Is there somewhere you can point me to?
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



requestAction issue

2007-05-23 Thread Repsah
I'm using cake 1.1.4, dealing with a requestAction problem.

In one of my controllers I need to apply some logic which clearly belongs to
another controller, to do this, I used a requestAction.
The abuse of this feature quickly brings a significant drop in performances.

In my opinoin, moving the login from controller to model to then be able to
load the model in the other controller and perform the checks is wrong,
models are not the place for such things, correct me if I am wrong.
The duplication of such logic in every controller where this is needed
doesn't sound right to me either.

In a situation like mine, what would be the best way to access another
controller's logic? Is there somewhere you can point me to?

Thank you

Repsah

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Redirecting the bot

2007-05-01 Thread Repsah
What would be the best solution to catch a particular useragent and show a
custom page only for that useragent whichever action or controller is
invoked?

I tried with routes but I failed miserably, can someone suggest me a valid
solution for this?

Thank you

Repsah

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Question on routes

2007-04-30 Thread Repsah
Cake 1.1.4
This is my custom route:

$Route->connect('/members/*', array('controller' => 'pages', 'action' =>
'display'));

I expect it to set my controller to pages and my action to display whichever
action I call.

But...

http://mysite.com/members/index

returns this error

"
Missing view

You are seeing this error because the view for pagesController::index()
could not be found.

If you want to customize this error message, create
app\views/errors/missing_view.thtml.

Fatal: Confirm you have created the file :
E:\Sviluppo\project\app\views\pages\index.thtml "

Where am I going wrong? I think I'm missing something in the logic of routes
but I don't know where my fault is.
Also... how would I create a jolly route that redirects all actions of all
controllers on a single page?

Thank you

repsah

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Game in Cake PHP

2007-04-27 Thread Repsah
And fixed the bug ;)

On 4/27/07, Repsah <[EMAIL PROTECTED]> wrote:
>
> yep, deleted them
>
> On 4/27/07, AD7six <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > On 27 abr, 12:40, Repsah <[EMAIL PROTECTED]> wrote:
> > > I'll be glad to see you there to crush your tiny armies...
> > >
> > > Btw, I'm almost done with development, I miss a few pics, some
> > balancing and
> > > then I'll make a first test with 2-3000 players, we'll see how cake
> > reacts
> > > ;)
> > >
> > > On 4/27/07, gwoo <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > > Hey repsah,
> > >
> > > > good to see you still workin on the game. I will be building a
> > monster
> > > > empire to dominate the world. Watch out.
> >
> > Did you delete all the old players? I had a great army :D. I can guess
> > the answer, although only because the lost password link breaks ;P.
> >
> > Cheers,
> >
> > AD
> >
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Game in Cake PHP

2007-04-27 Thread Repsah
yep, deleted them

On 4/27/07, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
>
> On 27 abr, 12:40, Repsah <[EMAIL PROTECTED]> wrote:
> > I'll be glad to see you there to crush your tiny armies...
> >
> > Btw, I'm almost done with development, I miss a few pics, some balancing
> and
> > then I'll make a first test with 2-3000 players, we'll see how cake
> reacts
> > ;)
> >
> > On 4/27/07, gwoo <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hey repsah,
> >
> > > good to see you still workin on the game. I will be building a monster
> > > empire to dominate the world. Watch out.
>
> Did you delete all the old players? I had a great army :D. I can guess
> the answer, although only because the lost password link breaks ;P.
>
> Cheers,
>
> AD
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Game in Cake PHP

2007-04-27 Thread Repsah
I'll be glad to see you there to crush your tiny armies...

Btw, I'm almost done with development, I miss a few pics, some balancing and
then I'll make a first test with 2-3000 players, we'll see how cake reacts
;)

On 4/27/07, gwoo <[EMAIL PROTECTED]> wrote:
>
>
> Hey repsah,
>
> good to see you still workin on the game. I will be building a monster
> empire to dominate the world. Watch out.
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Game in Cake PHP

2007-04-26 Thread repsah

Some of the old guys might remember me, and some of them might
remember the game too, anyway, lately I've been working on it and
pushing it further, right now I am in open beta.

The reason I post here is that all bakers are welcome there, I am
testing, so a few more heads in there can only be useful to me, plus,
I promise a lot of fun, the game is nice and challenging.

So, for those of you wishing to have some fun and at the same help out
with some bug report... here's the place:

www.colonists-empire.com

You can use the forum or the wiki to post your contributions.

Thank you all.

Repsah


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cake from command line

2006-07-25 Thread Repsah
A few time ago I was faced with the need to use cake controllers actions from command line.. a.k.a. calling a controller action from a script outside cake.Very useful (to me) if I need to run jobs at cron which interact with my application without having to write a complete separate application which handles the same structures.
I failed at that time.Today I decided to fill that emptiness and succeded, so I decided to share it here, someone might have my same need and find it useful.Basically, all you have to do is a file with a list of includes.
ob_start();/** *  Get Cake's root directory */    define('APP_DIR', 'app');    define('DS', DIRECTORY_SEPARATOR);    define('ROOT', 'my_cake_dir');/** * This only needs to be changed if the cake installed libs are located
 * outside of the distributed directory structure. */    if (!defined('CAKE_CORE_INCLUDE_PATH')) {        //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
        define('CAKE_CORE_INCLUDE_PATH', ROOT);    }    if (function_exists('ini_set')) {        ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS);
        define('APP_PATH', null);        define('CORE_PATH', null);    } else {        define('APP_PATH', ROOT . DS . APP_DIR . DS);        define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);    }
    require CORE_PATH . 'cake' . DS . 'basics.php';    require APP_PATH . 'config' . DS . 'core.php';    require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';    $bootstrap=true;    $uri  =setUri();
require(ROOT.DS.'cake' . DS .'libs' . DS .'object.php');require(ROOT.DS.'cake' . DS .'libs' . DS .'controller' . DS .'controller.php');require(ROOT.DS.'cake' . DS .'app_controller.php');require(ROOT.DS.'cake
' . DS .'libs' . DS .'model' . DS .'model.php');require(ROOT.DS.'cake' . DS .'libs' . DS .'model' . DS .'connection_manager.php');require(ROOT.DS.'cake' . DS .'app_model.php');require(ROOT.DS.'cake' . DS .'libs' . DS .'
inflector.php');require(ROOT.DS.'cake' . DS .'libs' . DS .'configure.php');require(ROOT.DS.'cake' . DS .'libs' . DS .'session.php');require(ROOT.DS.'cake' . DS .'dispatcher.php');require(ROOT.DS.'cake' . DS .'libs' . DS .'
security.php');require(ROOT.DS.'cake' . DS .'libs' . DS .'neat_array.php');require(ROOT.DS.'app' . DS .'controllers' . DS .'my_controller.php');require(ROOT.DS.'app' . DS .'config' . DS .'database.php');require(
ROOT.DS.'app' . DS .'models' . DS .'my_model.php');$classe = new MyController();$array = $classe->_batch();debug($array);ob_end_flush();?>With this, on php5, I successfully called a controlller action and made it fetch the lines from a table.
Your controller action should have a few differences from your usual actions.First of all, it should be underscored (for safety purposes).Second, you must load your model.function _batch(){
 $this->MyModel = &new MyModel(); return $this->MyModel->findall();}As you can see I haven't tested anything complicate, so it might require some changes if components or helpers are used, also, so far it's tested just on php5.
Hope it helps.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: scaffold troubles with non conventional name

2006-07-06 Thread Repsah
Hmm, speaking language... why use a plural for a model name when it should be singular? Isn't soggettus the singular for soggetti? So I would expect the model class to be Soggettus and the controller to be SoggettiContoller. I know, not a solution for your question, just... uno che ha fatto il liceo scientifico e spera di ricordarsi qualcosa di latino.
On 7/6/06, bracchetto <[EMAIL PROTECTED]> wrote:
this is the error i get:Notice: Undefined property: Soggettus in[...]cake/libs/controller/scaffold.php on line 399well, i think that the problem could be that i use italian classname,or because i use postgres.
Where can i specify that the model name is not Soggettus but Soggetti?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


db errors

2006-07-05 Thread Repsah
I used (in very old versions of cake, well, maybe not so old... RC6) to be able to access DB errors from the model in this way:$this->db->errorI'm working again on an old project and I found out I'm not able to access these errors anymore, can someone point me to the right direction?
Thanks

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: hasMany + save()

2006-06-27 Thread Repsah
>From wiki, page on understanding associations:...[Cake will save the correct values for the join table if your form
passes the proper field value. Assume, Post hasAndBelongsToMany Tag.
You have a join table: posts_tags, with post_id and tag_id as the
columns. If you are saving from PostsController::add(), the proper form
field name should be data['Tag']['Tag'][] (to clarify:
data['AssociatedModelName']['AssociatedModelName'][]) ] ...Is this still valid?On 6/26/06, bkuhns || (crash) <
[EMAIL PROTECTED]> wrote:I'm no authority on this, but I do recall seeing this question in the
IRC chatroom and I believe qwoo said you have to do the multiple save()approach.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


hasMany + save()

2006-06-26 Thread Repsah
I'm sure I've seen it asked before but I can't find the correct thread... anywayAssuming I have a model Userwhich hasMany AttributeIs there a way to call a single $this->User->save($this->data) to save values both in the users table and in the attributes table.
I give it as a fact I'm building a correct $this->data array to make this possible;$this->data['User']['id']  [other_fields]  .  .
$this->data['Attribute']['id']$this->data['Attribute']['name']$this->data['Attribute']['value']etc. etc.Or the only solution to this is a multiple use of save() for the User model and each of the User attributes?
Thanksrepsah

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: findAll and sorting

2006-06-22 Thread Repsah
Did you try$sortby = "Model.field1 desc, Model.field2 desc";And set debug up to 2 in core.php to check the query it's performing.On 6/21/06, 
Siegfried Hirsch <[EMAIL PROTECTED]> wrote:
Hello there,I just came across a problem with sorting in the findAll function.I just coded:$sortby = "field1 desc,field2 desc";$this->set( 'data', $this->Top->findAll("activ = 1", null, $sortby));
As you can see, I want to sort on both files descending. But thisdoes not work, instead it produces the list ascending.While I have a workaround by using query, I wanted to know ifsome else had this problem before
Siegfried--Siegfried Hirschhttp://www.rss-blogger.de / http://seconds11.com
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Spam & Security component

2006-06-21 Thread Repsah
Smrt ;)On 6/21/06, RosSoft <[EMAIL PROTECTED]> wrote:
There isn't any way for be sure that there's a robot posting comments.However, you can check the referer() for skip bad-implemented spamrobots. A good implemented spam robot will send the referer that youexpect and you will not see any difference.
There's other ways for skipping spam: Create a input field and hide itwith CSS. Put a hidden label with it like "Do not fill this" (onlyvisible in old browsers without CSS)The spam robot usually fills all the fields, then you can delete the
comments that have the field "do_not_fill_this" filled.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Can't caching view!

2006-06-20 Thread Repsah
Non lo siamo tutti?On 6/20/06, stefano <[EMAIL PROTECTED]> wrote:
Lorenzo,sì! anche tu?

--~--~-~--~~~---~--~~
Hai ricevuto questo messaggio in quanto sei iscritto al gruppo Gruppo "Cake PHP" di Google Gruppi.   Per mandare un messaggio a questo gruppo, invia una mail a cake-php@googlegroups.com   Per annullare l'iscrizione a questo gruppo, invia un'email a [EMAIL PROTECTED]   Per maggiori opzioni, visita questo gruppo all'indirizzo http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: TestSuite

2006-06-20 Thread Repsah
Nevermind... I found out... thanks for help anywayOn 6/20/06, Repsah <[EMAIL PROTECTED]> wrote:
I've done so, installed and working (except for img/css and js files which are not loaded in the default page, I guess because the path is incorrect, I've opened a ticket on the project).Now... where do I place my tests? In my app/controllers dir or under the tests/app/controllers dir? Or somewhere else?
ThanksOn 6/20/06, Daniel Hofstetter <
[EMAIL PROTECTED]> wrote:

The files of the test suite should be within your app directory (thesecond option you described).The tests are placed in app/tests/app/...There are two possible ways to run the tests:1. by calling the tests controller like 
yourproject.localhost/tests/2. or by using the test folder in webroot:yourproject.localhost/test/index.php--Daniel Hofstetter
http://cakebaker.wordpress.com



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: TestSuite

2006-06-20 Thread Repsah
I've done so, installed and working (except for img/css and js files which are not loaded in the default page, I guess because the path is incorrect, I've opened a ticket on the project).Now... where do I place my tests? In my app/controllers dir or under the tests/app/controllers dir? Or somewhere else?
ThanksOn 6/20/06, Daniel Hofstetter <[EMAIL PROTECTED]> wrote:
The files of the test suite should be within your app directory (thesecond option you described).The tests are placed in app/tests/app/...There are two possible ways to run the tests:1. by calling the tests controller like 
yourproject.localhost/tests/2. or by using the test folder in webroot:yourproject.localhost/test/index.php--Daniel Hofstetterhttp://cakebaker.wordpress.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Understanding

2006-06-20 Thread Repsah
You can access the POST data from your controller at$this->dataAs you can see from your pastes the $this->data array contains the values you posted from your form. I assume you have a Post model.
So, if you wanted to access your data, all you need to do is access the $this->data array$this->data['Post']['id'] will hold the id of your post.If the submission already contains the values you want to use to update your DB row all you need to do is a call to
$this->Post->save($this->data);On 6/20/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:Thanks to everyone in advance. I am trying to load a specific field
from a table based upon a specific id # (primary key) into a text box.Upon submissions i want to update that specific field based upon thatspecific id#. What i am not understanding is how to get the data after
the post. It seems like after post it creates a new array called[form]?? How do i access this and line up the data to save it?Thanks againBEFORE FORM POST([controller] => post
[action] => edit[pass] => Array([0] => 1)[form] => Array()[url] => Array([url] => /post/edit/1
)[bare] => 0[webservices] =>[data] => Array([Post] => Array([id] => 1[title] => 
[body] => [created] => 2006-06-15 21:54:22[modified] => 2006-06-19 23:56:42)))
After FORM POST([controller] => post[action] => edit[form] => Array([data] => Array([Post] => Array
([id] => 1[title] => [body] => qqq)
))[data] => Array([Post] => Array([id] => 1[title] => 
[body] => qqq))[url] => Array([url] => /post/edit)[bare] => 0[webservices] =>
)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: TestSuite

2006-06-20 Thread Repsah
Should it be treated like a plugin, so the testSuite directory on same level as /app/app/testSuite   /app  /controllers  /tests  .  .Or should it be placed inside cake dirs, so, placing the controller in the /app/controllers dir, the test dir under /app/tests etc. etc.?
After the installation, I read somewhere the test files should be something like mytest.test.php, but I could not find where to place them and how to run them.I'm sorry to ask for basic help but I found very few informations about it and mostly not complete. I swear once I make it work I'll give my contribution with a dummy proof tutorial (
a.k.a. Repsah proof).Thanks for your help.On 6/20/06, Daniel Hofstetter <[EMAIL PROTECTED]> wrote:
What is the problem?Just download the test suite from
http://cakeforge.org/projects/testsuite/ and copy the files in thecorrect directories. That's it.Please let us know if you think there is something we could improve :)--Daniel Hofstetter
http://cakebaker.wordpress.com
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


TestSuite

2006-06-19 Thread Repsah
Can someone point me to any document clear enough to make the testSuite work?
I found the pages on the wiki (RIP) but I guess I'm not smart enough to
make it work, I found posts in cakebaker's blog, one in rossoft and a
few messages in here but... I guess I'm in my dumb period.ThanksRepsah

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---