Best Practice to display data in layout or view

2012-08-10 Thread sanjeev
Hello,

What is the best practice to display data e.g. list of products, events, 
news in layout?

1. Element - which requires to call requestAction() and also calls 
beforeFilter from AppController each time
2. Helper - need to use Model class in helper

Regards,

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: PHP Code in Database

2012-08-10 Thread Sanjeev Divekar
Thanks  euromark

On Fri, Aug 10, 2012 at 10:33 PM, euromark  wrote:

> careful who has access to it, though
> using eval can be pretty dangerous - since it can execute any php code.
> so "normal users" should probably not have edit access.
>
> PS: in my case it was
> $res = eval("?>" . $str . " to make it work in all cases
>
> the reason you need this is that you have HTML in it and php is only
> embedded there as 
>
>
>
> Am Freitag, 10. August 2012 18:24:23 UTC+2 schrieb sanjeev:
>>
>> Thanks Tilen,
>>
>> This following code works
>> $content = $this->fetch('content');
>> echo eval('?>'.$content);
>>
>> can you explain why i need to prefix ?> berfore $content?
>>
>> On Fri, Aug 10, 2012 at 3:43 PM, Tilen Majerle wrote:
>>
>>> ok, i understand...
>>> allow user to write some idk, php code, save it in database and than use
>>> php's eval.
>>>
>>> http://si2.php.net/manual/en/**function.eval.php
>>>
>>>
>>> eval will execute code :)
>>> --
>>> Lep pozdrav, Tilen Majerle
>>> http://majerle.eu
>>>
>>>
>>>
>>> 2012/8/10 Sanjeev Divekar 
>>>
 No it's not cache. I want to execute user defined PHP code in my view.


 On Fri, Aug 10, 2012 at 2:31 PM, Tilen Majerle wrote:

> it sound's like you cache some view. Why you don't just use Cache by
> cakephp ?
> http://book.cakephp.org/2.0/**en/core-libraries/caching.html
> **
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/8/10 sanjeev 
>
>> Hello,
>>
>> I am developing CMS which need to execute some php code e.g. > echo $this->element('helpbox'); ?> which is stored in database.
>>
>> I tried
>> file_put_contents ('tempfile.tmp',$this->fetch('**content'));
>> include('tempfile.tmp');
>> in layout which works
>>
>> but any better Idea?
>>
>> Regards,
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "CakePHP" group.
>> To post to this group, send email to cake...@googlegroups.com.
>> To unsubscribe from this group, send email to cake-php+u...@**
>> googlegroups.com.
>>
>> Visit this group at http://groups.google.com/**
>> group/cake-php?hl=en-US
>> .
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake...@googlegroups.com.
> To unsubscribe from this group, send email to cake-php+u...@**
> googlegroups.com.
>
> Visit this group at 
> http://groups.google.com/**group/cake-php?hl=en-US
> .
>
>
>



 --
 Warm Regards,
 Sanjeev
 http://sanjeevdivekar.**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...@googlegroups.com.
 To unsubscribe from this group, send email to cake-php+u...@**
 googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/cake-php?hl=en-US
 .



>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To post to this group, send email to cake...@googlegroups.com.
>>> To unsubscribe from this group, send email to cake-php+u...@**
>>> googlegroups.com.
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/cake-php?hl=en-US
>>> .
>>>
>>>
>>>
>>
>>
>>
>> --
>> Warm Regards,
>> Sanjeev
>> http://sanjeevdivekar.**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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>



-- 
Warm Regards,
Sanjeev
http://sanjeevdivekar.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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: gebo admin template

2012-08-10 Thread rchavik
why is it running wordpress? :p

On Saturday, August 11, 2012 7:03:24 AM UTC+7, MetZ wrote:
>
>
> http://whatswhat.no/development/framework/cakephp-2/451-how-to-create-admin-panel-with-own-theme-in-cakephp
>
> Have fun :)
>
> kl. 15:17:32 UTC+2 torsdag 9. august 2012 skrev Rahul følgende:
>>
>> Hi,
>>
>> I am looking for some help to setup gebo admin template for my project, 
>> please share any useful links/info  .
>>
>> gebo admin template is the paid one and help is required to port that in  
>> cakephp.
>>
>> Thanks,
>>
>>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Elfinder 2.x integration with cakephp 2.x ?

2012-08-10 Thread MetZ
Hi all..

I have been using the old Elfinder as my filemanager in my admin panel (the 
v.1.somthing).

Now, I am trying to implement the new Elfinder 2 to my admin panel, and are 
experiencing some trouble. 

mainly, I can not seem to get the connector going. I have created an helper 
to load all JS to view, and tried to load the connector in my controller.

Any suggestions? Or perhaps you have this working on your projects?

What is the best approach here? I am not to experienced with components and 
such.. 

Thanks for any help on this..

Regards!
-Tom

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: gebo admin template

2012-08-10 Thread MetZ
http://whatswhat.no/development/framework/cakephp-2/451-how-to-create-admin-panel-with-own-theme-in-cakephp

Have fun :)

kl. 15:17:32 UTC+2 torsdag 9. august 2012 skrev Rahul følgende:
>
> Hi,
>
> I am looking for some help to setup gebo admin template for my project, 
> please share any useful links/info  .
>
> gebo admin template is the paid one and help is required to port that in  
> cakephp.
>
> Thanks,
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Error to save in database

2012-08-10 Thread lowpass
It's happening because Cake cannot find your User model. When you do
$this->User->something() it is usingthe AppModel instead of User
model. And so "registerValidate" is being sent directly to the
database as a query.

Is this model in a plugin? What is the file name? What does the first
line have? eg.

