How to load SQL views in Fixtures for unit tests in Cakephp 3?

2015-10-02 Thread Gabriel Lau
My application has some sql views to perform complex queries in the database and be better able to filter the results based on these values. One problem I encountered when running the unit tests is that Cake do not import sql views, just tables, breaking the application tests. *- How can I

Controller Integration Testing not catching exceptions in Cake 3.x

2015-09-01 Thread Gabriel Lau
Hi, I'm having problems with integration tests in my json API in moment of catch an exception thrown by the application. In my *UsersController*: request->allowMethod('get'); // ... throw new \Cake\Core\Exception\Exception('catch me'); // ... }

CakePHP 3 - foreign_key - bin/cake bake all --plugin

2015-03-29 Thread gabriel
Hi, I have these two tables: *- Articles* -- id -- title -- body -- type_id (foreign_key) *- Types* -- id -- title If i generate che scaffold code for the base application all is perfect, controller, model and view. bin/cake bake all Typesbin/cake bake all Articles The *foreign key* is

CakePHP 3.X - Creating Reusable Validators

2015-03-22 Thread gabriel
Hi everyone, I'm studying *CakePHP 3.x.* I have a form with three fields to change the password: - *OLD Password* - *NEW Password* - *Confirmation NEW Password* I would like to implement a validation for the *Old Password.* To do this *I think it is necessary to create a custom

Re: Online baking tool for CakePHP

2015-03-19 Thread gabriel
Brilliant !! excellent work. Makes my life so much easier as I am only developing online and not locally, and don't use the command line... Thanks On Wednesday, 10 April 2013 14:19:04 UTC+1, Christian Cadéré wrote: Petit Four is an online application dedicated to speed up the design and

Re: Access $this-Session from a model

2014-05-28 Thread Henry Gabriel González Montejo
Hi i have the same problem with the plugin https://github.com/robwilkerson/CakePHP-Audit-Log-Plugin, i put the method in my Model (AppModel) so it can be used in others models, my solution was: function currentUser() { //pr($this-Session-read('Auth.User')); //pr($this-Auth-user());

Exception output issue

2014-03-08 Thread Gabriel Lau
Hello people, I realized recently that when an exception is triggered through a view (calling a nonexistent helper, for example), the error message along with the error layout (if customized) are displayed after the contents of the view in that the error is being generated (before the

Displaying error messages without the content of the current view.

2013-10-21 Thread Gabriel Lau
Hi folks, how can i display error messages without the content of the current view? For example: If a vendor file throws a PDOException, the error message is displayed inside my current view. First, the content of my current view is displayed (without any layout, just the content), then the

Models indirect association, how to retrieve data?

2013-06-07 Thread Lucas Gabriel
How's it going? I have a problem with cakePHP, I'm new to it and struggling with it. Let me pour onto you guys my situation: I'm developing a system for a University here in Brazil. In this sytem I've got the following models: - Country; - State; - City; - University; - Unit; - Class; Ok.

Re: Cake is NOT able to connect to the database. Database connection Mysql is missing, or could not be created.

2013-05-19 Thread Gabriel Saulescu
I fixed it. Chenan Patel helped me. Thank you, Chenan :) On Thursday, May 16, 2013 9:58:37 PM UTC+3, Gabriel Saulescu wrote: I am trying to install cakephp on my laptop. I received this error. My SO is a WindowsVista in 32 b. I changed this: extension=php_mssql.dll. I need your help

Re: Cake is NOT able to connect to the database. Database connection Mysql is missing, or could not be created.

2013-05-17 Thread Gabriel Saulescu
On Thursday, May 16, 2013 9:58:37 PM UTC+3, Gabriel Saulescu wrote: I am trying to install cakephp on my laptop. I received this error. My SO is a WindowsVista in 32 b. I changed this: extension=php_mssql.dll. I need your help, please. What I have to do? Thank you in advance. Gabriel

