How to hide/show links in view /default.ctp/ for different types of user group

2009-12-24 Thread kani
How to hide/show links in view /default.ctp/ for different types of user group./admin manager user/ I used acl component. 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 G

Re: requestHandler swf/flash

2009-12-24 Thread DiRN
In 1.3 RequestHandler has an isFlash() method. I'm not sure if it exists in earlier versions. 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" grou

Array Help

2009-12-24 Thread Dave
I have this after submitting a form [SelectionsSkills] => Array ( [1] => Array ( [13] => 4 ) [2] => Array ( [1] => 4 ) [3] => Array

How to use get_cfg_var() in a cakePHP app ?

2009-12-24 Thread Ashu
I have a cakePHP app with my DB servers configured in the app/config/ database.php file. However, I need to use the get_cfg_var ('mysql.default_host') to get the host name because the client does not want the name hardcoded. I would appreciate a quick response regarding where the changes need to be

Re: Localization for Model validation messages

2009-12-24 Thread euromark
put this in your app_model.php /** * Overrides the Core invalidate function from the Model class * with the addition to use internationalization (I18n and L10n) * @param string $field Name of the table column * @param mixed $value The message or value w

Re: Parse XML or RSS feeds into your controller

2009-12-24 Thread Richard.Williams.20
I wrote a quick script for you. (I do this for a living. Also, I like crosswords.) # Script WordOfTheDay.txt var str rss, title, link, description cat "http://wordsmith.org/awad/rss1.xml"; > $rss while ( { sen -r -c "^&^" $rss } > 0 ) do stex -r -c "^^]" $rss > null stex -r -c "]^^" $r

Re: Merry Christmas

2009-12-24 Thread NeoWebTech
I agree. Lets not lose hope :) Happy New Year! On Dec 24, 8:16 pm, robustsolution wrote: > it will be only in your and my dream > happy new year Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because y

Localization for Model validation messages

2009-12-24 Thread si-mon
Hi All, Is there a way to use localization for validation messages in the Model $validate array? eg: $validate = array ( 'name' => array('rule'=>'notEmpty', 'message'=>'Name is mandatory' )); I need the message 'Name is mandatory' in five different languages. In other words: How can we use func

Re: Adaptive pagination

2009-12-24 Thread NeoWebTech
Hi Bruns! Thanks for your ideas. After reading your idea I think implementing myself this is not a big thing as I thought :) Thanks again... On Dec 24, 10:17 am, Jeremy Burns wrote: > This isn't a full answer but will hopefully help your thinking. > > You could build a custom element that incl

Multiple Model Pagination

2009-12-24 Thread Andrew
Greetings, all, I know other people have worked on this before, but I haven't been able to find a solution so far. So, the long and short of it is that I've got multiple models that I want to mix into one view sorted by the date created. I've got a 'created' datetime field in the database alr

Problem Prototype / jQuery

2009-12-24 Thread thomaus
Hi there, I have an issue using both Prototype and jQuery in my app. Here is my JS includes in my head folder: link('/js/scriptaculous-js-1.8.3/lib/prototype'); echo $javascript->link('/js/scriptaculous-js-1.8.3/src/ scriptaculous'); // jQuery echo $javascript->l

Re: Cookie in Models

2009-12-24 Thread Nabil Alsharif
Pulling the client_id from the cookie in the model really isn't a good idea IMO. The only way I can think of doing it is straight up with php's basic cookie functions or doing something like ClassRegistry::init('CookieComponent') and hoping it doesn't bomb out on you. OTOH you can easily get to th

Cookie in Models

2009-12-24 Thread dyutiman
Hi, I am building an application with multiple database. Database gets selected based upon clients. Now the client_id is saved in a cookie. I have to read the cookie value in my /app/app_model.php page to select respective database. Is there a way to retrieve the cookie value in that page !!!

Re: accents in html forms

2009-12-24 Thread Lorenzo Bettini
mh... could you please be a little bit more specific? thanks Lore euromark wrote: > yes it is > use utf8 in your template files if you need to use special characters > > > On 24 Dez., 16:10, Lorenzo Bettini wrote: >> Hi >> >> I'm experiencing problems with words with accents (e.g., Lu

Re: Logout link in layout

2009-12-24 Thread kani
How to do this in cakephp 1.2.5 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.

Re: accents in html forms

2009-12-24 Thread euromark
yes it is use utf8 in your template files if you need to use special characters On 24 Dez., 16:10, Lorenzo Bettini wrote: > Hi > > I'm experiencing problems with words with accents (e.g., Lu s) which are > not displayed at all in html forms generated with the html form helper > (e.g., select fie

Re: Multilanguage routes

2009-12-24 Thread robustsolution
I think the smart guy teknoid has a full article on this Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email

Re: Merry Christmas

2009-12-24 Thread robustsolution
it will be only in your and my dream happy new year 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 ca

accents in html forms

2009-12-24 Thread Lorenzo Bettini
Hi I'm experiencing problems with words with accents (e.g., Luís) which are not displayed at all in html forms generated with the html form helper (e.g., select fields). Is this a problem with encoding? thanks in advance Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ.

Re: using the session object

2009-12-24 Thread Josh
That sounds like a good solution to me. Thanks to both of you. 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

Re: using the session object

2009-12-24 Thread euromark
i personally hate to put too much data in the session the less in it the faster the requests are if there is a chance that you need this data only on some pages and only in the views (not in controller actions where you might get redirected anyway etc) i would put it in a file in tmp/data or whate

Re: Logout link in layout

2009-12-24 Thread euromark
If($this->Session->read('User.id')) would only be appropriate in cakephp 1.3! (in the view) On 24 Dez., 12:40, stefano wrote: > if($Session->read("User.id")) { > ... > > } > > On Thu, Dec 24, 2009 at 8:30 AM, Edinei Luis Cipriani > > > > wrote: > > If(isset($this->Session->read('User.id'))): >

Re: How to retrieve the query being executed

2009-12-24 Thread euromark
set debug level to 2 in config/core.php now it will print out the queries at the bottom of the page On 24 Dez., 13:00, SeeVik wrote: > Hello all > > I am trying to set my feet in CakePHP. I wanted to ask how can I know > what query is being executed when I write something like this... > > $cond

How to retrieve the query being executed

2009-12-24 Thread SeeVik
Hello all I am trying to set my feet in CakePHP. I wanted to ask how can I know what query is being executed when I write something like this... $cond = array( 'id={$param}' ); $list = $this->TableName->findAll( $cond, null, 'TableName.fieldName' ); Thanks and Regards ShiVik Check out the new C

Re: Logout link in layout

2009-12-24 Thread stefano
if($Session->read("User.id")) { ... } On Thu, Dec 24, 2009 at 8:30 AM, Edinei Luis Cipriani wrote: > If(isset($this->Session->read('User.id'))): >> echo $html->link('Logout', array('controller' => 'Users', >> 'action'=>'logout')); > > endif; > > > > happy christmas > > > Em 24/12/2009, às 07:46,

Multilanguage routes

2009-12-24 Thread Giro
Hi, I have this route on my routes.php Router::connect('/:language/historia',array('controller' => 'pages', 'action' => 'display', 'historia','language' => '[a-z]{3}')); This work but i need for a diferent url go to same page. For example if i have. www.example.com/spa/historia www.example.com/

Re: Logout link in layout

2009-12-24 Thread Edinei Luis Cipriani
If(isset($this->Session->read('User.id'))): > echo $html->link('Logout', array('controller' => 'Users', > 'action'=>'logout')); endif; happy christmas Em 24/12/2009, às 07:46, emmexx escreveu: > I'd like to put a logout link in my default layout. The link should be > there only when a user h

Re: using the session object

2009-12-24 Thread robustsolution
you ask a great question I forget about putting in database because it should be treated as permanent storage not temporary/volatile storage now about file caching. either you use session or you create your own cache engine. if the arrays are large I prefer create my own cache engine but instead o

Re: Logout link in layout

2009-12-24 Thread robustsolution
in you app_controller.php, put this public function beforeRender() { if (!array_key_exists('requested', $this->params)) { $user = $this->Session->read($this->Auth->sessionKey); $this->set(compact('user')); } } and in the layout put this if (!empty($

Logout link in layout

2009-12-24 Thread emmexx
I'd like to put a logout link in my default layout. The link should be there only when a user has already logged in. I put the following code in my app/views/layouts/default.ctp: if ($this->Auth->user()) echo $html->link('Logout', array('controller' => 'Users', 'action'=>'logout')); but,

Re: how i can download cakebook source from the chaw?!!

2009-12-24 Thread cherif_Gsoul
thank you i apperciate that i try to follow that. On 24 déc, 10:25, red wrote: > Here are some guides how to generate public ssh > keys:http://thechaw.com/wiki/guides/setuphttp://help.github.com/key-setup-redirect > > On 24 Gru, 09:53, cherif_Gsoul wrote: > > > hi, i have an acount on the cha

Re: how i can download cakebook source from the chaw?!!

2009-12-24 Thread red
Here are some guides how to generate public ssh keys: http://thechaw.com/wiki/guides/setup http://help.github.com/key-setup-redirect On 24 Gru, 09:53, cherif_Gsoul wrote: > hi, i have an acount on the chaw and i want to download cakebook > source, wheni use to download it with git bash i use th

Re: requestHandler swf/flash

2009-12-24 Thread cherif_Gsoul
On 22 déc, 21:42, "designv...@gmail.com" wrote: > Hi all, > > Is there a way to check if an action being called via flash with the > requestHandler like the is for Ajax? > > Cheers, > > t. i dont know too much about it but take a look at amfphp may can help you as i know is the bridge between f

how i can download cakebook source from the chaw?!!

2009-12-24 Thread cherif_Gsoul
hi, i have an acount on the chaw and i want to download cakebook source, wheni use to download it with git bash i use this command line (git clone g...@thechaw.com:cakebook.git) but after it makes the initialization of an empty git repos it sends me this message: Permission denied (public key). fat