class User extends Appmodel {

On Fri, Aug 10, 2012 at 4:29 PM, Lucas Simon Rodrigues Magalhaes
 wrote:
> hii guys!!!
>
> I have a error[1] in any save data of my actions in my UserController.
> The error is in my function to validate[2] a add[3] user
>
> [1]  http://pastebin.com/M3hSWD9k
> [2]  http://pastebin.com/9Wg1Aujm
> [3]  http://pastebin.com/rZctnxFX
>
>
> --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need help with reverse routing

2012-08-10 Thread Mark Wratten
cricket - thanks for the reply, I will try it and see if it works.

Thanks

Mark

On Friday, August 10, 2012 4:18:32 PM UTC-4, cricket wrote:
>
> Here's a generic element I use for pagination: 
>
> http://pastebin.com/JvKbyWUi 
>
> Perhaps you can modify that to your own needs. With Cake 2.x I've had 
> to make some changes to what I had been using. I suppose that I must 
> be doing something wrong that it requires the AppController snippet. 
>
> I think your route could be improved a bit: 
>
> Router::connect( 
> '/:state/:city/:page/:slug', 
> array( 
> 'controller' => 'pages', 
> 'action' => 'display', 
> 'level' => 'town' 
> ), 
> array( 
> 'state' => '[a-z]{2}', 
> 'city' => '[-a-z]+', 
> 'page' => '[0-9]+', 
> 'slug' => '[-a-z]+', 
> 'pass' => array('page', 'slug') 
> ) 
> ); 
>
>
> I've added the slug to the URL, which allows you to pass it as an 
> action param. Otherwise, I'm not sure what good it would do you. 
>
> I've also made a better regex for state, and "sluggified" city -- a 
> name with a space or apostrophe would not match your regex. Because 
> you want the city name to appear in URLs, you'll need to store both 
> the display text and slug for each city. 
>
> As for what's being passing as params, personally, I would pass state, 
> city, and slug. I also think it's a bit odd that this is pointing to 
> PagesController. But then, I don't know the details so ... 
>
> On Fri, Aug 10, 2012 at 2:33 PM, Mark Wratten > 
> wrote: 
> > I'm looking for some help with reverse routing as the documentation is a 
> bit 
> > thin. Particularly for use with rendering objects such as 
> PaginatorHelper. 
> > 
> > I have a URL in the format - /state/city/page/slug which I route with - 
> > Router::connect('/:state/:city/:page/*', array( 
> > 'controller' => 'pages', 'action' => 'display', 'level' => 'town'), 
> array( 
> > 'state' => '[a-z][a-z]', 'city' => '[a-z]+', 'page' => '[^/]*', 'pass' 
> => 
> > array('page'))); 
> > 
> > That works fine in the forward direction, but how do I get the 
> > PaginatorHelper to assemble the URL with the state and city pieces? 
> > 
> > If I add another route for ajax requests, such as - 
> > Router::connect('/ajax/:controller/:action/*'); 
> > 
> > That also works in the forward direction, but the URL generated by 
> > PaginatorHelper in the previous case now generates the URL in the form - 
> > /ajax/pages/display/... 
> > So How do you tell the reverse routing which rule to use? 
> > 
> > If I need to resort to a custom router, how do you tell the the Cake 
> > rendering functions to use the custom router? 
> > 
> > Thanks in advance 
> > 
> > Mark 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "CakePHP" group. 
> > To post to this group, send email to cake...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > cake-php+u...@googlegroups.com . 
> > Visit this group at http://groups.google.com/group/cake-php?hl=en-US. 
> > 
> > 
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Intermittent cache write failures with files or memcached - NginX, PHP-FPM, Load Balanced

2012-08-10 Thread Ryan Willis
It was a write permissions error on the files and a storage error in
Memcached. Oddly enough, I can no longer reproduce these. It must be a
server level problem. Thanks for your response and I will update if I
figure out what it was.

Ryan

On Thu, Aug 9, 2012 at 9:20 PM, Dr. Tarique Sani wrote:

> What is the error you are getting then attempting to re-write cache?
> OR is it that the code is not reaching the write to cache stage?
>
> Tarique
>
> On Thu, Aug 9, 2012 at 10:03 PM, Ryan Willis  wrote:
> > Howdy :)
> >
> > To give you a feel for the environment, we have a highly available
> > configuration of two load balanced web servers and two database servers
> > (master/slave). We are using CakePHP 2.2.1 on NginX and PHP-FPM with PHP
> > 5.4. We are noticing intermittent cache write failures despite having
> tried
> > both file based caching and memcached. For file based caching, even with
> > permissions being 777 and the umask set to 777, a cache file cannot be
> > overwritten once it is written. On the memcached side, the store failures
> > follow the same pattern. Once it has been written, it cannot be
> overwritten
> > when it expires.
> >
> > I am at a loss. At first I thought it had something to do with our file
> > syncing on the web servers but then we moved to memcached to sitestep the
> > issue and we are having the same problem. Any ideas?
> >
> > Thanks in advance!
> >
> > --
> > 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.
> > Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
> >
> >
>
>
>
> --
> =
> PHP for E-Biz: http://sanisoft.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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Error to save in database

2012-08-10 Thread Lucas Simon Rodrigues Magalhaes
hii guys!!!

I have a error[1] in any save data of my actions in my UserController.
The error is in my function to validate[2] a add[3] user

[1]  http://pastebin.com/M3hSWD9k 
[2]  http://pastebin.com/9Wg1Aujm 
[3]  http://pastebin.com/rZctnxFX 


-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need help with reverse routing

2012-08-10 Thread lowpass
Here's a generic element I use for pagination:

http://pastebin.com/JvKbyWUi

Perhaps you can modify that to your own needs. With Cake 2.x I've had
to make some changes to what I had been using. I suppose that I must
be doing something wrong that it requires the AppController snippet.

I think your route could be improved a bit:

Router::connect(
'/:state/:city/:page/:slug',
array(
'controller' => 'pages',
'action' => 'display',
'level' => 'town'
),
array(
'state' => '[a-z]{2}',
'city' => '[-a-z]+',
'page' => '[0-9]+',
'slug' => '[-a-z]+',
'pass' => array('page', 'slug')
)
);


I've added the slug to the URL, which allows you to pass it as an
action param. Otherwise, I'm not sure what good it would do you.

I've also made a better regex for state, and "sluggified" city -- a
name with a space or apostrophe would not match your regex. Because
you want the city name to appear in URLs, you'll need to store both
the display text and slug for each city.

As for what's being passing as params, personally, I would pass state,
city, and slug. I also think it's a bit odd that this is pointing to
PagesController. But then, I don't know the details so ...

On Fri, Aug 10, 2012 at 2:33 PM, Mark Wratten  wrote:
> I'm looking for some help with reverse routing as the documentation is a bit
> thin. Particularly for use with rendering objects such as PaginatorHelper.
>
> I have a URL in the format - /state/city/page/slug which I route with -
> Router::connect('/:state/:city/:page/*', array(
> 'controller' => 'pages', 'action' => 'display', 'level' => 'town'), array(
> 'state' => '[a-z][a-z]', 'city' => '[a-z]+', 'page' => '[^/]*', 'pass' =>
> array('page')));
>
> That works fine in the forward direction, but how do I get the
> PaginatorHelper to assemble the URL with the state and city pieces?
>
> If I add another route for ajax requests, such as -
> Router::connect('/ajax/:controller/:action/*');
>
> That also works in the forward direction, but the URL generated by
> PaginatorHelper in the previous case now generates the URL in the form -
> /ajax/pages/display/...
> So How do you tell the reverse routing which rule to use?
>
> If I need to resort to a custom router, how do you tell the the Cake
> rendering functions to use the custom router?
>
> Thanks in advance
>
> Mark
>
> --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Hi

2012-08-10 Thread Alok Mishra
add my gmail id


On Sat, Aug 11, 2012 at 1:15 AM, soda sonic  wrote:

> sometime maybe i help you
>
> contact me   skype:  soda_sonic
> and gtalk  this e mail
>
> thank you
>
>
> 2012/8/11 sooraj francis 
>
>> Hi
>>
>>  please contact me @ soorajfran...@gmail.com
>>  skype: soorajf900
>>
>>
>> On 8 August 2012 23:45, Dilip Bakotiya  wrote:
>>
>>> Hi
>>>
>>> i need the php developer for long term as remote developer .
>>>
>>> send me your skype and mail id to for further talk
>>>
>>>
>>> Thanks
>>>
>>> --
>>> 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.
>>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>>
>>>
>>>
>>
>>  --
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>
>
> --
> Sincerely
>
> Noom .  086 688 5686
>
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>



-- 
*ALOK KUMAR MISHRA*

Software Engg-A1 Technology Inc
Chandigarh Mohali.
Mobile@9569881400
aloksoft2...@gmail.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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Hi

2012-08-10 Thread soda sonic
sometime maybe i help you

contact me   skype:  soda_sonic
and gtalk  this e mail

thank you

2012/8/11 sooraj francis 

> Hi
>
>  please contact me @ soorajfran...@gmail.com
>  skype: soorajf900
>
>
> On 8 August 2012 23:45, Dilip Bakotiya  wrote:
>
>> Hi
>>
>> i need the php developer for long term as remote developer .
>>
>> send me your skype and mail id to for further talk
>>
>>
>> Thanks
>>
>> --
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>



-- 
Sincerely

Noom .  086 688 5686

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Need help with reverse routing

2012-08-10 Thread Mark Wratten
I'm looking for some help with reverse routing as the documentation is a 
bit thin. Particularly for use with rendering objects such as 
PaginatorHelper.

