getClientIP ?? strange format...

2010-02-02 Thread toka...@gmail.com
Hi, anybody know why cake or PHP native method is returning IP in this strange format?? getClientIP() fe80::222:41ff:fe2e:b64b $_SERVER['REMOTE_ADDR'] fe80::222:41ff:fe2e:b64b PS: I am running apache on MacOS Leopard using XAMPP. Many thanks Tomas Check out the new

Re: getClientIP ?? strange format...

2010-02-02 Thread Graham Weldon
Thats an IPv6 IP Address. IPv4 looks like 111.222.333.444 Its a valid IP Address through. :-) On 02/02/2010, at 7:18 PM, toka...@gmail.com wrote: Hi, anybody know why cake or PHP native method is returning IP in this strange format?? getClientIP()

tree behaviour and validation rule problem

2010-02-02 Thread emmexx
I wrote a simple model that acts as a tree behaviour. The model has a myfield_id field that must follow these rules: - if parent_id is empty (root) myfield_id can't be blank - if parent_id is not empty myfield_id must be blank (children) So I wrote a isUnique validation rule for myfield_id. And

virtual fields are giving me errors (1.3Beta)

2010-02-02 Thread Ernesto
Hello. i have 2 models: Order hasMany Item. - the hasMany has the option dependent set to TRUE. - Item model has a virtual field defined like this: var $virtualFields = array(barcode = CONCAT(Order.code, REPEAT('0', 10 - LENGTH (Item.code)), Item.code)); when i delete an order cake will attempt

Re: getClientIP ?? strange format...

2010-02-02 Thread toka...@gmail.com
Hi Graham, ok that's something new :))) http://en.wikipedia.org/wiki/IPv6 anyway, I should extend a database field for that...this one is a little bit larger :-D Thanks Tomas On Feb 2, 10:00 am, Graham Weldon gra...@grahamweldon.com wrote: Thats an IPv6 IP Address. IPv4 looks like

Re: Dynamic Drop Downs PHP

2010-02-02 Thread John Andersen
This groups is for the CakePHP framework, which is somewhat more than regular PHP, so I suggest you try the comp.lang.php group for future questions, as they will be able better to help you! On the other hand, you need to make the following change to your code: [code] $sType = $_GET['type'];

Re: Distinct in find('list')

2010-02-02 Thread John Andersen
What is your expected result? I want to know why you want to use an inner join to data_quantities - is it because you only want those records from the sources, for which exists data_quantities? Have you tried without distinct and do you get the wrong result? Enjoy, John On Feb 2, 1:06 am,

asset in cakephp 1.3

2010-02-02 Thread stefano
Hi i'm using cakephp 1.3 :) The Asset plugin of pseudocoder.com work in this version of cake? or there are others ways to do that?? Thanks S. -- Stefano Salvatori M. http://stefano.salvatori.cl/ Check out the new CakePHP Questions site http://cakeqs.org and help others with their

Re: How to use CMS in cake php.

2010-02-02 Thread John Andersen
CakePHP is a framework, from which you can build a CMS, but it is not a CMS! Look for Wildflower or Croogo, which are CMS built using CakePHP. If this does not help you, please clarify what your issue is! :) Enjoy, John On Feb 1, 8:10 pm, Md Moniruzzaman mo...@ugibd.net wrote: How to use CMS

Re: cookies / localhost / mac

2010-02-02 Thread John Andersen
Have you set up your cookie settings in the controller (show us)? Also show us the code with which you are writing and reading the cooking information. Have you checked that you have given write permission to the cookie path? Enjoy, John On Feb 1, 6:11 am, phil pbei...@gmail.com wrote: I am

Re: Navigation Controller

