PayPal Payflow Pro Integration with CakePHP
Hi I need to integrate Paypal Payflow Pro with Cake. I saw there is a component for Paypal's direct payment API. Can it also be used for the Payflow Pro? Has anyone tried that? https://www.paypal.com/cgi-bin/webscr?cmd=_profile-comparison Thanks in advance for your help. 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: How to manage URLs that doesn't require access to Database
Yes, but only if you set the constant 'CAKE_ADMIN' to 'cpanel' in app/ config/core.php. :jc On 23 Apr., 23:31, shoesole <[EMAIL PROTECTED]> wrote: > If you preface any function in your controller with cpanel_ then it > will have the path you are desire. > > For example, in your users_controller file you will have a function > called cpanel_add(). Then that will be avaliable > atwww.mysite.com/cpanel/users/add > like you want. If you want the URLwww.mysite.com/cpanel/users/to be > a list page, simply make your index function in users_controller > cpanel_index(). Hope that 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?hl=en -~--~~~~--~~--~--~---
Re: How to Display info from Different tables ?
You can use : var $uses = array('model1', 'model2'); in the controller, that will give you access to the corresponding table using $this->Model1 and $this->Model2 ... You can use then $this->data['Model1] and $this->data['Model2'] in your views.. Note that is the model are "linked", such as Model1 hasMany Model2, you can use $this->Model1->Model2 Hope this help On Apr 24, 3:02 pm, 浪漫様 <[EMAIL PROTECTED]> wrote: > Dear mates, > I was wondering how to display information from different tables on a > same controller/view. > For example... i want a control panel, that manages different sections > of my website, and i want to show the last 5 entries in each table on > the initial menu [ as a preview ]. > When the login is succeed at "www.mysite.com/cpanel/admins/login" goes > to "www.mysite.com/cpanel/admins/index" and here i want to show the > last 5 records of each table on my DB for maintenaice... "users", > "categories", "items" but i want them centralized at > "www.mysite.com/cpanel/admins/index" instead of: > > "www.mysite.com/cpanel/users/index" > "www.mysite.com/cpanel/categories/index" > "www.mysite.com/cpanel/items/index" > > Also... how to limit CakePHP to take only 5 records [ "LIMIT (x,5)" on > mysql ] ? > Thank you very much! > Best Regards, > > Rohman --~--~-~--~~~---~--~~ 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 helper in custom helper
Have to reply to myself again. I was using $this->Session->check('User') from __construct function. Seems like helpers are not available in helper constructors. But why? Thank you. On 25 апр, 15:19, Sergei <[EMAIL PROTECTED]> wrote: > Hello, > > Is there a way to use session helper from my custom helper? > > Tried to write > var $helpers = array('Session'); > > But that doesn't work. When using > > $this->Session->check('User') > > for example, > > I get an error: --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Apparent unwanted query caching when using $this->query in a Model.
Hello everyone ! My intentions: - to get a (kind of) sequence nr for naming an object - (maybe) save someone a headache My (first) approach was to use the function "query()" in the Model like so: *snip* function getNextSeqNr() { $seqnr = $this->query("SELECT (MAX(Item.id)+1) AS seqnr FROM items AS Item"); if(empty($seqnr[0][0]['seqnr'])) $seqnr[0][0]['seqnr'] = 1; return $seqnr[0][0]['seqnr']; } *snip* This method was sufficient for a while, it worked, BUT... ...only if it was called once per controller-action. If I tried to do this in a loop, the query was only executed once... (although i turned everything off, that had remotely to do with caching) I finally got around to another, a little bit more "unfancy"/"oldskool" method to get what i wanted. *snip* function getNextSeqNr() { $db =& ConnectionManager::getDataSource($this->useDbConfig); $result = $db->rawQuery("SELECT (MAX(Item.id)+1) AS seqnr FROM items AS Item"); $seqnr = 1; if($result === false) { $this->log("bleep, error blah."); $seqnr = false; } else { if($result->num_rows == 1) { $row= $result->fetch_assoc(); $seqnr = $row['seqnr']; } } return $seqnr; } *snip* Now the query is not unduly cached anymore. Or maybe there is another explanation ? - Would love to hear it. Cheers, Ray --~--~-~--~~~---~--~~ 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: Wrong base path
When not using mod rewrite, you have to suppress the .htaccess files and uncomment : // define ('BASE_URL', env('SCRIPT_NAME')); in config/core.php On Apr 24, 9:58 am, brandao <[EMAIL PROTECTED]> wrote: > Hello, > > i'm new to cakephp and i hope i found some help here. So let's start > with the first problem i have. I can't use mod_rewrite so i have to > use the cakephp style to build urls. But the urls are wrong like the > following > > http://localhost/~myname/appname/app/webroot/index.php/~myname/appnam... > orhttp://localhost/~myname/appname/app/webroot/index.php/~myname/appnam... > > and the url i need is ... > > http://localhost/~myname/appname/app/webroot/index.php/controller/action > > So how can i solve it? Should i use the routing and how can i use it? > > Thanks for any help > > Regards > Björn --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Session helper in custom helper
Hello, Is there a way to use session helper from my custom helper? Tried to write var $helpers = array('Session'); But that doesn't work. When using $this->Session->check('User') for example, I get an error: Notice: Undefined property: SiteHelper::$Session in ...site.php on line 31 Fatal error: Call to a member function check() on a non-object in ...site.php on line 31 Using latest stable release. 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: Some Fresh Cake
Am I going crazy, or is anyone else having trouble downloading any of the Cake releases from cakeforge? >From this page: http://cakeforge.org/frs/?group_id=23&release_id=215 The 'download' links for the files just drop me on an inactive "donation" page -- no redirect, no download. Tried a few browsers too.. not firefox's fault. Any help? Thoughts? Thanks! Ryan --~--~-~--~~~---~--~~ 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: whats the relationship between CakePHP 1.2 test suite N SimpleTest
Great! Thanks Mariano. I downloaded the code yesterday and see the testAction method which i did not have in the previous version. Thanks for your help, I will give this a try Krishnan On Apr 23, 3:28 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > I haven't had time to write a Bakery article regarding this, but update to > latest SVN head and look for testAction() in CakeTestSuite. I still have to > add a couple of things but I'll try to give you an idea here: > > Say you have typical Articles controller, with articles model, and it looks > like this: > > > class ArticlesController extends AppController { > var $name = 'Articles'; > var $helpers = array('Ajax', 'Form', 'Html'); > > function index($short = null) { > if (!empty($this->data)) { > $this->Article->save($this->data); > } > > if (!empty($short)) { > $result = $this->Article->findAll(null, array('id', > 'title')); > } else { > $result = $this->Article->findAll(); > } > > if (isset($this->params['requested'])) { > return $result; > } > > $this->set('title', 'Articles'); > $this->set('articles', $result); > } > > } > > ?> > > Create then a file named articles_controller.test.php on your > app/tests/cases/controllers directory and inside put: > > > class ArticlesControllerTest extends CakeTestCase { > function startCase() { > echo 'StartingTestCase'; > } > > function endCase() { > echo 'EndingTestCase'; > } > > function startTest($method) { > echo 'Starting method ' . $method . ''; > } > > function endTest($method) { > echo ''; > } > > function testIndex() { > $result = $this->testAction('/articles/index'); > debug($result); > } > > function testIndexShort() { > $result = $this->testAction('/articles/index/short'); > debug($result); > } > > function testIndexShortGetRenderedHtml() { > $result = $this->testAction('/articles/index/short', > array('return' => 'render')); > debug(htmlentities($result)); > } > > function testIndexShortGetViewVars() { > $result = $this->testAction('/articles/index/short', > array('return' => 'vars')); > debug($result); > } > > function testIndexFixturized() { > $result = $this->testAction('/articles/index/short', > array('fixturize' => true)); > debug($result); > } > > function testIndexPostFixturized() { > $data = array('Article' => array('user_id' => 1, 'published' > => 1, 'slug'=>'new-article', 'title' => 'New Article', 'body' => 'New > Body')); > $result = $this->testAction('/articles/index', > array('fixturize' => true, 'data' => $data, 'method' => 'post')); > debug($result); > } > > } > > ?> > > Ok couple of things: > > * In second parameter of testAction() you send an array with attributes. > Among others use: > > - return: set to what you want returned. Valid values are: 'vars' > (so you get the view vars available after executing action), 'render' (so > you get html generated once action is run), or 'return' to get the returned > value when action uses $this->params['requested']. Default is 'return'. > > - fixturize: set to true if you want your models auto-fixturized (so > your application tables get copied, along with their records, totesttables > so if you change data it does not affect your real application.) If you set > 'fixturize' to an array of models, then only those models will be > auto-fixturized while the other will remain with live tables. > > - data: see last item > > - method: see last item > > * testAction()can auto-fixturize the model so if yourtestsubmits data (and > therefore saves records, see next item) you can safely do it ontesttables, > automatically created for you. > > * You can POST data as POST or GET using the 'data' setting, where you set > it to be an associative array consisting of fields => value. Take a look at > function testIndexPostFixturized() in abovetestcase to see how we emulate > posting form data for a new article submission. > > -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 > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de ks > Enviado el: Lunes, 23 de Abril de 2007 0
Re: newbie question...creating a 'login' element
Maybe try putting this in a beforeRender() function in your Users controller?: if(!isset($this->viewVars['error'])) { $this->set('error', false); } On Apr 23, 8:24 pm, Stacey <[EMAIL PROTECTED]> wrote: > hi all, > > i read a post in here about having a login form built into the default > layout. it suggested using an element, so i created one. i'm having > one small problem with variables, and i'm hoping someone can help me > out. what i'm trying to accomplish, is having the login form in the > right column...but, after they login, i want to replace the form with > a logout button. so, i figured the default layout would be the best > place for this logic. > > ok...here's the login element : > > > Incorrect Username/Password p> > > Login/Register > > > Username > input('User/username', array('id' => > 'user_username', 'size' => '40', 'class' => 'textbox')) ?> > tagErrorMsg('User/username', 'Username > required') ?> > > > Password > input('User/passwd', array('id' => > 'user_passwd', 'size' => '40', 'type'=>"password", 'class' => > 'textbox')) ?> > tagErrorMsg('User/passwd', 'Password required') ? > > > checkbox("User/cookie");?> Remember > Me > > > > > [Forgot Password?] > Not Registered? Sign Up! > > > > the 'error' variable is being passed from the login function in my > users controller... > > function login() > { > $this->set('error', false); > if(isset($this->params['data'])) > { > if ($this->params['data']['User']['username']=='') > { > $this->User->invalidate('username'); > } > else if ($this->params['data']['User']['passwd']=='') > { > $this->User->invalidate('passwd'); > } > else > { > $this->set('error', true); > } > $auth_num = $this->othAuth->login($this->params['data'] > ['User']); > $this->set('auth_msg', $this->othAuth->getMsg($auth_num)); > } > } > > and, here is the call from my default.thtml: > > renderElement("login",array("error"=>$error)); ?> > > my problem is, i get an 'undefined variable : error' if the page is > loaded from anywhere but the login function. i understand why this is > happening, but i'm not sure how to fix it. i tried using isset above > the call to renderElement, to try and set the variable to false if > it's not valid, but it won't let me do that...and, i think that's not > the right way anyway. > > can someone point me in the right direction to do this. > > 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 -~--~~~~--~~--~--~---
Multiple Fields on a form single model
We have a form that we are building. It has a section for work history that has multiple fields with the same text label and it is using the same model. so for example: employer : address : from to employer address: from to etc etc etc. Since that is using the same model, we need to have multiple instances of that model to process that area of the form. I have been unable to find how to do this with Cake, and have not seen any documentation on this. Is there any way we can do this with Cake? --~--~-~--~~~---~--~~ 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: Some Fresh Cake
I am pretty it says "No 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: othAuth...login problem
notice you have $this->set('auth_msg', $this->othAuth- >getMsg($auth_num)); and you don't print it in the view, it has some login hints for the user. like user/login incorrect etc.. On Apr 23, 7:07 pm, Stacey <[EMAIL PROTECTED]> wrote: > ok, i'm stupid. i am new to cake, and thought that othAuth somehow > handled the field validation. after reading some posts, i realized i > need to do it myself. got it working...thanks. > > On Apr 23, 12:30 pm, Stacey <[EMAIL PROTECTED]> wrote: > > > hi all, > > > cake version: v1.1.13.4450 > > > i've been trying to implement othAuth, and seem to be having a problem > > with login errors. it seems to be installed properly...if i login with > > the correct password, it lets me access the pages. but, it is not > > returning any errors if the login is incorrect or if the fields are > > not filled in properly. ie. missing username, etc. > > > here is my login.thtml: > > > Log In: > > > method="post"> > > > > Username > > input('User/username', array('id' => > > 'user_username', 'size' => '40')) ?> > > tagErrorMsg('User/username', 'Please enter your > > username') ?> > > > > > > Password > > input('User/passwd', array('id' => > > 'user_passwd', 'size' => '40', 'type'=>"password")) ?> > > tagErrorMsg('User/passwd', 'Please enter your > > password!') ?> > > > > > checkbox("User/cookie");?> > > > > > > > > here is my users_controller: > > > > class UsersController extends AppController > > { > > function login() > > { > > if(isset($this->params['data'])) > > { > > $auth_num = $this->othAuth->login($this->params['data'] > > ['User']); > > $this->set('auth_msg', $this->othAuth->getMsg($auth_num)); > > } > > } > > function logout() > > { > > $this->othAuth->logout(); > > $this->flash('You are now logged out!','/users/login'); > > } > > > function noaccess() > > { > > $this->flash("You don't have permissions to access this > > page.",'/admin/login'); > > } > > > function index() > > { > > $username = $this->Session->read('user'); > > if ($username) > > { > > $results = $this->User->findByUsername($username); > > $this->set('User', $results['User']); > > $this->set('last_login', $this->Session->read('last_login')); > > } else { > > $this->redirect('/users/login'); > > } > > }} > > > ?> > > > if i put in an incorrect username, or i even leave one of the fields > > blank, it just keeps returning to the login page without any > > errors...so it's hard to tell what's going on. > > > any suggestions on where my problem lies would be greatly appreciated. > > > 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 -~--~~~~--~~--~--~---
Confusion reguarding hasAndBelongsToMany updates
Using Cake Version 1.1.13 I have a "group" Model defined as such: class Group extends AppModel { var $name = 'Group'; var $hasAndBelongsToMany = array( 'User' => array( 'className' => 'User', 'joinTable' => 'map_groups_users', 'foreignKey' => 'group_id', 'associationForeignKey' => 'user_id' ) ); } I users to be able to join the group from a "join" page, so I created this in the group controller: function join($group_id) { $this->Group->id = $group_id; $save['Group']['id'] = $group_id; $save['User']['User'][] = $this->Session->read('user_id'); $this->Group->save($save); } The problem is, when the page is run, it first deletes everything from the map_groups_users table before doing the insert. I want to simply do an INSERT if the user_id is not in the mapping table. I realize I could do this with a custom query, just curious is there is a cleaner way of doing it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to Display info from Different tables ?
Dear mates, I was wondering how to display information from different tables on a same controller/view. For example... i want a control panel, that manages different sections of my website, and i want to show the last 5 entries in each table on the initial menu [ as a preview ]. When the login is succeed at "www.mysite.com/cpanel/admins/login" goes to "www.mysite.com/cpanel/admins/index" and here i want to show the last 5 records of each table on my DB for maintenaice... "users", "categories", "items" but i want them centralized at "www.mysite.com/cpanel/admins/index" instead of: "www.mysite.com/cpanel/users/index" "www.mysite.com/cpanel/categories/index" "www.mysite.com/cpanel/items/index" Also... how to limit CakePHP to take only 5 records [ "LIMIT (x,5)" on mysql ] ? Thank you very much! Best Regards, Rohman --~--~-~--~~~---~--~~ 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: association with mysql View
Whoa, that´s a lot of SQL! It might be easier to debug for people on this group, and for yourself, if you made a smaller example, just to see if you can get it to work in the simplest case. No SQL errors then... I noticed this query: SELECT `Transaction`.`id`, `Transaction`.`created`, `Transaction`.`modified`, `Transaction`.`date`, `Transaction`.`name`, `Transaction`.`amount`, `Transaction`.`user_id`, `Transaction`.`account_id`, `Transaction`.`type_id`, `Transaction`.`jointaccount_id` FROM `transactions` AS `Transaction` WHERE `Transaction`.`user_id` = 1 So it looks like Cake is atempting to join the transactions view for user=1. If you run the above query manually, do you get any results? On Apr 23, 6:10 pm, sumanpaul <[EMAIL PROTECTED]> wrote: > Thx for concern ..here are the details. > > 1. User >hasMany >Balance(it's a view) > > 2. balance view sql : select `transactions`.`user_id` AS > `user_id`,sum(`transactions`.`amount`) AS `total` from `transactions` > group by `transactions`.`user_id` > > 3. Relations > > user.php > ~~ > > class User extends AppModel { > > var $name = 'User'; > > //The Associations below have been created with all possible keys, > those that are not needed can be removed > var $belongsTo = array( > 'Group' => array('className' => 'Group', > 'foreignKey' > => 'group_id', > 'conditions' > => '', > 'fields' => > '', > 'order' => '', > > 'counterCache' => ''), > ); > > var $hasOne = array( > 'Balance' => array('className' => 'Balance', > 'foreignKey' > => 'user_id', > 'conditions' > => '', > 'fields' => > '', > 'order' => '', > 'dependent' > => ''), > ); > var $hasMany = array( > 'Account' => array('className' => 'Account', > 'foreignKey' > => 'user_id', > 'conditions' > => '', > 'fields' => > '', > 'order' => '', > 'limit' => '', > 'offset' => > '', > 'dependent' > => '', > 'exclusive' > => '', > 'finderQuery' > => '', > > 'counterQuery' => ''), > 'Transaction' => array('className' => 'Transaction', > 'foreignKey' > => 'user_id', > 'conditions' > => '', > 'fields' => > '', > 'order' => > 'date desc', > 'limit' => > '10', > 'offset' => > '', > 'dependent' > => '', > 'exclusive' > => '', > 'finderQuery' > => '', > > 'counterQuery' => ''), > ); > > var $hasAndBelongsToMany = array( > 'Jointaccount' => array('className' => 'Jointaccount', > 'joinTable' => > 'jointaccounts_users', > 'foreignKey' => 'user_id', > 'associationForeignKey' => > 'jointaccount_id', > 'conditions' => '', > 'fields' => '', > 'order' => '', > 'limit' => '', >
Re: Some Fresh Cake
One of the buttons should say, "Not Now" or something to that effect On Apr 24, 7:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Am I going crazy, or is anyone else having trouble downloading any of > the Cake releases from cakeforge? > > >From this page: > > http://cakeforge.org/frs/?group_id=23&release_id=215 > > The 'download' links for the files just drop me on an inactive > "donation" page -- no redirect, no download. Tried a few browsers > too.. not firefox's fault. > > Any help? Thoughts? > > Thanks! > Ryan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
findAll condtion and sub model feature request
is it or would it be possible to do something like that : $this->Application->Server- >findAll(array('Application'=>array('id'=>1))); In order to find every Server that belongs to the application '1'. In order to performe that today I use bindModel and his conditions: $this->Application->Server- >bindModel(array('belongs'=>array('Application'=>array('conditions'=>'Application.id=1'; $this->Application->Server->findAll(); Then My second question : the result of that request give me an array of every servers and an arrayr of associated applications that match the related conditions. Array ( [0] => Array ( [Server] => Array ( [id] => 1 [name] => beasb1 ) [Application] => Array ( [0] => Array ( [id] => 1 [name] => infoqua ) ) ) [1] => Array ( [Server] => Array ( [id] => 2 [name] => beasb0 ) [Application] => Array ( ) ) ... But what I want looks like : Array ( [0] => Array ( [Server] => Array ( [id] => 1 [name] => beasb1 ) [Application] => Array ( [0] => Array ( [id] => 1 [name] => infoqua ) ) ) ... And the only solution I found is to unset every Server without Application. Can't CakePHP handle this ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Save one field to two models
Hi guys, I would like to save one inputfield to two models. But it only works when I make to inputfield: Page\title and Node\title. I just want one inputfield for both... same data! How can I fill Node\title with the data of Page\title? Or have someone an other suggestion? Ciao --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with Ajax Chat and hosting
Hi folks! I have downloaded the ajax chat plugin and execute it in my site...In localhost it works perfectly but, when I upload it to the hosting I get this error: Forbidden You don't have permission to access /cake/chat/update/chat on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. The chat controller has the right permissions. I tried to delete the chat controller from the hosting and the same error!, I tried to type the url calling this controller and this time the error didn't appear, just the message "No messages". The question is ¿the server needs a special configuration for run this plugin? 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 -~--~~~~--~~--~--~---
Problem: Ajax Chat plugin and Hosting
Hi folks! I have downloaded the ajax chat plugin and ran it in my site...In localhost it works perfectly but, when I upload it to the hosting I get this error: Forbidden You don't have permission to access /cake/chat/update/chat71 on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. The chat controller has the right permissions. I tried to delete the chat controller from the hosting and the same error!, I tried to type the url calling this controller and this time the error didn't appear, just the message "No messages". The question is ¿the server needs an especial configuration for run this plugin? 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 -~--~~~~--~~--~--~---
Problem with Ajax Chat and hosting
Hi folks! I have downloaded the ajax chat plugin and ran it in my site...In localhost it works perfectly but, when I upload it to the hosting I get this error: Forbidden You don't have permission to access /cake/chat/update/chat71 on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. The chat controller has the right permissions. I tried to delete the chat controller from the hosting and the same error!, I tried to type the url calling this controller and this time the error didn't appear, just the message "No messages". The question is ¿the server needs an especial configuration for run this plugin? 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 -~--~~~~--~~--~--~---
Pagination default order for each column
Hi, I'm using Pagination to display a table with several columns. My question is if is possible to setup a default order (DESC or ASC) independently for each column, to be used on the first time that any column header is clicked. For example: If I have the following table: Rank | Price |Points 1 | $5 | 9.5 2 | $8 | 9.7 3 | $3 | 9.2 4 | $1 | 8.3 5 | $10| 8.5 If I click the "Price" column header for first time, I would like that table would be sorted by Price *Ascending* order ($1, $3, $5 ...) But If I click the "Points" column for the first time, I would like that the table would be sorted by Points *Descending* order (9.7, 9.5, 9,2 ...) that makes more sense (no need to click it twice) Is it possible in configure it in Pagination? Sorry if it is a basic question - I'm new in Pagination. regards Defranco --~--~-~--~~~---~--~~ 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: Complex Find Conditions with "sound like" OR soundex()
On Apr 24, 2007, at 1:17 AM, c3k wrote: > > in a model, how can I create a condition array that generate an sql > query like: > > SELECT * FROM dbo.Orders > WHERE SOUNDEX(ShipName) = SOUNDEX('ernest') $this->Order->find("SOUNDEX(Order.ShipName) = SOUNDEX('ernest')"); > > OR > > SELECT * FROM dbo.Orders > WHERE ShipName SOUNDS LIKE 'ernest' $this->Order->find("Order.ShipName SOUNDS LIKE 'ernest'"); (off-the-cuff, ymmv) -- John --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
confused newbie...trying to figure out what problem i need to search on
hi all, i'm trying to implement cakephpbb. i've got the most of it working, except for the admin section of phpbb. when i try to hit the url 'myapp/forums/admin', i get the following error: Missing Method in ForumsController You are seeing this error because the action admin is not defined in controller ForumsController If you want to customize this error message, create app\views/errors/ missing_action.thtml. Fatal: Confirm you have created the ForumsController::admin() in file : app\controllers\forums_controller.php if i add the function admin() to my ForumsController, it then wants a view. so, i create an admin.thtml. after doing that, i now get this: Missing controller You are seeing this error because controller Phpbb2Controller could not be found. Notice: If you want to customize this error message, create app\views/ errors/missing_controller.thtml. Fatal: Create the class below in file : app\controllers \phpbb2_controller.php i'm guessing it wants a Phpbb2Controller because that is the directory in which the admin folder is located. ie. \app\webroot\phpBB2\admin\ i've searched all over the forums, and come across 'admin routing', but i'm not sure if that's what i need. any direction would be helpful. i'm just trying to pin down what i actually need to search on... 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: How to manage URLs that doesn't require access to Database
Woodsman, I'm not sure when it was added but the first time I used it was in 1.1.13. So I know it was prior to 1.2. It's a pretty sweet solution. --~--~-~--~~~---~--~~ 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: SWFupload
What was the problem? (in case anyone else comes across this) On Apr 23, 8:34 am, Enchy <[EMAIL PROTECTED]> wrote: > Got it work 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: For CakePHP Linux users: gedit snippets
Cool, thanks for sharing. The only thing is that there is still a bug with highlighting of mixed php and html in gtksourceview. Otherwise gedit is a really nice editor. Greez, Timo On Apr 24, 5:59 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello all, > > Decided to make a small contribution here for all cakephp linux users: > snippets for quick development. As seen in Textmate for Mac or Intype > for Windows. Snippets will allow you to simply write a quick trigger > tag and the editor will replace it with code. > > I.E. type htmlimagelink press tab and you will get > > echo $html->link($html->image("image",array()),"/location",null, null, > false); > > upon pressing tab again you will be able to edit the image, location > and false vars. (just as an example). > > Screenshot: http://aluna.homelinux.net/img/snippets.jpg > Download:http://aluna.homelinux.net/img/cakephp_snippet.tar.gz > > Instructions are simple > > 1. Simply install the snippet plugin for gedit (I would recomend > insalling all gedit plugins, ubuntu users can do a: sudo apt-get > install gedit-plugins from a console). > > 2. Untar cakephp_snippet.tar.gz and copy the file php.xml to ~/.gnome2/ > gedit/snippets > > Done! Restart gedit, enable snippets in the preferences->plugin window > and start using. > > After this you can find a list of available snippets by clicking Tools > -> Manage Snippets then selecting PHP. > > Initially the cakephp snippet list is small, the idea is to make it a > group effort and everyone contribute to it. > > Hope anyone finds this useful, I sure did! --~--~-~--~~~---~--~~ 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: Using PHPTAL with Cake: PhptalView class
The flip side is - Good coders just read the code in the article like regular text ;) T -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = On 4/24/07, Daniel Kvasnicka jr. <[EMAIL PROTECTED]> wrote: > > On Apr 24, 10:06 am, "Mariano Iglesias" <[EMAIL PROTECTED]> > wrote: > > Yes it would. I'm a reader and it would help me. > > > > I added the source as a second page. Just wanted to say, that I'm a > reader too :)...and that's why I dont like when the source is mixed > with the text. I find an article, download the source and then work --~--~-~--~~~---~--~~ 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: Unsure of how to do HABTM in my situation
Make Instruments your main focus and work outwards on both sides Instrument: hasOne type hasMany Mfg hasMany Artist Artist: hasMany Band hasMany Instrument Band: hasMany Artist Mfgs: hasMany Instrument Make a the database schema and do a quick bake, adjust further according to requirements The key being - do not start coding till you have the Database structure (and relations) almost finalized, how will you know that it is almost finalized? The bake script should pick up all the relations you want automagically (which it does if you have created the tables properly) HTH Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = On 4/24/07, Vache <[EMAIL PROTECTED]> wrote: > > I've worked through the Cake manual, and it only seemed to scratch the > surface on this concept. I'm not new to PHP, nor to MySQL, but I am to > Cake and a pre-made MVC framework, so be gentle in that regard. :) > > My situation is this: > > My musician's gear page will let the user search for an musician or an > entire band, and display the instruments they use (guitar, bass, > drums). My goal is to have the DB searchable via Musican, Band, > Instrument Type, or Instrument manufacturer. > > Mfgs -> Types* -> Instruments -> Artists -> Bands > > * Guitar, Bass, Drums > > In plain english - Many manufacturers make many different types of > instruments. Many kinds of instruments can be played by many Artists. > Many artists can be in many bands. Many bands can have many artists. > > Real world example: David Grohl of the band 'Foo Fighters', 'Nirvana', > and many others. He's a drummer, a guitar player, and a bass player, > with multiple makes/models of all the aforementioned instruments. > > Any and all help is greatly appreciate. I'll buy you cookies if you > can explain more than the manual does. > > > > > --~--~-~--~~~---~--~~ 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: Using PHPTAL with Cake: PhptalView class
On Apr 24, 10:06 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Yes it would. I'm a reader and it would help me. > I added the source as a second page. Just wanted to say, that I'm a reader too :)...and that's why I dont like when the source is mixed with the text. I find an article, download the source and then work with it, refering back to the article for information on how to work with the code. And when I'm confronted with tens of lines of code (which I've already downloaded and seen) every time I need to look in the article just for some usage info, it really annoys me. Posting it as a second page is a good compromise. Dan --~--~-~--~~~---~--~~ 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 to manage URLs that doesn't require access to Database
hey! shoesole, the "cpanel_" preface worked so well so far! and no needed to activate the admin route on "core.php". so is exactly what i wanted (^O^)/ now is easier to organize functions inside a folder! thank you all. Rohman --~--~-~--~~~---~--~~ 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: Using PHPTAL with Cake: PhptalView class
Yes it would. I'm a reader and it would help me. -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 -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Daniel Kvasnicka jr. Enviado el: Martes, 24 de Abril de 2007 04:18 a.m. Para: Cake PHP Asunto: Re: Using PHPTAL with Cake: PhptalView class Would it? To be honest, that's the thing I hate most about articles, when source code is posted directly to the article. --~--~-~--~~~---~--~~ 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: Using PHPTAL with Cake: PhptalView class
Make it a mulitpage article. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Complex Find Conditions with "sound like" OR soundex()
in a model, how can I create a condition array that generate an sql query like: SELECT * FROM dbo.Orders WHERE SOUNDEX(ShipName) = SOUNDEX('ernest') OR SELECT * FROM dbo.Orders WHERE ShipName SOUNDS LIKE 'ernest' ??? Is there a way whitout have to use $model->query(); --~--~-~--~~~---~--~~ 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: Using PHPTAL with Cake: PhptalView class
On Apr 24, 1:46 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > And also it would be good to include source code inside article content > instead of linking to cakeforge, easier for readers to get the code. > Would it? To be honest, that's the thing I hate most about articles, when source code is posted directly to the article. Dan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Wrong base path
Hello, i'm new to cakephp and i hope i found some help here. So let's start with the first problem i have. I can't use mod_rewrite so i have to use the cakephp style to build urls. But the urls are wrong like the following http://localhost/~myname/appname/app/webroot/index.php/~myname/appname/controller/action or http://localhost/~myname/appname/app/webroot/index.php/~myname/appname/app/webroot/ and the url i need is ... http://localhost/~myname/appname/app/webroot/index.php/controller/action So how can i solve it? Should i use the routing and how can i use it? Thanks for any help Regards Björn --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
JavaScript and HTML Available
Link Direct to Order Pagejavascript and html available http://www.jdoqocy.com/placeholder-2056041?target=_top&mouseover=N --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
LIMIT findAll()
OK, I have a db schema that has a CostCenterItem which has a foreign key to Item which has a foreign key to Vendor. I need to sort my result set by Vendor so my query looked like this: $data = $this->HistoryLog->findAll(null, null, 'CostCentersItem.Item.Vendor.name ASC', null, 4); I had just 'Vendor.name ASC' but it said that field didn't exist. Now I'm getting a generic sql error. Any ideas? Brian --~--~-~--~~~---~--~~ 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: Using PHPTAL with Cake: PhptalView class
Yes, I'm using PHP5 because PHPTAL is only for PHP5 (except some ancient versions). Removing try/catch would not help. Dan On Apr 24, 12:14 am, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]> wrote: > You need to change your view class on cakeforge. You are using php 5 syntax > with your try and catch code block. > > The article itself is still in queue so the link above is not valid until it > is approved by an admin... > > -- > /** > * @author Larry E. Masters > * @var string $userName > * @param string $realName > * @returns string aka PhpNut > * @access public > */ > > On 4/23/07, Daniel Kvasnicka jr. <[EMAIL PROTECTED]> wrote: > > > > > Hi folks, > > I know a few people were talking about this, but I haven't found any > > solution, so I've took View and derived a simple PhptalView class from > > it. It enables you to use PHPTAL templating engine with Cake. > > > It's really siple, but it works for my views and layouts. Read more at > > >http://bakery.cakephp.org/articles/view/using-phptal-for-templates-ph... > > > Waitin' for your comments, > > Dan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Unsure of how to do HABTM in my situation
I've worked through the Cake manual, and it only seemed to scratch the surface on this concept. I'm not new to PHP, nor to MySQL, but I am to Cake and a pre-made MVC framework, so be gentle in that regard. :) My situation is this: My musician's gear page will let the user search for an musician or an entire band, and display the instruments they use (guitar, bass, drums). My goal is to have the DB searchable via Musican, Band, Instrument Type, or Instrument manufacturer. Mfgs -> Types* -> Instruments -> Artists -> Bands * Guitar, Bass, Drums In plain english - Many manufacturers make many different types of instruments. Many kinds of instruments can be played by many Artists. Many artists can be in many bands. Many bands can have many artists. Real world example: David Grohl of the band 'Foo Fighters', 'Nirvana', and many others. He's a drummer, a guitar player, and a bass player, with multiple makes/models of all the aforementioned instruments. Any and all help is greatly appreciate. I'll buy you cookies if you can explain more than the manual does. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---