I have a URL in the format - /state/city/page/slug which I route with -
Router::connect('/:state/:city/:page/*', array(
'controller' => 'pages', 'action' => 'display', 'level' => 'town'), array(
'state' => '[a-z][a-z]', 'city' => '[a-z]+', 'page' => '[^/]*', 'pass' => 
array('page')));

That works fine in the forward direction, but how do I get the 
PaginatorHelper to assemble the URL with the state and city pieces?

If I add another route for ajax requests, such as -
Router::connect('/ajax/:controller/:action/*');

That also works in the forward direction, but the URL generated by 
PaginatorHelper in the previous case now generates the URL in the form - 
/ajax/pages/display/...
So How do you tell the reverse routing which rule to use?

If I need to resort to a custom router, how do you tell the the Cake 
rendering functions to use the custom router?

Thanks in advance 

Mark

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Hi

2012-08-10 Thread sooraj francis
Hi

 please contact me @ soorajfran...@gmail.com
 skype: soorajf900

On 8 August 2012 23:45, Dilip Bakotiya  wrote:

> Hi
>
> i need the php developer for long term as remote developer .
>
> send me your skype and mail id to for further talk
>
>
> Thanks
>
> --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Urgently Require Cakephp developer

2012-08-10 Thread Rahul
Hi,

I am looking for Cakephp developer preferably from India with 2 yrs exp 
range.

I have a long term project and handsome budget :)
Please send me your cv at ra...@zimaudio.com.

Thanks,

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: PHP Code in Database

2012-08-10 Thread euromark
careful who has access to it, though
using eval can be pretty dangerous - since it can execute any php code.
so "normal users" should probably not have edit access.

PS: in my case it was 
$res = eval("?>" . $str . "



Am Freitag, 10. August 2012 18:24:23 UTC+2 schrieb sanjeev:
>
> Thanks Tilen,
>
> This following code works
> $content = $this->fetch('content');
> echo eval('?>'.$content);
>
> can you explain why i need to prefix ?> berfore $content?
>
> On Fri, Aug 10, 2012 at 3:43 PM, Tilen Majerle 
> 
> > wrote:
>
>> ok, i understand...
>> allow user to write some idk, php code, save it in database and than use 
>> php's eval.
>>
>> http://si2.php.net/manual/en/function.eval.php 
>>
>> eval will execute code :)
>> --
>> Lep pozdrav, Tilen Majerle
>> http://majerle.eu
>>
>>
>>
>> 2012/8/10 Sanjeev Divekar >
>>
>>> No it's not cache. I want to execute user defined PHP code in my view.
>>>
>>>
>>> On Fri, Aug 10, 2012 at 2:31 PM, Tilen Majerle 
>>> 
>>> > wrote:
>>>
 it sound's like you cache some view. Why you don't just use Cache by 
 cakephp ?
 http://book.cakephp.org/2.0/en/core-libraries/caching.html 
 --
 Lep pozdrav, Tilen Majerle
 http://majerle.eu



 2012/8/10 sanjeev >

> Hello,
>
> I am developing CMS which need to execute some php code e.g.  echo $this->element('helpbox'); ?> which is stored in database.
>
> I tried 
> file_put_contents ('tempfile.tmp',$this->fetch('content'));
> include('tempfile.tmp');
> in layout which works
>
> but any better Idea?
>
> Regards,
>
>
>  -- 
> You received this message because you are subscribed to the Google 
> Groups "CakePHP" group.
> To post to this group, send email to cake...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> cake-php+u...@googlegroups.com .
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>  
>  
>

  -- 
 You received this message because you are subscribed to the Google 
 Groups "CakePHP" group.
 To post to this group, send email to cake...@googlegroups.com
 .
 To unsubscribe from this group, send email to 
 cake-php+u...@googlegroups.com .
 Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
  
  

>>>
>>>
>>>
>>> -- 
>>> Warm Regards,
>>> Sanjeev
>>> http://sanjeevdivekar.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...@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to 
>>> cake-php+u...@googlegroups.com .
>>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>>  
>>>  
>>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> cake-php+u...@googlegroups.com .
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>  
>>  
>>
>
>
>
> -- 
> Warm Regards,
> Sanjeev
> http://sanjeevdivekar.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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: PHP Code in Database

2012-08-10 Thread Sanjeev Divekar
Thanks Tilen,

This following code works
$content = $this->fetch('content');
echo eval('?>'.$content);

can you explain why i need to prefix ?> berfore $content?

On Fri, Aug 10, 2012 at 3:43 PM, Tilen Majerle wrote:

> ok, i understand...
> allow user to write some idk, php code, save it in database and than use
> php's eval.
>
> http://si2.php.net/manual/en/function.eval.php
>
> eval will execute code :)
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/8/10 Sanjeev Divekar 
>
>> No it's not cache. I want to execute user defined PHP code in my view.
>>
>>
>> On Fri, Aug 10, 2012 at 2:31 PM, Tilen Majerle 
>> wrote:
>>
>>> it sound's like you cache some view. Why you don't just use Cache by
>>> cakephp ?
>>> http://book.cakephp.org/2.0/en/core-libraries/caching.html
>>> --
>>> Lep pozdrav, Tilen Majerle
>>> http://majerle.eu
>>>
>>>
>>>
>>> 2012/8/10 sanjeev 
>>>
 Hello,

 I am developing CMS which need to execute some php code e.g. >>> echo $this->element('helpbox'); ?> which is stored in database.

 I tried
 file_put_contents ('tempfile.tmp',$this->fetch('content'));
 include('tempfile.tmp');
 in layout which works

 but any better Idea?

 Regards,


  --
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en-US.



>>>
>>>  --
>>> 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.
>>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Warm Regards,
>> Sanjeev
>> http://sanjeevdivekar.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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>



-- 
Warm Regards,
Sanjeev
http://sanjeevdivekar.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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: gebo admin template

2012-08-10 Thread Tilen Majerle
and what ?
we can now find this template or what ?

omg..

--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/8/9 Rahul 

> Hi,
>
> I am looking for some help to setup gebo admin template for my project,
> please share any useful links/info  .
>
> gebo admin template is the paid one and help is required to port that in
> cakephp.
>
> Thanks,
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




gebo admin template

2012-08-10 Thread Rahul
Hi,

I am looking for some help to setup gebo admin template for my project, 
please share any useful links/info  .

gebo admin template is the paid one and help is required to port that in  
cakephp.

Thanks,

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Using mPDF

2012-08-10 Thread DerekGardiner
I have mPDF working within an existing view. Now i need to figure out how 
to create a PDF of a another view.

For example, I would like to set up a cron job which calls a function which 
creates and emails a number of PDFs every night but I don't know how to 
actually call that controller and retrieve the HTML from the view to give 
mpdf in order for it to render a pdf.

Does anyone know/have a tutorial on how to achieve that?

On Friday, 9 September 2011 17:26:39 UTC+2, LunarDraco wrote:
>
> You might want to review this article in the bakery: 
>
> http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf
>  
>
> As mPDF is based on html2fpdf perhaps the techniques in that article 
> could help you get started. 
>
> On Sep 8, 12:34 pm, Uziel Barbosa  wrote: 
> > anyone? 
> > 
> > 2011/9/8 Uziel Barbosa  
> > 
> > > Has anyone used mPDF with Cake? 
> > > Thanks. 
> > 
> > > __ 
> > > Uziel Barbosa 
> > > GodLabs 
> > > IFAL 
> > > @uzielbarbosa 
> > 
> > -- 
> > Uziel Barbosa 
> > GodLabs 
> > IFAL 
> > @uzielbarbosa

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Use of requestaction

