Creating a 2 column layout with cake?

2007-01-11 Thread Gould, Adrian


I'm familiar with CSS etc, but wondering if anyone has any tips on getting cake 
to output two different sets of layout to two different columns.

EG:

Column 1 -> contains the blog entries in reverse order

Column 2 -> contains the latest comments, the latest number of visitors, and so 
on.

Thanks in advance

Adrian

--~--~-~--~~~---~--~~
 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: Using CakePHP objects externally

2007-01-11 Thread leea

I also forgot to mention that even though the CakePHP program is a
website, the external program is run from the command line.


--~--~-~--~~~---~--~~
 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: Using CakePHP objects externally

2007-01-11 Thread leea

Thanks mate,

Basically, theres 2 functions in the model class that grab and
manipulate the data from the db. I was hoping for my external program
to use this as opposed to duplicating the code in my external program.


--~--~-~--~~~---~--~~
 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: Using CakePHP objects externally

2007-01-11 Thread Grant Cox

Depends what you want to do - if you want to access internal Cake
elements from your app, I'm not sure if this can be done.  If you don't
mind just interacting with the Cake dispatcher (so executing Cake
requests and getting the response), then it's much easier.  Afaik there
isn't a really simple, elegant way of doing it, but it is not
difficult.

dispatch('/posts/test',
array('return'=>1));

echo $result;
?>

