Re: get model id by a set of conditions

2010-02-09 Thread Graham Weldon
If the model is "Post", you can do the following: $post = $this->Post->find('first', array( 'conditions' => array( ), 'fields' => array('Post.id') )); Your ID will be in: $post['Post']['id'] On Tue, Feb 9, 2010 at 8:57 PM, WebbedIT wrote: > It sounds like you need to read the boo

Re: getClientIP ?? strange format...

2010-02-02 Thread Graham Weldon
php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Cheers, Graham Weldon e. gra...@grahamweldon.com p. +61 407 017 293 w. http://grahamweldon.com Check out the new CakePHP Questions site http://cakeqs.org and help other

Re: Advanced Installation

2010-02-01 Thread Graham Weldon
p/ Ensure debug is turned on to 2, so you can see any errors that may be present. Ensure that your app/tmp directory structure is writable by the web server user Let me know how you go. Cheers, Graham Weldon e. gra...@grahamweldon.com p. +61 407 017 293 w. http://grahamweldon.com On 02/02/201

Re: Australian Job Vacancy - Newcastle NSW

2010-02-01 Thread Graham Weldon
Hey guys, The work cannot be remote, freelance, or outsourced. This is for a full time position, and as I understand, is open to Australian and New Zealand residents only. Cheers. Graham Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

Australian Job Vacancy - Newcastle NSW

2010-02-01 Thread Graham Weldon
interested, please drop me an email, and I can forward you through the relevant information. Cheers, Graham Weldon (aka. Predominant) 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 subscri

Re: Creating own Helper: Problems with including other Helpers, also via app::import

2010-01-12 Thread Graham Weldon
Can you provide the error you were getting when defining inner helpers in the $helpers array? Cheers, Graham Weldon e. gra...@grahamweldon.com p. +61 407 017 293 w. http://grahamweldon.com On 13/01/2010, at 8:41 AM, Deine Mutter wrote: > Hey, > > I'm creating

Re: Hi

2010-01-01 Thread Graham Weldon
The SQL debug table is removed when debug is set to 0. This is done in config/core.php On 01/01/2010, at 6:28 PM, Saran wrote: > I raise my question first: > > How to remove the query table that is below of all my page, it shows > some query and " NrQueryErrorAffectedNum. rows

Re: git and cake2

2009-12-16 Thread Graham Weldon
ead, which means that fixes we make to enable this for PHP 5.2 strict mode break fairly frequently. Watch the repository for updates, as its being working on all the time. Also feel free to contribute. We love contributors. Cheers, Graham Weldon e. gra...@grahamweldon.com w. http://grahamweldon

Re: Auth forgot password question

2009-11-18 Thread Graham Weldon
Just one small change will fix this. You're hashing the password, and sending that via email. Change this part: > Your new password: {$user['User']['password']}"; to use ['tmp_password'] instead of ['password'] since tmp_p

Re: addons.mozilla.org soon will leave CakePHP..

2009-11-18 Thread Graham Weldon
ovements are made throughout the core in 1.3. They'd certainly benefit from an upgrade to one of the more recent versions. However, it appears as though a decision has been made, and we wish the Mozilla AMO team all the best as they migrate to django. Cheers, Graham Weldon e. gra...@gr

Re: invalidFields isUnique return existing id?

2009-11-17 Thread Graham Weldon
s up. 2) You are going to have to do some in-controller processing to deal with the data submitted: - Check the ID supplied - if it exists, load the data, overwrite with supplied data, and save - if it didnt exist, save new record. I would be ensuring validation on the fields you need with t

CakeFest IV - America - Help us pick a location!

2009-11-12 Thread Graham Weldon
ughts on it. Cheers, Graham Weldon (AKA: Predominant) e. gra...@grahamweldon.com w. http://grahamweldon.com -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from t

Re: thoughts on CakePHP and revision control

2009-11-12 Thread Graham Weldon
my app. Cheers, Graham Weldon e. gra...@grahamweldon.com p. +61 407 017 293 w. http://grahamweldon.com On 13/11/2009, at 2:11 PM, James P. Howard, II wrote: > I am about to start a new project based on CakePHP and would like to > know about others' experiences using CakePHP (or si

Re: CakePHP Questions - Now out of beta!

2009-11-11 Thread Graham Weldon
We're planning to add this to the top links on the other Cake Software Foundation websites to ensure everyone is able to reach the site. This should be happening very soon. Thanks for the positive feedback :-) Cheers, Graham Weldon e. gra...@grahamweldon.com w. http://grahamweldon.com

