Re: how i make backend and frontend?
Configure admin and clients as prefixes in core.php then in clients controller admin_index() clients_index() index() - S On 16 July 2010 00:11, Davor Ilic wrote: > My problem is i use now my own backend which i wrote it with cakephp but > how i can use now the same controllers for my frontend not the same as > backend methods but the same controller ? example: > > i have an Controller: ClientsController in which an: admin_index() and > index() but can´t use index() without asking mie to authentifacting me... > how to solve this to see the frontend > > > 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 to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Something like ActiveMerchant?
This all sounds great! I don't have much of have an opinion of what to do with the name considering the most obvious combinations of PHP and Merchant have already been used. I dunno, maybe "Active PHP Merchant"? I'm not the most imaginative when it comes to naming. I haven't used PHPUnit yet, but I think that could be a nice way for interested parties (myself included) to get involved just by starting some tests. Take care, Cameron On Jul 14, 2:34 pm, Andreas wrote: > I 'll make a git repo in a few days so you can see the source code. > > @iamcam The code is close to ruby code ( as php 5.2 allows ). Gateways > have standard public methods ( authorize, purchase, void etc ). > > Every response is an Response class object. There is also Creditcard > class object, and everything Active Merchant has. > > Some missing, for now, features are PHPUnit tests and integation form > helper. > > By the way, thinking of naming this project "phpMerchant" but googling > on that i found this linkhttp://code.google.com/p/php-merchant/ > > It is an Active Merchant like project, but it is inactive for over a > year... > > On Jul 14, 10:15 am, "iamcam (Cameron Perry)" > > > > wrote: > > Bharadwaj, That's the best I could come up with in the PHP world. > > Unfortunately the PEAR packages look outdated, and the Kohana > > component is for that framework - not sure how it would work as a > > stand-alone. There are ports in other languages (python and Objective- > > C), but that doesn't help us. > > > This is a huge need in the PHP community, even if most the payment > > gateways already have sample code. It's so much nicer working with > > consistent interfaces than trying to decipher the intricacies between > > all the various APIs. > > > ~Cameron > > > On Jul 12, 10:32 pm, Bharadwaj Parthasarathy > > wrote: > > > > +1 for github > > > > I am also interested in participating in development. > > > > From a quick google search, there seems to be no similar framework in > > > php. > > > You may want to check this > > > -http://stackoverflow.com/questions/2768942/do-any-projects-exist-for-... > > > > - Bharadwaj > > > > On 12-Jul-10, at 10:23 PM, iamcam (Cameron Perry) wrote: > > > > > How closely are you following the original ruby version? I'd be > > > > interested in helping out here and there once you put it on github (so > > > > much better than google). > > > > > ~Cameron > > > > > On Jul 9, 4:20 pm, Andreas wrote: > > > >> Hi, > > > > >> I am currently developing a port of Active Merchant on PHP. > > > > >> I 've also add a few gateways for testing such as PaypalExpress, > > > >> Hsbc, > > > >> Authorize.net(partial), Centinel 3D secure(partial), and > > > >> Eurobank(Greek bank). > > > > >> I am planning to make a public repository on github or google project > > > >> hosting, when i clean the code and add some documentation. > > > > >> I hope this will help php developers to integrate payments api to > > > >> their eCommerce applications. > > > > >> On Jul 6, 1:51 am, "iamcam (Cameron Perry)" > > > >> wrote: > > > > >>> Has anyone seen anything like ActiveMerchant on the PHP side? I > > > >>> searched around a bit but haven't seen anything. > > > > >>> I'm intrigued by the fact that it supports so many gateways out of > > > >>> the > > > >>> box, and wonder if (a) anyone has already come up with a PHP > > > >>> alternative, or (b) thinks it feasible to attempt a port. > > > > >>> Thanks! > > > >>> Cameron > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > > > 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 to cake-php@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > cake-php+unsubscr...@googlegroups.com For more options, visit this > > > > group athttp://groups.google.com/group/cake-php?hl=en 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: FULL TEXT SEARCH
You don't need to do a custom query. Just include the following in your conditions array: $conditions = array( 'MATCH(Post.title, Post.content) AGAINST(\'' . $terms . '\' IN BOOLEAN MODE)' ); And be sure to setup your fields array like so: $fields = array( 'MATCH (Post.title, Post.content) AGAINST (\'' . $terms . '\') AS score', 'Post.id', 'Post.title', 'Post.content' ); Then execute your find query, as usual. You can use this approach with pagination as well. HTH. 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to populate my data (from one table) into combobox
i attached my App at this link : http://www.ziddu.com/download/10731772/CategoryApp.rar.html On Jul 16, 9:45 am, Cruisine wrote: > IT WORKS...thanks CRICKET > > On Jul 15, 10:20 pm, cricket wrote: > > > On Thu, Jul 15, 2010 at 5:27 AM, Badieah wrote: > > > hi,i'm still newbie in cakePHP > > > i have a problem to populate my data into combobox. > > > i have one table named Category which have function to manage account > > > (in finance) and sub account.. > > > the logic are account have many sub account, sub account have many > > > child..the field of the table represented in followings : > > > id --->id of the account data > > > parent_id --->id parent of the account data > > > name --->name of the account > > > when i want to make a new account (it can account,sub account and > > > child) i want to select the parent of that account..it will get from > > > field id.. > > > i tried to write the followings script into the controller : > > > > function categoryParent(){ > > > $parentinfo = $this->Category- > > >>find('list',array('fields'=>array('Category.id','Category.name'))); > > > $this->set('idparent',$parentinfo); > > > } > > > First, I would name the variable something that better reflects what > > the list is. This is all you should need in the controller. > > > $this->set( > > 'categories', > > $this->Category->find('list') > > ); > > > > but i still dont know how to call the variable "idparent" in "add" > > > view...so i can populate all "id" (not parent_id) in combobox.. > > > can sombody help me to solve this problem? > > > I'm not sure what you're asking here. This will create the select list: > > > echo $form->input('Account.category_id', array('options' => $categories)); > > > Incidentally, if you were to use Andy Dawson's TreeHelper [1] you > > could create the list items so that they appear threaded, eg: > > > category A > > --- category A.1 > > -- category A.1.a > > -- category A.1.b > > --- category A.2 > > category B > > category C > > --- category C.1 > > > It's a little complicated to understand at first but worth the time to > > figure out. > > > [1]http://bakery.cakephp.org/articles/view/tree-helper-1 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to populate my data (from one table) into combobox
the data had been shown in combobox..but why i still cant save the data into database? seems like it replaced the existing data that i choose from the combobox.. how to solve that problem?? On Jul 16, 9:45 am, Cruisine wrote: > IT WORKS...thanks CRICKET > > On Jul 15, 10:20 pm, cricket wrote: > > > On Thu, Jul 15, 2010 at 5:27 AM, Badieah wrote: > > > hi,i'm still newbie in cakePHP > > > i have a problem to populate my data into combobox. > > > i have one table named Category which have function to manage account > > > (in finance) and sub account.. > > > the logic are account have many sub account, sub account have many > > > child..the field of the table represented in followings : > > > id --->id of the account data > > > parent_id --->id parent of the account data > > > name --->name of the account > > > when i want to make a new account (it can account,sub account and > > > child) i want to select the parent of that account..it will get from > > > field id.. > > > i tried to write the followings script into the controller : > > > > function categoryParent(){ > > > $parentinfo = $this->Category- > > >>find('list',array('fields'=>array('Category.id','Category.name'))); > > > $this->set('idparent',$parentinfo); > > > } > > > First, I would name the variable something that better reflects what > > the list is. This is all you should need in the controller. > > > $this->set( > > 'categories', > > $this->Category->find('list') > > ); > > > > but i still dont know how to call the variable "idparent" in "add" > > > view...so i can populate all "id" (not parent_id) in combobox.. > > > can sombody help me to solve this problem? > > > I'm not sure what you're asking here. This will create the select list: > > > echo $form->input('Account.category_id', array('options' => $categories)); > > > Incidentally, if you were to use Andy Dawson's TreeHelper [1] you > > could create the list items so that they appear threaded, eg: > > > category A > > --- category A.1 > > -- category A.1.a > > -- category A.1.b > > --- category A.2 > > category B > > category C > > --- category C.1 > > > It's a little complicated to understand at first but worth the time to > > figure out. > > > [1]http://bakery.cakephp.org/articles/view/tree-helper-1 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to populate my data (from one table) into combobox
IT WORKS...thanks CRICKET On Jul 15, 10:20 pm, cricket wrote: > On Thu, Jul 15, 2010 at 5:27 AM, Badieah wrote: > > hi,i'm still newbie in cakePHP > > i have a problem to populate my data into combobox. > > i have one table named Category which have function to manage account > > (in finance) and sub account.. > > the logic are account have many sub account, sub account have many > > child..the field of the table represented in followings : > > id --->id of the account data > > parent_id --->id parent of the account data > > name --->name of the account > > when i want to make a new account (it can account,sub account and > > child) i want to select the parent of that account..it will get from > > field id.. > > i tried to write the followings script into the controller : > > > function categoryParent(){ > > $parentinfo = $this->Category- > >>find('list',array('fields'=>array('Category.id','Category.name'))); > > $this->set('idparent',$parentinfo); > > } > > First, I would name the variable something that better reflects what > the list is. This is all you should need in the controller. > > $this->set( > 'categories', > $this->Category->find('list') > ); > > > but i still dont know how to call the variable "idparent" in "add" > > view...so i can populate all "id" (not parent_id) in combobox.. > > can sombody help me to solve this problem? > > I'm not sure what you're asking here. This will create the select list: > > echo $form->input('Account.category_id', array('options' => $categories)); > > Incidentally, if you were to use Andy Dawson's TreeHelper [1] you > could create the list items so that they appear threaded, eg: > > category A > --- category A.1 > -- category A.1.a > -- category A.1.b > --- category A.2 > category B > category C > --- category C.1 > > It's a little complicated to understand at first but worth the time to > figure out. > > [1]http://bakery.cakephp.org/articles/view/tree-helper-1 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to populate my data (from one table) into combobox
thx for ur reply.. the exactly thing that i want to achieve is populating field "id" and "name" into combobox..just that.. but i just have one table (Categories)..the question is how to populate all data field "id" as values and field "name" as display label and show into combobox? but i'm going to try from ur answer first..i wish it works.. oya,u can check my App from this link: http://www.ziddu.com/download/10730967/CategoryApp.rar.html On Jul 15, 10:20 pm, cricket wrote: > On Thu, Jul 15, 2010 at 5:27 AM, Badieah wrote: > > hi,i'm still newbie in cakePHP > > i have a problem to populate my data into combobox. > > i have one table named Category which have function to manage account > > (in finance) and sub account.. > > the logic are account have many sub account, sub account have many > > child..the field of the table represented in followings : > > id --->id of the account data > > parent_id --->id parent of the account data > > name --->name of the account > > when i want to make a new account (it can account,sub account and > > child) i want to select the parent of that account..it will get from > > field id.. > > i tried to write the followings script into the controller : > > > function categoryParent(){ > > $parentinfo = $this->Category- > >>find('list',array('fields'=>array('Category.id','Category.name'))); > > $this->set('idparent',$parentinfo); > > } > > First, I would name the variable something that better reflects what > the list is. This is all you should need in the controller. > > $this->set( > 'categories', > $this->Category->find('list') > ); > > > but i still dont know how to call the variable "idparent" in "add" > > view...so i can populate all "id" (not parent_id) in combobox.. > > can sombody help me to solve this problem? > > I'm not sure what you're asking here. This will create the select list: > > echo $form->input('Account.category_id', array('options' => $categories)); > > Incidentally, if you were to use Andy Dawson's TreeHelper [1] you > could create the list items so that they appear threaded, eg: > > category A > --- category A.1 > -- category A.1.a > -- category A.1.b > --- category A.2 > category B > category C > --- category C.1 > > It's a little complicated to understand at first but worth the time to > figure out. > > [1]http://bakery.cakephp.org/articles/view/tree-helper-1 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
HOW TO POPULATE DATA INTO COMBOBOX?
hi,i'm still newbie in cakePHP i have a problem to populate my data into combobox. i have one table named Category which have function to manage account (in finance) and sub account.. the logic are account have many sub account,and sub account have many child..the field of the table represented in followings : id --->id of the account data parent_id --->id parent of the account data name--->name of the account when i want to make a new account (it can account,sub account and child) i want to select the parent of that account..it will get from field id.. i tried to write the followings script into the controller : function categoryParent(){ $parentinfo = $this->Category- >find('list',array('fields'=>array('Category.id','Category.name'))); $this->set('idparent',$parentinfo); } but i still dont know how to call the variable "idparent" in "add" view...so i can populate all "id" (not parent_id) in combobox.. can sombody help me to solve this problem? i've been attached my App to this link : http://www.ziddu.com/download/10730967/CategoryApp.rar.html 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
how i make backend and frontend?
My problem is i use now my own backend which i wrote it with cakephp but how i can use now the same controllers for my frontend not the same as backend methods but the same controller ? example: i have an Controller: ClientsController in which an: admin_index() and index() but can´t use index() without asking mie to authentifacting me... how to solve this to see the frontend 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Mod_rewrite not work
Good night I am testing a website developed with cakephp, and seems to me a 404 error. I have found that the mod_rewrite module is enabled, phpinfo (). .htaccess files are correct, since they are the default files Any ideas? Thanks 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Best practice query - Where to render element
@Nabil, @Sam, thanks both for your ideas! I believe for consistency sake thruout the app, i'll stick to the controller->view->element chain (comin from a J2EE backgrnd, its hard to break conventions and rules :) ) But of course as you guys suggested, i can excuse myself in certain cases. KS On Jul 15, 12:26 am, Sam wrote: > One use I've had for rendering an element in the controller(well, from > a component actually) is for a form plugin- my users could put a > bbcode like tag in the body of a page and it would render the proper > form within their content... normally I would do this processing with > a helper, but the form fields were stored in the database, which made > a component a more logical place to retrieve the data and render the > element. > > On Jul 14, 1:17 pm, Nabil Alsharif wrote: > > > It's usually best to have the view render the elements and to pass > > settings/variables to view that passes it on to the element but > > to every rule there are exceptions. > > > On Wed, Jul 14, 2010 at 1:52 PM, sanedevil wrote: > > > Hi Bakers! > > > Is it ok to render an element from a controller? Or as a best > > > practice, let the controller always render the view and then in the > > > view render the element? > > > > Thanks! KS > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > > athttp://groups.google.com/group/cake-php?hl=en 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Nickname routing question
Hi CakePHP community! I have a doubt about routing and accesing models while routing. The thing is I have two models: user, and group. Both have show pages. I want to have nicknames so I have a nicknames table and I want to access the show method in this way: www.mydomain.com/thisismygroup1 www.mydomain.com/user34 Nicknames table: id group_id user_id detail (nickname) I can't use normal routing because I don't know to wich controller the nickname belongs to. I need to access Nickname model inside routes.php? Then if nickname has user_id I redirect to /users/show and if nickname has group_id I redirect to /groups/show. Is that ok? It's possibly and right to access a Model inside routes? 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Cannot send the email to more than one recipient.
I ran into the same problem a long while ago. And your right the to is a string but the component doesn't do anything with the $to var except pass it off to the php mail function. The way the php mail function processes the mail depends on how it is configured. If you search for "php mail sending to more than one email" you'll see almost all of the example solutions use a loop to send the same email to multiple individual 'to' emails. The php mail documentation indicates that you can send to multiple by separating with a ',' but I've yet to see anywhere explain exactly how to configure your mail subsystem to support it. I'm currently using postfix on my local dev and local server. Not sure exactly what my deployed host is using. The problem has nothing to do with the email component but rather with the email subsystem on the machine/host your running on. The php mail documentation also gives plenty of warnings about differences between windows and linux and weather or not you have a MTA running etc. I think a single to recipient is a better design pattern as it keeps the email address more private. It also allows better design for sending to large groups as I believe there is a limit to the number of email addresses. If I need to send to a group then I send to myself or a blackhole email address and cc all the others. The only reason I would do that is if I needed to allow or expected the recipients to carry on a thread via reply to all. I never did figure out how to setup my local mail system to handle multiple to recipients, and I figured I would run into similar problems with different host so I looked for a more manageable solution. I moved to the swiftmailer component to make better use of the SMTP and ssl connections thus by passing most of whatever mail subsystem was installed on the host and connecting directly to a known dedicated smtp server. However I still send the email to one recipient. You'll need to either send multiple copies of the same email to each person via a loop Or add the additional emails to the CC or BCC array. On Jul 14, 9:17 pm, googong wrote: > Yes other options are fine > -one "to" recipient, > -one and many "cc" recipient. > -one and many "bcc" recipient. > > I wonder why "to" option need to be string because cc and bcc are > array and it works fine. > > On Jul 15, 6:37 am, nurvzy wrote: > > > Can you get it to work with just one recipient? Because my first > > question is if you (or your host) has setup sendmail properly. You > > can always use a SMTP server to send your mail which is usually > > recommended for bulk email anyway. > > > Nick > > > On Jul 13, 9:27 pm, googong wrote: > > > > Hi all, > > > I follow the > > > documenthttp://book.cakephp.org/view/1284/Class-Attributes-and-Variables > > > to send mail. > > > > "Address the message is going to (string). Separate the addresses with > > > a comma if you want to send the email to more than one recipient." > > > > I tried to send many "to" email with separate comma like > > > "addre...@domain.com, addre...@domain.com" but nothing happen when run > > > the script. > > > > Any suggestion? > > > Thank you very much > > > googong. 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to populate my data (from one table) into combobox
On Thu, Jul 15, 2010 at 5:27 AM, Badieah wrote: > hi,i'm still newbie in cakePHP > i have a problem to populate my data into combobox. > i have one table named Category which have function to manage account > (in finance) and sub account.. > the logic are account have many sub account, sub account have many > child..the field of the table represented in followings : > id --->id of the account data > parent_id --->id parent of the account data > name --->name of the account > when i want to make a new account (it can account,sub account and > child) i want to select the parent of that account..it will get from > field id.. > i tried to write the followings script into the controller : > > function categoryParent(){ > $parentinfo = $this->Category- >>find('list',array('fields'=>array('Category.id','Category.name'))); > $this->set('idparent',$parentinfo); > } First, I would name the variable something that better reflects what the list is. This is all you should need in the controller. $this->set( 'categories', $this->Category->find('list') ); > but i still dont know how to call the variable "idparent" in "add" > view...so i can populate all "id" (not parent_id) in combobox.. > can sombody help me to solve this problem? I'm not sure what you're asking here. This will create the select list: echo $form->input('Account.category_id', array('options' => $categories)); Incidentally, if you were to use Andy Dawson's TreeHelper [1] you could create the list items so that they appear threaded, eg: category A --- category A.1 -- category A.1.a -- category A.1.b --- category A.2 category B category C --- category C.1 It's a little complicated to understand at first but worth the time to figure out. [1] http://bakery.cakephp.org/articles/view/tree-helper-1 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Question about slugs
Thanks Miles. Yes, absolutely agree. It's just that my client is asking for that and she doesn't want to change her mind :( Regards On 14 jul, 18:56, Miles J wrote: > Its a good idea never to route something to the root, you should > always put them in a container. > > /user/miles > /team/lakers > /band/u2 > > Etc. > > On Jul 14, 4:23 pm, Roland Pish wrote: > > > Thanks a lot Sam. Great idea. > > I'll add the routes for the other controllers. > > > Regards. > > > On 14 jul, 16:33, Sam wrote: > > > > Above your route for the slugs you need to add a route for every > > > controller as follows: > > > > Router::connect('/example/:action',array('controller'=>'example', > > > 'action' => 'index')); > > > > Or, you could modify your slugs routing and add a path before theslug > > > e.g. > > > > Router::connect('example/:slug/ > > > *',array('controller'=>'practitioners','action'=>'view')); > > > > On Jul 14, 3:28 pm, Roland Pish wrote: > > > > > Hi. > > > > I have urls like this in my project: > > > > >www.mysite.com/practitioners/view/1 > > > > > and I want to convert them to: > > > > >www.mysite.com/the-name-of-the-practitioner > > > > > So I started using slugs (and the corresponding db field) and > > > > configured this: > > > > > Router::connect('/:slug/ > > > > *',array('controller'=>'practitioners','action'=>'view')); > > > > > This works fine but now every URL is obviously redirected to > > > > practitioners/view and I have some other controllers with their > > > > actions. > > > > > How can I achieve this? > > > > > Thanks in advance. 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: cakeDC Tag Plugin Delete issue
I think I know what the problem is. It just occurred to me that all you have to do is add a condition in the $hasAndBelongsToMany relationship in the model to ensure that both the foreign key and the model are matched in the Tagged table. This way you can avoid the custom query hack. ~Kirk On Wed, Jul 14, 2010 at 10:35 AM, Kirk wrote: > perhaps the problem is that the Taggable behavior has no beforeDelete > callback > > > On Wed, Jul 14, 2010 at 2:45 AM, abocanegra wrote: > >> I solved it, You can check out the code on my blog >> >> http://www.whatartist.com/blog/2010/07/making-cakedc-tags-plugin-delete-by-model-only/ >> >> On Jul 8, 4:35 am, abocanegra wrote: >> > I have been enjoying the Tag Plugin by CakeDC. However, I am having an >> > issue when it is utilized across multiple models (i.e Photo, Design, >> > Video). When I delete an entry with tags in say Photos it deletes >> > based off of foreign_key which is the ID of photos. However, if I also >> > have the same ID in Designs or Videos it also deletes those tags. I am >> > aware of the options in the actsas function in the model. Still i am >> > unable to figure out how to delete based on foreign_key and model => >> > Design ( or the appropriate model in any case ). >> > >> > Has anybody had experience with this? >> > >> > my model currently is just using the default: >> > >> > var $actsAs = array( >> > 'Tags.Taggable'); >> > >> > The additional options on their site are: >> > >> > var $actsAs = array( >> > 'Tags.Taggable' => array( >> > 'separator' => '', >> > 'field' => 'tags', >> > 'tagAlias' => 'Tag', >> > 'tagClass' => 'Tags.Tag', >> > 'taggedClass' => 'Tags.Tagged', >> > 'foreignKey' => 'foreign_key', >> > 'associationForeignKey' => 'tag_id', >> > 'automaticTagging' => true, >> > 'unsetInAfterFind' => false, >> > 'resetBinding' => false, >> > ) >> > ); >> > >> > This is the last obstacle I have before launching my new site, it >> > seems small, but it is quite frustrating. >> >> 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 to cake-php@googlegroups.com >> To unsubscribe from this group, send email to >> cake-php+unsubscr...@googlegroups.comFor >> more options, visit this group at >> http://groups.google.com/group/cake-php?hl=en >> > > 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Something like ActiveMerchant?
Very interested in this. Please update this list when it's up. Much appreciated. 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Assign Profile When User Registers
Hi Guys, i need a bit of help with this. I have a hasOne relationship between USER and PROFILE, when user registers it assigns a profile, this is fine. What i want to do is to auto assign a profile that will already be inserted in the database, by some fields like email, first name and last name. Is this possible ? Thanks in advice. 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
How to populate my data (from one table) into combobox
hi,i'm still newbie in cakePHP i have a problem to populate my data into combobox. i have one table named Category which have function to manage account (in finance) and sub account.. the logic are account have many sub account, sub account have many child..the field of the table represented in followings : id --->id of the account data parent_id --->id parent of the account data name--->name of the account when i want to make a new account (it can account,sub account and child) i want to select the parent of that account..it will get from field id.. i tried to write the followings script into the controller : function categoryParent(){ $parentinfo = $this->Category- >find('list',array('fields'=>array('Category.id','Category.name'))); $this->set('idparent',$parentinfo); } but i still dont know how to call the variable "idparent" in "add" view...so i can populate all "id" (not parent_id) in combobox.. can sombody help me to solve this problem? 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Something like ActiveMerchant?
I 'll make a git repo in a few days so you can see the source code. @iamcam The code is close to ruby code ( as php 5.2 allows ). Gateways have standard public methods ( authorize, purchase, void etc ). Every response is an Response class object. There is also Creditcard class object, and everything Active Merchant has. Some missing, for now, features are PHPUnit tests and integation form helper. By the way, thinking of naming this project "phpMerchant" but googling on that i found this link http://code.google.com/p/php-merchant/ It is an Active Merchant like project, but it is inactive for over a year... On Jul 14, 10:15 am, "iamcam (Cameron Perry)" wrote: > Bharadwaj, That's the best I could come up with in the PHP world. > Unfortunately the PEAR packages look outdated, and the Kohana > component is for that framework - not sure how it would work as a > stand-alone. There are ports in other languages (python and Objective- > C), but that doesn't help us. > > This is a huge need in the PHP community, even if most the payment > gateways already have sample code. It's so much nicer working with > consistent interfaces than trying to decipher the intricacies between > all the various APIs. > > ~Cameron > > On Jul 12, 10:32 pm, Bharadwaj Parthasarathy > wrote: > > > +1 for github > > > I am also interested in participating in development. > > > From a quick google search, there seems to be no similar framework in > > php. > > You may want to check this > > -http://stackoverflow.com/questions/2768942/do-any-projects-exist-for-... > > > - Bharadwaj > > > On 12-Jul-10, at 10:23 PM, iamcam (Cameron Perry) wrote: > > > > How closely are you following the original ruby version? I'd be > > > interested in helping out here and there once you put it on github (so > > > much better than google). > > > > ~Cameron > > > > On Jul 9, 4:20 pm, Andreas wrote: > > >> Hi, > > > >> I am currently developing a port of Active Merchant on PHP. > > > >> I 've also add a few gateways for testing such as PaypalExpress, > > >> Hsbc, > > >> Authorize.net(partial), Centinel 3D secure(partial), and > > >> Eurobank(Greek bank). > > > >> I am planning to make a public repository on github or google project > > >> hosting, when i clean the code and add some documentation. > > > >> I hope this will help php developers to integrate payments api to > > >> their eCommerce applications. > > > >> On Jul 6, 1:51 am, "iamcam (Cameron Perry)" > > >> wrote: > > > >>> Has anyone seen anything like ActiveMerchant on the PHP side? I > > >>> searched around a bit but haven't seen anything. > > > >>> I'm intrigued by the fact that it supports so many gateways out of > > >>> the > > >>> box, and wonder if (a) anyone has already come up with a PHP > > >>> alternative, or (b) thinks it feasible to attempt a port. > > > >>> Thanks! > > >>> Cameron > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > > 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 to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this > > > group athttp://groups.google.com/group/cake-php?hl=en 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Cake Console Error - Warning: the dispatcher may have been loaded incorrectly...
Hy, I installed a local instance of xampplite and tried the console but it will not really work :( C:\xampplite\htdocs\cakecore\cake\console>cake CakePHP Console: Warning: the dispatcher may have been loaded incorrectly, wich could lead to unexpected results... continue anyway after YES - i tried to open bake bot the system isn't able to find it. I'm working on windows 7. Any Ideas? 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
find threaded problem
hi guys, is it possible in cakephp to treat a table like threaded if my parent_id has a different name ? i couldnt find any customization quick help would be cool yours sincerely, duderion :D 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
action validation problem
Hi Guys, the situation: i have a controller UserController that has actions like 'add','edit' ... (surprise surprise! :) ) i'd like to have custom validations for the particular actions. i tried Multiple Validation Sets in the UserModel with validateAdd, validateEdit... but the controller doesn't access them, only the normal (general) validation ($this->validate) is done, but not the custom ones like validateAdd.. im using cakephp 1.3.2 whats the best practice here ? is validateAdd still possible in cake 1.3 ? the tips i found where for 1.2.. im not sure tx in advance 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: trouble with models associations
i found a solution On 12 Jul., 19:45, duderion wrote: > *bump* :( > > On 8 Jul., 22:18, duderion wrote: > > > hi guys, > > > i have a (noob) question: > > > i have > > > - product model with the primary key id, a unique key "Zupid" and so > > on > > - fav model with "zupid" "user_id" ... > > - user model "id" "name" ... > > > i want to connect the tables fav and product with the key "zupid" > > > i guess > > > fav belongs to user, product > > > when i access fav in my view, the userdata connected to the fav works, > > but the productdata is null (correct structure, but null everywhere) > > > how can i associate them to have both userdata and productdata in the > > $fav array... ? > > > my core problem is that even if i say "product has many fav", cake > > tries to compare fav.zupid with product.id and not with product.zupid > > > Tx in advance > > duderion 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: alt tag for text box
`alt` is not a tag, it's an attribute. Also, although some browsers show an ``'s alt attribute as a tooltip, this is nonstandard. The `title` attribute is what should be used for a tooltip, and it works on all elements. In short, text('contact_name', array('title' => 'Contact Name', 'value' => '', 'style' => 'width: 80%'))); ?> This will make "Contact Name" appear in the tooltip when the text box is hovered. hth grigri On Jul 15, 11:50 am, Jeremy Burns | Class Outfit wrote: > I'm happy to be corrected, but I think the 'alt' tag only exists for images > (that's HTML, not Cake). > > Also interested to see you using inline styles - are you not using CSS? > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 15 Jul 2010, at 11:42, Master Ram wrote: > > > Hi, > > > how to set "alt" tag for text box, in cakePHP. > > > i used like this. > > text('contact_name', array('alt' => 'Contact Name', > > 'value' => '', > > 'style' => 'width: 80%'))); > > ?> > > > its not working . > > > where i missed out. > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.2 Performance under load
Thanks one and all for the very informative responses. Suffice to say, I think CakePHP will be fine for my needs. Granted, it's not the fastest or necessarily the most extensive framework ... but heck, it's just so darn beautiful! :D Cheers, Matthew On Jul 15, 8:56 pm, "Mike Karthauser" wrote: > On Thu, July 15, 2010 11:37 am, ohcibi wrote: > > is suggest you visiting: > >http://book.cakephp.org/view/510/Sites-in-the-wild > > for sites that use cakephp and just try them how they feel check > > out addons.mozilla.org as they are using cakephp as well and should > > have some traffic on their sites... > > google addons are migration to django if they havent > already.http://micropipes.com/blog/2009/11/17/amo-development-changes-in-2010/ > > -- > Mike Karthauser > Managing Director - Brightstorm Ltd > > Email: mi...@brightstorm.co.uk > Web:http://www.brightstorm.co.uk > Tel: 07939 252144 (mobile) > Fax: 0870 1320560 > > Address: 1 Brewery Court, North Street, Bristol, BS3 1JS 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.2 Performance under load
On Thu, July 15, 2010 11:37 am, ohcibi wrote: > is suggest you visiting: > http://book.cakephp.org/view/510/Sites-in-the-wild > for sites that use cakephp and just try them how they feel check > out addons.mozilla.org as they are using cakephp as well and should > have some traffic on their sites... google addons are migration to django if they havent already. http://micropipes.com/blog/2009/11/17/amo-development-changes-in-2010/ -- Mike Karthauser Managing Director - Brightstorm Ltd Email: mi...@brightstorm.co.uk Web: http://www.brightstorm.co.uk Tel: 07939 252144 (mobile) Fax: 0870 1320560 Address: 1 Brewery Court, North Street, Bristol, BS3 1JS 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: alt tag for text box
I'm happy to be corrected, but I think the 'alt' tag only exists for images (that's HTML, not Cake). Also interested to see you using inline styles - are you not using CSS? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jul 2010, at 11:42, Master Ram wrote: > Hi, > > how to set "alt" tag for text box, in cakePHP. > > i used like this. > text('contact_name', array('alt' => 'Contact Name', >'value' => '', >'style' => 'width: 80%'))); >?> > > its not working . > > where i missed out. > > 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 to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
alt tag for text box
Hi, how to set "alt" tag for text box, in cakePHP. i used like this. text('contact_name', array('alt' => 'Contact Name', 'value' => '', 'style' => 'width: 80%'))); ?> its not working . where i missed out. 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.3.2 Performance under load
I don't know about any follow up test but i do know that a hello world application is not even meant to be done with a framework like cakephp. So if a new benchmark would really follow up the old benchmark it would produce the same useless result as with the cake 1.1 benchmark is suggest you visiting: http://book.cakephp.org/view/510/Sites-in-the-wild for sites that use cakephp and just try them how they feel check out addons.mozilla.org as they are using cakephp as well and should have some traffic on their sites... but afair performance improvements where mentioned in the 1.3 announcement at the bakery On 15 Jul., 06:56, Matthew Porter wrote: > Thanks @ohcibi > > Yes, I realise the article is old ... however, it is still not > flattering for Cake. > > It would be ideal if there was a follow-up test, or even something > from the Cake team indicating how to get the best performance out of > the framework to address these concerns. > > To the uninitiated, it might appear that Cake's performance is > lacking. The Cookbook really needs some performance examples and > statistics to help build confidence in the framework. > > Don't get me wrong, I think Cake is awesome. I just wish I didn't > have this nagging concern about performance. It's pretty hard to > ignore a performance difference so large between Cake and CI, even on > an old version; especially when there is some evidence to suggest that > later versions performed worse as RC. > > I really was just hoping that someone could tell me that 1.3.x > introduced some performance improvements and tuning suggestions into > the Cookbook and release notes. > > Thanks again everyone! :) > > Matthew > > On Jul 15, 10:14 am, ohcibi wrote: > > > > > > I have read some articles suggesting the performance of CakePHP 1.2 is > > > well behind that of comparable frameworks under load. > > > In particular, one article (found > > > here:http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/) > > > Alternatively, can anyone comment on the validity or otherwise of the > > > article link above? > > > the link is from 2006 and he was benchmarking CakePHP 1.1 not 1.2 (1.2 > > was not even out there in 2006). > > > Tuning is (like many other topic) not well documented in cake, thats > > true. Caching is though, have a look into the book... 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Too many SQL queries!!
See this thread for a direct solution to your problem (use a finder query): http://groups.google.com/group/cake-php/msg/c10840be78a34df0 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 to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en