Re: Paginate losing $this-data

2009-11-10 Thread Kyo
Probably you are not passing all URL arguments to paginator functions.

Have you tried something like this?
$paginator-options(array('url' = $this-passedArgs));


hth

Kyo

--

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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.




Re: Automagic Form Elements---Column Type

2009-10-25 Thread Kyo

You can force the type of an input by specifying a type.

echo $form-input('auther', array('type' = 'textarea'));

hth

Kyo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to enable the right click for a single page out of the whole website?

2009-10-25 Thread Kyo

I guess It's not a cake question.
Maybe your site is using a JavaScript code to disable right click.

hth,

Kyo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Moving the SQL debug information from its default location

2009-10-23 Thread Kyo

If you just don't like the way Cake spits out debug information,
the Debug Kit plugin might be what you want.

http://www.ohloh.net/p/cakephp-debugkit

hth

Kyo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how tho show files with cakephp?

2009-06-17 Thread Kyo

If you set everything up with CakePHP correctly, all you need to do is
place the files into your webroot folder (I think the app/webroot/
files folder is suitable for you needs).

hth,

Kyo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to suppress authorisation error

2009-06-16 Thread Kyo

This might work:

function login() {
if (empty($this-data)) {
$this-Session-del('Message.auth');
}
}

hth
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: MySQL function escape with multiple conditions

2009-06-16 Thread Kyo

That's useful. Thanks for sharing.

Kyo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: For Set::combine experts...

2009-05-14 Thread Kyo

It seems that Set::combine() won't solve your problem. I recommend
that you should not use the model's query() method to retrieve the
data. So, try $this-Product-find() with recursive set to -1

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to extend ajax helper?

2009-05-14 Thread Kyo

Use require_once() before the class statement and it'll do the trick.

require_once LIBS . 'view'. DS . 'helpers' . DS . 'ajax.php';
class MyAjaxHelper extends AjaxHelper {
}

hth
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth - How to show a message logged in as John' when the user is already logged in

2009-05-14 Thread Kyo

This might help:

http://groups.google.ch/group/cake-php/browse_thread/thread/ee9456de93d2eece/7c930c0b46b7eafc?lnk=gstq=isAuthed#7c930c0b46b7eafc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unintended Redirect to homepage after Implementing 'Remember_Me' Component

2008-12-02 Thread Kyo

Try the example entitled 5.2.6.9 autoRedirect in the Cookbook
http://book.cakephp.org/view/248/AuthComponent-Variables

I'm not answering to your question but it works fine.

hth,

Kyo
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to use Prefix Routing for form submit

2008-11-28 Thread Kyo

Try something like:

echo $form-create(null, array('url'=/{$this-params['url']
['url']}));

$params['url']['url'] holds the url of the current page.
That should do the trick.

hth
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: jquery prototype

2008-11-27 Thread Kyo

Hi, Diego.
You need to call jQuery.noConflict() so that jQuery wouldn't conflict
with the $ object of Prototype.
I don't recommend using several JavaScript frameworks together since
it will increase loading time of pages and things would be more
complicated.
AjaxHelper only generates code based on Prototype and Scriptaculous. I
don't use it normally with jQuery plugins.

hth

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: stay on current page once delete an item in CMS

2008-11-26 Thread Kyo

Try $this-redirect($this-referer());
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to check the path of your cache view in the source code?

2008-11-25 Thread Kyo

Did you include the CacheHelper in your $helpers array?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Multiple table access from within a model

2008-11-25 Thread Kyo

Use the Containable behavior http://book.cakephp.org/view/474/Containable
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: connecting the many to many dots - going from table1 - table1_table2 - table 2

2008-11-25 Thread Kyo

You can retrieve data from a HABTM relationship either by modelizing
the join table or using 'with' key of the model association.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: moving into production mode

2008-11-24 Thread Kyo

Hi, validkeys.
Take a look at Andy's site http://www.ad7six.com/MiBlog/ProductionSetup
From this article you can get some idea of a production style.

hth
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: find using HABTM relationship

2008-11-24 Thread Kyo

You can't put User conditions in the Site query.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: find using HABTM relationship

2008-11-24 Thread Kyo

This might be what you are looking for.
The Containable behavior will do the job.

$options = array(
'conditions' = array('User.id' = 7),
'contain' = array(
'Site' = array('fields' = array('id', 'title'))
)
);
$results = $this-User-find('all', $options);

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Migration to Cake 1.2

2008-11-23 Thread Kyo

I'm not sure the exact date of the final release of CakePHP 1.2. Only
the CakePHP development team knows the expected date.
I've got a gut feeling that it's coming early next year but don't
blame me if not.

You can make a forecast with:
https://trac.cakephp.org/roadmap

hth
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Accessing named parameters