2012-08-10 Thread Remy Bertot
Here are some interesting read on requestAction, maybe a bit old but I
think most of it is still relevant :

http://debuggable.com/posts/requestaction-considered-harmful:48abb514-1f9c-4443-b91c-6d0f4834cda3
http://cakebaker.42dh.com/2008/08/20/an-alternative-to-requestaction/
http://www.mark-story.com/posts/view/how-using-requestaction-increased-performance-on-my-site

Cheers,


On Fri, Aug 10, 2012 at 2:29 PM, Bharat Maheshwari <
bharat.maheshw...@logicspice.com> wrote:

> I want to know is there any performance issue if i use requestaction in a
> ctp file???
>
> On Wednesday, August 1, 2012 11:29:16 PM UTC+5:30, cricket wrote:
>>
>> Those are very different things. What do you want to do exactly?
>>
>> On Wed, Aug 1, 2012 at 3:43 AM, Bharat Maheshwari
>>  wrote:
>> > I just want to know that the use of requestaction in a view file is
>> good for
>> > coding or using Class::Rergistry is better then requestaction ?
>> >
>> > --
>> > Our newest site for the community: CakePHP Video Tutorials
>> > http://tv.cakephp.org
>> > Check out the new CakePHP Questions site http://ask.cakephp.org and
>> help
>> > others with their CakePHP related questions.
>> >
>> >
>> > To unsubscribe from this group, send email to
>> > cake-php+u...@**googlegroups.com For more options, visit this group at
>> > http://groups.google.com/**group/cake-php
>>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: $html->tableHeaders using the colspan for a single TH

2012-08-10 Thread Ezequiel Pozzo
This is a really old post but I'm writing this for future reference (if you 
search cakephp tableheaders colspan this is one of the first hits).

Cake 2.2 implements a way of doing this:

http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html 