Re: CakePHP Questions - Now out of beta!

2009-11-11 Thread Graham Weldon
very soon. Cheers, Graham Weldon e. gra...@grahamweldon.com w. http://grahamweldon.com On 12/11/2009, at 12:25 AM, keymaster wrote: > Not sure where best to post this, but ... there needs to be a "Resend > Verification Email" link on the new questions site or people whose &g

Re: CakePHP Questions - Now out of beta!

2009-11-11 Thread Graham Weldon
Cool :-) Lots of signups happening. Nice to see. Cheers, Graham Weldon e. gra...@grahamweldon.com w. http://grahamweldon.com On Nov 11, 10:33 am, "Larry E. Masters aka PhpNut" wrote: > CakePHP Questionshttp://cakeqs.orghas just come out of beta testing and > registration is o

Re: Play Audio in PHP

2009-11-11 Thread Graham Weldon
Hey, I would use something like this: http://www.schillmania.com/projects/soundmanager2/ But as other have suggested, for easing your users experience, be minimal with sounds if you can. They are great for band sites.. and for audible notifications. Thats about it ;-) Cheers, Graham Weldon

cake-php@googlegroups.com

2009-11-09 Thread Graham Weldon
You might need to do: 1) URL encode your category names Or 2) refactor to allow category name slugs for URL access to avoid use of special characters Cheers Graham On 10/11/2009, at 11:56 AM, "ashok.b" wrote: > > Hi, I'm trying to pass values having an ampersand... li

Re: Strange Error

2009-11-09 Thread Graham Weldon
5.2.11-p0. So I mightbe a good opportunity to upgrade also. Cheers Graham On 10/11/2009, at 11:05 AM, dtirer wrote: > > Note: Outside of Cake, this server has no problem deal with OOP and > classes > > On Nov 9, 6:53 pm, dtirer wrote: >> So I've been toying with

Re: can a custom validation function return an error message or just true/false?

2009-08-26 Thread Graham Weldon
#x27;, 'message' => 'Something Else is wrong.' ) ) ); function vLength($data) { /// -- implementation } function vAllowedCharacters($data) { /// -- implementation } function vSomethingElse($data) { /

Re: How to inheirt form other controllers?