2010-02-02 Thread John Andersen
With regard to your navigation system :) I would attach two additional fields to store the url and title. menues + id + lft + rght + parent_id + title - url So in your Contact us case, you would add a node with the title Contact us and the url as /contacts/us (ok, funny to have a contacts

Re: tree behaviour and validation rule problem

2010-02-02 Thread John Andersen
As I can't see your full code from the moment you retrieve the Category and until you try to save it, I can't be sure that you have provided the Category.id at the time of saving the updated parent_id. I just imagine that CakePHP actually may try to add a new record, in which case the isUnique

Re: interesting session problem - session is lost and recovers again randomly

2010-02-02 Thread rich...@home
Are you using IE? And making Ajax calls? or launching applets? I had this problem for the last few days. The fix is to set Configure::write('Session.checkAgent', false); in core.php The reason is: IE sometimes uses a different user agent string when doing ajax calls, and so will any

Re: tree behaviour and validation rule problem

2010-02-02 Thread emmexx
On 2 Feb, 15:45, John Andersen j.andersen...@gmail.com wrote: As I can't see your full code from the moment you retrieve the Category and until you try to save it, I can't be sure that you have provided the Category.id at the time of saving the updated parent_id. I just imagine that CakePHP

Re: Table name problem

2010-02-02 Thread joe-electro
Muito obrigado! Joe On Feb 1, 8:51 pm, Marcelo Andrade mfandr...@gmail.com wrote: On Mon, Feb 1, 2010 at 3:43 PM, joe-electro joe.elec...@gmail.com wrote: (..) How do I tell Cake that this field points to the primary key of this table and not of a table called Parent_Categories?

Cake console

2010-02-02 Thread Waterschaats
I try to bake models with the console. I've already bakes a new app and created a database for it. When i try to bake the models for the app its keeps on showing the models of the main app. How do i change the path to the new app? (I use MAMP on OSX) Check out the new CakePHP Questions site

Re: getClientIP ?? strange format...

2010-02-02 Thread Andras Kende
Tomas, You could try disable IPV6: System preferences - Network - Ethernet - Advanced - Configure IPV6 = Off Also comment out the IPV6 addresses in /etc/hosts file Or try to access that site not by http://localhost but by ip like http://192.168.1.101 Andras On Feb 2, 2010, at 3:18 AM,

Problem with relations when recursive 1

2010-02-02 Thread doze
Hello! I have following database tables and relations: |---| |-| || | Tuotteet | | Tekstit | | Kaannokset | |---| |-| || | teksti_id | hasOne | id

ACL Question

2010-02-02 Thread JNotti
I have Autho and ACL setup correctly - I believe. No issues with logging in etc. My problem is the permissions. When I assign permissions my aros_acos table is populated with the proper info but I tried something a bit different and dont know which route to take. When I run this:

Re: How to use CMS in cake php.

2010-02-02 Thread mufti ali
Read this articles, http://blogfreakz.com/cms/cakephp-based-cms/ maybe one of them suitable for you. -- Mufti Ali 087831163105 http://wordtaps.com http://blogfreakz.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

Plugin using different Dynamic Database Connection

2010-02-02 Thread bryan de asis
Hello, Has anyone here tried to create a plugin which connects to a difference database dynamically? My Plugin name is News I have tried adding this lines on beforeFilter on my ArticlesController: $db = ConnectionManager::getDataSource('default'); $db-disconnect();

Form inputs showing incorrect value

2010-02-02 Thread McScreech
Hello, I have edit/add views that are not retaining the correct values when they exist nor displaying the desired default values when new records are created. The following code examples look the same as other select type inputs in my code that DO work, I cannot seem to find my error. In the

Pagination: URL for last page

2010-02-02 Thread Ragnis
How can i go to the last page, if i don't know the count of items? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

Re: Pagination: URL for last page

2010-02-02 Thread Jeremy Burns
echo $paginator-last(''); Jeremy Burns On 2 Feb 2010, at 17:11, Ragnis wrote: How can i go to the last page, if i don't know the count of items? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

RE: Navigation Controller

2010-02-02 Thread Dave
I thought about this. Contacts I am making a controller since it usually has a contact form of some sort. But my only problem is passing the site to a non tech and having them type in urls. Its easy for us since we tend to know what does what but someone who has no clue might not understand

Re: Form inputs showing incorrect value

2010-02-02 Thread Dr. Loboto
echo $form-input('active', array( 'label' = 'Active Clone', 'options' = array('no' = 'no', 'yes' = 'yes'), 'default' = 'yes' )); On Feb 2, 11:04 pm, McScreech scre...@sympatico.ca wrote: Hello, I have edit/add views that are not retaining the correct values when they exist nor displaying the

Re: checking whether a table exists

2010-02-02 Thread Miles J
I had to do the same thing for my plugin. Simply dont use Models. http://github.com/milesj/forum/blob/master/controllers/install_controller.php On Feb 1, 11:39 pm, Lorenzo Bettini bett...@dsi.unifi.it wrote: Hi I'm trying to build an installation procedure for my site based on cakephp; thus

Re: Plugin using different Dynamic Database Connection

2010-02-02 Thread Miles J
Why aren't you just placing the config in database.php? On Feb 2, 8:48 am, bryan de asis bryandea...@gmail.com wrote: Hello, Has anyone here tried to create a plugin which connects to a difference database dynamically? My Plugin name is News I have tried adding this lines on beforeFilter on

Re: Plugin using different Dynamic Database Connection

2010-02-02 Thread Bryan De Asis
Co'z I'm creating a database table which contains the database connection credentials so i can have thousands hundreds of config... so i can manage other news articles table databases using same plugin... On Tue, Feb 2, 2010 at 12:51 PM, Miles J mileswjohn...@gmail.com wrote: Why aren't you

Error in define HABTM relation with 'joinTable' and with 'with'

2010-02-02 Thread marco.rizze...@gmail.com
Hi I'm working on a legacy system , i must to defina an HABTM relation between User and Group. In User model I have this: var $hasAndBelongsToMany=array( 'Group' =array( 'className'= 'Group', 'joinTable'=

Re: Form inputs showing incorrect value

2010-02-02 Thread McScreech
Thank you very much Dr. Loboto. That was the solution. This actually prompted me to try a few other test patterns elsewhere in my application, and lo, the select boxes were actually not working in some other forms either! You saved my skin on that one, thanks again, DaveT. On Feb 2, 12:46 

Re: Associated Pagination

2010-02-02 Thread Changoso
My Gallery Controller looks something like this: ?php class GalleriesController extends AppController { var $name = 'Galleries'; var $helpers = array('Html', 'Form', 'Javascript'); var $components = array('RequestHandler'); var $paginate = array(

Re: Associated Pagination

2010-02-02 Thread Changoso
I modified the view so it looks something more lke the manual... ?php if (!empty($gallery['Photo'])):? table border='1' tr ?php $i = 0; foreach ($data as $interest): ? td align='middle' ?php

Uploader Component

2010-02-02 Thread Dave
I keep getting: Fatal error: Call to undefined method UploaderComponent::thumbnail() I want to upload 1 image and then make a thumb version, cropped size and then the original So added the thumbnail call and the error is what i get. if($data = $this-Uploader-upload('image',

Re: Uploader Component

2010-02-02 Thread Miles J
The thumbnail() method is no longer supported in the newer versions. http://www.milesj.me/resources/script/uploader-plugin#Generating-Thumbnails On Feb 2, 12:49 pm, Dave make.cake.b...@gmail.com wrote: I keep getting: Fatal error: Call to undefined method UploaderComponent::thumbnail() I

Identifying the moment of successful login using AuthComponent

2010-02-02 Thread Johnny Cupcake
How can I run code on AuthComponent's successful login _event_? For example, to record the login date/time in the database? I've tried writing my own login() action in the controller--but by the time that function executes, login has already been performed by the component--so I don't know

logins worked, now they fail

2010-02-02 Thread cricket
The site I'm working on had authentication working fine (it was one of the first things I set up). but suddenly I find that they no longer work. Auth isn't showing me anything helpful, and there are no SQL queries displayed (debug = 2), just the usual DESCRIBEs. Passwords were created using

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread Miles J
I added the this functionality to one of my plugins: http://github.com/milesj/forum/blob/master/controllers/users_controller.php#L114 On Feb 2, 1:22 pm, Johnny Cupcake sparklew...@hotmail.com wrote: How can I run code on AuthComponent's successful login _event_?  For example, to record the

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread Johnny Cupcake
Thanks. I am just a Cake novice--should I infer that there is no solution to my problem that uses AuthComponent as-is? I'm guessing I could modify a few lines in AuthComponent to add a callback, and get the behavior I want--but I'd rather not go down that road if there are simpler options. On

Advanced Install

2010-02-02 Thread Dave
I am trying to set up multiple apps using 1 cake so i have currently: public_html/ dev/ libs/ cake1.2.6/ site1/ /app site2/

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread Miles J
I just presented you with the solution. You check if Auth has been set within login() then do your database updates. On Feb 2, 1:57 pm, Johnny Cupcake sparklew...@hotmail.com wrote: Thanks.  I am just a Cake novice--should I infer that there is no solution to my problem that uses AuthComponent

Re: Dynamic Drop Downs PHP

2010-02-02 Thread Marc A.
OH sorry, i thought cakePHP was just a PHP community. Thanks for the help it worked. Knew it was very obvious! On Feb 2, 8:46 am, John Andersen j.andersen...@gmail.com wrote: This groups is for the CakePHP framework, which is somewhat more than regular PHP, so I suggest you try the

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread AD7six
On 2 feb, 22:57, Johnny Cupcake sparklew...@hotmail.com wrote: Thanks.  I am just a Cake novice--should I infer that there is no solution to my problem that uses AuthComponent as-is? I'm guessing I could modify a few lines in AuthComponent to add a callback, and get the behavior I want--but

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread AD7six
On 2 feb, 22:22, Johnny Cupcake sparklew...@hotmail.com wrote: How can I run code on AuthComponent's successful login _event_?  For example, to record the login date/time in the database? I've tried writing my own login() action in the controller--but by the time that function executes,

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread Johnny Cupcake
Nevermind, the book does cover this situation. http://book.cakephp.org/view/248/AuthComponent-Variables#autoRedirect-395 The key to the puzzle is understanding that when your login() executes, your form contents have _already_ been processed by AuthComponent...so the login event condition is when

The Resize Helper to Resize Images On The Fly

2010-02-02 Thread harake
http://harake.wordpress.com/2010/02/02/the-resize-helper-to-resize-images-on-the-fly/ Have a nice baking day Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google

The Include Engine

2010-02-02 Thread harake
http://harake.wordpress.com/2010/01/30/the-include-engine/ Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email

Re: The Include Engine

2010-02-02 Thread AD7six
On 3 feb, 00:19, harake i...@robustsolution.net wrote: http://harake.wordpress.com/2010/01/30/the-include-engine/ Please do not spam the group. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because

Re: The Include Engine

2010-02-02 Thread harake
m sorry but I thought I could put here some articles that are related to Cake I invite you to join and give me your comments anyway On Feb 2, 11:30 pm, AD7six andydawso...@gmail.com wrote: On 3 feb, 00:19, harake i...@robustsolution.net wrote:

Related lists, polymorphic habtm? (fao: AD7six ;))

2010-02-02 Thread Jon Bennett
Hi bakers, Been mulling this over and haven't hit on the ideal solution yet, so thought I'd try and put it down to get some outside ideas. I'm trying to find a flexible way to associate a record in one table with many other records from other tables, but contained within a single list. Eg, say

htaccess help

2010-02-02 Thread Dave
I have moved my cake folder and set up multiple apps running 1 cake setup. But my css / images are all going looking in the site root. My guess is this ss to do withthe htaccess in webroot IfModule mod_rewrite.c RewriteEngine on RewriteRule^$webroot/[L] RewriteRule

Problem with Scripts_In_Layout in earlier version of cake 1.2

2010-02-02 Thread MikeK
We have an application that was written with an earlier version of Cake 1.2 (5875 prebeta) - we will be upgrading to the latest release in a couple of weeks but we ran across an issue with a single action that is blowing away the $this-__scripts var that is the basis of $scripts_in_layouts. As a

Paginate Tree Data

2010-02-02 Thread Dave
Is there a way to paginate data from a tree? I am using the Tree Behavior but having problems pagination the data. Using the cookbook $nodelist = $this-Product-generatetreelist(null,null,null, - ); gets me all the data but how would i paginate that? Thanks Dave Check out the new CakePHP

Re: Paginate Tree Data

2010-02-02 Thread Jon Bennett
hi Dave, Is there a way to paginate data from a tree? I am using the Tree Behavior but having problems pagination the data. You need to order the data by the lft value, eg: $this-paginate['Product'] = array( 'order'=array('Prodcut.lft asc'); ); $this-data = $this-paginate(); To make

New User Management Plug-in

2010-02-02 Thread jedt
Hello, I'm inviting everyone to try my user management plug-in in http://github.com/jedt/spark_plug Features - Easy to install. This is totally subjective but is one of the main features. - Multi User Registration/Login. This enables your project to have multi-user access. For example you want