Re: Pagination problem
Hi bino, In your views , add this line $paginator->options(array('url' => $this->passedArgs)); Thanks Isaac On Sat, Jul 18, 2009 at 11:06 PM, bino dev wrote: > Hi Friends, > > Iam very new in cake php. > I need a help on the pagination . Actually iam trying to make a search with > the company and phone number. Iam pasting the code below. When i search with > a company with 'A' iam getting the result which have the compnay name which > starts with A. When i go to the next page the all results are showing ( > because query is changing due to compnay values is null). How can i solve it > . > > - > my controller code > if > ($this->data['post']['comp'] !='') { > $datass .=" and posts.body like '%". $this->data['post']['comp']."%'"; > } > if($this->data['post']['phone'] !='') { > $datass .=" and posts.active like '". $this->data['post']['phone']."'"; > } > $criteria='post.active =1'; > list($order,$limit,$page) = $this->Pagination->init($criteria); > $sql = array('conditions' => array($datass), > 'recursive' => 1 , > 'fields' => array('posts.*'), > 'order' => array( 'posts.id DESC'), > 'limit' => $limit, > 'page' => $page > ); > $tasks = $this->posts->find('all',$sql ); > $this->set('results', $tasks); > -- > > > --~--~-~--~~~---~--~~ 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 modify header information
Check whether you have mad an debug or echo statement in your code On Tue, Jul 21, 2009 at 1:32 AM, Dave Maharaj :: WidePixels.com < d...@widepixels.com> wrote: > Ok, > > thanks for the tip. Will check it out. > > Dave > > -- > *From:* Pablo Viojo [mailto:pvi...@gmail.com] > *Sent:* July-20-09 5:07 PM > > *To:* cake-php@googlegroups.com > *Subject:* Re: Cannot modify header information > > Now what? > Try looking at /cake/basics.php:108 ... I found it belongs to function > debug(), so maybe you're using debug(...) previously? > > Take a look at your code. > > Saludos, > > Pablo Viojo > pvi...@gmail.com > http://pviojo.net > (#340 y creciendo!) > > > Ayudar nos hace felices! > http://needish.com - http://helperman.org > > > > On Mon, Jul 20, 2009 at 3:24 PM, Dave Maharaj :: WidePixels.com < > d...@widepixels.com> wrote: > >> >> Yes. >> >> Cannot modify header information - headers already sent by (output started >> at /cake/basics.php:108) [CORE/cake/libs/controller/controller.php, line >> 640] >> >> Now what? >> >> >> >> >> From: Pablo Viojo [mailto:pvi...@gmail.com] >> Sent: July-20-09 4:39 PM >> To: cake-php@googlegroups.com >> Subject: Re: Cannot modify header information >> >> >> Normally that error comes with something like: >> >> Warning (2): Cannot modify header information - headers already sent by >> (output started at file:line) >> >> Regards, >> >> Pablo Viojo >> pvi...@gmail.com >> http://pviojo.net >> (#340 y creciendo!) >> >> >> Ayudar nos hace felices! >> http://needish.com - http://helperman.org >> >> >> >> >> On Mon, Jul 20, 2009 at 2:54 PM, Dave Maharaj :: WidePixels.com >> wrote: >> >> >> >>I have debug = 2 and I get >>Cannot modify header information >> >>turn debug to 0 and it works the way i want. Doing a redirect after >> login to >>redirect a user to appropriate area. >>No white space after closing ?> >>$this->Auth->autoRedirect = false; >> >>Ideas why this may be happeining? >> >>Dave >> >> >> >> >> >> >> >> >> >> >> >> >> > > > --~--~-~--~~~---~--~~ 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: Search
Hi bino dev, since you are using a searches controller, and you are using a line like this $data = $this->Search->findAll($sql , NULL, $order, $limit, $page); you need to create a Search model.(with searches table) Actually it is not necessary to create searches controller and its view. you need to include a search method in the controller which you want to search. For example, if you want to seach the products table, create a method search in products controller and a model Product. Thanks Isaac Raja On Tue, Jul 21, 2009 at 2:35 AM, bino dev wrote: > Hi, > > Please help me. > Friends i need to create one search page, its searching with company , > first name, lastname, email > i created the view , controller for the functionality. Do i need to create > any model for it. Iam getting the error if there is no model in it.If i need > to create the model , what should be the $name in the model. > > searchs_controller.php ( http://bin.cakephp.org/view/243917622 ) > > class SearchsController extends AppController > { > > //var $uses = array('search'); > > var $name = 'Search'; > > var $useTable = false; > > function admin_index() > { > > if(isset($this->params['url']['data'])) { > echo $this->params['url']['data']['searchs']['first_name']; > echo $this->params['url']['data']['searchs']['last_name']; > echo $this->params['url']['data']['searchs']['company']; > echo $this->params['url']['data']['searchs']['email']; > echo $this->params['url']['data']['searchs']['phone']; > echo $this->params['url']['data']['searchs']['address']; > > > $datass = "user.status = 1 "; > > if($this->params['url']['data']['searchs']['first_name'] !='') > { > $datass .= " and user.first_name like > '%".$this->params['url']['data']['searchs']['first_name']."%'"; > } > > if($this->params['url']['data']['searchs']['last_name'] !='') { > $datass .= " and user.last_name like > '%".$this->params['url']['data']['searchs']['last_name']."%'"; > } > > > if($this->params['url']['data']['searchs']['email'] !='') { > $datass .=" and user.email like > '%".$$this->params['url']['data']['searchs']['email'] ."%'"; > } > > > //list($order,$limit,$page) = $this->Pagination->init($datass); > > //pr($this->params); > > $sql = array('conditions' => array($datass), >'recursive' => 1 , >'fields' => array('Search.username, Search.first_name, > Search.last_name, Search.email, Search.status, Search.created, > Search.modified'), > 'order' => array( 'Search.created DESC'), >'limit' => $limit, >'page' => $page > ); > } > $data = $this->Search->findAll($sql , NULL, $order, $limit, > $page); > $this->set('userdetails', $data); > > } > > } > ?> > > view page http://bin.cakephp.org/view/311196886 > > setLayout('admin'); ?> > > jQuery(document).ready(function($) { > $('.roundbox').hover( > function(){$('.roundbox ul').show();}, > function(){$('.roundbox ul').hide();} > ); > }); > > > #sidebar { > background-color: white; > position: absolute; > top: 84px; > right: 20px; > z-index: 999; > } > .roundbox ul { > display: none; > } > #main { > width: 100%; > padding-top:15px; > } > > > > Sub Menu > > > link('Export current items in CSV > format', '/admin/potential_suppliers/export'); ?> > > > > > > List Potential Suppliers > > //$p
Re: call function from .ctp file in cakephp1.2
Please mention what you are trying to achieve; we can find a better way to do it. Isaac On Tue, Jul 21, 2009 at 2:49 AM, Marcelo Andrade wrote: > > On Mon, Jul 20, 2009 at 2:02 AM, liyakat Ali wrote: > > i need to call function from .ctp file. > > And function is defined in App Controller. > > is it possible. > > As Pixelastic and Rob both said, if you have to call > some method in your view, this method is best suited > to be placed in a helper and not in your controller. > > Check this out: > > http://book.cakephp.org/view/101/Creating-Helpers > > Best regards. > > -- > MARCELO DE F. ANDRADE > Belem, PA, Amazonia, Brazil > Linux User #221105 > > http://mfandrade.wordpress.com > > > > --~--~-~--~~~---~--~~ 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: Simple cakePHP login authentication
Hi dhileep, Here is where i learned authentication in cakephp http://www.studiocanaria.com/articles/cakephp_auth_component_users_groups_permissions_revisited It also tells how to create groups & permissions. Thanks, Isaac On Mon, Jul 20, 2009 at 4:40 PM, Dhileepen Chakravarthy < dhileepen.cake...@gmail.com> wrote: > Hi Jeff, > > > http://bakery.cakephp.org/articles/view/simple-form-authentication-in-1-2-x-x > > > I tried with this sample program but its not giving error or nothing. > Simply it gives blank page. > > Other's are complecated wa of coding with Auth component and they wont give > complete. > > Anyway i ll try to learn Issac tip > > Regards, > Dhileep > > > > --~--~-~--~~~---~--~~ 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: Simple cakePHP login authentication
Hi Dhileep, Goto github or googlecode search for cakephp, you will find some opensource cakephp applications, check for the login authentication system there. it's easy. Regards, Isaac On Mon, Jul 20, 2009 at 4:29 PM, jeff wrote: > pha .. > > u never will learn,if u dont try to do it by urself.after reading > the docs > > its a simple process > > dont expect everthing to be done by others > .. > > this time am not helping you... > > find it urself. > > hint use this link > > http://book.cakephp.org/view/172/Authentication > > On Mon, Jul 20, 2009 at 4:16 PM, Dhileepen Chakravarthy < > dhileepen.cake...@gmail.com> wrote: > >> Hi Everybody >> >> Please refer good url for simple cakePHP login form >> If any body wrote a code is very much appreciated. >> >> Regards, >> Dhileep >> >> >> > > > -- > -- > (¨`•.•´¨) I may be busy, > `•.¸(¨`•.•´¨) but I assure you, > (¨`•.•´¨)¸.•´ you are always in my heart > `•.¸.•´ > > > With Lots of Love. > > THANKS AND REGARDS > > Jeffery Jacob > > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Sub query related question
Hi, I know these type of questions has been asked many times. please excuse. I have a category table with id, parent_id, name, slug. so if i want the children of a particular category I do a find all with conditions array('conditions' => array('Category.parent_id' => $id ); Now i want the children of a particular category where i don't know the id of this particular category but only it's slug. I have done something like the one given below and it works. But is there any other way to do this in cake? or cake way of doing this?.Any link to learn about this more. $conditions1[] = 'Category.parent_id IN (SELECT Category.id FROM categories AS Category WHERE Category.slug LIKE \'%'. $slug.'%\')'; $this->set('categories1', $this->Category->find('all',array('conditions' => $conditions,'order' => 'lft ASC'))); Thanks, Isaac --~--~-~--~~~---~--~~ 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: replacing parts of url
Hi AD, i'll try your suggestion and find how can i do it. thanks Isaac On Sat, Jul 18, 2009 at 8:40 PM, AD7six wrote: > > > > On Jul 18, 2:51 am, Isaac Raja wrote: > > no. i'm just manipulating the the url as a string and replacing it with > the > > users selected city. Here's my code.I know the code is bad. but i'm > thinking > > of a way to overcome it. > > > > $id = $this->params['url']['city']; > > $this->Category->Post->City->id = $id; > > $this->data = $this->Category->Post->City->read(); > > $subdomain = low($this->data['City']['city']); > > $domain = Configure::read('Site.domain'); > > $urll = ''; > > $urll = 'http://'; > > $urll .= !empty($subdomain)?$subdomain.'.':'www.'; > > $urll .= $domain; > > $urll .= $this->params['url']['url_here']; > > if(!empty($this->params['url']['keyw'])) > > { > > > > $urll .= '/keyw:'.$this->params['url']['keyw']; > > } > > $this->Session->write('Current', array('id' => $id, 'city' => > > $subdomain)); > > $this->redirect($urll,null,true); > > > > Thanks > > Isaac > > You want something like $this->redirect(array_merge($this->params, > array('city' => $city))); > > since you're using subdomains - that's going to mean the url comes out > as /foo/bar/already:intheurl/city:$city . However if you > > 1) override app helper url, like > http://thechaw.com/cakebook/source/app_helper.php#37 > 2) create a component with a beforeRedirect function, like > > http://trac.assembla.com/mi/browser/branches/base/controllers/components/seo.php#L98 > > That means you can put your bespoke url logic in one (well, two) place > - and so long as you use arrays for urls, always, your code isn't tied > to your desired route 'scheme' but you can do whatever you want. > > Regards, > > AD > > > --~--~-~--~~~---~--~~ 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: replacing parts of url
Hi brian, I think i'm confused. so here here is my situation, suppose the url is like. http://www.example.com/categories/animals/color:black/price:320 now, the user selects a city ex: newyorknow the url turns into http://newyork.example.com/categories/animals/color:black/price:320 I have written code that extracts the subdomain and adds it to conditions array for find method. Now can you please tell me how should i proceed, what should be in the controller and view. Thanks Isaac On Sat, Jul 18, 2009 at 7:58 PM, brian wrote: > > Sorry, you've lost me. So, the "city" param is already in the URL? > What is it that you need to do? > > On Fri, Jul 17, 2009 at 8:51 PM, Isaac Raja wrote: > > no. i'm just manipulating the the url as a string and replacing it with > the > > users selected city. Here's my code.I know the code is bad. but i'm > thinking > > of a way to overcome it. > > > > > > $id = $this->params['url']['city']; > > $this->Category->Post->City->id = $id; > > $this->data = $this->Category->Post->City->read(); > > $subdomain = low($this->data['City']['city']); > > $domain = Configure::read('Site.domain'); > > $urll = ''; > > $urll = 'http://'; > > $urll .= !empty($subdomain)?$subdomain.'.':'www.'; > > $urll .= $domain; > > $urll .= $this->params['url']['url_here']; > > if(!empty($this->params['url']['keyw'])) > > { > > > > $urll .= '/keyw:'.$this->params['url']['keyw']; > > } > > $this->Session->write('Current', array('id' => $id, 'city' => > > $subdomain)); > > $this->redirect($urll,null,true); > > > > > > Thanks > > Isaac > > > > On Fri, Jul 17, 2009 at 11:55 PM, brian wrote: > >> > >> How are you creating the links? With HtrmlHelper? > >> > >> On Fri, Jul 17, 2009 at 1:10 PM, Isaac Raja wrote: > >> > any ideas? > >> > > >> > On Fri, Jul 17, 2009 at 6:26 AM, Isaac Raja > wrote: > >> >> > >> >> Hi all, > >> >> > >> >> I'm developing a web application, in which the when the user adds a > >> >> filter, it is appended to the url, for example > >> >> > >> >> > >> >> > >> >> > >> >> > http://www.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname > >> >> > >> >> > >> >> Everything is working fine now, But I want the user to add the filter > >> >> city. When the user clicks a particular city link, the above url > must > >> >> be > >> >> turned into > >> >> > >> >> > >> >> > >> >> > http://cityname.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname > >> >> > >> >> ie) i don't want to loose other filters . I have done an ugly hack, > in > >> >> which i get the url from $this->here and replace the sudomain part. > >> >> > >> >> > >> >> Is there a cake way to do it. Or how to implement this feature in > >> >> cakephp? > >> >> > >> >> > >> >> Thanks > >> >> Isaac > >> > > >> > > >> > > > >> > > >> > >> > > > > > > > > > > > > > --~--~-~--~~~---~--~~ 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: replacing parts of url
no. i'm just manipulating the the url as a string and replacing it with the users selected city. Here's my code.I know the code is bad. but i'm thinking of a way to overcome it. $id = $this->params['url']['city']; $this->Category->Post->City->id = $id; $this->data = $this->Category->Post->City->read(); $subdomain = low($this->data['City']['city']); $domain = Configure::read('Site.domain'); $urll = ''; $urll = 'http://'; $urll .= !empty($subdomain)?$subdomain.'.':'www.'; $urll .= $domain; $urll .= $this->params['url']['url_here']; if(!empty($this->params['url']['keyw'])) { $urll .= '/keyw:'.$this->params['url']['keyw']; } $this->Session->write('Current', array('id' => $id, 'city' => $subdomain)); $this->redirect($urll,null,true); Thanks Isaac On Fri, Jul 17, 2009 at 11:55 PM, brian wrote: > > How are you creating the links? With HtrmlHelper? > > On Fri, Jul 17, 2009 at 1:10 PM, Isaac Raja wrote: > > any ideas? > > > > On Fri, Jul 17, 2009 at 6:26 AM, Isaac Raja wrote: > >> > >> Hi all, > >> > >> I'm developing a web application, in which the when the user adds a > >> filter, it is appended to the url, for example > >> > >> > >> > >> > http://www.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname > >> > >> > >> Everything is working fine now, But I want the user to add the filter > >> city. When the user clicks a particular city link, the above url must > be > >> turned into > >> > >> > >> > http://cityname.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname > >> > >> ie) i don't want to loose other filters . I have done an ugly hack, in > >> which i get the url from $this->here and replace the sudomain part. > >> > >> > >> Is there a cake way to do it. Or how to implement this feature in > cakephp? > >> > >> > >> Thanks > >> Isaac > > > > > > > > > > > > > --~--~-~--~~~---~--~~ 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 secret app at CakeFest
Thanks for the link. On Fri, Jul 17, 2009 at 9:27 PM, Nate Abele wrote: > > It's hardly secret. ;-) > > http://github.com/predominant/CakeFest-Berlin-2009-Workshop/ > > On Jul 17, 11:10 am, Isaac Raja wrote: > > Hi, > > > > Anybody know where can i find the source of the application that nate > > created at the CakeFest this year? I searched for it and couldn't find it > > anywhere. I heard that the application was similiar to twitter. > > > > Thanks > > Isaac > > > --~--~-~--~~~---~--~~ 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: replacing parts of url
any ideas? On Fri, Jul 17, 2009 at 6:26 AM, Isaac Raja wrote: > Hi all, > > I'm developing a web application, in which the when the user adds a > filter, it is appended to the url, for example > > > > http://www.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname > > > Everything is working fine now, But I want the user to add the filter city. > When the user clicks a particular city link, the above url must be turned > into > > > http://cityname.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname > > ie) i don't want to loose other filters . I have done an ugly hack, in > which i get the url from $this->here and replace the sudomain part. > > > Is there a cake way to do it. Or how to implement this feature in cakephp? > > > Thanks > Isaac > --~--~-~--~~~---~--~~ 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 development questions
Hi mark, thank you. Isaac > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cakephp secret app at CakeFest
Hi, Anybody know where can i find the source of the application that nate created at the CakeFest this year? I searched for it and couldn't find it anywhere. I heard that the application was similiar to twitter. Thanks Isaac --~--~-~--~~~---~--~~ 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: url to array
Thank you very much , i was searching on the api for this a while. and you got it. Isaac On Fri, Jul 17, 2009 at 1:15 PM, brian wrote: > > Yes, try Router::parse($url) > > http://api.cakephp.org/class/router#method-Routerparse > > On Thu, Jul 16, 2009 at 11:24 PM, Isaac Raja wrote: > > Hi, > > > > Every functions in helpers like $html->link $html->urlconverts the > > array url parameters in to an url (like array('controller' => > > 'posts','action' => 'view'); gets converted in to /posts/view is > there > > any function in cakephp that does the reverse?. > > > > Example convert /posts/view/1/cat:animals/name:rajato something like > > array('controller' => 'posts', 'action' => view,'pass' => 1, > > params['named']['cat'] => 'animals'); > > > > > > Thanks > > Isaac > > > > > > > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cakephp development questions
Hi, what is the development flow in cakephp, define routers and then start creating application or create application and then create routing config? also how to name the controller methods like Categories::list_post() or Categories::listPost() ? Thanks Isaac --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
url to array
Hi, Every functions in helpers like $html->link $html->urlconverts the array url parameters in to an url (like array('controller' => 'posts','action' => 'view'); gets converted in to /posts/view is there any function in cakephp that does the reverse?. Example convert /posts/view/1/cat:animals/name:rajato something like array('controller' => 'posts', 'action' => view,'pass' => 1, params['named']['cat'] => 'animals'); Thanks Isaac --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
replacing parts of url
Hi all, I'm developing a web application, in which the when the user adds a filter, it is appended to the url, for example http://www.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname Everything is working fine now, But I want the user to add the filter city. When the user clicks a particular city link, the above url must be turned into http://cityname.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname ie) i don't want to loose other filters . I have done an ugly hack, in which i get the url from $this->here and replace the sudomain part. Is there a cake way to do it. Or how to implement this feature in cakephp? Thanks Isaac --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Flex -> cakePHP -> database. What are pros & cons ?
Hi, I am evaluating flex -> PHP -> database for porting a desktop C/S application to web. We just completed test application accessing firebird database with amfPHP. Some ppl suggested us to wrap database layer in some server side PHP framework like cakePHP. We are also aware that there is flavor of amfPHP for cakePHP like cakeAmfPHP. Since this is our first web application we are not able to judge the gravity of this suggestion. Can somebody tell us what are pros and cons of using cakePHP in between. We will be using only services to access data from flex. There will not be any PHP/HTML forms/views attached to database. At later stage we may shift to AIR if its appropriate but as of today we dont have any plans to develop conventional HTML based browser application. Thanks and best regards Raja --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Need Help for laying out Database application
Hello, We are basically desktop C/S database application developers and are planning to port one of our application (Delphi Firebird) to web. The basic requirements are as follows 1> It should be Backend Database independent (i.e. should use one of Firebird, MySQL, PostgrSQL, Oracle and MS-SQL server). Data stored on Web server or a separate database server at altogether different location. 2> It can be either Browser based or RIA (Flex/AIR is shortlisted as of today) 3> It should have Reporting facility which can print on Dot-matrix printer (Fast DMP mode) as well as normal Windows Graphics Printing Mode (nice but Slow). Similarly It should have page by page report preview Mode with search in report capability. 4> Secured Access, Data Communication between Client and web server so that no man in middle have chance to manipulate data. 5> Data export/Import to/from CSV, Text, dbf, xls, ods and XML. There will be two parts in application one will be serving to RIA i.e. supporting internal staff engaged in data creation and other is for Client's customers. The second part will a wesite giving them status of customer's orders this may or may not be a flex application but plain Php/HTML can serve purpose ( This part may be developed by some other vendor in artistic web page designing area ) We are supposed to develop the core data-capturing and internal reporting application where mainly data processing reports will be required. The story till date is as follows. For last couple of weeks we are trying to formulate layout of application, evaluating and finalizing technologies to be used etc. etc. with clients participation. HTML/PHP user interface was denied by client since it wont give MDI kind of interface so We evaluated Flex and client has approved the interface, so that part is over. We asked on Flex forum about data access and we got two options Spring-Hibernate and PHP- ADOdb as server side. We evaluated PHP-ADOdb and within couple of days we got a Test PHP script giving XML list which can be consumed by Flex right from doing LAMP installation apache-PHP configuration and learning PHP from scratch with no previous experience in developing and implementing any web application. On other hand another team having Java development experience is still struggling with installation of those technologies. To complete the evaluation of PHP route we enquired to person who suggested us PHP. He responded that the data access layer to be wrapped in cakePHP so we are here, but asof today we have not understood what he has suggested, we would like to know more about this. We also visited BAKERY section and the "Aroma" is really inviting. We could feel potential of cakePHP though we dont have any experience in web development. One of the baking "development of web site in about 200 hr" is really fascinating. Well now what we need is, help from this community, in laying out the server side part of application and suggestions on reporting/exporting part of the application. Googling about reporting indicated that BIRT can be integrated with PHP, if there is any other we will welcome it and evaluate it. Another part is security and secured communication between Client and serer so that data is not stolen or modified in between. Suggest us various options in cakePHP we will try to evaluate it. The guy who wrote "web site in 200 hrs" has admired this list so we are dared to give such long mail as our first post. Thanks for reading such a long post and hope a very positive response from cakePHP gurus. Best regards Raja --~--~-~--~~~---~--~~ 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: google map implementation
Please explain your problem , with some more information, so that you get help. The mail you've sent has no clue on what u r doing & errors u received. On 10/31/07, Raj Kumar <[EMAIL PROTECTED]> wrote: > > > hi i install cakemap but its not working any body help me plz > > thanks > rajkumar > > > > > --~--~-~--~~~---~--~~ 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: MVC architecture
RTFM On 11/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I am new to cake PHP.I want to know MVC architecture. > > > > > --~--~-~--~~~---~--~~ 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: create subdomain.
Hi, I have done it actually. i also use cake php to power it. My domain is www.indiandrs.in i'll tell you what i have done. I spoke with my web hoster and told him to add a wildcard entry for my domain *.indiandrs.in after that, in before filter of u r application, u should extract the subdomain name in to a variable. $domain = env('HTTP_HOST'); $domain_parts = explode('.',$domain); if (count($domain_parts) == 3 && $domain_parts[0]!= "www") { // make sure a subdomain is called $user = $domain_parts[0]; this method works only when your web hosting provider adds a wild card entry in httpd.conf file Thanks Isaac --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Changing the font size according to the field size
Hi , Please excuse me if this is a newbie question. I retrieve all the fields from the database using models & i get them through $users['User']['name']>name $users['User']['qualification'] > qualification and i display them thru the below statement in the view file Mr. The problem is, the length of [user][name] is varchar 30 & qualification is varchar 30. Some times, the User name is short---> eg Tom Sometimes the user name is lengthy ---> eg Michael Augustin Sarajevo silvers when the user name is normal, i can get it displayed correctly, but if it is lengthy, it wraps to the next line, & i need to avoid that. and if set the font size to small, short user names are also small, is there any way to change the size of the font dynamically, depending upon the number of characters entered in the username field? or any ideas on this will be helpful. please Thanks in advance Isaac Raja --~--~-~--~~~---~--~~ 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 duplicate Fields Validation
Hi, I have a form to add users to my database. I want the Doctornumber(id) & subdomain to be unique( no duplicates) I tried the following http://bakery.cakephp.org/articles/view/checking-for-duplicate-records-unique-record the add user function has the following code if (!empty($this->data)) { if ($this->User->isUnique('id', $this->data['User']['id']) && $this->User->isUnique('subdom', $this->data['User']['subdom'])) { if ($this->User->save($this->data)) { $this->flash('Doctor has been saved.','/users/ adddoctor'); } } } and my view files has this Subdomain Name: input('User/subdom', array('size' => '40'))? > tagErrorMsg('User/subdom', 'Subdomain is required.') ?> tagErrorMsg('User/ unique_subdom', 'Enter another subdomain, this is already used.'); ?> Doctor Number: input('User/id', array('size' => '40'))?> tagErrorMsg('User/id', 'Doctor Number is required.') ?> tagErrorMsg('User/ unique_id', 'Enter another number, this is already used.'); ?> the problem is when any of the fields is wrong it always says "Enter another number, this is already used" even if the subdomain field is wrong the result is "Enter another number, this is already used" what would be the problem? Can't i do multiple field validations? Please Help me Thank you Isaac Raja --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---