2008-11-20 Thread Kyo

Briefly speaking, $this-passedArgs holds only params passed and
named, but $this-params does more than that.
For exmaple, you don't have access to values such as controller,
plugin and isAjax by using $this-passedArgs.
Personally, I always use $this-params to access parameters rather
than the other.

hth

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Authentication component generates incorrect SQL query

2008-11-20 Thread Kyo

Did you specify $this-Auth-fields and db field names correctly?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best method to allow user to have multiple sessions

2008-11-18 Thread Kyo

Share session across multiple cake applications?
Is that what you want to achieve?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: url parameters in cake1.2

2008-11-18 Thread Kyo

Use debug($this-params) to see all the parameters you passed.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Determinate layout controller inside app_error.php

2008-11-16 Thread Kyo

Just extend ErrorHandler and override __outputMessage().

class AppError extends ErrorHandler {

function __construct($method, $messages) {
parent::__construct($method, $messages);
}

function __outputMessage($template) {
$this-controller-render($template);
$this-controller-afterFilter();
$this-controller-output = null;
$this-controller-render('yourViewTemplate', 
'yourLayoutTemplate');
echo $this-controller-output;
}
}


hth
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Performance

2008-11-16 Thread Kyo

CakePHP supports a variety of Cache Engines such as File storage
engine, APC and Memcache. IMHO, The best way is reduce the number of
modules displayed by default on the site to minimum but i think it
will help reduce the number of queries.

hth
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Determinate layout controller inside app_error.php

2008-11-15 Thread Kyo

I'm not clear on what you are trying to do but...I'm assuming you
already have CakePHP's ErrorHandler class, which captures and handles
all cakeError() calls, so why not use it?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sharing Session across Different Applications

2008-01-18 Thread Kyo

Thanks Adam. I did the method you suggested and found it very nice,
but I'm having another problem now.
In my case, it works in two different cake applications within one
domain, but it doesn't seem to work in two separate domains.

I did the following:

This does a redirect from siteA.com/blah/index to siteB.com/blah/
index.

// siteA.com