El jueves, 14 de diciembre de 2006 21:42:22 UTC-3, Seb escribió:
>
> I came accross this same problem 2 wks or so ago and decided I coun't
> live without that...! So I created my own helper, extending HtmlHelper
> and implemented the function as follow;
>
> [code location="my custom/extended helper"]
> /**
>  * Returns a row of formatted and named TABLE headers.
>  *
>  * @param array $namesArray of tablenames - if a tablename 
> is an
> array, index 1 should contain th options.
>  * @param array $trOptionsHTML options for TR elements.
>  * @param array $thOptionsHTML options for TH elements.
>  * @param  boolean $returnWheter this method should return a value
>  * @return string
>  */
> function tableHeaders($names, $trOptions = null, $thOptions = null,
> $return = false) {
>
> $out = array();
> foreach($names as $arg) {
> if (is_array($arg) && isset($arg[0]) && isset($arg[1])) { 
> // the 2x
> isset() are pretty useless really... but well for the sake of
> robustness!
> $out[] = sprintf($this->tags['tableheader'],
> $this->parseHtmlOptions(array_merge($thOptions,$arg[1])), $arg[0]);
> } else {
> $out[] = sprintf($this->tags['tableheader'],
> $this->parseHtmlOptions($thOptions), $arg);
> }
> }
>
> $data = sprintf($this->tags['tablerow'],
> $this->parseHtmlOptions($trOptions), join(' ', $out));
> return $this->output($data, $return);
> }
> [/code]
>
> then, I use it like this;
>
> [code location="any view"]
> $th = array (
> array($pagination->sortBy('weight','Order'),
> array('width'=>'60px')),
> $pagination->sortBy('name'),
> array($pagination->sortBy('status'), 
> array('width'=>'150px')),
> array('Actions', array('class' => 'actions')),
> );
>
> $eoHtml->tableHeaders($th);
>
> //
> // note that you could still provide 'global' th options like this;
> // $eoHtml->tableHeaders($th,null,array('class'=>'whatever'));
> ///
> [/code]
>
> I don't quite like the fact that names are linked with options, but I
> really wanted to keep the same signature... plus, it makes a bit of
> sense to link a specific header name with it's option(s)!
>
> so.. the above code will generate a 4 column table headers,
> column 1 is labeled Order, is sortable (because of the
> $pagination->sortBy()), and has a fixed width of 60px;
> column 2 is labeled Name, and is sortable - no other options (the
> defautl css still applies)
> column 3 is labeled Status, is sortable (...) and has a fixed width of
> 150px;
> and finally
> column 4 is labeled Actions, and will be generated a class="actions"
> attribute.
>
> Hope this helps...
>
> Seb.
>
> On Dec 15, 10:22 am, "Falagar"  wrote:
> > The html Helper does not implement such a behavior. You either have
> > attributes for all th's or for none.
> >
> > So you have a number of possibilities: you either don't use a helper
> > and write the HTML yourself (which shouldn't be hard).
> >
> > Or (if you make use of this helper function very often and changing all
> > instances would be tedious) you write your own function (probably
> > similar to the one in html Helper) that does excactly what you want.
> >
> > Another very ugly possibility would be to change the core html Helper
> > code to do what you want, which I do not recommend.
> >
> > On Dec 14, 6:39 am, "progra...@gmail.com"  wrote:
> >
> > > I need add an attribute for only a th, but the $helper extend to every
> > > TH.
> > > I want create a colspan for the 3 th.
> > > Ho I can?
> >
> > > $thop=array(COLSPAN=>1);
> > > $th = array (
> > > $pagination->sortBy('id'),
> > > $pagination->sortBy('title'),
> > > $pagination->sortBy('created'),
> > > "Actions"
> > > ); // Generate the pagination sort links
> > > echo $html->tableHeaders($th,null,$thop); // Create the table headers
> > > with sort links if desired
> > 
> > > Thanks!
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: How to call css with ie6 or ie7

2012-08-10 Thread soda sonic
thank you Metz

2012/8/9 MetZ 

>  
>
> kl. 14:48:37 UTC+2 tirsdag 7. august 2012 skrev suttipong Pratum følgende:
>
>> How to coding css with cakePHP
>>
>>
>>
>>   
>>
>>   
>>
>>
>> thank you
>>
>> sodaZa
>>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>



-- 
Sincerely

Noom .  086 688 5686

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Render main app Cake Template file in Plugin

2012-08-10 Thread Luis C
I have been working on a Plugin and there is an element in the main app 
that I want to include within the plugin. I have the following in my 
controller.

I have the following action inside a plugin's controller:

public function add (){
$this->layout

$this->render('CTP FILE OUTSIDE OF THE PLUGIN');
}

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Newbie - Resources

2012-08-10 Thread Robert Haylor
Hi All, 

Quick question, I am new to the concept of CakePHP and was just wondering 
if anyone could recommend some great books or resources which will be ideal 
for a beginner  - I'm currently following the tutorial on the CakePHP 
website but any advice would be great.

Thanks

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Overriding form helper error messages in CakePHP 2.0

2012-08-10 Thread William Notowidagdo
Hi Richard,

Same here. I'm using 2.2.1. Though the doc said we can do that 
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html

On Monday, October 24, 2011 9:44:33 PM UTC+7, Richard@Home wrote:
>
> Hi all. 
>
> I have the following $validate in my User model: 
>
> var $validate = array( 
> 'email'=>array( 
> 'required'=>array( 
> 'rule'=>'notEmpty', 
> 'message'=>'cannot be blank' 
> ), 
> 'email'=>array( 
> 'rule'=>'email', 
> 'message'=>'must be a valid email address' 
> ), 
> 'unique'=>array( 
> 'rule'=>'isUnique', 
> 'message'=>'that email is already in use' 
> ) 
> ), 
> 'password'=>array( 
> 'required'=>array( 
> 'rule'=>'notEmpty', 
> 'message'=>'cannot be blank' 
> ), 
> 'length'=>array( 
> 'rule'=>array('minLength', 6), 
> 'message'=>'must be at least 6 letters, 
> numbers or symbols' 
> ), 
> 'matches'=>array( 
> 'rule'=>'passwordsMatch', 
> 'message'=>'passwords do not match' 
> ) 
> ) 
> ); 
>
>
> And I'm trying to override the 'unique' email address message in my 
> form with: 
>
> echo $this->Form->input('User.email', array( 
> 'error'=>array( 
> 'unique' => 'That email is already in use. Have you ' . 
> $this->Html- 
> >link('forgotten your password', 
> array('action'=>'forgotten_password')) . '?' 
> ) 
> )); 
>
>
>
> But it's still displaying the default validate message, not the custom 
> one. 
>
> What am I doing wrong? 
>
> Thanks in advance. 
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: 3.0: a peek into CakePHP's future

2012-08-10 Thread David Gallagher
Would the object returned from queries implement ArrayAccess and Iterator? 
If that is the case you should still be able to access data exactly as you 
did before.

On Friday, July 6, 2012 12:36:03 PM UTC+10, José Lorenzo wrote:
>
> Since its creation, more than 7 years ago, CakePHP has grown with a life 
> of its own. Its main goal has always been to empower developers with tools 
> that are both easy to learn and use, leverage great libraries requiring low 
> documentation and low dependencies too. We've had several big releases 
> along these years and an ever growing community. Being one of the most 
> popular frameworks out there and probably the first one (!) we have also 
> gotten a lot of criticism from the developer community in general. We have, 
> though, accepted it and learnt from our mistakes to keep building the best 
> PHP framework there is.
>
> CakePHP is known for having a very slow pace of adopting new stuff and it 
> has served very well to its community. Back when we were doing version 2.0 
> we decided to hold on version 5.2 of PHP for multiple reasons and despite 
> it didn't let us innovate as much as we wished to, it was an excellent 
> choice given the general environment regarding hosting solutions and 
> general adoption of PHP 5.3. A look back into the past reminded us that we 
> were big innovators in PHP, bringing features to developers that few dreamt 
> possible to do in this language. Now, it's time to look ahead in future and 
> decide on staying in our comfort zone or take back our leading position as 
> innovators.
>
> So it is with great excitement that we announce we are putting our our 
> efforts in bringing you the next major release of CakePHP. Version 3.0 will 
> leverage the new features in PHP 5.4 and will include an important change 
> in our models and database system. CakePHP 3.0 will not be ready less than 
> 6 or 8 months and we reckon that, given the rise of cheap cloud hosting 
> solutions and upcoming release of new operating system versions, there is 
> no better time to jump on the most current stable version of PHP.
>
> As you may already know, PHP 5.4 offers awesome features that would 
> introduce useful new concepts and interesting solutions to old problems. 
> Closure binding, traits, multibyte support are tools we see of great 
> usefulness for properly implemented advanced framework features we've had 
> in mind for a long time. Also new syntax sugar added to the language will 
> make it more pleasant to write both small and complex applications with the 
> framework and a always welcomed free performance increase.
>
> We have a young but already well defined road map for what we want to 
> accomplish in next release and you are invited to contribute and suggest 
> what's next:
>
>- Drop support for 5.2.x and support 5.4+ only
>- Add proper namespaces for all classes. This will make it easier to 
>reuse classes outside CakePHP and to use external libraries and finally no 
>chances of collisions between your app classes and core ones.
>- Use traits were possible and makes sense
>- Improve bootstrapping process to allow more developer control and 
>better performance
>- Model layer rewrite:
>   - Models to return objects from queries
>   - Datamapper-like paradigm
>   - Richer query API
>   - Support for any database type
>   - Support for more database drivers both PDO and native
>- Improve Router:
>   - Make it faster
>   - Remove named parameters
>   - Add support for named routes
>   - Smarter router prefixes
>   - Shorter url syntax
>
> As you may imagine most of the time will be spent or rewriting the model 
> layer, but it will also be one of the most powerful features CakePHP 3.0 
> will have. It's new architecture based on PHP 5.4 capabilities will offer 
> an easier and more powerful set of tools to build web applications in no 
> time.
>
> If you are already as excited as we are this all this new stuff coming, 
> you definitely should meet us on next CakeFest  we'll 
> be talking about the future of CakePHP and hacking our way through to bring 
> you a dev release as soon as possible. Wouldn't it be lovely to attend to 
> awesome talks, workshops and also be part of the group deciding initial 
> architecture for next major version of the framework? Make sure you book 
> your tickets before we run out of them!
>
> We're always looking for different people having a vision on software 
> development, are you interested in helping out? There is no better time to 
> start sending patches and become one of the core team!
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Use of requestaction

2012-08-10 Thread André Luis
If used without caching requestAction can lead to poor performance. It is 
rarely appropriate to use in a controller or model. 
From:  
http://book.cakephp.org/2.0/en/controllers.html#Controller::requestAction 

If the ClassRegistry will not give you any kind of conflict, i recommend 
the use of this, but if you have trouble you can use requestAction without 
problems, i am using this for dinamic menus wich have related models.

Em quarta-feira, 1 de agosto de 2012 04h43min21s UTC-3, Bharat Maheshwari 
escreveu:
>
> I just want to know that the use of *requestaction* in a view file is 
> good for coding or using *Class::Rergistry* is better then *requestaction*?
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Use of requestaction

2012-08-10 Thread André Luis
>From cakephp.org documentation:

If used without caching requestAction can lead to poor performance. It is 
rarely appropriate to use in a controller or model. 

If the ClassRegistry will not give you any conflict, it´s better, but if 
you have any conflict use the requestAction.

Em sexta-feira, 10 de agosto de 2012 09h29min40s UTC-3, Bharat Maheshwari 
escreveu:
>
> I want to know is there any performance issue if i use requestaction in a 
> ctp file???
>
> On Wednesday, August 1, 2012 11:29:16 PM UTC+5:30, cricket wrote:
>>
>> Those are very different things. What do you want to do exactly? 
>>
>> On Wed, Aug 1, 2012 at 3:43 AM, Bharat Maheshwari 
>>  wrote: 
>> > I just want to know that the use of requestaction in a view file is 
>> good for 
>> > coding or using Class::Rergistry is better then requestaction ? 
>> > 
>> > -- 
>> > Our newest site for the community: CakePHP Video Tutorials 
>> > http://tv.cakephp.org 
>> > Check out the new CakePHP Questions site http://ask.cakephp.org and 
>> help 
>> > others with their CakePHP related questions. 
>> > 
>> > 
>> > To unsubscribe from this group, send email to 
>> > cake-php+u...@googlegroups.com For more options, visit this group at 
>> > http://groups.google.com/group/cake-php 
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Model associations

2012-08-10 Thread André Luis
cricket, thanks for the answear, but it´s not exactly this... I have a menu 
wich is generated dinamically in ALL pages of the site, so it´s a part of 
the layout and the categories information needs to be in all pages.

Em sexta-feira, 10 de agosto de 2012 00h23min04s UTC-3, cricket escreveu:
>
> I'm not sure I follow all of that but I think what you want is a list 
> of all Categories for the main page, and all Products for a given 
> Category. If that's the case, I would set the main page as 
> CategoryController::index(). This is from one of my projects: 
>
> Router::connect( 
> '/catalog', 
> array( 
> 'controller' => Categories', 
> 'action' => 'index' 
> ) 
> ); 
> Router::connect( 
> '/catalog/:slug', 
> array( 
> 'controller' => Categories', 
> 'action' => 'view' 
> ), 
> array( 
> 'slug' => '[-a-z0-9]+', 
> 'pass' => array('slug') 
> ) 
> ); 
>
> Next, fetch the Category list directly from that model: 
>
> public function index() 
> { 
> $this->set( 
> 'data', 
> $this->Category->find( 
> 'all', 
> array( 
> 'order' => array( 
> 'Category.name' => 'ASC' 
> ), 
> 'recursive' => -1 
> ) 
> ) 
> ); 
> } 
>
> public function view($slug = null) 
> { 
> if (empty($slug)) 
> { 
> ... 
> } 
>  
> $this->set( 
> 'data' 
> $this->Category->fetch($slug) 
> ); 
> } 
>
>
> Category model: 
>
> public function fetch($slug) 
> { 
> return $this->find( 
> 'first', 
> array( 
> 'conditions' => array( 
> $this->alias.'.slug' => $slug 
> ), 
> 'contain' => array( 
> 'Product' 
> ) 
> ) 
> ); 
> } 
>
>
> On Thu, Aug 9, 2012 at 10:43 AM, André Luis > 
> wrote: 
> > Hi people, it´s me again! 
> > 
> > I am using a habtm relationship in my application, it works 100% fine... 
> But 
> > the Product menu is created dinamically with it´s Categories... so i 
> have 
> > Product model and the Category model with habtm relationship between 
> them. 
> > 
> > In AppController i have to set at beforeFilter the variable 
> > "products_categories", as i dont need the products of each category 
> right 
> > now i use 
> > 
> $this->set('products_categories",$this->Product->CatProduct->find('all')); 
> > and it works fine... BUT, latter when i need to read the product 
> category 
> > with it´s products, i would use $this->CatProduct->read('*',$id); right? 
> BUT 
> > it´s returning ONLY the category, not the products relateds, but if i 
> > comment the line $this->Product->CatProduct->find('all') it works fine, 
> and 
> > returns me the category and all related products. 
> > 
> > What i am doing wrong? Isnt there anyway to get only the categories them 
> get 
> > one category with it´s relateds? 
> > 
> > Thanks! 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "CakePHP" group. 
> > To post to this group, send email to cake...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > cake-php+u...@googlegroups.com . 
> > Visit this group at http://groups.google.com/group/cake-php?hl=en-US. 
> > 
> > 
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Model associations

2012-08-10 Thread André Luis
Yes i do... I resolved the problem using requestAction, but i know that´s 
not correct.

Em quinta-feira, 9 de agosto de 2012 17h28min29s UTC-3, Mark Wratten 
escreveu:
>
> Do you have var $belongsTo = array('Category', 'Product'); in your 
> CatProduct model?
>
> On Thursday, August 9, 2012 10:43:43 AM UTC-4, André Luis wrote:
>>
>> Hi people, it´s me again!
>>
>> I am using a habtm relationship in my application, it works 100% fine... 
>> But the Product menu is created dinamically with it´s Categories... so i 
>> have Product model and the Category model with habtm relationship between 
>> them.
>>
>> In AppController i have to set at beforeFilter the variable 
>> "products_categories", as i dont need the products of each category right 
>> now i use 
>> $this->set('products_categories",$this->Product->CatProduct->find('all')); 
>> and it works fine... BUT, latter when i need to read the product category 
>> with it´s products, i would use $this->CatProduct->read('*',$id); right? 
>> BUT it´s returning ONLY the category, not the products relateds, but if i 
>> comment the line $this->Product->CatProduct->find('all') it works fine, and 
>> returns me the category and all related products.
>>
>> What i am doing wrong? Isnt there anyway to get only the categories them 
>> get one category with it´s relateds?
>>
>> Thanks!
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Use of requestaction

2012-08-10 Thread Bharat Maheshwari
I want to know is there any performance issue if i use requestaction in a 
ctp file???

On Wednesday, August 1, 2012 11:29:16 PM UTC+5:30, cricket wrote:
>
> Those are very different things. What do you want to do exactly? 
>
> On Wed, Aug 1, 2012 at 3:43 AM, Bharat Maheshwari 
> > wrote: 
> > I just want to know that the use of requestaction in a view file is good 
> for 
> > coding or using Class::Rergistry is better then requestaction ? 
> > 
> > -- 
> > Our newest site for the community: CakePHP Video Tutorials 
> > http://tv.cakephp.org 
> > Check out the new CakePHP Questions site http://ask.cakephp.org and 
> help 
> > others with their CakePHP related questions. 
> > 
> > 
> > To unsubscribe from this group, send email to 
> > cake-php+u...@googlegroups.com  For more options, visit 
> this group at 
> > http://groups.google.com/group/cake-php 
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Mike Griffin
On Fri, Aug 10, 2012 at 10:24 AM, mohit kumar  wrote:
> thanks Mike.. Let me try that . But the problem is my controller that i
> generated by the bake is like
>
> user -
> shift -
> save so with 1 form 1 can save only one user, will it be possible for me to
> save multiple mappings with one go
>

Yes, it will. Once again, have you tried it? Please read the manual
and understand it, it's all in there.

Mike.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Ajax submit Data

2012-08-10 Thread Ly Dara
Dear MetZ,

Now I have try with new method.

Thanks a lots for your help and I will ask you again later if I cannot do
it.

Have a great day.

Sincerely,
Mr. Manager,

On Fri, Aug 10, 2012 at 2:57 AM, MetZ  wrote:

> Oh sorry.. Did not see you double posted :/
>
> What are you wondering about? just ask and I will try to help you out..
>
> -Tom
> PS! show me what you got this far.. (your code).
>
>
> kl. 11:53:16 UTC+2 fredag 10. august 2012 skrev MetZ følgende:
>
>> Here you are:
>> http://whatswhat.no/**development/framework/cakephp-**
>> 2/468-jquery-twitter-**bootstrap-typeahead-ajax-user-**
>> search-with-onselect-in-**cakephp-2
>>
>> Modify to your needs.
>>
>> -Tom
>>
>> kl. 09:49:08 UTC+2 fredag 10. august 2012 skrev Mr. Manager følgende:
>>>
>>> Dear All,
>>>
>>> I hope that anyone can help me I am using cakephp 2.1 and I would like
>>> to sumit data for the name field of my table via ajax to controller
>>> function in order to search for the whole record.
>>>
>>> It better If anyone available for chatting with me because it make
>>> easier.
>>>
>>> This issue is in hurry to be solved.
>>>
>>> Sincerely,
>>> Mr. Manager,
>>>
>>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: PHP Code in Database

2012-08-10 Thread Tilen Majerle
ok, i understand...
allow user to write some idk, php code, save it in database and than use
php's eval.

http://si2.php.net/manual/en/function.eval.php

eval will execute code :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/8/10 Sanjeev Divekar 

> No it's not cache. I want to execute user defined PHP code in my view.
>
>
> On Fri, Aug 10, 2012 at 2:31 PM, Tilen Majerle wrote:
>
>> it sound's like you cache some view. Why you don't just use Cache by
>> cakephp ?
>> http://book.cakephp.org/2.0/en/core-libraries/caching.html
>> --
>> Lep pozdrav, Tilen Majerle
>> http://majerle.eu
>>
>>
>>
>> 2012/8/10 sanjeev 
>>
>>> Hello,
>>>
>>> I am developing CMS which need to execute some php code e.g. >> $this->element('helpbox'); ?> which is stored in database.
>>>
>>> I tried
>>> file_put_contents ('tempfile.tmp',$this->fetch('content'));
>>> include('tempfile.tmp');
>>> in layout which works
>>>
>>> but any better Idea?
>>>
>>> Regards,
>>>
>>>
>>>  --
>>> 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.
>>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>>
>>>
>>>
>>
>>  --
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>
>
> --
> Warm Regards,
> Sanjeev
> http://sanjeevdivekar.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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Ajax submit Data

2012-08-10 Thread MetZ
Oh sorry.. Did not see you double posted :/

What are you wondering about? just ask and I will try to help you out..

-Tom
PS! show me what you got this far.. (your code).


kl. 11:53:16 UTC+2 fredag 10. august 2012 skrev MetZ følgende:
>
> Here you are:
>
> http://whatswhat.no/development/framework/cakephp-2/468-jquery-twitter-bootstrap-typeahead-ajax-user-search-with-onselect-in-cakephp-2
>
> Modify to your needs.
>
> -Tom
>
> kl. 09:49:08 UTC+2 fredag 10. august 2012 skrev Mr. Manager følgende:
>>
>> Dear All,
>>
>> I hope that anyone can help me I am using cakephp 2.1 and I would like to 
>> sumit data for the name field of my table via ajax to controller function 
>> in order to search for the whole record.
>>
>> It better If anyone available for chatting with me because it make easier.
>>
>> This issue is in hurry to be solved.
>>
>> Sincerely,
>> Mr. Manager,
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Salines
http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-saveall-array-data-null-array-options-array

Dana petak, 10. kolovoza 2012. 11:24:07 UTC+2, korisnik mohit napisao je:
>
> thanks Mike.. Let me try that . But the problem is my controller that i 
> generated by the bake is like
>
> user - 
> shift - 
> save so with 1 form 1 can save only one user, will it be possible for me 
> to save multiple mappings with one go
>
> *With Best Regards,
> Mohit Kumar *
> *+91-9582894570*
>
>
>
> On Fri, Aug 10, 2012 at 2:51 PM, Mike Griffin 
> > wrote:
>
>> On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar 
>> > 
>> wrote:
>> > How can i display the data in this format. [] are checkboxes
>> >
>> >
>> > Users   Shift1 shift2 shift3 shift4
>> > user1[]  [] [] []
>> > user2[]  [] [] []
>> > user3[]  [] [] []
>> > user4[]  [] [] []
>> > user5[]  [] [] []
>> >
>>
>> Is this something like what you are looking for?
>>
>>
>> > echo "";
>> foreach($users as $u) {
>>   // output the users name here, as the first cell of a table, for example
>>   echo "".$u['name']."";
>>   for($i=0; $i<5; $i++) {
>> // output the shifts here
>> echo "[CODE FOR CHECKBOX]";
>>   }
>>   // finish the row in the table
>>   echo "";
>> }
>> echo "";
>>
>> Mike.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> cake-php+u...@googlegroups.com .
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Ajax submit Data

2012-08-10 Thread MetZ
Here you are:
http://whatswhat.no/development/framework/cakephp-2/468-jquery-twitter-bootstrap-typeahead-ajax-user-search-with-onselect-in-cakephp-2

Modify to your needs.

-Tom

kl. 09:49:08 UTC+2 fredag 10. august 2012 skrev Mr. Manager følgende:
>
> Dear All,
>
> I hope that anyone can help me I am using cakephp 2.1 and I would like to 
> sumit data for the name field of my table via ajax to controller function 
> in order to search for the whole record.
>
> It better If anyone available for chatting with me because it make easier.
>
> This issue is in hurry to be solved.
>
> Sincerely,
> Mr. Manager,
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
thanks Mike.. Let me try that . But the problem is my controller that i
generated by the bake is like

user -
shift -
save so with 1 form 1 can save only one user, will it be possible for me to
save multiple mappings with one go

*With Best Regards,
Mohit Kumar *
*+91-9582894570*



On Fri, Aug 10, 2012 at 2:51 PM, Mike Griffin  wrote:

> On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar  wrote:
> > How can i display the data in this format. [] are checkboxes
> >
> >
> > Users   Shift1 shift2 shift3 shift4
> > user1[]  [] [] []
> > user2[]  [] [] []
> > user3[]  [] [] []
> > user4[]  [] [] []
> > user5[]  [] [] []
> >
>
> Is this something like what you are looking for?
>
>
>  echo "";
> foreach($users as $u) {
>   // output the users name here, as the first cell of a table, for example
>   echo "".$u['name']."";
>   for($i=0; $i<5; $i++) {
> // output the shifts here
> echo "[CODE FOR CHECKBOX]";
>   }
>   // finish the row in the table
>   echo "";
> }
> echo "";
>
> Mike.
>
> --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Mike Griffin
On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar  wrote:
> How can i display the data in this format. [] are checkboxes
>
>
> Users   Shift1 shift2 shift3 shift4
> user1[]  [] [] []
> user2[]  [] [] []
> user3[]  [] [] []
> user4[]  [] [] []
> user5[]  [] [] []
>

Is this something like what you are looking for?


";
foreach($users as $u) {
  // output the users name here, as the first cell of a table, for example
  echo "".$u['name']."";
  for($i=0; $i<5; $i++) {
// output the shifts here
echo "[CODE FOR CHECKBOX]";
  }
  // finish the row in the table
  echo "";
}
echo "";

Mike.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: PHP Code in Database

2012-08-10 Thread Sanjeev Divekar
No it's not cache. I want to execute user defined PHP code in my view.

On Fri, Aug 10, 2012 at 2:31 PM, Tilen Majerle wrote:

> it sound's like you cache some view. Why you don't just use Cache by
> cakephp ?
> http://book.cakephp.org/2.0/en/core-libraries/caching.html
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/8/10 sanjeev 
>
>> Hello,
>>
>> I am developing CMS which need to execute some php code e.g. > $this->element('helpbox'); ?> which is stored in database.
>>
>> I tried
>> file_put_contents ('tempfile.tmp',$this->fetch('content'));
>> include('tempfile.tmp');
>> in layout which works
>>
>> but any better Idea?
>>
>> Regards,
>>
>>
>>  --
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>



-- 
Warm Regards,
Sanjeev
http://sanjeevdivekar.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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Documentation on modifying default REST routes

2012-08-10 Thread Mike Griffin
On Fri, Aug 10, 2012 at 9:58 AM, Lightee  wrote:
> Thanks for your patient replies. Yes, I did read it even a few times but
> cannot be sure if I understand correctly. The problem is there is no sample
> code to test one's understanding.
>
>  Router::connect(
> "/:controller/:id",
> array("action" => "edit", "[method]" => "PUT"),
> array("id" => "[0-9]+")
> );
>
> I am guessing that what it means is that the action "edit" uses HTTP PUT and
> the parameter passed in is the id field. id field is a digit. What if I want
> to pass in 2 or more parameters which are not primary keys? May I know if
> this can be done in CakePHP?
>

What have you tried?

You can get more documentation in the API
http://api.cakephp.org/class/router#method-Routerconnect

Mike.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
How can i display the data in this format. [] are checkboxes

   1.
   2. Users   Shift1 shift2 shift3 shift4
   3. user1[]  [] [] []
   4. user2[]  [] [] []
   5. user3[]  [] [] []
   6. user4[]  [] [] []
   7. user5[]  [] [] []



*With Best Regards,
Mohit Kumar *
*+91-9582894570*



On Fri, Aug 10, 2012 at 2:30 PM, Tilen Majerle wrote:

> i'm not understanding you well, describe more about your problem..
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/8/10 mohit kumar 
>
>> Any idea guys?
>>
>> *With Best Regards,
>> Mohit Kumar *
>> *+91-9582894570*
>>
>>
>>
>> On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:
>>
>>> Hi Folks,
>>>
>>> Can anyone help me regarding this.
>>>
>>> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>>>
>>>
>>>
>>> *With Best Regards,
>>> Mohit Kumar *
>>> *+91-9582894570*
>>>
>>>
>>  --
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: PHP Code in Database

2012-08-10 Thread Tilen Majerle
it sound's like you cache some view. Why you don't just use Cache by
cakephp ?
http://book.cakephp.org/2.0/en/core-libraries/caching.html
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/8/10 sanjeev 

> Hello,
>
> I am developing CMS which need to execute some php code e.g.  $this->element('helpbox'); ?> which is stored in database.
>
> I tried
> file_put_contents ('tempfile.tmp',$this->fetch('content'));
> include('tempfile.tmp');
> in layout which works
>
> but any better Idea?
>
> Regards,
>
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Tilen Majerle
i'm not understanding you well, describe more about your problem..
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/8/10 mohit kumar 

> Any idea guys?
>
> *With Best Regards,
> Mohit Kumar *
> *+91-9582894570*
>
>
>
> On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:
>
>> Hi Folks,
>>
>> Can anyone help me regarding this.
>>
>> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>>
>>
>>
>> *With Best Regards,
>> Mohit Kumar *
>> *+91-9582894570*
>>
>>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Documentation on modifying default REST routes

2012-08-10 Thread Lightee
Thanks for your patient replies. Yes, I did read it even a few times but 
cannot be sure if I understand correctly. The problem is there is no sample 
code to test one's understanding. 

 "edit", "[method]" => "PUT"),
array("id" => "[0-9]+"));

I am guessing that what it means is that the action "edit" uses HTTP PUT 
and the parameter passed in is the id field. id field is a digit. What if I 
want to pass in 2 or more parameters which are not primary keys? May I know 
if this can be done in CakePHP?

Thank you very much.

On Friday, August 10, 2012 4:43:35 PM UTC+8, Mike Griffin wrote:
>
> On Thu, Aug 9, 2012 at 4:38 PM, Lightee > 
> wrote: 
> > What if the wanted data to be returned is based on data fields other 
> than 
> > the id? It is restricting to get data based on id only. Is there some 
> way to 
> > get data based on other fields of the table? 
> > 
>
> Did you look here: 
> http://book.cakephp.org/2.0/en/development/rest.html#custom-rest-routing 
>
> Mike. 
>

On Friday, August 10, 2012 4:43:35 PM UTC+8, Mike Griffin wrote:
>
> On Thu, Aug 9, 2012 at 4:38 PM, Lightee > 
> wrote: 
> > What if the wanted data to be returned is based on data fields other 
> than 
> > the id? It is restricting to get data based on id only. Is there some 
> way to 
> > get data based on other fields of the table? 
> > 
>
> Did you look here: 
> http://book.cakephp.org/2.0/en/development/rest.html#custom-rest-routing 
>
> Mike. 
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
Any idea guys?

*With Best Regards,
Mohit Kumar *
*+91-9582894570*



On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:

> Hi Folks,
>
> Can anyone help me regarding this.
>
> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>
>
>
> *With Best Regards,
> Mohit Kumar *
> *+91-9582894570*
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Documentation on modifying default REST routes

2012-08-10 Thread Mike Griffin
On Thu, Aug 9, 2012 at 4:38 PM, Lightee  wrote:
> What if the wanted data to be returned is based on data fields other than
> the id? It is restricting to get data based on id only. Is there some way to
> get data based on other fields of the table?
>

Did you look here:
http://book.cakephp.org/2.0/en/development/rest.html#custom-rest-routing

Mike.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Does CakePHP convention require primary key to be auto-incrementing?

2012-08-10 Thread Daniel Baird
No, that would be alright. It's a terrible idea, but technically you could
just assign the user data to your id field, then save.

You would want to check first that you don't already have a record with
that id, etc etc.. why are you reluctant to use a synthetic/auto
incrementing key? Every time I've tried to use a real world value for a
key, I've regretted it later.

;Daniel


On Friday, 10 August 2012, Lightee wrote:

> So, it seems that the value of the primary key cannot be inputted by user.
> Is this correct?
>
> On Friday, August 10, 2012 4:02:25 PM UTC+8, Albert 'Tigr' wrote:
>>
>> AFAIK you have a choice of:
>>
>> - integer key that you set in your DB to be auto-incremented
>> - UUID key that CakePHP will automatically generate for you
>> - any other key that you generate yourself before saving
>>
>> HTH
>> Albert
>>
>> On Thursday, August 9, 2012 9:59:44 AM UTC+2, Lightee wrote:
>>>
>>> Dear CakePHP gurus,
>>>
>>> I am using cakephp scaffolding feature to build a basic CRUD
>>> application. I have a table which gives problem when adding new record. I
>>> discover that the reason is that the primary key is not auto-incremented.
>>> May I know whether this is part of CakePHP convention that primary key has
>>> to be auto-incremented?
>>>
>>> Other tables with primary keys which are auto-incremented do not give me
>>> problems.
>>>
>>  --
> 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 'cake-php@googlegroups.com');>
> .
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com  'cake-php%2bunsubscr...@googlegroups.com');>.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>


