media plugin for 1.3

2010-06-25 Thread randy
i've downloaded the latest code for david persson's media plugin, and
i'm trying out the 1.3 version. i'd love to have my site running on
the latest cakephp.

this plugin is pretty complicated, totally cool but setup can be
tough. my question is how ready is the 1.3 version of the plugin?

i think it's labelled beta right now, i expect something marked "beta"
to be generally working. i will continue to wrestle with the setup but
i don't want to do so if the transition to 1.3 is far from ready.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Model Output as HTML

2010-06-25 Thread euromark
without code to look at we can only guess


On 25 Jun., 19:11, Jeremy Burns | Class Outfit
 wrote:
> Not sure if I'm missing the point, but might the escape option 
> help?http://book.cakephp.org/view/1445/para
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 25 Jun 2010, at 18:07, cricket wrote:
>
>
>
> > On Thu, Jun 24, 2010 at 1:48 PM, DragonFlyEye  
> > wrote:
> >> I'll bet this is obvious, but my Model data actually contains some
> >> HTML markup (I know, but you work with what you have) and that markup
> >> is being converted to entities before being displayed on the page. Is
> >> this something that CakePHP is doing? Is it happening in the Model or
> >> the Controller? How can I stop it.
>
> > Are you certain it's raw HTML? If you're viewing the data in, say,
> > MySQLAdmin, any entities might have been converted. If you can, have a
> > look at the data from a terminal or export a dump and look at it
> > there.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Hierarchy problem

2010-06-25 Thread Hugo Massaroli
Well, maybe not... the thing is that Fulltext is a table MyISAM and Item is
InnoDB. That's because I only can have fulltext indexes (that helps for
searchers) in MyISAM tables but in MyISAM engine I do not have FOREIGN KEYS
:S.

But... in Item table I really don't have important foreign keys so maybe the
solution will be mix both tables, so it's a good idea, and put all data in a
unique MyISAM table. The problem is that I don't know if I can have a
foreing key in a InnoDB table referencing a MyISAM table. Yeap, that's the
real problem :S

2010/6/25 cricket 

> On Thu, Jun 24, 2010 at 10:13 PM, Hugo M  wrote:
> > Hi there! I have this structure:
> >
> > Recommend hasOne Item
> > Item hasOne ItemFulltext
> >
> > (ItemFulltext are fields from the item)
> >
> > When I do a Recommend->find() I get:
> >
> > Array
> > (
> >[0] => Array
> >(
> >[Recommend] => Array(...)
> >
> >[Item] => Array (
> > [ItemFulltext] => Array(...)
> > ...)
> >)
> > )
> >
> >
> > I want one of two things:
> >
> > 1) Put ItemFulltext in the same level as Item
> > ...
> > or mixing two tables in one model... (better)
>
> Is it really necessary to have a separate ItemFullText model? Why not
> put that data in items table?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: controllers index function with related tables.

2010-06-25 Thread cricket
On Fri, Jun 25, 2010 at 12:47 PM, Jeremy Burns | Class Outfit
 wrote:
>
> To get the count of comments you can either do a
> count of comments from within the array, or use the counterCache function.

If you don't go with counterCache you might want to adjust the
contains array so that you're only fetching the ID for each comment.

$posts = $this->Post->find(
'all',
array(
'contain' => array(
'Comment' => array(
'fields' => array(
'Comment.id'
)
),
'Tag'
)
)
);

This way, you're not fetching a bunch of unnecessary data and you can
use sizeof() to get the number of comments for each post.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Hierarchy problem

2010-06-25 Thread cricket
On Thu, Jun 24, 2010 at 10:13 PM, Hugo M  wrote:
> Hi there! I have this structure:
>
> Recommend hasOne Item
> Item hasOne ItemFulltext
>
> (ItemFulltext are fields from the item)
>
> When I do a Recommend->find() I get:
>
> Array
> (
>    [0] => Array
>        (
>            [Recommend] => Array(...)
>
>            [Item] => Array (
>                 [ItemFulltext] => Array(...)
>             ...)
>        )
> )
>
>
> I want one of two things:
>
> 1) Put ItemFulltext in the same level as Item
> ...
> or mixing two tables in one model... (better)