2009-07-27 Thread Graham Weldon
Try something like: if (!class_exists('ParentController')) { App::import('Controller', 'ParentController'); } class ChildController extends ParentController { // Imeplement controller as normal } Cheers, Graham Weldon e. gra...@grahamweldon.

Re: modify home page

2009-07-02 Thread Graham Weldon
oesnt exist, you can create one. You can copy the standard one from: cake/libs/views/layouts/default.ctp Let us know how you go, and if you need anything else. Cheers, Graham Weldon http://grahamweldon.com --~--~-~--~~~---~--~~ You received this message becaus

Re: grr help with cron/shell tabs

2009-06-21 Thread Graham Weldon
Ensure that your environment variable PATH includes the path to the php executable. Cheers, Graham Weldon http://grahamweldon.com Miles J wrote: > I found out that my CLI was PHP 4, so I changed it to PHP 5. I can run > the cron through SSH manually, but when I run through cron I n

Re: How can I remove the 'app/websroot' from the link $html-->link() creates?

2009-06-10 Thread Graham Weldon
is done, your URLs will no longer be prefixed with app/webroot". Let us know how you go. Cheers, Graham maf wrote: > I'm a new cake user. I've run the blog tutorial and am not trying some > custom stuff. > > Why does $html-->link create the extraneous dirs (a

Re: CSS

2009-06-09 Thread Graham Weldon
Hi Dave, You can use addScript to ensure it gets added to the head block at the top of the page like so: $this->addScript($html->css('my_file')); Cheers, Graham Dave Maharaj :: WidePixels.com wrote: > Can you include CSS per view as you do js? > > I need sifr css

Re: OS X cake bake woes

2009-05-14 Thread Graham Weldon
Create the directory. mkdir /var/mysql ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock /var/mysql/mysql.sock Note that I switched the ln command arguments around. I made a mistake before. Try that. Cheers, Graham harrzack wrote: > Hmm - I'd seen the ln trick elswhere bu

Re: OS X cake bake woes

2009-05-14 Thread Graham Weldon
my.cnf as they were. Try that, and again, let me know how you go. Cheers, Graham harrzack wrote: > Graham - > > Thanks - but still no joy! :-( > When I cd to the app directory, do 'cake bake', the do a C for > Controller I still get the flood of warnings that start: &g

Re: OS X cake bake woes

2009-05-13 Thread Graham Weldon
MAMP install has the following socket definition in my.cnf socket = /Applications/MAMP/tmp/mysql/mysql.sock Hope this helps. Do let us know how you go Cheers, Graham harrzack wrote: > This is on OS X 10.4.11 with latest XAMPP install. > > Having probs getting cake bake to use t

Re: Good star rating tutorial

2009-05-12 Thread Graham Weldon
Hey, There are quite a few out there. I just googled "cakephp star rating" and found a bunch. Try there first, and report back if you have any specific implementation issues that you need help with. Cheers, Graham Weldon http://grahamweldon.com jwerd wrote: > Hey there

Re: Email Component, cc and bcc not working?

2009-05-12 Thread Graham Weldon
Hi Louie, I believe the cc and bcc variables need to be arrays. Try wrapping them in an array and see how that goes for you. Cheers, Graham Weldon http://grahamweldon.com Louie Miranda wrote: > Hi, I have setup the email component properly on cakephp. I can send > and it's ok fo

Re: CakePHP and web services support

2009-04-22 Thread Graham Weldon
I think that if the book page linked doesnt help you to achieve what you need, perhaps being a little more specific with what you are trying to achieve will allow us to assist you in a more effective manner. Cheers, Graham Ma'moon wrote: > O.K, thats my false for not mentioning tha

Re: CakePHP and web services support

2009-04-22 Thread Graham Weldon
I'm going to say it... RTFM. http://book.cakephp.org/view/476/REST Cheers, Graham Ma'moon wrote: > Hello guys, > Any one knows a good example usage for creating RESTfull web services > in CakePHP 1.2? > >

Re: cakephp.org homepage

2009-04-13 Thread Graham Weldon
You can use a method like this one: http://jqueryfordesigners.com/coda-slider-effect/ hope that helps. Cheers, Graham Gwoo wrote: > Jquery > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Cake-PHP friendly social network software?

2009-04-06 Thread Graham Weldon
Try this: http://noserub.com Cheers, Graham jwerd wrote: > I am building a Cake-PHP based project but I feel instead of > reinventing the wheel, I'd like to just integrate an existing open > source social networking solution that is Cake-PHP friendly. > > What I mean by fr

Re: Sub Controller

2009-03-24 Thread Graham Weldon
need to look into routing. Cheers Graham On 25/03/2009, at 12:21 PM, Ranju wrote: > > Hello > > I want to create sub controller like create admin panel.within > controller folder create admin folder then create admin controller. > which type possib

Re: limit access to a site?

2009-03-23 Thread Graham Weldon
eed a check in or around your if statement in the beforeFilter there to ensure unrestricted access to whatever you set $accessDeniedRedirect is set to. But I will leave that for you to sort out. Can't give you all the solutions. That would be boring! Cheers, Graham Aurelius wrote: > Hi! > &g

Re: What does 'Error Affected' stand for?

2009-03-14 Thread Graham Weldon
"Error" and "Affected" are two separate results. Throw some CSS into your page to style up the table generated by cake, and it will make it all a little clearer. Affected is the number of rows affected by the query that was run. Cheers, Graham Joshua wrote: > Wh

Re: Cakephp Developers Required

2009-03-12 Thread Graham Weldon
Hi Rajesh, I'm interested to know what your project is and what time you need allocated to the development. Cheers Graham Weldon On 13/03/2009, at 11:48 AM, Rajesh wrote: > > I need cakephp developer for a new project. If any one interested le

Re: RegEx: Dash Problem

2009-03-08 Thread Graham Weldon
Hey, Try escaping the hyphen: \- That should work out for you. Cheers, Graham Weldon w. http://grahamweldon.com e. gra...@grahamweldon.com p. +61 407 017 293 On Sat, 7 Mar 2009 16:02:58 -0800 (PST), KS wrote: > Hi there, > > This might not be a cakePHP issue, but here goes.

Re: Submit using image

2009-02-24 Thread Graham Weldon
single sprite, this essentially shows the backgorund image in place, while hiding overflow, and pushing your text outside its display area. This is also a useful image replacement technique for headings and such too. Give it a go, and let me know how it works out. Cheers, Graham Weldon. On Tue

Re: Containable bug?

2009-02-24 Thread Graham Weldon
back a bit while things are shaping up, before letting the dogs loose on it. (This is also true of CakeBot implementations! tee hee) Cheers, Graham On Tue, 24 Feb 2009 05:54:08 -0800 (PST), mradosta wrote: > It's going to be fixed in 1.3. > https://trac.cakephp.org/ticket/5864 >

Re: Autocomplete search on users table

2009-02-23 Thread Graham Weldon
ata, only returning back strings containing the information you have partially entered. This could potentially be more powerful, allowing you to pass back more information like ID's to link to, as well as doing SQL "WHERE LIKE" matches, for mid-string matching. Hope this gets you started

Re: Cake core is throwing unlink warnings

2009-02-23 Thread Graham Weldon
the permissions. This should solve the problem. Let us know how you go. Cheers, Graham Weldon w. http://grahamweldon.com e. gra...@grahamweldon.com p. +61 407 017 293 On Mon, 23 Feb 2009 12:51:07 -0800 (PST), RyOnLife wrote: > I am getting this (and other similar) warnings: > > W

Re: How to login with username only ?

2009-02-05 Thread Graham Weldon
('password', array('type' => 'hidden', 'value' => 'genericpassword')); ?> That should cover you :-) I dont recommend only requiring a username to login... unless the stored data is completely trivial. Cheers -- Cheers, Graham Weldon w. htt

Re: Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Graham Weldon
;User->Site->SitePage->save(array('SitePage' => array( 'site_id' => $this->User->Site->id, // --- any other data ))); Tada! Associationes from User to Site, and Site to SitePages need to exist for that to work. Cheers, Graham On Mon, 2 Feb 200

Re: Cache not configured properly on Mac OS X

2009-01-29 Thread Graham Weldon
just change them to 777 instead of 755 in the above command. Hope this helps. Cheers, Graham On Thu, 29 Jan 2009 02:57:11 -0800 (PST), leo wrote: > Try 777. It's the only way I could get it to work. > Fwiw, I don't enable the cache on my dev server as it can lead to > c

Re: svn or git?

2009-01-28 Thread Graham Weldon
probably the right spot for discussing it. Cheers, Graham On Wed, 28 Jan 2009 03:00:30 -0800 (PST), leo wrote: > This has probably been discussed before, but I can't find anything > specific. > > Why does CakePHP use SVN, while The Chaw appears to use GIT? > > Should I b

Re: Closing $ajax->form()

2009-01-27 Thread Graham Weldon
$ajax->submit() will create a submit button. However, it will not end your form. You need to also end your form with $form->end(). $ajax->submit() will work, as indicated previously: >> $ajax->form(); >> $form->inputs(); >> $ajax->submit(); >>

Re: Closing $ajax->form()

2009-01-26 Thread Graham Weldon
$ajax->submit() creates an ajax submit element. $form->end('something') creates a submit button, and ends the form. $ajax->form() starts a form. Your usage will depends very much on your implementation, and requirements. The simple reason for there not being an $ajax->formEnd() is because its

Re: Anyone built a forum system yet?

2009-01-19 Thread Graham Weldon
Have you released / are you planning to release source for this? Cheers, Graham On Mon, 19 Jan 2009 13:43:05 -0800 (PST), Miles J wrote: > www.sc2armory.com > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: $id = null and $id

2009-01-18 Thread Graham Weldon
Provision of = in a function call for PHP means that if the value is not provided, the specified is used as a default. Example: function foo($b = "World") { echo "Hello " . $b; } foo(); foo("CakePHP"); Output: Hello World Hello CakePHP hope that explai

Re: A new discussion about "controllers which extend another-controller-other-than-AppController"

2009-01-15 Thread Graham Weldon
s back to the parent should ensure that the parent class is processed properly, but this should happen by default. Try the App::import() and let me know how you go with the components. Cheers, Graham On Thu, 15 Jan 2009 12:47:58 -0800 (PST), caminante wrote: > Being released 1.2 final versi

Re: mod_rewrite problems

2009-01-15 Thread Graham Weldon
Hey, I know its a basic thing, so don't get annoyed at me for asking.. But are you restarting the webserver after these changes? You'll need to restart or reload your apache config in order for changes to take effect. Cheers, Graham On Thu, 15 Jan 2009 10:15:38 -0800 (PST), neri

Re: Creating a "Does not Equal To" SQL Statement

2009-01-15 Thread Graham Weldon
Hey, 'conditions' => array( 'OpportunityCategory.id !=' => 1) That should do it for you. Cheers. On Thu, 15 Jan 2009 05:13:20 -0800 (PST), exo_duz wrote: > Hi all, > > Simple question. I want to create a "Does Not Equal To" SQL statement > within the Controller. The SQL statement would

Re: Sessions, phpThumb, SwfUpload, Cake 1.2

2009-01-12 Thread graham
Hey, If you are overwriting your $components variable for that controller, try adding in the Session component. I've got the feeling you'll want to do: var $components = array('Thumb', 'SwfUpload', 'Session'); Cheers, Graham On Mon, 12 Jan 2009 12:4

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Graham Weldon
$_SERVER['REMOTE_ADDR'] should tell you what you need. Cheers, Graham Aus wrote: > I'm writing an application like no-ip.com , the user will send a _POST > message includes the domain name to the website, and the website > should map the domain name in the message w

Re: HABTM naming convention messed up?

2009-01-04 Thread Graham Weldon
it Cheers, Graham On Jan 5, 11:47 am, gearvOsh wrote: > Ok I have a users and teams system. Users are part of a team. Here is > the naming conventions: > > Model: Team, User > DB: teams, users > HABTM: teams_users (TeamUser model) > > But when I set my HABTM relation

Re: Can i compile the PHP webpage instead of leaving the source code on the server?

2009-01-04 Thread Graham Weldon
You can, through using an optimiser / byte code generator, for example: - Zend Optimiser http://zend.com/store/products/zend-optimizer.php - eAccelerator http://eaccelerator.net/ Cheers, Graham On Jan 5, 2:10 pm, Aus wrote: > I've designed a PHP webpage, but i don't want to k

Re: new benchmarks of PHP frameworks

2009-01-01 Thread Graham Weldon
Your benchmarks are still "Hello World" examples, from what I can see there. Great as a benchmark for those using static only pages with their frameworks, but I suggest that the majority of developers out there are doing something more complex. Cheers, Graham Weldon kiang wrote: &

Re: Modifying a String

2009-01-01 Thread Graham Weldon
ent tested the above, but its just basic String manipulation, you shouldnt have any issues modifying it. Best of luck with it. Cheers, Graham Weldon Kyle Decot wrote: > How would I find the first occurrence of a word or phrase in a string > and then strip off everything after that? > &

Re: new benchmarks of PHP frameworks

2009-01-01 Thread Graham Weldon
kephp-1.2.0/app/controllers/benchmark_controller.php Benchmark testing should be done with non-trivial code, and given these frameworks abstract databases, and that abstraction can affect performance, it should probably include tests that include database access. Cheers, Graham Weldon kiang

Re: HTML 4 specific CakePHP?

2008-12-26 Thread Graham Weldon
to the bakery, and share your helper with the community! Cheers, Graham (Predominant) gearvOsh wrote: > Honestly I really dislike the "xhtml" type of tags in CakePHP. There > are no reasons for that, I think it would be a better idea to make it > html 4 strict. > > Heres

Re: Advanced Routes

2008-11-25 Thread Graham Weldon
k your way from the top, and try some similar routing examples that are relevant to your particular app. Best fo luck, and be sure to let us know how you go. Cheers, Graham BeroFX wrote: > Hi guys! > > Imagine you have a standard social network with users who can have > blogs, pictu

Re: forget password

2008-09-02 Thread Graham Weldon
. This action should check the email address, username, key, and if all match successfully, provide a password reset input, where they can choose their own new password. I hope this gives you a little direction on what you need to be doing, and how to achieve it. Cheers, Graham On Wed, Sep 3, 2008

Re: forget password

2008-09-02 Thread Graham Weldon
Hey Ranjana, Were you looking to create a password reminder feature for a site you are building? Provide a little more detail about what you are trying to achieve, and someone will be able to provide some direction or assistance. Cheers, Graham On Tue, Sep 2, 2008 at 5:18 PM, Ranjana

Re: Even prettier URLs tutorial

2006-06-20 Thread Graham Bird
efer to be able to choose the URL. Maybe I need to explain that too. Thanks, Graham --~--~-~--~~~---~--~~ 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

Even prettier URLs tutorial

2006-06-20 Thread Graham Bird
lcome. Thanks, Graham --~--~-~--~~~---~--~~ 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 PROT

Re: Are you ready for the best Cake yet?

2006-05-03 Thread Graham Bird
Congratulations! --~--~-~--~~~---~--~~ 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 m

<    1   2