This file, completely external from Cake, will output the response from
the /posts/test action, which will be the /posts/test return value (or
the rendered page if you don't return anything).

The only change you will need to make in cake is to comment out the
page generation time from your app/webroot/index.php (down the bottom),
as if this is output before your dispatcher call then the session
cannot start (due to headers already sent).

If you search for Cake CLI you may find some more info, and something
more elegant.


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Nested tree menu with current and parent(s) active state by css classes

2007-01-11 Thread georgeL

i´m using a getAllThreaded call to get some categories and want to
build a category menu which has a highligting(css) class set for its
parent(s) and itself when clicked.

building a stateless menu is not that hard, but keeping track of the
parent categories really beat the shxx out of me. I had this problem in
several cms systems and could never really solve it.

After those stateless tries i found a pretty neat looking walker class
in the new wordpress 2.1beta. i started building a helper whit it,
which just gets the raw categories(unthreaded) and builds a menu tree.

navigation features should be:

- accept any cake array which uses the selfjoining parent_id
- markup from top parent to current element
- define the depth to walk down
- flexible output
- easy call in view

the following code did not really worked because if the nested
menuitems are not directly behind each other in the cat array the
nesting fails. this is probably due to my lack of knowledge about
recursion or coding in general. (In Wordpress they are using this class
to iterate over array of objects). So this needs some heavy recoding!

Anyway i´ll post it here and maybe somebody with an equal problem can
help me out or even better, propose a smarter solution than this one.
please don´t be to hard on me if you think this is crap.


helper file walker.php:

array['category']
* @param string $type, name of the subarray -> cakespecific
array[Category: type ][id]
* @param int $to_depth - how deep shal we go
*/
function walk($elements, $type, $to_depth)
{
$args = array_slice(func_get_args(), 2);
$parents = array();
$depth = 1;
$previous_element = '';
$output = '';

#local id field
$id_field = $this->db_fields['id'];
$parent_field = $this->db_fields['parent'];

//padding at the end so we need to know when to stop
$last_element[$type][$id_field] = 0;
$last_element[$type][$parent_field] = 0;
$elements[] = $last_element;

$flat = ($to_depth == -1) ? true : false;

foreach ( $elements as $element )
{#debug($previous_element);
if ( $flat)
{ // If flat, start and end the element and skip the 
level checks.

if ( isset($element[$type][$id_field]) &&
$element[$type][$id_field] != 0 )
{// Start the element.
$cb_args = array_merge( array($output, 
$element, $depth - 1),
$args);
$output = 
call_user_func_array(array(&$this, 'start_el'),
$cb_args);
}

if ( isset($element[$type][$id_field]) &&
$element[$type][$id_field] != 0 )
{// End the element.
$cb_args = array_merge( array($output, 
$element, $depth - 1),
$args);
$output = 
call_user_func_array(array(&$this, 'end_el'), $cb_args);
}
continue;
}

// Walk the tree.
if ( !empty($previous_element) &&
$element[$type][$parent_field] ==
$previous_element[$type][$id_field] )
{ // Previous element is my parent. Descend a level.

array_unshift($parents, $previous_element);
$depth++; //always do this so when we start the 
element further
down, we know where we are

if ( !$to_depth || ($depth < $to_depth) )
{ //only descend if we're below $to_depth
$cb_args = array_merge( array($output, 
$depth - 1), $args);
$output = 
call_user_func_array(array(&$this, 'start_lvl'),
$cb_args);
}
else
{  // If we've reached depth, end the previous 
element.
$cb_args = array_merge( array($output, 
$previous_element, $depth -
1), $args);
$output = 
call_user_func_array(array(&$this, 'end_el'), $cb_args);
}
}
else if ( !empty($previous_element)
  && $element[$type][$parent_field] ==
$previous_element[$type][$parent_field])
{
// On the same level as previous element.
if ( !$to_depth || ($depth <= $to_depth) )
 

Re: CakePHP - sharing the normal PHP session

2007-01-11 Thread Grant Cox

I'm not entirely understanding your question, but to use the Cake
session in other PHP scripts, the only issue I've found is setting the
right session cookie.  So if in your app/config/core.php you have

define('CAKE_SESSION_COOKIE', 'MyApplication');

Then in your "normal" php script, have

// get the Cake Session
if(isset($_COOKIE['MyApplication'])){
session_id($_COOKIE['MyApplication']);
}
session_start();


--~--~-~--~~~---~--~~
 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: othAuth component v0.5.2 and Stable: 1.1.12.4205 go it?

2007-01-11 Thread CraZyLeGs

what errors are you getting ?


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Using CakePHP objects externally

2007-01-11 Thread leea

Hi,

I have an independant PHP program that works by itself without Cake.

I also have a Cakephp Framework that contains a few models and
controller functions id like to access with my independant PHP program.

This is a seperate program, and I dont want to duplicate the code
already existing in the Cakephp program for obvious reasons.

When I do a "include_once()" I start getting the dependencies crap and
have to include lots and lots of cakephp files. Is there an easier way
to do this?

Thanks

Andrew


--~--~-~--~~~---~--~~
 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: Integrate a datepicker

2007-01-11 Thread Mikee Freedom

hey dood,

this may help you.

http://groups.google.com/group/cake-php/browse_thread/thread/cb3b706edb127a63/5673130bd0d4a1ad#5673130bd0d4a1ad

On 12/01/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I was searching through some older posts and found another user
> using the dynarch calendar picker.  It can be found on the following
> site...
>
> http://www.dynarch.com/projects/calendar/
>
>I am brand new to cakephp and would like to implement something like
> that.  I think that the dateTimeOptionTag is kind of ugly.  I would
> like to use something that is prettier, but just don't know how to
> install or use it.
>
>Any help is appreciated.  Thanks!
>
>
> >
>

--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Integrate a datepicker

2007-01-11 Thread [EMAIL PROTECTED]

Hi!

I was searching through some older posts and found another user
using the dynarch calendar picker.  It can be found on the following
site...

http://www.dynarch.com/projects/calendar/

   I am brand new to cakephp and would like to implement something like
that.  I think that the dateTimeOptionTag is kind of ugly.  I would
like to use something that is prettier, but just don't know how to
install or use it.  

   Any help is appreciated.  Thanks!


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



CakePHP - sharing the normal PHP session

2007-01-11 Thread the_woodsman

Hi Bakers,

I'm trying to integrate Cake into an existing project, and I have an
issue with user logins and the session data for them.
My beforeFilter in my app controller calls an existing session checking
script, which redirects if the right data isn't in the session.

However, when users move between pages, they have to log in twice :
once for standard PHP pages, and once for Cake page.

The post tiled  "Import Existing Sessions into CAKE" was enlightening
but disheartening, and as my needs are so much simpler than the
examples in that thread, I'm hoping there's a simpler solution.

I can stop Cake sessions being started automatically (core.php I think)
and then users only have to log in once - but then I can't use the Cake
session classes, like setting flash methods, etc.

Perhaps alterations to the other session related settings in core.php
wold allow Cake to find the exisitng cookie and session data?

Any insight would be helpful...

Thanks,

Woody


--~--~-~--~~~---~--~~
 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: language subdomain

2007-01-11 Thread Oneill

Serious... I didn't know that! Well I gonna try it with the bootstrap
method. thanks.


[EMAIL PROTECTED] schreef:

> DJ Spark wrote:
> > btw,  wikipedia uses different installs for each subdomain :)
> >
> >  i *think* you could set different subdomains pointing to different
> > cake 'webroot' folders, and setting some variable there. Or reading
> > the current domain in bootstap, and setting that language variable...
> >
> can't you just in your .htacess specify for each vhost the same webroot
> but each a different "default file to include" ? that way you only need
> several slightly different index.php files that contain 2 things: an
> initialisation of the name variable, and the inclusion of the real
> index.php that comes with cakephp (which is inside webroot already by
> default)


--~--~-~--~~~---~--~~
 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: Problem with mod_rewrite

2007-01-11 Thread roby

I've contacted the admin already and the admin said that I've been
given the permissions to write... but the problems still appeared :|

Any idea how to solve it? The server runs on Debian Linux (I don't know
the version) and using Samba 3.0.


--~--~-~--~~~---~--~~
 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: Can I specify fieldnames from associated models in findAll()?

2007-01-11 Thread keymaster

I'm confused on when to rely on correctly configured associations, when
to add an additional bindModel, and when to do something like:

$result = $this->A->B->C->FindAll();

To my simple mind, if I've configured the associations correctly, and
have set recursive parameter to 2 in the $this->A->findAll(), I
shouldn't need extra steps to get model C to be included. Where am I
mistaken?

Thx.

On Jan 11, 8:27 pm, "gwoo" <[EMAIL PROTECTED]> wrote:
> for hasMany you can specify the fields in your model. Or dynamically
> bind them with bindModel.


--~--~-~--~~~---~--~~
 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: How to do dynamic includes of controllers

2007-01-11 Thread Dave Rogers

I just wanted to make sure I understood you.

I found this link on cakephp groups:
http://groups.google.com/group/cake-php/browse_frm/thread/6dab044365132bdf/02ffb077f9ebf389?lnk=gst&q=elements&rnum=14#02ffb077f9ebf389

Is that what you had in mind?


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Create CAKE Models on-demand

2007-01-11 Thread mindcharger

Hello to everyone.

I have searched all through CAKE's manual, and suggested links, as well
as through all of this group's posts but wasn't able to find anything
similar to my problem. If this is a really easy
question I appologize, but I've started with CAKE just two days a go...


I'm working on a telecoms project that deals with network statistical
measures and has a web GUI as a component. This web GUI (actually a web
site coded in PHP) will need to access some data (the statistical
measures) on a database and render some tables with this data. The
problem is that the system user can create new measures and this
measures are stored on different DB tables, with different names and
different columns. So, there is never a really a static Model for the
tables, because the user can create new tables and edit existing tables
(Note: there's a table on the DB that keeps record of the other tables
composition, so I can find at any time the name, number of columns and
column names of each existing table in my DB at a give time).

Is there anyway that I can use to solve this issue? 

Thanks in advance,


--~--~-~--~~~---~--~~
 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: Multiple Admin Routes

2007-01-11 Thread gwoo

you can create a global method in your controller. Then call the
prefixed methods from that based on the passed params.


--~--~-~--~~~---~--~~
 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: Can I specify fieldnames from associated models in findAll()?

2007-01-11 Thread gwoo

for hasMany you can specify the fields in your model. Or dynamically
bind them with bindModel.


--~--~-~--~~~---~--~~
 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: Can I specify fieldnames from associated models in findAll()?

2007-01-11 Thread dkarlson

http://api.cakephp.org/class_model.html#63ade7d3c6d03c83ab53a224e23ad9dd

On Jan 11, 10:43 am, "keymaster" <[EMAIL PROTECTED]> wrote:
> In $this->modelA->findAll(), can I include fieldnames from associated
> models in my $conditions parameter ?
>
> Eg.
>
> I have these associations:
>
> A hasMany B
> B hasMany C
>
> C belongsTo B
> B belongsTo A
>
> I have a search box which submits the user to A/search (controller A,
> action search).
>
> The user is expecting data from all three models in his display,
> according to various conditions on those fields.
>
> I would like to include conditions for all the fields in controller
> A's findAll() .
>
> Can I do something like:
>
> $results = $this->A->findAll ("A.field1 = B.field2 AND C.field3 = 0
> GROUPBY C.field3", ... "rest of params" ...);  ?
> 
> Thx.


--~--~-~--~~~---~--~~
 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: language subdomain

2007-01-11 Thread [EMAIL PROTECTED]


DJ Spark wrote:
> btw,  wikipedia uses different installs for each subdomain :)
>
>  i *think* you could set different subdomains pointing to different
> cake 'webroot' folders, and setting some variable there. Or reading
> the current domain in bootstap, and setting that language variable...
>
can't you just in your .htacess specify for each vhost the same webroot
but each a different "default file to include" ? that way you only need
several slightly different index.php files that contain 2 things: an
initialisation of the name variable, and the inclusion of the real
index.php that comes with cakephp (which is inside webroot already by
default)


--~--~-~--~~~---~--~~
 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: How to do dynamic includes of controllers

2007-01-11 Thread gwoo

Use elements. Put your requestAction calls in the elements. Do not
return the view from requestAction. Just return the data and have the
element display it.


--~--~-~--~~~---~--~~
 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: language subdomain

2007-01-11 Thread DJ Spark

 btw,  wikipedia uses different installs for each subdomain :)

 i *think* you could set different subdomains pointing to different
cake 'webroot' folders, and setting some variable there. Or reading
the current domain in bootstap, and setting that language variable...



 spark

On 1/11/07, Oneill <[EMAIL PROTECTED]> wrote:
>
> Well you describe it as useless.. Maybe you're right. ;-) But I would
> like to do the same as wikipedia does. But I think it looks better and
> its better for the navigation. But how can I remove the language part
> from the URI without redirecting?
>
>
> >
>


-- 
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br/mp3

--~--~-~--~~~---~--~~
 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: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-01-11 Thread timblack1

I'll let you all know here once I've got my own component working with
Cake inside, and I'll take the time to generalize from that to make a
tutorial or example component.

Right now I'm worried that I don't understand what Cake does internally
with the $_GET['url']  and $_SERVER['PHP_SELF'] variables, so I'm not
sure that my method of setting them is robust.  It works with the
scaffolding, but since I'm so new to Cake I can not yet test whether it
works with much else of Cake.


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Can I specify fieldnames from associated models in findAll()?

2007-01-11 Thread keymaster

In $this->modelA->findAll(), can I include fieldnames from associated
models in my $conditions parameter ?

Eg.

I have these associations:

A hasMany B
B hasMany C

C belongsTo B
B belongsTo A

I have a search box which submits the user to A/search (controller A,
action search).

The user is expecting data from all three models in his display,
according to various conditions on those fields.

I would like to include conditions for all the fields in controller
A's findAll() .

Can I do something like:

$results = $this->A->findAll ("A.field1 = B.field2 AND C.field3 = 0
GROUPBY C.field3", ... "rest of params" ...);  ? 

Thx.


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Extending controllers

2007-01-11 Thread Dave Rogers

I have an CMS application that has multiple 'modules' that can be used
on each 'page'.  These 'modules' seem to naturally extend each other.
A sample hierarchy of modules is below:

Item
--> Article
--> Content
--> Announcement
--> Event
--> File
--> Document
--> Image
--> Audio

So, in my item controller, I can define common things, like 'title'.
Then the article controller extends 'item' by adding 'title' and
'body'.  Then the event controller extends 'article' by adding
'start_date', 'end_date', 'location', etc.

Just because of OO design, each extended controller takes longer to
process because of having to go up the chain.  I don't know how much
overhead this really is, though.

It seems to work fairly well:  I only have to change things in one
place.  I'm wondering though, is there a way to get the parent's views
such that I only have to have a view in one place, such as 'article'
instead of duplicating views for content, announcement and event?

Is there a more defined way to do what I am attempting?


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



How to do dynamic includes of controllers

2007-01-11 Thread Dave Rogers

I am trying to put together a CMS that would allow you to create an
infinite number of pages and add an infinite number of sections (which
are controllers) to that page.

So far, I have a page controller that accepts all URLs that do not
specifically have a route defined:  mysite.com/about goes to the pages
controller and looks up the page 'about' and finds all the sections for
that page.  The 'about' page might have a 'news' section and a
'content' section.  In turn, the 'news' section does a requestAction of
'/news/show', then it does a similar requestAction for the 'content'
section.

The code looks like this:
foreach ($pageSections as $pageSection) {
  if ($pageSection['Section']['section_type_id']!='0') {
$requestAction = '/'.
strtolower($pageSection['SectionType']['title']).
'/show';
$pageContent .= $this->requestAction($requestAction,
array('return'
,'pageSection'=>$pageSection
,'permissions'=>$this->permissions
)
 );
  }
}

My question is:  Does this seem like the best way to do this sort of
thing?  Is there another way to do it because it seems kind of abstract
and might break easily with an update to the Cake core files.

If this is unclear, please let me know.


--~--~-~--~~~---~--~~
 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: language subdomain

2007-01-11 Thread Oneill

Well you describe it as useless.. Maybe you're right. ;-) But I would
like to do the same as wikipedia does. But I think it looks better and
its better for the navigation. But how can I remove the language part
from the URI without redirecting?


--~--~-~--~~~---~--~~
 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: controller calling an other controller with an array as parameter

2007-01-11 Thread [EMAIL PROTECTED]

hey ho

try:

$serializedscenes = serialize($scenesarray);

$maplocations =
$this->requestAction('locations/within/'.$m['x1'].'/'.$m['y1'].'/'.$m['x2'].'/'.$m['y2'].'/'.$serializedtypes.'/'.$serializedscenes);

wirtsi

On 8 Jan., 20:36, "klaus1977" <[EMAIL PROTECTED]> wrote:
> Hi TJ Singleton,
>
> i know the function requestAction.
>
> But i want to know, can i call this function with an array as parameter
> from an other controller.
>
> $document= array('1', '/2007/01/01/filename.pdf', 'example');
>
> function saveDocument($document){
>
> //do something with the $document array
> 
>  }
> 
> Klaus Schwarzkopf


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



ACL ADMIN Error

2007-01-11 Thread luis_y27

Hello, I've been setting up acl admin this week and most of the
application is working correctly.  However on the ACL Permissions
section when I click on the Setup OWNER access to ROOT link or whenever
I try to give permissions to aro to ROOT I get the following errors:

Warning: DB_ACL::allow() - Invalid node in
/var/www/html/CallRating/cake/libs/controller/components/dbacl/db_acl.php
on line 142
Notice: Undefined index: action in
/var/www/html/CallRating/cake/dispatcher.php on line 114
Notice: Undefined index: action in
/var/www/html/CallRating/cake/dispatcher.php on line 117
Notice: Undefined index: action in
/var/www/html/CallRating/cake/dispatcher.php on line 418
Notice: Undefined variable: ctrlName in
/var/www/html/CallRating/cake/dispatcher.php on line 121
Notice: Undefined variable: ctrlName in
/var/www/html/CallRating/cake/dispatcher.php on line 124
Notice: Undefined variable: ctrlName in
/var/www/html/CallRating/cake/dispatcher.php on line 125

I traced the code and on the file
cake/libs/controller/components/dbacl/db_acl.php there's a call to a
function called getAclLink(aro, aco)  to get the permissions, this
function fins information for the aro and aco but it doesn't seem to
find anything.

Anyone out there that knows what this might be about, thanks in advance.


--~--~-~--~~~---~--~~
 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: language subdomain

2007-01-11 Thread anselm

> I want to use subdomains for the language of the content on the site.
> Like en.mydomain.com, de.mydomain.com. Does anyone know a solutions for
> this?

As far as I know, Cake will not do that on it's own. If you are using
apache with mod_rewrite enabled, I guess you write rewrite-rules that
map en.example.com/somepage into /en/somepage -- then change
bootstrap.php to set the current language globally and remove the
language part from the URI.

Anselm


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



Multiple Admin Routes

2007-01-11 Thread [EMAIL PROTECTED]

Hello ...

I know the routes topic has been through here a couple of times but I
coulndn't find a solution for my problem here.

What I'm looking for is the following:

If I enable admin routing, then /admin/blog/view/1 gets routed to
admin_view() and the view file is at admin_view.html ... which is
something I like cause it nicely keeps the different parts of the site
separated.

For my project I would  love to add more admin routes, e.g. /retailer
... they should have retailer_[action] methods and also
retailer_[action].html views

Has anyone found out how to do this? I was fiddling around with
routes->connect, something like

$Route->connect('/:group/:controller/:action/*', array('controller' =>
'{:controller}','action' => '{:group}_{:action}');

but that doesn't seem to work.

Any help appreciated ... thanx

wirtsi


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



language subdomain

2007-01-11 Thread Oneill

Dear,

I want to use subdomains for the language of the content on the site.
Like en.mydomain.com, de.mydomain.com. Does anyone know a solutions for
this?

Oneill


--~--~-~--~~~---~--~~
 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: Showing user's logged in status when using dAuth

2007-01-11 Thread Dr. Tarique Sani

On 1/11/07, Jayant Gandhi <[EMAIL PROTECTED]> wrote:

> But if I use the same code, inside another view, likes notes/index or
> notes/add or anything/* etc , then this information doesn't get printed
> and I get the error that the variable is undefined.

try using  echo $session->read('User'); in your view

HTH

Tarique

-- 
=
PHP Applications for E-Biz: http://www.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
-~--~~~~--~~--~--~---



Showing user's logged in status when using dAuth

2007-01-11 Thread Jayant Gandhi

Hi Dieter/Others,

I used the suggestion by Dieter about showing whether the user is
logged in or not, and applied the following 2 lines in the startup of
the dAuth Component.
$User = $this->Session->read('User');
$this->controller->set('User',$User);

Now he suggests using

anywhere we wish to print the users, logged in status.

I have dAuth as users/register etc. using the standard tutorial. If I
use the above code on any of the views users/* I am able to print the
same.

But if I use the same code, inside another view, likes notes/index or
notes/add or anything/* etc , then this information doesn't get printed
and I get the error that the variable is undefined.

Thanks in advance,
jkg


--~--~-~--~~~---~--~~
 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: script execution time

2007-01-11 Thread Grant Cox

The complete page generation time is already there, as a html comment.
Look at the bottom of the source of any of your pages.  You can change
this to something visible by editing your app/webroot/index.php - look
at the bottom.


--~--~-~--~~~---~--~~
 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: Cake without DB?

2007-01-11 Thread Daniel Hofstetter

Try $useTable = false;

-- 
Daniel Hofstetter
http://cakebaker.42dh.com


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Cake without DB?

2007-01-11 Thread LMX

Hello, all Cake bakers!
I use Cake in project without any database, using SOAP to access to my
data on external server, so I want not to make a empty table for each
Model (which is still used for data validation purpouses, etc.). How I
can do that? I've tried $useTable = '', but it doesn't seem to work =(


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



script execution time

2007-01-11 Thread michelek

hi,

Are there any built-in means for displaying page execution time?

Like performing a google search will report something like
Results 1 - 10 of about 821,000 for cakephp tutorial. (0.33 seconds).

thanksalot
michelek


--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



odd behaviour with $this->base in controller

2007-01-11 Thread David Herbert

Hello,

I am new to Cake PHP and am experimenting with it prior to hopefully 
using it to develop code for real clients.  I am likely to have to 
deploy the eventual project on a shared server and I can't assume I'll 
have mod_rewrite available to me.  So I have chosen to use Cake pretty 
URLs, which I think should be fine for my intended client.

I have developed a little app for outputting news items, closely 
following the blog tutorial.  I downloaded a component and helper suite 
from the Bakery to enable pagination of the record set.  There seems to 
be a problem whenever this helper uses $html->link to generate a URL 
e.g. for next/previous page, or for changing the sort by criterion on a 
heading.  This seems to be entirely down to two properties in the 
controller class being set to odd values viz:

$this->here = 
/workspace/myclient/index.php/workspace/myclient/news_items/index
$this->base =
/workspace/myclient/index.php/workspace/myclient

I call up the controller by:

http://localhost/workspace/myclient/index.php/news_items/index

The output I get is as expected as far as the list of items is 
concerned, though all the generated URLs from the paginator are wrong. I 
can't understand why Cake is inserting the extra "/workspace/myclient" 
into these two URL properties, here and base.  It is certainly causing 
the paginator to generate URLs like:

http://localhost/workspace/myclient/index.php/workspace/myclient/news_items/index/?page=2

rather than:

http://localhost/workspace/myclient/index.php/news_items/index/?page=2

The former not surprisingly moans about a missing workspace controller!

I have set my local environment up (on Fedora Core Linux) as follows 
(changing the set directory pattern as I am likely to have to do this 
when I deploy live):

My application is in /home/davidh/workspace/myclient (there is a 
symbolic link "workspace" in the Apache server root /opt/lampp/htdocs 
which points to /home/davidh/workspace). /home/davidh/workspace/myclient 
is intended to be the web root where css, img etc directories are.  The 
class files are in a subdirectory /home/davidh/workspace/myclient/app.

I have commented out all mod_rewrite directives in the .htaccess file in 
/home/davidh/workspace/myclient and /home/davidh/workspace/myclient/app. 
  I have kept these files as I have needed to set php_flag

session.use_trans_sid 0

as I kept getting session ids in my URLS in my browser, despite wanting 
to use cookies. BTW looking at the cookie path that had been set in my 
browser, it had the same odd path and was clearly generated from 
controller "here" property.  Which probably meant the session id 
functionality wasn't using the cookie as the path was screwed up.

In the top level index.php in /home/davidh/workspace/myclient I have set 
the following:

if (!defined('ROOT')) {
 //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY 
IS 
LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
 //You should also use the DS define to seperate your 
directories
 //define('ROOT', dirname(dirname(dirname(__FILE__;
 define('ROOT', dirname(__FILE__));
}
if (!defined('APP_DIR')) {
 //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';

//define('APP_DIR',basename(dirname(dirname(__FILE__;
 define('APP_DIR', 'app');
}   
/**
  * This only needs to be changed if the cake installed libs are located
  * outside of the distributed directory structure.
  */
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
 //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY 
WHERE CAKE 
CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
 //You should also use the DS define to seperate your 
directories
 //define('CAKE_CORE_INCLUDE_PATH', ROOT);
 define('CAKE_CORE_INCLUDE_PATH', 
DS.'opt'.DS.'lampp'.DS.'htdocs'.DS.'cakephp');

(I want the Cake libraries to reside outside of the workspace structure).

Can anyone shed some light on what I'm doing wrong here?  I can hack 
around the problem by putting the line:

$this->base = BASE_URL;

(BTW I have done:

define ('BASE_URL', env('SCRIPT_NAME'));

in core.php so I turn off mod_rewrite).

in every method of my controller that needs to generate a URL (this 
works), but I'd rather understand why I'm having this problem!

Thanks in advance for any help people can give.

David Herbert
Cambridge UK.


--~--~-~--~~~---~--~~
 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: OT - Q for PHPNut on DBDesigner 4 - Was: ER Tools

2007-01-11 Thread keymaster

Hi NOSLOW,

Just wanted to report back and thank you. I followed your advice and
DBDesigner is no longer causing problems.

FYI, the problem was I had been using the plain relationships (the
lower set of icons). Using the "non-identifying" ones (the upper set),
as you suggested, made the problems disappear.

Thanks NOSLOW.

(And thanks to the comments of others regarding DB-based foreign key
constraints for db's accessed by multiple applications).


--~--~-~--~~~---~--~~
 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: International PHP Magazine Poll:Best PHP Framework

2007-01-11 Thread Ryan Snowden (Beijing)
A nod is as good as a wink to a blind pony


On Jan 10, 2007, at 11:56 PM, Samuel DeVore wrote:

>
> So isn't the framework called Symfony???
> http://www.symfony-project.com/  how valid can a poll be if it gets
> the names wrong, or how authoritative is the mag?  Now they did get
> CakePHP right, and as a list we know what the killer framework is
>
> On 1/10/07, RichardAtHome <[EMAIL PROTECTED]> wrote:
>>
>> Congratulations to everyone responsible for making CakePHP happen!
>>
>> http://www.php-mag.net/magphpde/magphpde_news/psecom,id, 
>> 26752,nodeid,5.html
>>
>> 'CakePHP' has beaten all its competitors with a majority of 78.5%
>> votes taking home the title of the best PHP MVC Framework. Next in  
>> line
>> is 'Sympony' with 10.9 %votes.WACT, Achievo, PHPonTrax was last on
>> the list as three of them garnered a dismal 0.0% votes each.
>>
>>
>>>
>>
>
>
> -- 
> ==
> S. DeVore
> (the old fart) the advice is free, the lack of crankiness will cost  
> you
>
> >



--~--~-~--~~~---~--~~
 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: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-01-11 Thread scott lewis
I'll add my name to the list of people who would love to see you  
publish a com_cakephpwrapper.


s


PGP.sig
Description: This is a digitally signed message part