Is it really necessary to have a separate ItemFullText model? Why not
put that data in items table?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Form Helper set class value of each in Drop down menu

2010-06-25 Thread cricket
On Thu, Jun 24, 2010 at 2:32 PM, Josh K  wrote:
>
> How can I make the form helper output this?:
>
>  id="StatuslistStatuscss">
> status1
> status2
> status3
> 

I doubt you can do that with Cake without creating your own helper. I
think a better route would be to do that with javascript. It should be
a cinch with JQuery, especially if the class names are the same as the
values.

Actually, if this is purely for styling, you might try going with straight CSS:

option[value=foo] {...}
option[value=bar] {...}
etc.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Model Output as HTML

2010-06-25 Thread Jeremy Burns | Class Outfit
Not sure if I'm missing the point, but might the escape option help? 
http://book.cakephp.org/view/1445/para

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 25 Jun 2010, at 18:07, cricket wrote:

> On Thu, Jun 24, 2010 at 1:48 PM, DragonFlyEye  
> wrote:
>> I'll bet this is obvious, but my Model data actually contains some
>> HTML markup (I know, but you work with what you have) and that markup
>> is being converted to entities before being displayed on the page. Is
>> this something that CakePHP is doing? Is it happening in the Model or
>> the Controller? How can I stop it.
> 
> Are you certain it's raw HTML? If you're viewing the data in, say,
> MySQLAdmin, any entities might have been converted. If you can, have a
> look at the data from a terminal or export a dump and look at it
> there.
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.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

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Model Output as HTML

2010-06-25 Thread cricket
On Thu, Jun 24, 2010 at 1:48 PM, DragonFlyEye  wrote:
> I'll bet this is obvious, but my Model data actually contains some
> HTML markup (I know, but you work with what you have) and that markup
> is being converted to entities before being displayed on the page. Is
> this something that CakePHP is doing? Is it happening in the Model or
> the Controller? How can I stop it.

Are you certain it's raw HTML? If you're viewing the data in, say,
MySQLAdmin, any entities might have been converted. If you can, have a
look at the data from a terminal or export a dump and look at it
there.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: controllers index function with related tables.

2010-06-25 Thread Jeremy Burns | Class Outfit
Welcome to Cake.

The secret is to (in this order):
1) build your database tables to the conventions (lower case plural table 
names, `id` and `name` fields etc)
2) create indexes and referential integrity in the database
3) build your Cake models - you can use Bake for this as its pretty good, or do 
it yourself
4) learn and implement the Containable behaviour (it's much more powerful, 
controllable and friendly than relying on recursive)

Your Cake models echo the database joins using $belongsTo, $hasMany and 
$hasAndBelongsToMany. So, to use the good old blog model, a Post can have many 
comments ($hasMany), a Comment belongs to a Post ($belongsTo), a Tag has many 
Posts and a Post has many Tags ($hasAndBelongsToMany), and so on. To see your 
Posts with associated Comments and Tags you do this search:

$posts = $this->Post->find(
'all',
array(
'contain' => array(
'Comment',
'Tag'
)
)
);

This will give you an array with an element for each Post, and nested in it an 
array with its Comments and Tags. You can then read these out and display them 
on your index view. To get the count of comments you can either do a count of 
comments from within the array, or use the counterCache function. This adds a 
comment_count field to your posts table and Cake will keep that up to date as 
Comments are added and removed to the database through the website (it can't 
track changes made directly in the database, or course).

Pages that might help:

http://book.cakephp.org/view/903/Model-and-Database-Conventions
http://book.cakephp.org/view/1323/Containable
http://book.cakephp.org/view/1042/belongsTo (has some details on counterCache)


Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 25 Jun 2010, at 12:30, pswiggers wrote:

> Hi,
> 
> I'm new to cakephp , still really a lot to learn about it, but already
> convinced cake is a good thing.
> 
> So this is what I'm struggling with;
> On my website I can list all my posts via the index function ($this-
>> Post->recursive = 0).
> But I've also comments and tags I already want to show on the index;
> meaning number of comments (a count) and a list of tags. I can see
> this data via the view function, but that requires an ID. As I can see
> all data in the view for an ID I assume I build the tables (and
> models) following cakephp convention.
> Long story short:  How could I to use the index but with related
> information or the view but for all posts (not specific ID)?
> 
> 
> Kind regards,
> Patrick
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.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

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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


controllers index function with related tables.

2010-06-25 Thread pswiggers
Hi,

I'm new to cakephp , still really a lot to learn about it, but already
convinced cake is a good thing.

So this is what I'm struggling with;
On my website I can list all my posts via the index function ($this-
>Post->recursive = 0).
But I've also comments and tags I already want to show on the index;
meaning number of comments (a count) and a list of tags. I can see
this data via the view function, but that requires an ID. As I can see
all data in the view for an ID I assume I build the tables (and
models) following cakephp convention.
Long story short:  How could I to use the index but with related
information or the view but for all posts (not specific ID)?


Kind regards,
Patrick


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Hierarchy problem

2010-06-25 Thread hugom
I just made a reply and it didn't appear, is this working? Ping
group :P

On Jun 25, 5:41 am, John Andersen  wrote:
> Make you find from the Item model, that should give you something,
> that are nearly as you want.
> Enjoy,
>    John
>
> On Jun 25, 4:13 am, Hugo M  wrote:
>
> > Hi there! I have this structure:
>
> > Recommend hasOne Item
> > Item hasOne ItemFulltext
>
> > (ItemFulltext are fields from the item)
>
> > When I do a Recommend->find() I get:
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [Recommend] => Array(...)
>
> >            [Item] => Array (
> >                 [ItemFulltext] => Array(...)
> >             ...)
> >        )
> > )
>
> > I want one of two things:
>
> > 1) Put ItemFulltext in the same level as Item
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [Recommend] => Array(...)
>
> >            [Item] => Array (...)
>
> >            [ItemFulltext] => Array(...)
> >        )
> > )
>
> > or mixing two tables in one model... (better)
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [Recommend] => Array(...)
>
> >            [Item] => Array ( here fields inside ItemFulltext...)
> >        )
> > )
>
> > There's a way to do any of this options?
>
> > Regardss

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Hierarchy problem

2010-06-25 Thread hugom
Yeah, the problem is that I need the Recommend model too. If I do what
you say, I get something like:

array(
   [0] =>
  [Item] => Array (...)

   [ItemFulltext] => Array(...)
   )
)

and the foreign key item_id is on the recommends table, so I would
need to do something like:

$this->Recommend->find('all', array('conditions' =>
array('Recommend.item_id' => Set:extract('/Items/id';

Which is ok to get the recommends, but there's a way to mix the two
arrays in just one?

I mean, I would have $items and $recommends and I need both in the
same register (I could make my own function but probably there's some
way to do that with the Set class?

On Jun 25, 5:41 am, John Andersen  wrote:
> Make you find from the Item model, that should give you something,
> that are nearly as you want.
> Enjoy,
>    John
>
> On Jun 25, 4:13 am, Hugo M  wrote:
>
> > Hi there! I have this structure:
>
> > Recommend hasOne Item
> > Item hasOne ItemFulltext
>
> > (ItemFulltext are fields from the item)
>
> > When I do a Recommend->find() I get:
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [Recommend] => Array(...)
>
> >            [Item] => Array (
> >                 [ItemFulltext] => Array(...)
> >             ...)
> >        )
> > )
>
> > I want one of two things:
>
> > 1) Put ItemFulltext in the same level as Item
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [Recommend] => Array(...)
>
> >            [Item] => Array (...)
>
> >            [ItemFulltext] => Array(...)
> >        )
> > )
>
> > or mixing two tables in one model... (better)
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [Recommend] => Array(...)
>
> >            [Item] => Array ( here fields inside ItemFulltext...)
> >        )
> > )
>
> > There's a way to do any of this options?
>
> > Regardss

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Error I can't understand when trying to access specific field from array retrieved by query