function index() {
if(!$this-Session-check('Test')) {
$this-Session-write('Test', 'Hello, this is only a session
test!');
}
}

function redirectem() {
uses('string');
$this-data['SiteTransfer']['sess_id'] = $this-Session-id();
$this-SiteTransfer-id = String::uuid();
if($this-SiteTransfer-save($this-data)) {
$this-redirect('http://siteB.com/blah/catchem/uuid:'.$this-
SiteTransfer-id);
}
}

// siteB.com

function beforeFilter() {
if(!empty($this-params['named']['uuid'])) {
$uuid = $this-params['named']['uuid'];
$this-data = $this-SiteTransfer-findById($uuid);
$this-Session-id($this-data['SiteTransfer']['sess_id']);
$this-SiteTransfer-del($uuid);
}
}
function catchem($uuid) {
$this-redirect('/blah/index');
}
function index() {
debug($this-Session-read('Test'));
}

I found that SiteB.com instantiates the session data with the session
ID in beforeFilter successfully;
however, when the page (siteB.com/blah/index) gets rendered
completely, siteB.com creates another session id.
Have I missed something fundamental?



On Jan 17, 6:36 pm, Adam Royle [EMAIL PROTECTED] wrote:
 Yes, here is one method of making it more secure.

 So have you two sites, siteA.com and siteB.com.

 User is browsing siteA.com and you want them transferred to siteB.com

 They click a link: eg. siteA.com/blah/redirectem/

 In your redirectem method you get the currentsessionid and save it
 into your database (eg. site_transfers) with a uuid (ie. String::uuid)

 then you do a redirect to siteB.com/blah/catchem/$uuid

 and search your database table for the uuid token and then instantiate
 thesessionwith thesessionid from the db.

 Then delete the uuid andsessionid from your site_transfers table.

 All done!

 On Jan 17, 2:57 pm, Kyo [EMAIL PROTECTED] wrote:

  Following your instruction, now i figured out how to share sessions
  between applications.
  In my view I appended thesessionID to the link like this:

  $html-link( 'Go to the other application',http://www.example.com/
  other_cake/tests/index/sess_id:{$session-id('Test')});

  On the other application, in the beforeFilter method in my controller:

  function beforeFilter() {
  $this-Session-id($this-params['named']['sess_id']);

  }

  I appreciate your instruction!
  Are there any way to make this more secure?

  On 1月16日, 午後10:48, Adam Royle [EMAIL PROTECTED] wrote:

   Yes! When you transfer between applications (I'm guessing you have a
   link of some description) append thesessionid onto your querystring
   and use $this-Session-id($this-params['url']['sess_id']) on the
   other end. There are more secure approaches to this, but you still
   need to pass some kind of token so you know your user is really your
   user.

   Adam

   On Jan 16, 6:58 pm, Kyo [EMAIL PROTECTED] wrote:

Yes, I use the same db for both applications.
When I jump from one cake application to another, they store two
   sessiondata with different IDs.
Cookie got anything to do with it?

On 1月16日, 午後5:44, AD7six [EMAIL PROTECTED] wrote:

 On Jan 16, 6:15 am, Kyo [EMAIL PROTECTED] wrote:

  I currently use two Cake applications (beta 1.2) for my project but
  I'm wondering if there is any way to sharesessiondata between those
  two applications. Both applications have database sessions.

 Use the same db for both? It's pretty much what db sessions are for.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sharing Session across Different Applications

2008-01-18 Thread Kyo

It took a little time to figure out but now it works great!
Actually I made no change to the above code.
I just reuploaded the whole cake to the server. That's it.
There must have been some other factors that triggered the problem.

On Jan 18, 7:40 pm, Kyo [EMAIL PROTECTED] wrote:
 Thanks Adam. I did the method you suggested and found it very nice,
 but I'm having another problem now.
 In my case, it works in two different cake applications within one
 domain, but it doesn't seem to work in two separate domains.

 I did the following:

 This does a redirect from siteA.com/blah/index to siteB.com/blah/
 index.

 // siteA.com

 function index() {
 if(!$this-Session-check('Test')) {
 $this-Session-write('Test', 'Hello, this is only asession
 test!');
 }

 }

 function redirectem() {
 uses('string');
 $this-data['SiteTransfer']['sess_id'] = $this-Session-id();
 $this-SiteTransfer-id = String::uuid();
 if($this-SiteTransfer-save($this-data)) {
 $this-redirect('http://siteB.com/blah/catchem/uuid:'.$this-

 SiteTransfer-id);
 }
 }

 // siteB.com

 function beforeFilter() {
 if(!empty($this-params['named']['uuid'])) {
 $uuid = $this-params['named']['uuid'];
 $this-data = $this-SiteTransfer-findById($uuid);
 $this-Session-id($this-data['SiteTransfer']['sess_id']);
 $this-SiteTransfer-del($uuid);
 }}

 function catchem($uuid) {
 $this-redirect('/blah/index');}

 function index() {
 debug($this-Session-read('Test'));

 }

 I found that SiteB.com instantiates thesessiondata with thesession
 ID in beforeFilter successfully;
 however, when the page (siteB.com/blah/index) gets rendered
 completely, siteB.com creates anothersessionid.
 Have I missed something fundamental?

 On Jan 17, 6:36 pm, Adam Royle [EMAIL PROTECTED] wrote:

  Yes, here is one method of making it more secure.

  So have you two sites, siteA.com and siteB.com.

  User is browsing siteA.com and you want them transferred to siteB.com

  They click a link: eg. siteA.com/blah/redirectem/

  In your redirectem method you get the currentsessionid and save it
  into your database (eg. site_transfers) with a uuid (ie. String::uuid)

  then you do a redirect to siteB.com/blah/catchem/$uuid

  and search your database table for the uuid token and then instantiate
  thesessionwith thesessionid from the db.

  Then delete the uuid andsessionid from your site_transfers table.

  All done!

  On Jan 17, 2:57 pm, Kyo [EMAIL PROTECTED] wrote:

   Following your instruction, now i figured out how to share sessions
   between applications.
   In my view I appended thesessionID to the link like this:

   $html-link( 'Go to the other application',http://www.example.com/
   other_cake/tests/index/sess_id:{$session-id('Test')});

   On the other application, in the beforeFilter method in my controller:

   function beforeFilter() {
   $this-Session-id($this-params['named']['sess_id']);

   }

   I appreciate your instruction!
   Are there any way to make this more secure?

   On 1月16日, 午後10:48, Adam Royle [EMAIL PROTECTED] wrote:

Yes! When you transfer between applications (I'm guessing you have a
link of some description) append thesessionid onto your querystring
and use $this-Session-id($this-params['url']['sess_id']) on the
other end. There are more secure approaches to this, but you still
need to pass some kind of token so you know your user is really your
user.

Adam

On Jan 16, 6:58 pm, Kyo [EMAIL PROTECTED] wrote:

 Yes, I use the same db for both applications.
 When I jump from one cake application to another, they store two
sessiondata with different IDs.
 Cookie got anything to do with it?

 On 1月16日, 午後5:44, AD7six [EMAIL PROTECTED] wrote:

  On Jan 16, 6:15 am, Kyo [EMAIL PROTECTED] wrote:

   I currently use two Cake applications (beta 1.2) for my project 
   but
   I'm wondering if there is any way to sharesessiondata between 
   those
   two applications. Both applications have database sessions.

  Use the same db for both? It's pretty much what db sessions are for.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Sharing Session across Different Applications

2008-01-16 Thread Kyo

I currently use two Cake applications (beta 1.2) for my project but
I'm wondering if there is any way to share session data between those
two applications. Both applications have database sessions.

Regards,

Kyo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sharing Session across Different Applications

2008-01-16 Thread Kyo

Yes, I use the same db for both applications.
When I jump from one cake application to another, they store two
session data with different IDs.
Cookie got anything to do with it?

On 1月16日, 午後5:44, AD7six [EMAIL PROTECTED] wrote:
 On Jan 16, 6:15 am, Kyo [EMAIL PROTECTED] wrote:

  I currently use two Cake applications (beta 1.2) for my project but
  I'm wondering if there is any way to share session data between those
  two applications. Both applications have database sessions.

 Use the same db for both? It's pretty much what db sessions are for.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sharing Session across Different Applications

2008-01-16 Thread Kyo

Following your instruction, now i figured out how to share sessions
between applications.
In my view I appended the session ID to the link like this:

$html-link( 'Go to the other application',http://www.example.com/
other_cake/tests/index/sess_id:{$session-id('Test')});

On the other application, in the beforeFilter method in my controller:

function beforeFilter() {
$this-Session-id($this-params['named']['sess_id']);
}

I appreciate your instruction!
Are there any way to make this more secure?

On 1月16日, 午後10:48, Adam Royle [EMAIL PROTECTED] wrote:
 Yes! When you transfer between applications (I'm guessing you have a
 link of some description) append thesessionid onto your querystring
 and use $this-Session-id($this-params['url']['sess_id']) on the
 other end. There are more secure approaches to this, but you still
 need to pass some kind of token so you know your user is really your
 user.

 Adam

 On Jan 16, 6:58 pm, Kyo [EMAIL PROTECTED] wrote:

  Yes, I use the same db for both applications.
  When I jump from one cake application to another, they store two
 sessiondata with different IDs.
  Cookie got anything to do with it?

  On 1月16日, 午後5:44, AD7six [EMAIL PROTECTED] wrote:

   On Jan 16, 6:15 am, Kyo [EMAIL PROTECTED] wrote:

I currently use two Cake applications (beta 1.2) for my project but
I'm wondering if there is any way to sharesessiondata between those
two applications. Both applications have database sessions.

   Use the same db for both? It's pretty much what db sessions are for.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: why am I getting this undefined index error?

2007-11-29 Thread Kyo


Those errors won't get you into any trouble in reality.
If you want to remove them, just try something like this in your view:

?php if($output['OrderItem']['id']): ?
?php echo $output['OrderItem']['id'] ?
?php endif; ?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Smarty problem with hasMany associations

2007-03-10 Thread Kyo

Since I currently use cakePHP 1.1 for my project, I don't know much
about Set::extract.
I'll go for cakePHP 1.2 when it's ready to fly.  Thanks for your
suggestion anyway, Mariano.

On 3月10日, 午後10:04, Mariano Iglesias [EMAIL PROTECTED]
wrote:
 Unless you use CakePHP 1.2, and take advantage of the beauty of
 Set::extract.

 -MI

 ---

 Remember, smart coders answer ten questions for every question they ask.
 So be smart, be cool, and share your knowledge.

 BAKE ON!

 blog:http://www.MarianoIglesias.com.ar

 -Mensaje original-
 De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
 de Dr. Tarique Sani
 Enviado el: Sábado, 10 de Marzo de 2007 09:38 a.m.
 Para: cake-php@googlegroups.com
 Asunto: Re: Smarty problem with hasMany associations

 Ummm... may be I was not clear - first multi dimentional arrays will
 need nested a loop
 second you will need to use foreach for the comments part the key in
 that case will be irrelevant


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Smarty problem with hasMany associations

2007-03-10 Thread Kyo

Tarique, your reply solved my problem.
Like you said, I put a nested loop into the first multi dimentional
arrays,
and then foreach into the second one.

{section name=val loop=$data}
{$data[val].User.first_name}
{foreach from=$data[val].Comment item=comment}
{$comment.body}
{/foreach}
{/section}

Thanks for the help, Tarique!


On 3月10日, 午後9:37, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
 On 3/10/07, Kyo [EMAIL PROTECTED] wrote:

  Thanks for your reply, Tarique.
  I am curious as to how foreach would access to keys(e.g. [0],[1],[2])
  in a multi-dimensional associative arrays.

 Ummm... may be I was not clear - first multi dimentional arrays will
 need nested a loop
 second you will need to use foreach for the comments part the key in
 that case will be irrelevant

 HTH
 Tarique

 --
 =
 PHP for E-Biz:http://sanisoft.com
 Cheesecake-Photoblog:http://cheesecake-photoblog.org
 =


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---