Re: Cake is NOT able to connect to the database. Database connection Mysql is missing, or could not be created.

2013-05-17 Thread Gabriel Saulescu
DATABASE_CONFIG { public $default = array( 'datasource' = 'Database/Mysql', 'persistent' = false, 'host' = 'localhost', 'login' = 'gabriel', 'password' = 'gabi62#', 'database' = 'cake', 'prefix

Cake is NOT able to connect to the database. Database connection Mysql is missing, or could not be created.

2013-05-17 Thread Gabriel Saulescu
DATABASE_CONFIG { public $default = array( 'datasource' = 'Database/Mysql', 'persistent' = false, 'host' = 'localhost', 'login' = 'gabriel', 'password' = 'gabi62#', 'database' = 'cake', 'prefix

Re: Doubt regarding sessions in cakephp

2012-03-30 Thread Gabriel Vila Real
Hi Litto It looks like some php.ini configuration has to be done. Compare your local php.ini file with production php.ini file, and check the session configurations. -- Gabriel Vila Real On Thu, Mar 29, 2012 at 02:39, LITTO CHACKO li...@axtecindia.com wrote: hai, buddies iam currently

Re: Cahe Helper: Cached Render Time

2010-11-15 Thread Gabriel
by extending CakePHP's built-in and to override the renderCache() method to add the code as needed. The non-recommended way is to modify CakePHP's built-in View::renderCache() method. Amit PHP Applications for E-Biz:http://www.sanisoft.com On Fri, Nov 12, 2010 at 12:57 AM, Gabriel gbrl

Cahe Helper: Cached Render Time

2010-11-11 Thread Gabriel
Hi, i'm having some problems with the Cache Helper, i have some cached json responses, and the cache helper adds at the end of the json data stats like this: !-- Cached Render Time: 0.0467s --, that screwup the javascript json parser. How i could remove that info? Thanks Check out the new

Re: Using multiple domains on one app to create four seperate sites

2010-10-03 Thread Gabriel
Yes, it's possible. I do that in a dreamhost's account. With a single user i have 2 domains with folders like this: /home/username/domain1.com (app1) /home/username/domain2.com (app2) /home/username/cake (CakePHP Core) There is no need to modify apache config o htaccess files. On 2 oct, 16:00,

Re: Using multiple domains on one app to create four seperate sites

2010-10-03 Thread Gabriel
the magic. On 3 oct, 10:16, Gabriel gbrl...@gmail.com wrote: Yes, it's possible. I do that in a dreamhost's account. With a single user i have 2 domains with folders like this: /home/username/domain1.com (app1) /home/username/domain2.com (app2) /home/username/cake (CakePHP Core) There is no need

Re: how to create forms

2010-07-20 Thread gabriel
Here a good tutorial for a contact form! http://snook.ca/archives/cakephp/contact_form_cakephp On Jul 19, 4:14 pm, amr_AJ ramruth...@gmail.com wrote: how to create forms Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

Re: Structure of data returned by $this-Model-find

2010-05-05 Thread gabriel
Hi, In order to make a node system with a standard way, check this ressource : http://dev.mysql.com/tech-resources/articles/hierarchical-data.html The exemple is specifique to mysql but you can make change to fit your needs. Cheers! Gabriel On 4 mai, 10:26, Roland B feedback2...@eudoxos.de

Re: PHP CodeSniffer

2010-05-03 Thread gabriel Tessier
Hi, I want to use coding standards with my cake app too. The default coding standard is pear. You can change default standard see the Code Sniffer doc. If you use netbeans there's a plugin to check your code. http://www.amaxus.com/cms-blog/coding-standards-netbeans-php-codesniffer I don't find a

Re: How can I configure the value of CAKE_CORE_INCLUDE_PATH?

2009-05-27 Thread Gabriel
Hi, you can do that in app/webroot/index.php and test.php This is the code i use to switch the core path depending on the server name: if (!defined('CAKE_CORE_INCLUDE_PATH')) { $srvname = $_SERVER['SERVER_NAME']; if( $srvname == 'localhost' || $srvname == '127.0.0.1' || $srvname ==

Add actions to model dinamically in behavior

2009-05-26 Thread Gabriel
I'm working with an image behavior, that stores resized images for the specified fields. Thats work fine. To get the images i have to define an action in the controller for each image field... i'm wonder if can i add these actions dinamically in the behavior? Thanks in advance and sorry by mi

Re: Poll: what do you hate about CakePHP?

2009-05-20 Thread Gabriel
Totaly agree with avairet's comment about the site design... Some clients want to know what tools we use, and when they search about cakephp thinks that is a software for kids. avairet escribió: Thank you for this ironic but serious message Nate! To respect your humoristic formulation, here

Re: losing action parameters after submit

2009-05-19 Thread Gabriel
Hola, creo que hablas español. En realidad funciona como es de esperarse. Llamas a la accion pasando el id de la empresa que la accion lo utiliza para obtener los datos pero luego al generar la vista y enviar el formulario es logico que se pierda el id de la empresa ya que no figura en ningun

Re: losing action parameters after submit

2009-05-19 Thread Gabriel
O creo que podria simplificarse mas usando: ?php echo $form-create('Local',array('action'='agregar/'.$empresa['Empresa']['id']));? Ya que en la accion del formulario no pones el parametro. Y olvide las comillas en el mensaje anterior, seria: input type=hidden name=*data[Empresa][id]*

Custom php.ini and .htaccess

2009-05-18 Thread Gabriel A. Gonzalez
Hi guys! I using a custom php configuration on dreamhost and works fine with standalone php files. But i can't get it working with cakephp(Cakephp works fine without the custom php.ini but i need it to increase te max upload size) The thing is when i try to use the custom config with

Re: Forcing user to access her data only

2009-05-18 Thread Gabriel A. Gonzalez
Hi Brian, i assume that each course have an user_id right? so when you list, edit or view the courses just use a condition to search all the courses of the current user... ex: $cond = array('Course.user_id' = $Current_user_id); $this-set('courses', $this-paginate('Course', $cond)); Brian Lee

Re: Datetime difference

2009-05-18 Thread Gabriel A. Gonzalez
You could calculate the time difference on the fly with mysql TIMEDIFF function [http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_timediff] instead of store it in the db And this [http://www.gidnetwork.com/b-16.html] may help to store the time difference.

Re: Submit/Cancel problem

2009-05-18 Thread Gabriel A. Gonzalez
Use reset or button NOT submit type for the cancel button. input name=Cancel value=cancel type=reset or input name=Cancel value=cancel type=button Nancy escribió: So, I added a submit and a cancel button to my ajax form and it doesn't matter which you press, it always returns the submit

Calling a Cake Shell Script from controller

2008-11-21 Thread Gabriel Gilini
site, so I'm looking for a workaround. So, what I would like to know is if there's a Cake-way of calling a Shell script, and if not, whether there is a way to exec it and keep it running on the server-side when the client goes away from that page. Thanks in advance. Cheers -- Gabriel Gilini

Re: Jquery or Scriptalicious?

2008-11-04 Thread Gabriel Gilini
the lesser the codes the lesser the debugging time oh, that's so not true [snip] Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: Jquery or Scriptalicious?

2008-11-02 Thread Gabriel Gilini
I mean that there is a hell lot of people learning jQuery, not JavaScript these days. Every allegedly javascript developer should, at least, read the ECMA-262. Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Sun, Nov 2, 2008 at 10:08 PM, 703designs [EMAIL PROTECTED

Re: Post Data

2008-10-31 Thread Gabriel Gilini
Are you building your form with the Form Helper? Because it seems to me that there are no naming conventions at all there. Cheers Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Fri, Oct 31, 2008 at 9:46 AM, MDB [EMAIL PROTECTED] wrote: The form values do not show

Re: Jquery or Scriptalicious?

2008-10-31 Thread Gabriel Gilini
Looks like I'm the only one who loves prototype here :) Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Fri, Oct 31, 2008 at 10:27 AM, Marcelius [EMAIL PROTECTED] wrote: @Anupom: Any arguments? Anupom schreef: I think PHP helper for writing Javascript is a very

Re: Jquery or Scriptalicious?

2008-10-31 Thread Gabriel Gilini
Sorry, mate, but prototype also supports all CSS3 selectors. ps: I never use cakephp's ajax helpers, and I love writing javascript Cheers Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Fri, Oct 31, 2008 at 10:45 AM, Josey [EMAIL PROTECTED] wrote: I perfer jQuery

Re: Jquery or Scriptalicious?

2008-10-31 Thread Gabriel Gilini
The right answers is: learn real javascript Yes, the learning curve with jQuery is way lower, but when you really know javascript, take a look in proto ;) Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Fri, Oct 31, 2008 at 4:37 PM, Samuel DeVore [EMAIL PROTECTED] wrote

Re: Few errors I found so far.

2008-10-27 Thread Gabriel Gilini
/posts/comments/add Results: Should this not be: action=/workspace/cake/comments/add ? Try to set 'model' = 'comments' in the options array. Kind Regards, Martin Cheers, Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED

Re: Few errors I found so far.

2008-10-27 Thread Gabriel Gilini
Try to set 'model' = 'comments' in the options array. Sorry, I meant 'model' = 'Comment'. Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Mon, Oct 27, 2008 at 12:50 PM, Gabriel Gilini [EMAIL PROTECTED]wrote: On Mon, Oct 27, 2008 at 11:36 AM, [EMAIL PROTECTED] [EMAIL

Re: cakeapp.com

2008-10-21 Thread Gabriel Gilini
Nevermind, I found it. http://ondras.zarovi.cz/sql/ Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Tue, Oct 21, 2008 at 10:32 AM, Gabriel Gilini [EMAIL PROTECTED]wrote: Hi, Nice app, keep up the good job! That SQL Designer, did you develop it? I found it very

Re: cakeapp.com

2008-10-21 Thread Gabriel Gilini
Hi, Nice app, keep up the good job! That SQL Designer, did you develop it? I found it very interesting. Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Mon, Oct 20, 2008 at 1:13 PM, teknoid [EMAIL PROTECTED] wrote: I've posted the reply on the blog, but wanted

how to display users' country from country table in product list

2008-10-15 Thread gabriel
Hi, I have no idea where to start with this so I would appreciate it if someone can point me in the right direction: I have a products (controller, model, view) In it I display a list of products, in the products table there is a user_id, in the user table there is a country_id. Question: how

Re: how to display users' country from country table in product list

2008-10-15 Thread Gabriel Kolbe
Thanks Dan. Everyday we learn. On Wed, Oct 15, 2008 at 4:08 PM, Dan Bair [EMAIL PROTECTED] wrote: Hi Gabriel, You'll have to set the recursive property of the Product model to fetch the associated countries. You should also make sure that the correct relations are set in your three models

Re: Installing Magento w/ CakePHP

2008-10-15 Thread Gabriel Kolbe
Hi Kyle just a few questions... why use cake and magento together if they do the same thing, I know magento is a instant fix, for an ecommerce website, but you can use bakesale and customise it if a ecommerce website is what you want - and have it all cake. Secondly, if you want to go with

email body/message does not come through

2008-10-14 Thread gabriel
Hi My emails works, but the message/body/content part of the email does not come through, the $this-Email-template = 'thanks'; does not come through...can anyone please help. ?php class ContactsController extends AppController { var $name = Contacts; var $uses = 'Contact'; var

Re: email body/message does not come through

2008-10-14 Thread Gabriel Kolbe
found the answer... in the elements/email/text/thanks.cpt do this ?php echo $this-data['Contact']['content']; ? On Tue, Oct 14, 2008 at 1:46 PM, gabriel [EMAIL PROTECTED] wrote: Hi My emails works, but the message/body/content part of the email does not come through, the $this-Email

help with get product by user, function in products controller

2008-10-14 Thread gabriel
Hi, i hope someone can help me here please, I need help with my controller function, I want to get products by user_id, unfortunately I have no idea where to start, help will be greatfully received. Here is my code so far... class ProductsController extends AppController { var $name =

Re: help with get product by user, function in products controller

2008-10-14 Thread Gabriel Kolbe
Hope it helps... Cheers gabriel wrote: Hi, i hope someone can help me here please, I need help with my controller function, I want to get products by user_id, unfortunately I have no idea where to start, help will be greatfully received. Here is my code so far... class ProductsController

Re: help with get product by user, function in products controller

2008-10-14 Thread Gabriel Kolbe
to do this. return $this-Product-find(); } in the controller you do: $userProducts = $this-User-getProduct(); //SImple Hope it helps... Cheers gabriel wrote: Hi, i hope someone can help me here please, I need help with my controller function, I want to get products by user_id

Re: Yet another site powered by Cakephp

2008-10-13 Thread Gabriel Kolbe
Hi, my name is Gabriel, I did respond to your email on cake groups. As I said I am working on a similar site - for the UK market. I am using Bakesale as a basis which I edit. I know this is very bold of me to ask you this, but it would save me a lot of time if I could buy your code and edit

Re: Yet another site powered by Cakephp

2008-10-12 Thread Gabriel Kolbe
Hi did you use Bakesale and customized it a bit? regards On Sat, Oct 11, 2008 at 8:28 AM, Sayhello [EMAIL PROTECTED] wrote: Hello all, Just wanted to introduce yet another site built with CakePHP 1.2 RC3 - www.sayhello.me. Sayhello is a new classified ads site to help you buy and sell. We

Re: Recursive Association in Model

2008-10-10 Thread Gabriel Gilini
, Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Thu, Oct 9, 2008 at 10:41 AM, SamuraiDio [EMAIL PROTECTED] wrote: Hi... A friend of mine is developing an application with uses a recursive hasMany association in a Model. Everything is working fine, except

Re: how to unit test a shell script

2008-10-10 Thread Gabriel Gilini
So, are there any guidelines to write a Shell Test Case? On 16 set, 18:05, mark_story [EMAIL PROTECTED] wrote: Jeurgen,  Testingshellclasses is a bit tricky right now App::import() currently does not let you target shells so you have to include them regular php style.  We are working on ways

anyone know why this session check does not work like it suppose to

2008-10-09 Thread gabriel
I login, then want to check the session if a person has admin rights If I login as an 'admin' where the role = admin or if I login as a non- admin where the role=0, it displays in both situations the admin area link... the script: if ($session-check('Auth.User.role') == 'admin') {

Re: Site powered by CakePHP

2008-10-09 Thread Gabriel Kolbe
Looks good, how do you join the project? By registering in the site? On Wed, Oct 8, 2008 at 8:58 PM, dezpo [EMAIL PROTECTED] wrote: Hello bakers, Just wanted to show you what I have did in the past 2 months using cakephp. This is my new site about car fans. If you have time please try to

Re: anyone know why this session check does not work like it suppose to

2008-10-09 Thread Gabriel Kolbe
ha-ha, thanks, so obvious! On Thu, Oct 9, 2008 at 2:07 PM, 3lancer.eu [EMAIL PROTECTED] wrote: Hi, There is essential difference between read() and check() methods of the Session class. However, you should rather use the following convention:

Re: newbie question

2008-10-09 Thread Gabriel Kolbe
I user Xampp, and it works like a dream !! On Thu, Oct 9, 2008 at 4:09 AM, [EMAIL PROTECTED] wrote: I think it may be best if you use a real server! On 10/08/2008, JRough [EMAIL PROTECTED] wrote: I want to try out Cakephp. Do you know if I can use it with XXAMP on Windows just for

Re: How do i upload images using cakephp

2008-10-03 Thread Gabriel Kolbe
Hi I don't know how too but.. you can steal some ideas how to handles images at http://www.bakesalehq.com/ since it is a ecommerce site/template that uses images On Fri, Oct 3, 2008 at 12:43 PM, AceStudio [EMAIL PROTECTED] wrote: I am developing a social community and would like members

Add user_id from session to db when adding a product

2008-10-03 Thread gabriel
Hi, I am busy reworking a bakesale script based on cake, my OOP php is not that good. Maybe someone can point me here in the right direction. I want to change a script the add a product and in sert in the db the user_id in the product table - which should come from the User.id function

Re: Add user_id from session to db when adding a product

2008-10-03 Thread Gabriel Kolbe
Hi I would prefer to get the value from the session. When I do if(isset($this-data['Product']['user_id'] = $user_id)) { if(isset($this-data['Product']['user_id'] = $this-Auth-user('id');) { I get this error Parse error: syntax error, unexpected '=', expecting ',' or ')' in

trying to add new pages and use same layout page in Bakesale

2008-10-02 Thread gabriel
Hi All. I am trying to edit the Bakesale library I downloaded from the internet, which runs on cake. BakeSale uses, to layouts - admin, and show. I have added 2 new sets of controllers, views, models. If I type in users/register , it keeps opening up in the 'CakePHP: the rapid development php

Re: trying to add new pages and use same layout page in Bakesale

2008-10-02 Thread Gabriel Kolbe
'), array( 'pass' = array('id', 'slug'), 'slug' = '.*', 'id' = '[\d]+' ) ); On Thu, Oct 2, 2008 at 6:52 PM, gabriel [EMAIL PROTECTED] wrote: Hi All. I am trying to edit the Bakesale library I downloaded from the internet, which runs on cake

Crumbs - crumbs - crumbs

2008-09-29 Thread gabriel
I could probably do this easily in sessions BUT I don't want to reinvent Cakes wheels. So, I have added ?=$html-addCrumb('Register', '/users/register');? in the register.ctp view. and added the the ?=$html-getCrumbs();? in the default.ctp layout. It only displays the current view and does not

Re: Adding to db without going to view..?

2008-09-29 Thread Gabriel Kolbe
)); $this- redirect(array('action'='view')); } } } hope this is a start rich On Sep 26, 10:59 am, gabriel [EMAIL PROTECTED] wrote: Hi, does anyone know how I can add (like a favourite to a db table) without going

Adding to db without going to view..?

2008-09-26 Thread gabriel
Hi, does anyone know how I can add (like a favourite to a db table) without going to the add view? I have a link testsite/user_favourites/add/2 IF I click on it it, it takes me to the add view (which has a model and controller) I DON'T want to go to the add view, but the 'view' view which

Linking to the admin area?

2008-09-26 Thread gabriel
Hi, I have to functions in the user_controller. One is admin_accnt, the other is accnt. How do I link to the admin_accnt ? My link echo $html-link(Admin, array(controller = users, action = admin_accnt)); IF I just do echo $html-link(Admin, array(controller = users, action = accnt)); I go the

Re: Linking to the admin area?

2008-09-26 Thread Gabriel Kolbe
S'ok, found the answer.. echo $html-link('Admin Area', '/admin/users/accnt'); On Fri, Sep 26, 2008 at 4:14 PM, gabriel [EMAIL PROTECTED] wrote: Hi, I have to functions in the user_controller. One is admin_accnt, the other is accnt. How do I link to the admin_accnt ? My link echo $html

PLease help, 3 days struggle with 'simple' authentication

2008-09-24 Thread gabriel
This is my current code: class AppController extends Controller { var $components = array('Auth'); function beforeFilter() { $this-Auth-authorize = 'controller'; $this-Auth-allow('*'); $this-Auth-deny('admin', 'accnt', 'faq'); // does not work } function

Re: PLease help, 3 days struggle with 'simple' authentication

2008-09-24 Thread Gabriel Kolbe
S'ok, I created 'fake' functions in the user controller, then added the views to the users views, then take the Authentication process from the app_controller to the users_controller.. On Wed, Sep 24, 2008 at 10:54 AM, gabriel [EMAIL PROTECTED] wrote: This is my current code: class

Re: PLease help, 3 days struggle with 'simple' authentication

2008-09-24 Thread Gabriel Kolbe
, but it would deny ALL views handled by the pages controller. Your workaround is a good compromise. Or you could make your own dedicated MyPagesController to group all these pages together. On Sep 24, 11:12 am, Gabriel Kolbe [EMAIL PROTECTED] wrote: S'ok, I created 'fake' functions in the user

Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread gabriel
Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages, for instance I want to redirect a page in straight PHP it would be ' header(Location: index.php); ' does any one know how to do this in CAKE ? --~--~-~--~~~---~--~~ You received

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
23, 2:00 pm, gabriel [EMAIL PROTECTED] wrote: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages, for instance I want to redirect a page in straight PHP it would be ' header(Location: index.php); ' does any one know how to do this in CAKE

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
app and input forms; but never handle any business or application logic. The name itself implies it - view ;) On Sep 23, 4:53 pm, Gabriel Kolbe [EMAIL PROTECTED] wrote: Hi doc Thanks for the reply, but how do I redirect in a view which does not have a model or controller? On Tue, Sep 23

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
, Gabriel Kolbe [EMAIL PROTECTED] wrote: Hi, my situation is the following: // check if user is logged in... ? if ($session-check('Auth.User.id')) { ? do your thing ? } else { ? redirect page somewhere else ? } ? is is done in a view how, do you mean I have to check the login

Re: Wouldn't it be great if cake adds a straight PHP equivalent on it's manual pages e.g redirection

2008-09-23 Thread Gabriel Kolbe
. On Sep 23, 2:14 pm, Gabriel Kolbe [EMAIL PROTECTED] wrote: Sorry, just to add to the info below, the view DOES not have a controller or a model, not I don't want to place it in the app_controller, because some page accessable even if you are not logged in.. my problem is I am unexperienced

Getting the session user_id, when login

2008-09-22 Thread gabriel
Hi, I have created an authentication according to the cookbook. I login and check the sessions, I can get the user_id like $_SESSION['Auth']['User']['id'], is there any better way of getting the session value ? --~--~-~--~~~---~--~~ You received this message

dealing with sessions - should be a simple answer..

2008-09-22 Thread gabriel
Hi, I have a reasonable simple question for an experienced person.. I did authentication according to the cookbook, I want to access the user id via session. I do this in the user controller... function login() { $userid = $this-Auth-user('id'); $this-Session-write('id', $userid ); }

simple session question - for Authentication

2008-09-19 Thread gabriel
Hi, I have followed the Authentication in the Cookbook. I have a few problems, maybe someone can help me. Firstly to 'allow' certain pages, I place the $this-Auth-allow('add'); in the Users controller and get and error, I have also tried to include it in the add and login functions, but it does

Re: simple session question - for Authentication

2008-09-19 Thread gabriel
'), which does not work..( in the view) On 19 Sep, 15:39, avairet [EMAIL PROTECTED] wrote: Hi, Just an idea for the first issue: put $this-Auth-allow('add') in your beforeFilter() function! On 19 sep, 16:31, gabriel [EMAIL PROTECTED] wrote: Hi, I have followed the Authentication

Re: simple session question - for Authentication

2008-09-19 Thread gabriel
..( in the view) On 19 Sep, 16:45, gabriel [EMAIL PROTECTED] wrote: Hi, Yes!! just figured it out as well function beforeFilter(){     $this-Auth-allow('add', '');   } How do you 'allow' page which is not in a controler?? ~AND Any ideas on ... SECONDLY: I am trying to do a on sessions, if I do pr

Re: simple session question - for Authentication

2008-09-19 Thread Gabriel Kolbe
NOPE !!! sorry made a mistake, can't stick the $this-Auth-allow in the app_controller... On Fri, Sep 19, 2008 at 4:51 PM, gabriel [EMAIL PROTECTED] wrote: Hi, sorry..found the solution to allow pages without a controller - stick it in the app_controller.. which only leaves me know

Re: Auth component not working for me

2008-09-19 Thread gabriel
$this-Auth-allow('display','index','register'); you don't have a 'display' funtion in your controller..don't know much maybe this is it. On 15 Sep, 06:51, Golam Kibria [EMAIL PROTECTED] wrote: hello i have triedauthcomponent and is not working for me. here is my code ?php class

Warning 512 - cache problem

2008-09-18 Thread gabriel
consider it being more advanced than 1.1 but it is now a pain for me? Why is that happening? Anyone knows? Regards, Gabriel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

trying to make othAuth login process work

2008-09-18 Thread gabriel
Hi, I have carefully followed the othAuth doc http://bakery.cakephp.org/articles/view/othauth-0-5-documentation, trying to get it to work, bur when I go to http://127.0.0.1/testsite/users/login, I get the following errors.. Username Warning (512): Method HtmlHelper::input does not exist

getting cake bake to work on vista, xampp..

2008-09-17 Thread gabriel
hi, I would like to know if anyone can help me.. I am trying to get cake bake to work on vista, xampp, I have also installed cygwin.. I have included in my advanced-Enviroment Variables-path (edit) C:\xamp\php\php4\phpcli.exe;C:\xamp\htdocs\testsite\cake\console \cake.bat yet when I type in '

Re: getting cake bake to work on vista, xampp..

2008-09-17 Thread Gabriel Kolbe
17, 9:25 am, gabriel [EMAIL PROTECTED] wrote: hi, I would like to know if anyone can help me.. I am trying to get cake bake to work on vista, xampp, I have also installed cygwin.. I have included in my advanced-Enviroment Variables-path (edit) C:\xamp\php\php4\phpcli.exe;C:\xamp\htdocs

making a view without a controller or model

2008-09-12 Thread gabriel
Hi, I am new, as you might guess.., I have created an (HTML) view in the pages folder in views, called account.ctp. It doesn't have a controller or model. But is looking for a controller. How do I get around this? Thanks and blessings to the person who helps me.

Re: making a view without a controller or model

2008-09-12 Thread gabriel
', 'account')); hth grigri On Sep 12, 2:59 pm, gabriel [EMAIL PROTECTED] wrote: Hi, I am new, as you might guess.., I have created an (HTML) view in the pages folder in views, called account.ctp. It doesn't have a controller or model. But is looking for a controller. How do I get around

Making a simple link to another page

2008-09-12 Thread gabriel
I would like to make a simple link to a view which does not have a controller and model, can anyone help me. REgards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Help with installation cakephp on xamp package

2008-09-10 Thread gabriel
Hi, all. I have been reading a book by APRESS, called 'Beginning CakePHP from novice to Professional' in it, it says that if you have installed cake, and get the starting up screen without the fonts and colours on the page working then, there is an error. Cake will work but the scaffolding and

missing view

2008-09-08 Thread gabriel
Hi, I am new to cake and are really frustrated with the basics. I have created a default.thml in layouts, with the code ?PHP echo $content_for_layout; ?, then I created a test.thtml in pages, I point the server to it and get a missing view error - anyone any ideas?