2010-06-25 Thread Flavia Missi
That's true, @Daniel! I just missed this... rs

I guess that it's your issue! Try and tell us if it works... ;)

2010/6/25 Daniel 

> the first index of the array $result is table name and the second is
> column name.
> try this:
>
> $query_result = $result11 ['table_name]['column_name'] ;
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Flàvia Missi

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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


Migrating from IsapiRewrite 2 (ini) to Isapi Rewrite 3 (.htaccess)

2010-06-25 Thread simon...@terra.com.br
Good Morning,

I have a website that had IsapiRewrite 2 installed, so I was using the
IsapiRewrite4.ini file to configure.

Now they did update to version 3, so I have to use .htaccess. I'm
trying to do the same configuration that I had before, but it doesn't
work. Can somebody help me?

Here's the code I was using in version 2:


# IsapiRewrite4.ini

# IsapiRewrite4 options
# RewriteLog  logs\iirfLog.out
RewriteLogLevel 0
MaxMatchCount 10
IterationLimit 10

# Match a fully qualifed domain name such as intranet.domain.com
# and redirect it to http://intranet (plus any query parameters).
# Replace "domain" with your domain name
# RewriteCond %{SERVER_NAME} ([^\.]+)\.kakarekos.com\.com$ [I]
# RewriteRule ^(.*)$ http://%1$1 [R]


# RewriteRule^$ app/webroot/[L]
# RewriteRule(.*) app/webroot/$1 [L]

RewriteRule ^/$/index.php?REQUEST_URI=index.php [L]
#RewriteRule ^(.*)$ /index.php?REQUEST_URI=$1[L]

Regards,

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: using the auth information outside of cakephp

2010-06-25 Thread mrnnn
thanks a million cricket!

On Jun 21, 7:08 pm, cricket  wrote:
> On Mon, Jun 21, 2010 at 9:33 AM, mrnnn  wrote:
> > sorry for bumping, but nobody? really?
>
> > On Jun 10, 4:09 pm, mrnnn  wrote:
> >> A rather unusual question maybe, but I'd like to use cake's auth in a
> >> seperate php file. I tried checking what's in the session, but that
> >> one seems to be empty?
>
> >> Here's what i want to do: I have a simple file manager and when the
> >> user is logged in (no matter what group, so basically i only need a
> >> yes/no answer, doesn't matter who), he should be allowed to see the
> >> entire file structure. if not, only a part.
>
> >> important to notice i guess: file manager and cakephp site run on the
> >> same domain (and same subdomain).
>
> >> I've tried using the cookie and session components in cakephp and then
> >> printing the $_SESSION (after a session_start() of course) and
> >> $_COOKIE arrays, but those seemed empty except for a CAKEPHP value.
>
> Have a look at this:
>
> http://www.flickspin.com/en/software_development/cakephp_session_webroot

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Building a 2-level relationship

2010-06-25 Thread WhyNotSmile
Thanks Stefano,

looks like that's what I need!

Sharon



On 24 June, 22:58, stefano  wrote:
> On Thu, Jun 24, 2010 at 1:09 PM, WhyNotSmile  
> wrote:
> > I have the following structure:
>
> > Group - hasMany Users (user has foreign key called group_id)
> > User - hasMany Children (child has foreign key called user_id)
> >        - belongsTo Group (based on group_id)
> > Child - belongsTo User (based on user_id)
>
> > My question is this: is there a way to define the Child realtionship
> > to the group?  E.g., when finding Children, I want to be able to loop
> > over each Group and find all the Children in each one, but the Child
> > model doesn't know that Group exists.
>
> > I have looked at the Tree behaviour, but it looks like it's more
> > complicated than I need.
>
> > Any advice is appreciated.
>
> > Thanks!
> > Sharon
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> check containble
>
> http://book.cakephp.org/view/474/Containable
>
> s.
>
> --
> Stefano Salvatori M.http://stefano.salvatori.cl/

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Hierarchy problem

2010-06-25 Thread John Andersen
Make you find from the Item model, that should give you something,
that are nearly as you want.
Enjoy,
   John

On Jun 25, 4:13 am, Hugo M  wrote:
> Hi there! I have this structure:
>
> Recommend hasOne Item
> Item hasOne ItemFulltext
>
> (ItemFulltext are fields from the item)
>
> When I do a Recommend->find() I get:
>
> Array
> (
>    [0] => Array
>        (
>            [Recommend] => Array(...)
>
>            [Item] => Array (
>                 [ItemFulltext] => Array(...)
>             ...)
>        )
> )
>
> I want one of two things:
>
> 1) Put ItemFulltext in the same level as Item
>
> Array
> (
>    [0] => Array
>        (
>            [Recommend] => Array(...)
>
>            [Item] => Array (...)
>
>            [ItemFulltext] => Array(...)
>        )
> )
>
> or mixing two tables in one model... (better)
>
> Array
> (
>    [0] => Array
>        (
>            [Recommend] => Array(...)
>
>            [Item] => Array ( here fields inside ItemFulltext...)
>        )
> )
>
> There's a way to do any of this options?
>
> Regardss

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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 i decode md 5 in cake php

2010-06-25 Thread euromark
google search will turn up sth like

http://www.hotscripts.com/forums/php/38943-md5-decode-encode.html


On 25 Jun., 08:26, Dilip Godhani  wrote:
> Hello frd
> Can any one tell me how i decode md5 in cakephp
>
> Thanks
>
> Dilip Godhani
> Software Developer,
> Entourage Solutions
> e-mail: di...@entouragesolutions.com
>           dilip.godh...@gmail.com
> Web.:www.entouragesolutions.com
> m. 9913822582

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: CakePHP Ajax - Getting returned JSON code evaled and into variable

2010-06-25 Thread Joakim
Well, i would say its a cakePHP question, because i am wondering how
to do it within the cakePHP framework.

if i set it up like this:



link(
'View Post',
array( 'controller' => 'posts', 'action' => 'post' ),
array( 'complete' => 'callback()'  )
);
?>

And the ajax call only returns a JSON structure, how do i either:
- Get hold of that structure inside the js function
or
- Pass it into the js function as a variable

Forinstance a callback for a Yahoo User Interface request handler
would have a function like this:

success: function(oResponse){...}

And then you fetch the returned json data out of that variable.

Is the callback function specified in the cakePHP called with any
parameters?

On 24 Jun, 20:29, Mike  wrote:
> Just this exact thing this week There's a good example 
> here:http://api.jquery.com/jQuery.getJSON/... if your not using jquery you
> can use eval() just the same.
>
> On Jun 24, 9:56 am, Joakim  wrote:
>
> > Hello,
>
> > I have a ajax link that returns a json datastructure(writes out the
> > json datastructure in the view) and i want to get this evaled and
> > placed into a js datastructure that i can use. How do i manage this?
>
> > All suggestions are really helpful!
>
> > Best regards

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: Error I can't understand when trying to access specific field from array retrieved by query

2010-06-25 Thread Daniel
the first index of the array $result is table name and the second is
column name.
try this:

$query_result = $result11 ['table_name]['column_name'] ;

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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: ajax.updater in cakephp

2010-06-25 Thread Petter Andreas Strøm
Thanks!

I've kind of found what i was looking for my self.

I just removed the layout for the functions inside my controller, so
they just return the code for the function itself(not a whole doc...).


On Jun 22, 9:59 am, alagar  wrote:
> http://book.cakephp.org/view/212/Methods
>
> On Jun 21, 6:05 pm, Petter Andreas Strøm  wrote:
>
> > Hi,
>
> > Im quite new to both ajax and cake, so i have a question regarding the
> > use of ajax.updater in cakephp. Is it possible to use the ajax.updater
> > to just update an html element to contain just one cake function? (in
> > other words; ive tried to give the ajax.updater the url of a cake-
> > function, but then it replaces the element with a whole new page with
> > its own layout etc...)
>
> > Maybe this is some odd explanation:P

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.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