-- 
Daniel Baird
I've tried going to the XHTML  a few times, but it's always closed.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




PHP Code in Database

2012-08-10 Thread sanjeev
Hello,

I am developing CMS which need to execute some php code e.g. element('helpbox'); ?> which is stored in database.

I tried 
file_put_contents ('tempfile.tmp',$this->fetch('content'));
include('tempfile.tmp');
in layout which works

but any better Idea?

Regards,


-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Does CakePHP convention require primary key to be auto-incrementing?

2012-08-10 Thread Lightee
So, it seems that the value of the primary key cannot be inputted by user. 
Is this correct?

On Friday, August 10, 2012 4:02:25 PM UTC+8, Albert 'Tigr' wrote:
>
> AFAIK you have a choice of:
>
> - integer key that you set in your DB to be auto-incremented
> - UUID key that CakePHP will automatically generate for you
> - any other key that you generate yourself before saving
>
> HTH
> Albert
>
> On Thursday, August 9, 2012 9:59:44 AM UTC+2, Lightee wrote:
>>
>> Dear CakePHP gurus,
>>
>> I am using cakephp scaffolding feature to build a basic CRUD application. 
>> I have a table which gives problem when adding new record. I discover that 
>> the reason is that the primary key is not auto-incremented. May I know 
>> whether this is part of CakePHP convention that primary key has to be 
>> auto-incremented?
>>
>> Other tables with primary keys which are auto-incremented do not give me 
>> problems.
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Does CakePHP convention require primary key to be auto-incrementing?

2012-08-10 Thread Albert 'Tigr'
AFAIK you have a choice of:

- integer key that you set in your DB to be auto-incremented
- UUID key that CakePHP will automatically generate for you
- any other key that you generate yourself before saving

HTH
Albert

On Thursday, August 9, 2012 9:59:44 AM UTC+2, Lightee wrote:
>
> Dear CakePHP gurus,
>
> I am using cakephp scaffolding feature to build a basic CRUD application. 
> I have a table which gives problem when adding new record. I discover that 
> the reason is that the primary key is not auto-incremented. May I know 
> whether this is part of CakePHP convention that primary key has to be 
> auto-incremented?
>
> Other tables with primary keys which are auto-incremented do not give me 
> problems.
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Ajax submit Data

2012-08-10 Thread Mr. Manager
Dear All,

I hope that anyone can help me I am using cakephp 2.1 and I would like to 
sumit data for the name field of my table via ajax to controller function 
in order to search for the whole record.

It better If anyone available for chatting with me because it make easier.

This issue is in hurry to be solved.

Sincerely,
Mr. Manager,

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.