Re: SwiftMailer Component

2007-04-05 Thread Aidan Lister

Hi Anthony,

I found it a lot easier just to use Swift as a vendor package.

Place it in your vendor folder, call your $this->render inside an
output buffer, and pass this to Swift.

It's not ideal, but I found it a lot easier to use than the components
floating around.

set('event', $event);
$this->render('emails/studenteventinfo', 'email');
$message = ob_get_contents();
ob_end_clean();

// Send the email
$swift->send($studentemails, $from, $subject, $message);

// Show any errors
if ($swift->hasFailed()) {
$this->set('errors', $swift->getErrors());
}
?>

On 06/04/07, Anthony <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm using the SwiftMailer Component for CakePHP found here:
> http://bakery.cakephp.org/articles/view/193
>
> However, the newest version of SwiftMailer is 3, while the component
> is designed for 2 and no longer works "out of the box". Is there a
> version out there for version 3? Or does anybody know where I can find
> an old version 2 download of SwiftMailer?
>
> Thanks,
>
> Anthony
>
>
> >
>

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



WithCake.com ideas (Was Re: WithCake.com relaunched)

2007-04-05 Thread R. Rajesh Jeba Anbiah

On Apr 5, 10:58 pm, "jonathan.snook" <[EMAIL PROTECTED]> wrote:
> On Mar 24, 4:52 pm, "jonathan.snook" <[EMAIL PROTECTED]> wrote:
>
> > There's still two main features that I need to add:
> > 1) RSS feeds for the job listing
> > 2) a way for people to contact you through the site
>
> Both of these are now in. At this point, the site is essentially
> "feature complete" although if anybody comes up with some cool ideas,
> I'm not averse to it. :)

Kind of developer and company rankings would be cool. Especially
cake is lacking some good documentations; so probably add some field
stating how many articles were published by that developer (this is
also good to Cake itself) or so... something like:
1. PhpNut
* This developer is CakePHP core developer
* Has published 1000 articles on bakery

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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
-~--~~~~--~~--~--~---



Re: new auth component in cake 1.2

2007-04-05 Thread R. Rajesh Jeba Anbiah

On Apr 6, 1:38 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > how can i find manual, trytourial about new auth coponent+acl  in cake
> > 1.2 ?
>
> I guess you could write it ;)  I am not sure there is anything out there yet.

There is indeed an Auth component  in 1.2.

I too was interested in this component and when asked in IRC,
PhpNut informed me that, we have to write many stuffs and can use the
methods found in the Auth component. So, I'd thought of settling in
othAuth for now.

   HTH.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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
-~--~~~~--~~--~--~---



Re: Two Applications sharing Models

2007-04-05 Thread Felix Geisendörfer
If both apps are running on the same machine which I assume, you should 
be able to simply put the Models in one application and then go to 
/app/config/bootstrap.php  and create a:

$modelPaths = array('full path to models', 'second full path to models', 
'etc...');*

*array where you add the full path to the model directory of your other 
application.*

*Let me know if this will work or not,*
*-- Felix*
*
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


rtconner wrote:
> Hm... maybe. I develop on windows machine. But qa/production are done
> on linux.
>
> I did some searching at your prompting, I guess there is a utility
> called linkd which emulates symlinks on widows. I gotta find it and
> get it running. We'll see.
>
> The SVN thing.. hm.. gotta figure this out. Because the 2nd
> application would be in its own SVN plus there would be a file (or few
> files) in it in a different SVN location. Would that work out? If that
> can work out that would be great. Now that I think about it it might
> work. I'll give it a run. Just gotta make special allowances when
> doign a new checkout or export or doing a release. I guess that is
> just good practice though.
>
>
> On Apr 5, 4:19 pm, "John David Anderson (_psychic_)"
> <[EMAIL PROTECTED]> wrote:
>   
>> On Apr 5, 2007, at 4:14 PM, rtconner wrote:
>>
>>
>>
>>
>>
>> 
>>> Is there a way to have two applications share a Model, and possibly
>>> some componants and helpers also?
>>>   
>>> I realize in general most applications will have different data sets
>>> and sharing Models will make no sense at all. However if you use the
>>> same model twice with two different database configs, now you are
>>> using similar data sets, just on different databases. Also it has
>>> crossed my mind that I could have an internal and external application
>>> both sharing the same data (Why not share models also?). I know I can
>>> just copy and paste files into the new directories. That gets to be a
>>> pain when you modify files and add code or fix bugs. Now you have to
>>> maintain two files, such a pain.
>>>   
>>> In short, if I have two applications both with User tables, I only
>>> want to write and maintain one User Model class.
>>>   
>>> Any ideas? Only thing I can think of is to put them into the cake/
>>> libs/
>>> models folder. I'm not even sure if that would work anyways.
>>>   
>> Didja try a symlink?
>>
>> You might also just check the Model into SVN and use it in both places.
>>
>> -- John
>> 
>
>
> >
>
>   

--~--~-~--~~~---~--~~
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 verify cache is working properly

2007-04-05 Thread bingo

hi Tane,

Thanks for informing me about that. I didn't know that...
Cache although seems simple with CakePHP, there is no good tutorial
that covers all this points in one place.

I am struggling to use get caching machanism work properly..

Regards,
bingo

On Apr 5, 1:56 pm, "digital spaghetti"
<[EMAIL PROTECTED]> wrote:
> I only found out this method today, but found it to work perfectly.
>
> Put the code you wish to cache in an element, and when you want to
> render the element use this:
>
> element('element', array('cache'=>'1 day'));?>
>
> Now the element will be cached for 24 hours from generation. Beware
> though, if you update the data it uses you need to make sure you
> unlink the cache file on afterSave
>
> In your model file:
>
> function afterSave()
> {
>@unlink(CACHE.'view'.'element__elementname');
>
> }
>
> (Please check this though, I'm writing this from memory on my blackberry!!)
>
> Tane
>
> On 4/5/07, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
> > I don't have much traffic on my website...but for future, I am
> > starting to implement cache.
>
> > Its seems to be working...but how do I verify that its properly
> > working...
>
> > For instance, I set cacheAction only for one action in one controller.
> > But when I check my tmp/cahce, I only found cache for model and that
> > too for all the tables. There was no cache folder for view.. Am I
> > missing something.
>
> > Is there any way to check what queries where sent by cakephp before it
> > rendered the view. I tried setting debug to 3 and it seems it sending
> > all
>
> > Regards,
> > bingo- Hide quoted text -
>
> - Show quoted text -


--~--~-~--~~~---~--~~
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 execute OthAuth protected actions with a CRON job?

2007-04-05 Thread CraZyLeGs

Hi,

well, requestAction() goes through the whole pipe and auth is in
there.
if the action protected is in the same controller then do $this-
>myaction() instead of requestAction.
If however it's in another controller then it's problematic.
You can do something though: you need to disable auto redirects in
othAuth, login() and then call requestAction. logout() if you need
afterwards.

something like( not tested):
$this->othAuth->auto_redirect = false;
$this->data[$this->othAuth->user_model][$this->othAuth-
>user_login_var] = 'login';
$this->data[$this->othAuth->user_model][$this->othAuth-
>user_passw_var] = 'password';
if($this->othAuth->login() == 1) // you are logged in now
{
  $this->set('percentage', $this->requestAction('/actions/
get_percentage/'.$user_id));
  $this->othAuth->logout();
}

Note, you need to have permission to the action you're requestAction()-
ing
you can create a user that only have access to this particular action.

maybe there is an easier method but this one is not in state of sin.

On 3 avr, 22:54, "Bootstrapper" <[EMAIL PROTECTED]> wrote:
> I'm generating a view that is emailed to my subscribers regularly
> through a CRON job. It works fine if the CRON job is only accessing
> actions that are unprotected by OthAuth (for example if var
> $othAuthRestrictions = null;).
>
> It's alright if the initial action being called is unprotected, but
> it's critical that this action call other actions which are protected.
> As soon as the action is protected by OthAuth, however, the CRON just
> stops executing with that call.
>
> Any ideas on how to solve this?
>
> I can't be the only one trying to run protected actions wtih a CRON
> job, right?
>
> This is the line where the action stops functioning:
>
> $this->set('percentage', $this->requestAction('/actions/
> get_percentage/'.$user_id));
>
> But if I set  var $othAuthRestrictions = null
> in the ActionsController, then everything runs fine. (But anyone can
> access my ActionController actions without logging in.)
>
> Many thanks for you help!


--~--~-~--~~~---~--~~
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: Ajax validate effect

2007-04-05 Thread pixelclub

thanks Christopher,  i'm going to give that a try.

I was wondering if its possible to retrieve a list of input fields
that don't validate and pass these to a javascript function from
within the controller.
This way i can apply an effect to all of these using scriptaculous.
This will be executed after the user presses submit ofcourse

On Apr 5, 5:44 pm, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> If you're using $ajax->observeField, you can add custom javascript to
> your loaded option in the array.
> ie. $ajax->observeField(,array('loaded' =>
> 'document.getElementById('div_name').style.background-color =
> "yellow"; document.getElementById));
>
> You get the idea.  Write some javascript in a separate file and
> include it.  Have the loaded call the function and pass some
> paramaters.
>
> You are pretty much going to have to write your own, any way you look
> at it.
>
> You *may* be able to do this:  In the thtml file where you are getting
> the generated messages to update the divs with, just have it update
> the field that is getting observed by, giving the response of the text
> field, with the highlighted word using $text->highlight and then when
> it is loaded, use javascript to place the cursor at the end of the
> text field and give it focus again so the user can keep typing.
>
> This could be a problem if you have someone who types very fast.
>
> On Apr 4, 6:26 pm, "pixelclub" <[EMAIL PROTECTED]> wrote:
>
> > Hey all,
>
> > I was wondering how to "highlight" the input fields that don't
> > validate after submitting a form.
> > Updating one div which contains the error messages works and color
> > fading it,  but can't seem to figure out how to do it based on the
> > validation results.
>
> > 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
-~--~~~~--~~--~--~---



Re: Choice of Version

2007-04-05 Thread Joshua Benner

Integration with Drupal is on the list of desired features, but if it
does not work, it's not a show-stopper (I'll just have to write an
application wrapper that handles ldap login, authorization, etc). As
such, do I understand correctly that I should be able to develop a
CakePHP application separately from Drupal/Drake, then integrate it into
Drupal with Drake once the CakePHP app is finished?

If I do this, are there any pitfalls to watch out for that would make my
cake inedible by Drake? :)

Mariano Iglesias wrote:
> Drake is supposed to support 1.2. I tried it with latest SVN available at
> the time of release and was working perfectly. Need to try it with latest
> SVN, though, but I don't foresee any issues other that already known issues:
>
> http://dev.sypad.com/projects/drake/documentation/known-issues/
>
> Regarding Drake, it's still on its beta stage, so I can't make any further
> guarantee than that I will give support when there are issues. Best thing to
> do is to just try it and test your application thoroughly.
>
> As you can see on Drake's documentation + source code there are no changes
> to Cake nor Drupal core, which already minimizes potential bugs
> considerably.
>
> -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 Joshua Benner
> Enviado el: Jueves, 05 de Abril de 2007 03:33 p.m.
> Para: Cake PHP
> Asunto: Re: Choice of Version
>
> Does Drake work with 1.2, and is Drake a usable platform for writing
> internal applications? (our intranet runs on drupal 5.1)
>
>
> >
>   


--~--~-~--~~~---~--~~
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: Two Applications sharing Models

2007-04-05 Thread rtconner

Hm... maybe. I develop on windows machine. But qa/production are done
on linux.

I did some searching at your prompting, I guess there is a utility
called linkd which emulates symlinks on widows. I gotta find it and
get it running. We'll see.

The SVN thing.. hm.. gotta figure this out. Because the 2nd
application would be in its own SVN plus there would be a file (or few
files) in it in a different SVN location. Would that work out? If that
can work out that would be great. Now that I think about it it might
work. I'll give it a run. Just gotta make special allowances when
doign a new checkout or export or doing a release. I guess that is
just good practice though.


On Apr 5, 4:19 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Apr 5, 2007, at 4:14 PM, rtconner wrote:
>
>
>
>
>
> > Is there a way to have two applications share a Model, and possibly
> > some componants and helpers also?
>
> > I realize in general most applications will have different data sets
> > and sharing Models will make no sense at all. However if you use the
> > same model twice with two different database configs, now you are
> > using similar data sets, just on different databases. Also it has
> > crossed my mind that I could have an internal and external application
> > both sharing the same data (Why not share models also?). I know I can
> > just copy and paste files into the new directories. That gets to be a
> > pain when you modify files and add code or fix bugs. Now you have to
> > maintain two files, such a pain.
>
> > In short, if I have two applications both with User tables, I only
> > want to write and maintain one User Model class.
>
> > Any ideas? Only thing I can think of is to put them into the cake/
> > libs/
> > models folder. I'm not even sure if that would work anyways.
>
> Didja try a symlink?
>
> You might also just check the Model into SVN and use it in both places.
>
> -- John


--~--~-~--~~~---~--~~
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: Two Applications sharing Models

2007-04-05 Thread John David Anderson (_psychic_)


On Apr 5, 2007, at 4:14 PM, rtconner wrote:

>
> Is there a way to have two applications share a Model, and possibly
> some componants and helpers also?
>
> I realize in general most applications will have different data sets
> and sharing Models will make no sense at all. However if you use the
> same model twice with two different database configs, now you are
> using similar data sets, just on different databases. Also it has
> crossed my mind that I could have an internal and external application
> both sharing the same data (Why not share models also?). I know I can
> just copy and paste files into the new directories. That gets to be a
> pain when you modify files and add code or fix bugs. Now you have to
> maintain two files, such a pain.
>
> In short, if I have two applications both with User tables, I only
> want to write and maintain one User Model class.
>
> Any ideas? Only thing I can think of is to put them into the cake/ 
> libs/
> models folder. I'm not even sure if that would work anyways.

Didja try a symlink?

You might also just check the Model into SVN and use it in both places.

-- John

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



Some Fresh Cake

2007-04-05 Thread Larry E. Masters aka PhpNut
We put together a new bug fix release for 1.1.x.x stable branch, so
download[1] version 1.1.14.4797 Have a look at the change log[2] to see what
has been updated and fixed.

We have also been working hard to get all the features into 1.2.x.x branch.
We are not quite there yet, so we have another 1.2.0.4798alpha packaged and
ready to download[3]. While this release is still an alpha, most of the core
features are stable and running nicely. You can view the 1.2.x.x change
log[4] for recent additions. We are still working on the new documentation,
but there is some good information already on the Bakery and in some of the
blogs about the new features.

If you would like to help out please email [EMAIL PROTECTED] or stop by IRC.

[1] Download 1.1.14.4797:
http://cakeforge.org/frs/?group_id=23&release_id=215
[2] 1.1.x.x branch change log:
https://trac.cakephp.org/wiki/changelog/1.1.x.x
[3] Download 1.2.0.4798alpha:
http://cakeforge.org/frs/?group_id=23&release_id=216
[4] 1.2.x.x branch change log:
https://trac.cakephp.org/wiki/changelog/1.2.x.x

Happy Baking

-- 
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access  public
*/

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



Two Applications sharing Models

2007-04-05 Thread rtconner

Is there a way to have two applications share a Model, and possibly
some componants and helpers also?

I realize in general most applications will have different data sets
and sharing Models will make no sense at all. However if you use the
same model twice with two different database configs, now you are
using similar data sets, just on different databases. Also it has
crossed my mind that I could have an internal and external application
both sharing the same data (Why not share models also?). I know I can
just copy and paste files into the new directories. That gets to be a
pain when you modify files and add code or fix bugs. Now you have to
maintain two files, such a pain.

In short, if I have two applications both with User tables, I only
want to write and maintain one User Model class.

Any ideas? Only thing I can think of is to put them into the cake/libs/
models folder. I'm not even sure if that would work anyways.

-Rob


--~--~-~--~~~---~--~~
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: new auth component in cake 1.2

2007-04-05 Thread Digital Spaghetti

If your looking for a Auth component, consider othAuth (http://
bakery.cakephp.org/articles/view/99).  The documentation is good
(http://bakery.cakephp.org/articles/view/148) and very easy to drop
into your project.

The notes indicate that it will later support CakePHP's own ACL
component, but in the meantime it serves as a very good component to
handle login/logout and user permissions.

Tane

On Apr 5, 9:37 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> how can i find manual, trytourial about new auth coponent+acl  in cake
> 1.2 ?


--~--~-~--~~~---~--~~
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: Choice of Version

2007-04-05 Thread Mariano Iglesias

Drake is supposed to support 1.2. I tried it with latest SVN available at
the time of release and was working perfectly. Need to try it with latest
SVN, though, but I don't foresee any issues other that already known issues:

http://dev.sypad.com/projects/drake/documentation/known-issues/

Regarding Drake, it's still on its beta stage, so I can't make any further
guarantee than that I will give support when there are issues. Best thing to
do is to just try it and test your application thoroughly.

As you can see on Drake's documentation + source code there are no changes
to Cake nor Drupal core, which already minimizes potential bugs
considerably.

-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 Joshua Benner
Enviado el: Jueves, 05 de Abril de 2007 03:33 p.m.
Para: Cake PHP
Asunto: Re: Choice of Version

Does Drake work with 1.2, and is Drake a usable platform for writing
internal applications? (our intranet runs on drupal 5.1)


--~--~-~--~~~---~--~~
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: find session entries / force session _gc / (de)serialization

2007-04-05 Thread Chris Hartjes

On 4/5/07, jyrgen <[EMAIL PROTECTED]> wrote:
>
> should read "de"serialized data, sorry. let me try to explain:
>
> after successful login i write a status value "logged_in" = 1
> into the session. this helps granting access to certain actions.
> Users should be allowed to log in only *once*. so during
> login i must search the whole session table for that user
> id, and then check if there is a session still existing with that
> id (for example because he closed the browser).
> if there is a valid session, then i'd like to deny access.
> if the session is expired, and still there (because _gc has
> *not* been called in the meantime) i'd want to force _gc.
>
> i might set the _gc probability to 1 to achieve this, but
> i dislike the idea...
> anyways, apart from read/write to the current session there
> seems to be no other routines out of the box for my needs.
> thats why i considered setting up a model for the session
> table. but when it comes to (de)serialisation i will wonder
> how to do it...
>

Ah, I understand.  Perhaps the easiest way to solve this problem is to
create a custom session handler that uses the login ID as the key for
the session.  You can't have more than one session with the same login
ID that way, so that stops multiple logins.

I hope that makes sense, and I'm sure the people smarter than me
around here (for there are many) will correct me.

Preventing multiple logins is not an easy task to solve without a
central location that is keeping track of who is logged in.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digital photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: Best Practice with Behaviors or How To Make a Model Act As...

2007-04-05 Thread Mariano Iglesias

Here you have some built in behaviors:

https://svn.cakephp.org/repo/branches/1.2.x.x/cake/libs/model/behaviors/

More may be added in the future, but remember, Cake is not a package of
useful classes, it's a framework. While some behaviors that are very common
to different kind of applications may be available out of the box, it's the
job of the community to produce general purpose and useful behaviors.

-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 BlenderStyle
Enviado el: Jueves, 05 de Abril de 2007 06:25 p.m.
Para: Cake PHP
Asunto: Best Practice with Behaviors or How To Make a Model Act As...

I'm assuming Cake is going to have some built-in behaviors, but right
now (1.2.0.4451alpha), cake/libs/model/behaviors is empty. Does anyone
know if there are some on the way? 


--~--~-~--~~~---~--~~
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: find session entries / force session _gc / (de)serialization

2007-04-05 Thread jyrgen

> > 1) i need to find arbitrary session entries in the db,
> > or better: retrieve a row with a particular serialized
> > value of data.
>
> I'm curious as to what you're trying to accomplish by doing this?

should read "de"serialized data, sorry. let me try to explain:

after successful login i write a status value "logged_in" = 1
into the session. this helps granting access to certain actions.
Users should be allowed to log in only *once*. so during
login i must search the whole session table for that user
id, and then check if there is a session still existing with that
id (for example because he closed the browser).
if there is a valid session, then i'd like to deny access.
if the session is expired, and still there (because _gc has
*not* been called in the meantime) i'd want to force _gc.

i might set the _gc probability to 1 to achieve this, but
i dislike the idea...
anyways, apart from read/write to the current session there
seems to be no other routines out of the box for my needs.
thats why i considered setting up a model for the session
table. but when it comes to (de)serialisation i will wonder
how to do it...

jyrgen



--~--~-~--~~~---~--~~
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: Best Practice with Behaviors or How To Make a Model Act As...

2007-04-05 Thread BlenderStyle

Oops. That broken link should be:

http://groups.google.com/group/cake-php/browse_thread/thread/683cdd4820eb2c03/df729d09968eaf7d


--~--~-~--~~~---~--~~
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: Struggling greatly with validation

2007-04-05 Thread Michael Tuzi

Well, I finally figured out my problem. You told me to $this->Model-
>set($this->data), but I missed off the model. What a maroon!!! I just
upgraded my IDE and was stepping through the code. I couldn't figure
out how the model got the data from the controller. Now I do. Anyway,
I asked before about validation without saving, but you were the first
to tell me I needed to call Model->set(). I see that Model->save()
calls set, but Model->validates() doesn't (which is undoubtedly why
you told me to do so). It seems that most of the more experienced here
are using 1.2. I wonder how much my code will have to change with the
newer code? Earlier suggestions I received told me to do if($this-
>Model->create($this->data) && $this->Model->validates()), but in 1.1,
$this->Model->creates() doesn't take any parameters and unsets it's
data array, while $this->Model->validates() requires the data array to
be set. I suppose I'll have to call $this->Model->set($this->data)
between the two calls (or modify create to take and use a parameter).
If anyone could suggest where I might want to leave some comments in
my code for future changes, I would be most appreciative.

Thank you very much again,

2z


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



Best Practice with Behaviors or How To Make a Model Act As...

2007-04-05 Thread BlenderStyle

The concept of behaviors is a new one to me. I understand that views
have helpers, controllers have components, and models have behaviors,
but I still don't grasp how to use these correctly. So, I did some
research:

cake/libs/model/model.php
cake/libs/model/behavior.php
Various Google Group posts (a lot from nate)
Slug Behavior: http://bakery.cakephp.org/articles/view/295
Transaction Behavior: http://bakery.cakephp.org/articles/view/228
Touch Behavior: http://bakery.cakephp.org/articles/view/198
Chapter 15 in Agile Web Development with Rails

The thing that really hit the nail on the head for me, is how a
behavior is used in a model - actAs. That makes it much, much easier
to understand. If I wanted my model to act as a tree (MPTT), I could
create a behavior called TreeBehavior and tell my model to act like a
tree. If I wanted my model to act like a list, I could do that too.
Very cool stuff. Is this the best way to think of behaviors? Anyone
have some thoughts on how to use behaviors in the MVC-intended way?

I'm assuming Cake is going to have some built-in behaviors, but right
now (1.2.0.4451alpha), cake/libs/model/behaviors is empty. Does anyone
know if there are some on the way? I understand that the Cake team is
busy (http://groups.google.com/group/cake-php/browse_thread/thread/
683cdd4820eb2c03/df729d09968eaf7d), so I'm not trying to be pushy, I'm
just curious. An MPTT behavior would be awesome to do things like move/
delete a branch of nodes.


--~--~-~--~~~---~--~~
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: find session entries / force session _gc / (de)serialization

2007-04-05 Thread Chris Hartjes

On 4/5/07, jyrgen <[EMAIL PROTECTED]> wrote:
>
> my auth system is more or less selfmade. i dig the session component
> very much, but need more control in my controllers (!) over the
> content
> of the session table.
>
> 1) i need to find arbitrary session entries in the db,
> or better: retrieve a row with a particular serialized
> value of data.

I'm curious as to what you're trying to accomplish by doing this?

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digital photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

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



find session entries / force session _gc / (de)serialization

2007-04-05 Thread jyrgen

my auth system is more or less selfmade. i dig the session component
very much, but need more control in my controllers (!) over the
content
of the session table.

1) i need to find arbitrary session entries in the db,
or better: retrieve a row with a particular serialized
value of data.

do i need to set up a model in order to get sth. like
this working ?

$t = $this->Session->findAll();
pr($t);exit;

2) how can i force the garbage collection and wipe out expired
sessions ?

is this possible:

SessionComponent::gc()  ??

This more a question helping me to understand how
_write and _read work:

3) how does the actual (de)serialization happen in
class CakeSession ?

thanks, jyrgen


--~--~-~--~~~---~--~~
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: new auth component in cake 1.2

2007-04-05 Thread John David Anderson (_psychic_)


On Apr 5, 2007, at 2:38 PM, Samuel DeVore wrote:

>
> On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>  
> wrote:
>>
>> how can i find manual, trytourial about new auth coponent+acl  in  
>> cake
>> 1.2 ?
>>
>
> I guess you could write it ;)  I am not sure there is anything out  
> there yet.

And there probably won't be until 1.2 is no longer an alpha or  
developer release.

Please realize that 1.2 is a developer release, and has *no* official  
docs. Once everything stabilizes, docs will be released (soon) after.

-- John

--~--~-~--~~~---~--~~
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: new auth component in cake 1.2

2007-04-05 Thread Samuel DeVore

On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> how can i find manual, trytourial about new auth coponent+acl  in cake
> 1.2 ?
>

I guess you could write it ;)  I am not sure there is anything out there yet.

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



new auth component in cake 1.2

2007-04-05 Thread [EMAIL PROTECTED]

how can i find manual, trytourial about new auth coponent+acl  in cake
1.2 ?


--~--~-~--~~~---~--~~
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: Choice of Version

2007-04-05 Thread Joshua Benner

Mariano,

Does Drake work with 1.2, and is Drake a usable platform for writing
internal applications? (our intranet runs on drupal 5.1)

On Apr 5, 10:55 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Yes bakery runs on 1.2
>
> And if you are confortable with an Alpha release, PLEASE OH PLEASE don't
> give us a message on the google group in about three days saying that
> there's little documentation. It's an alpha release ;)
>
> -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 Samuel DeVore
> Enviado el: Jueves, 05 de Abril de 2007 11:48 a.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: Choice of Version
>
> btw the bakery runs 1.2 I believe


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



SwiftMailer Component

2007-04-05 Thread Anthony

Hi, I'm using the SwiftMailer Component for CakePHP found here:
http://bakery.cakephp.org/articles/view/193

However, the newest version of SwiftMailer is 3, while the component
is designed for 2 and no longer works "out of the box". Is there a
version out there for version 3? Or does anybody know where I can find
an old version 2 download of SwiftMailer?

Thanks,

Anthony


--~--~-~--~~~---~--~~
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: /app/webroot access & css.php

2007-04-05 Thread joe

AD,

What do you mean dev-style install?  Yes, the static files are in the
webroot folder, but my question is why it's doing an explicit
redirect?  I can access anything in the webroot folder from "/"
directly, but leaving out the trailing slash changes the URL to
prepend "/app/webroot/"

My debug setting is set to production (0).  Don't know why I'm not
seeing the wrong filename msg you're getting...  Is it maybe cuz of
the apache server settings that the .htaccess behaves differently?

thanks.

On Apr 5, 2:05 am, "AD7six" <[EMAIL PROTECTED]> wrote:
> On 5 abr, 06:58, "joe" <[EMAIL PROTECTED]> wrote:
>
> > Hi, I am running version 1.1.12.4205.
>
> > When I access "/files" (w/o the trailing slash), it redirects to "/app/
> > webroot/files/".   Why is it doing this?
>
> If you are using a development style install, it is assumed that
> everything is in your webroot folder.
>
>
>
> > Also, hitting /app/webroot/css.php spits out an error page... which
> > contains my local directories!!!
> > """
> > Notice: Use of undefined constant LIBS - assumed 'LIBS' in  
> > MY_FULL_DIR_PATH_HERE on line 35
>
> > Fatal error: require() [function.require]: Failed opening required
> > 'LIBSfolder.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')
> > """
>
> with what debug setting? that file should never be accessed directly,
> but if it is (at least in my case) it issues only the text "wrong
> filename".
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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: WithCake.com relaunched

2007-04-05 Thread jonathan.snook

On Mar 24, 4:52 pm, "jonathan.snook" <[EMAIL PROTECTED]> wrote:
> There's still two main features that I need to add:
> 1) RSS feeds for the job listing
> 2) a way for people to contact you through the site

Both of these are now in. At this point, the site is essentially
"feature complete" although if anybody comes up with some cool ideas,
I'm not averse to 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: how to verify cache is working properly

2007-04-05 Thread digital spaghetti

I only found out this method today, but found it to work perfectly.

Put the code you wish to cache in an element, and when you want to
render the element use this:

element('element', array('cache'=>'1 day'));?>

Now the element will be cached for 24 hours from generation. Beware
though, if you update the data it uses you need to make sure you
unlink the cache file on afterSave

In your model file:

function afterSave()
{
   @unlink(CACHE.'view'.'element__elementname');
}

(Please check this though, I'm writing this from memory on my blackberry!!)

Tane

On 4/5/07, bingo <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I don't have much traffic on my website...but for future, I am
> starting to implement cache.
>
> Its seems to be working...but how do I verify that its properly
> working...
>
> For instance, I set cacheAction only for one action in one controller.
> But when I check my tmp/cahce, I only found cache for model and that
> too for all the tables. There was no cache folder for view.. Am I
> missing something.
>
> Is there any way to check what queries where sent by cakephp before it
> rendered the view. I tried setting debug to 3 and it seems it sending
> all
>
> Regards,
> bingo
>
>
> >
>

--~--~-~--~~~---~--~~
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 can I call Element from another Element?

2007-04-05 Thread Sam Sherlock
Well I have been able to place elements from within elements using the

default.ctp
$this->renderElement('header');


in header.ctp
$this->renderElement('nav')


header & nav are elements

using cakephp 1.2

On 05/04/07, jinhr <[EMAIL PROTECTED]> wrote:
>
>
> Anybody have idea how can I make my element
> /views/elements/navigation.ctp
>
> to include other elements:
> /views/elements/searchbox.ctp
> /views/elements/calendar.ctp ?
>
> Thanks ahead.
>
> Henry @ Toronto.
>
>
> >
>

--~--~-~--~~~---~--~~
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: sessions in database

2007-04-05 Thread majna

or
$result = eval("return \$_SESSION;");
pr($result);

On Apr 4, 11:49 am, "jyrgen" <[EMAIL PROTECTED]> wrote:
> here's a solution i found on php.net.
>
> it's definitely not smart, but works ok.
>
> $temp = mysql_query('SELECT * FROM sessions');
> while ($row = mysql_fetch_array($temp)){
> $variables = array(  );
> $a = preg_split( "/(\w+)\|/", $row['data'], -1,
> PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
> for( $i = 0; $i < count( $a ); $i = $i+2 ) {
> $variables[$a[$i]] = unserialize( $a[$i+1] );
> }
> }
>
> pr($variables);
>
> cheers, jyrgen


--~--~-~--~~~---~--~~
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 can I call Element from another Element?

2007-04-05 Thread jinhr

Anybody have idea how can I make my element
/views/elements/navigation.ctp

to include other elements:
/views/elements/searchbox.ctp
/views/elements/calendar.ctp ?

Thanks ahead.

Henry @ Toronto.


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



Discussion on cake-apps-sites-in-the-wild

2007-04-05 Thread savagekabbage

I have created a new interactive site almost emulating a flash
enviroment.  Please let me know what you think, visit: www.letterwars.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
-~--~~~~--~~--~--~---



Re: images -> prev, next

2007-04-05 Thread Copot

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



Re: Struggling greatly with validation

2007-04-05 Thread Michael Tuzi

I'm using CakePHP 1.1 and my call from the controller is:

if($this->Model->create() && $this->Model->validates($this->data))

I have also tried:
if($this->Model->create($this->data) && $this->Model->validates())
if($this->Model->validates())

And when I use this in my model:
function beforeValidate()
{
$this->log("model.php: beforeValidate()");
$this->log($this->data);
return true;
}

I get this in my log every time:
2007-04-05 11:35:50 Error: model.php: beforeValidate()
2007-04-05 11:35:50 Error: Array
(
)

I checked, and $this->data is full prior to the call to both create()
and validates(). I have tried the call to validates() w/o $this->data
and the check didn't work for anything. That doesn't make sense to me
because the api shows that validates() calls invalidFields() which
assigns $this-data to a local $data variable before it calls
beforeValidate(). The create() unsets $this->data, yet I still get a
correct result when I use $this->data as an argument to validates().
If I skip the call to create(), I can invalidate the fields I want,
but I have to do it in the controller prior to the call to
validates(), because I'm not getting a $this->data in
beforeValidates(). I don't see what I'm doing wrong. Thanks for the
response. I'm starting to feel a bit lonely out here.

2z

On Apr 5, 4:44 am, "Dia" <[EMAIL PROTECTED]> wrote:
> in your controller :
> ...
> $this->MyModel->set($this->data);
> if ($this->MyModel->validates()) {
> ...
>
> or, if using CakePHP 1.2.x.x :
> if ($this->MyModel->create($this->data) and $this->MyModel-
>
> >validates())
>
> the array shouldn't be empty any more in beforeValidate function


--~--~-~--~~~---~--~~
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: DreamHost and CakePHP?

2007-04-05 Thread neospirit

Oops. I've found
http://groups.google.com/group/cake-php/browse_thread/thread/306ba0d11463663
e/533102f4a1cc0d09?lnk=gst&q=DreamHost&rnum=1#533102f4a1cc0d09 about
DreamHost and CakePHP.

Still, if anyone like to share what's the "current situation" of CakePHP
based site and DreamHost, please do.


--~--~-~--~~~---~--~~
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: Ajax validate effect

2007-04-05 Thread Christopher E. Franklin, Sr.

If you're using $ajax->observeField, you can add custom javascript to
your loaded option in the array.
ie. $ajax->observeField(,array('loaded' =>
'document.getElementById('div_name').style.background-color =
"yellow"; document.getElementById));

You get the idea.  Write some javascript in a separate file and
include it.  Have the loaded call the function and pass some
paramaters.

You are pretty much going to have to write your own, any way you look
at it.

You *may* be able to do this:  In the thtml file where you are getting
the generated messages to update the divs with, just have it update
the field that is getting observed by, giving the response of the text
field, with the highlighted word using $text->highlight and then when
it is loaded, use javascript to place the cursor at the end of the
text field and give it focus again so the user can keep typing.

This could be a problem if you have someone who types very fast.

On Apr 4, 6:26 pm, "pixelclub" <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I was wondering how to "highlight" the input fields that don't
> validate after submitting a form.
> Updating one div which contains the error messages works and color
> fading it,  but can't seem to figure out how to do it based on the
> validation results.
>
> 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
-~--~~~~--~~--~--~---



Re: Strange app_controller problem

2007-04-05 Thread [EMAIL PROTECTED]

That did the trick :) Thanks alot!

On 5 apr, 17:30, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Could be because I also use a beforeRender() in the each
>
> > of my controllers?
>
> Probably try
>
> parent::beforeRender(); at the end of those functions in your
> beforeRender() in the other controllers
>
> http://us2.php.net/manual/en/keyword.parent.php


--~--~-~--~~~---~--~~
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: Strange app_controller problem

2007-04-05 Thread Samuel DeVore

On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Could be because I also use a beforeRender() in the each
> of my controllers?

Probably try

parent::beforeRender(); at the end of those functions in your
beforeRender() in the other controllers

http://us2.php.net/manual/en/keyword.parent.php

--~--~-~--~~~---~--~~
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 when i include javascript files

2007-04-05 Thread John David Anderson (_psychic_)


On Apr 5, 2007, at 9:17 AM, Dia wrote:

>
> is it possible to do :
>
> // AppController :
> $components = array(a, b, c);
>
> // ThingsController
> $components[] = c;

Have you tried it, and if so, what happened?

;o)

-- John

--~--~-~--~~~---~--~~
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 when i include javascript files

2007-04-05 Thread Dia

sorry, $controller[] = d;


--~--~-~--~~~---~--~~
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 when i include javascript files

2007-04-05 Thread Dia

you mean if I have
var $helpers = array('Html', 'Form', 'Javascript');
in app/app_controller.php

and
var $helper= array('Text');
in xxxsController

only Text helper will be available in xxxsController ?

(sorry for just "reformulation-question" but sometimes have troubles
with English :p)

is it the same for $components ? guess yes...


--~--~-~--~~~---~--~~
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 when i include javascript files

2007-04-05 Thread Dia

is it possible to do :

// AppController :
$components = array(a, b, c);

// ThingsController
$components[] = c;

?


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



Strange app_controller problem

2007-04-05 Thread [EMAIL PROTECTED]

I have some code which needs to be executed on every page (it's a
latest headlines block in the layout), so I decided to put the code to
get the data in app/app_controller.php:

function beforeRender() {
if (isset($this->News)) {
$this->set('Layout_news, $this->News->findAll("online = '1'
AND locatie LIKE 'news.%'", '', 'id DESC', '5'));
}
if (isset($this->Calendar)) {
$this->set('Layout_calendar, $this->Calendar->findAll("date=
CURDATE()", '', timeASC'));
}
if (isset($this->Picture)) {
  $this->set('Layout_Picture, $this->Picture->findAll("online =
'1'", '', 'id DESC', '3'));
}
}

In the layout then the necesarry blocks are made. However the code in
the app_controller.php is not executed ... And I have absolutly no
clue why ... Could be because I also use a beforeRender() in the each
of my controllers? Or not? If anybody has an idea that could help me,
would be much appreciated as I am quite stuck now ;).

I use CakePHP 1.1.13.4450 and a XAMPP for development (Apache 2, PHP 5
and MySQL).


--~--~-~--~~~---~--~~
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: images -> prev, next

2007-04-05 Thread digital spaghetti

You should not need to do e($html->image('prev.gif')

Instead, try it like this:

prev($html->image('prev.gif'), null, null)); ?>
next($html->image('next.gif'), null, null)); ?>


On 4/5/07, Copot <[EMAIL PROTECTED]> wrote:
>
> When I do something like this,
>
> prev(e($html->image('prev.gif')), null, null); ?>
> next(e($html->image('next.gif')), null, null); ?>
>
> no links are genereated. It seems to work only with text.
>
> Can someone give me an explaination or a solution?
>
>
> >
>

--~--~-~--~~~---~--~~
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: Choice of Version

2007-04-05 Thread Samuel DeVore

Also the best way to make this a great release is for people to
actually use it and kick the tire on it, allot! Also if you think you
find bugs report them in https://trac.cakephp.org  with a patch if you
can.  As you do thing with it, if its cool (and you will do stuff that
is cool, we all think we do ;)  write it up, make a blog entry, post
it here, share it...  But be careful this release is a little
addictive you will not want to go back to 1.1 if you start down the
1.2 path ;)

Heck I still have a site that runs .94 or some funky release

On 4/5/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> Yes bakery runs on 1.2
>
> And if you are confortable with an Alpha release, PLEASE OH PLEASE don't
> give us a message on the google group in about three days saying that
> there's little documentation. It's an alpha release ;)
>
> -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 Samuel DeVore
> Enviado el: Jueves, 05 de Abril de 2007 11:48 a.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: Choice of Version
>
> btw the bakery runs 1.2 I believe
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
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: Choice of Version

2007-04-05 Thread Mariano Iglesias

Yes bakery runs on 1.2

And if you are confortable with an Alpha release, PLEASE OH PLEASE don't
give us a message on the google group in about three days saying that
there's little documentation. It's an alpha release ;)

-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 Samuel DeVore
Enviado el: Jueves, 05 de Abril de 2007 11:48 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Choice of Version

btw the bakery runs 1.2 I believe


--~--~-~--~~~---~--~~
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: Choice of Version

2007-04-05 Thread Chris Hartjes

On 4/5/07, Joshua Benner <[EMAIL PROTECTED]> wrote:
>
> Seasoned PHP developer looking to dive into CakePHP for a new project
> on organization's intranet. Is 1.2 stable enough for production use,
> or should I steer clear until it reaches release?
>

Don't fear the beta! ;)

1.2 is probably good enough for production use, but I guess it depends
on what Those You Answer To think about the use of beta or release
candidate software.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digital photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: Choice of Version

2007-04-05 Thread Samuel DeVore

If you don't mind some shifting api's (which seems to of slowed down a
lot)  for an internal project just starting up I would use 1.2 it's
got some cool stuff coming down the pike.

btw the bakery runs 1.2 I believe

Sam D

On 4/5/07, Joshua Benner <[EMAIL PROTECTED]> wrote:
>
> Seasoned PHP developer looking to dive into CakePHP for a new project
> on organization's intranet. Is 1.2 stable enough for production use,
> or should I steer clear until it reaches release?
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
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 when i include javascript files

2007-04-05 Thread Samuel DeVore

Also remember that helpers are not additive, so if you have
'Javascript' in your AppController  and you have other stuff in that
controller for this page Javascript is gone.

On 4/5/07, Dia <[EMAIL PROTECTED]> wrote:
>
> I think you should add
> var $helpers = array('Javascript');
> in the controller corresponding to your view
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

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



Choice of Version

2007-04-05 Thread Joshua Benner

Seasoned PHP developer looking to dive into CakePHP for a new project
on organization's intranet. Is 1.2 stable enough for production use,
or should I steer clear until it reaches release?


--~--~-~--~~~---~--~~
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: DreamHost and CakePHP?

2007-04-05 Thread Samuel DeVore

http://runningshopaz.com

http://wingsbirds.com

both dreamhost.

By the way a simple search of the group would reveal



It's not hosted on google groups for the UI  ;)

On 4/5/07, Erich C. Beyrent <[EMAIL PROTECTED]> wrote:
>
> I've got a few sites on Dreamhost and had no problems.
>
> -Erich-
>
> neospirit wrote:
> > Hi all,
> >
> > Anyone here currently host CakePHP site with DreamHost? Any issues on
> > deploying CakePHP site?
> >
> > I'd really appriciate any info shared here. I plan to use their service.
> >
> > Regards,
> > Uwie
> >
> >
> > >
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

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

2007-04-05 Thread Samuel DeVore

By thanking people for their future help, are you not expecting a
response to this question.  I would think cake probably could, but you
could take a little more effort in wording your question.  How about
an example... a bit of a schema, try putting into your question some
effort equivalent to what you expect in return.

Given your effort asking here is mine answering.  (note: I am a grumpy
old fart :)

"Probably.  Try reading the manual."

On 4/5/07, replikan <[EMAIL PROTECTED]> wrote:
>
> Hi !
>
> By doing my CDM, i have to create at least in my DBMS one triple
> relation.
> Is CakePHP manage this kind of relation and how ?
>
> thanks for your future help
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
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 use a model in views?

2007-04-05 Thread fr3nch13

search this group for 'requestAction' or use the ajax helper.

On Apr 5, 6:37 am, "JuniorCMS" <[EMAIL PROTECTED]> wrote:
> Hi to all,
>
> i need to have a view that use a model or a controller method to load
> some data like news or other.
>
> I'm implementing a simple template system for my cake blog and my be
> one template want to load some data like news and other template want
> to load last read article
>
> What to do?
> 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
-~--~~~~--~~--~--~---



Re: flash don't redirects the user to the specified $url.

2007-04-05 Thread clemos

what's your DEBUG level ?
if it's not 0 (production level), flash() won't redirect
automatically. it will only display a link.

hope it helps.

clément

On 4/5/07, Bruno <[EMAIL PROTECTED]> wrote:
>
> If i code in a controller (generated by bake)
>
> function delete($id)
> {
> if ($this->Livre->del($id))
> {
> $this->flash('The Livre with id: '.$id.' has been 
> deleted.', '/
> livres');
> }
> }
>
> The flash function shows the message but don't redirects the user to
> the specified url '/livres'.
>
> Do you have any idea of my mistake ?
>
> NB : the function $this->render('index') 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
-~--~~~~--~~--~--~---



Re: problem when i include javascript files

2007-04-05 Thread Dia

I think you should add
var $helpers = array('Javascript');
in the controller corresponding to your view


--~--~-~--~~~---~--~~
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: DreamHost and CakePHP?

2007-04-05 Thread Erich C. Beyrent

I've got a few sites on Dreamhost and had no problems.

-Erich-

neospirit wrote:
> Hi all,
> 
> Anyone here currently host CakePHP site with DreamHost? Any issues on
> deploying CakePHP site?
> 
> I'd really appriciate any info shared here. I plan to use their service.
> 
> Regards,
> Uwie
> 
> 
> > 

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



problem with my cdm

2007-04-05 Thread replikan

Hi !

By doing my CDM, i have to create at least in my DBMS one triple
relation.
Is CakePHP manage this kind of relation and how ?

thanks for your future help


--~--~-~--~~~---~--~~
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: Validation: beforeSave and setting fields

2007-04-05 Thread Tony

Nice. That works perfectly.

Thanks,
- Tony


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



flash don't redirects the user to the specified $url.

2007-04-05 Thread Bruno

If i code in a controller (generated by bake)

function delete($id)
{
if ($this->Livre->del($id))
{
$this->flash('The Livre with id: '.$id.' has been 
deleted.', '/
livres');
}
}

The flash function shows the message but don't redirects the user to
the specified url '/livres'.

Do you have any idea of my mistake ?

NB : the function $this->render('index') 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
-~--~~~~--~~--~--~---



Helper tutorial/example

2007-04-05 Thread Luca.PESCATORE
Hello,
 where I can find a good tutorial for Helpers ?

Luca

--~--~-~--~~~---~--~~
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: DreamHost and CakePHP?

2007-04-05 Thread Humble Groups

I have deployed it without any issues. Probably you have to check the
php version compatibility with your components and enable php 4 or 5
accordingly..

On 4/5/07, neospirit <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Anyone here currently host CakePHP site with DreamHost? Any issues on
> deploying CakePHP site?
>
> I'd really appriciate any info shared here. I plan to use their service.
>
> Regards,
> Uwie
>
>
> >
>

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



problem when i include javascript files

2007-04-05 Thread joshi

hello there,

When i try to include a external javascript fle in my 'thtml' file

echo $javascript->link('rico/rico.js');

it resides in webroot/js/

but iam getting the error

Missing controller
You are seeing this error because controller
JsController could not be found.
Notice: If you want to
customize this error message, create app/views/errors/
missing_controller.thtml.
Fatal: Create the class below
in file : app/controllers/js_controller.php



How to use a model in views?

2007-04-05 Thread JuniorCMS

Hi to all,

i need to have a view that use a model or a controller method to load
some data like news or other.

I'm implementing a simple template system for my cake blog and my be
one template want to load some data like news and other template want
to load last read article

What to do?
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
-~--~~~~--~~--~--~---



Re: Components not loading

2007-04-05 Thread bit

> I wondered about that but forgot to directly ask/clarify. If you put
> code in your app controller that relies on something being present, it
> would be a *very good* idea to put what it relies upon in the same
> place ;).

I won't argue with you on that but I was hoping that I wouldn't have
to load components and helpers in controllers that didn't use 'em.
I've moved all of the Component and Helper declarations into
AppController and everything is now working as it should as far as I
can tell. :-)

Many thanks, AD!


--~--~-~--~~~---~--~~
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 restrict cakephp to certain sections of your site?

2007-04-05 Thread Dr. Tarique Sani

On 4/5/07, AD7six <[EMAIL PROTECTED]> wrote:
> Why add the complexity (I'm sure you have a valid reason)?

May be I understood the question wrong but he did not want to put
stuff other stuff in webroot and what I describe achieves what he
wants

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: 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
-~--~~~~--~~--~--~---



Re: Components not loading

2007-04-05 Thread bit

I've don't remember overriding the __construct method and I just
double-checked to confirm that. :-P

Tried printing out the contents of $this->components and all I got was
Session. Next I tried declaring the components array in AppController
and see if that changes anything. It did. No more errors from PHP but
then I find that the Session component is loaded and then the
components in my declared array gets loaded too - the Session
component is added twice.

And the weirdness doesn't stop there, I suddenly get a missing model
error too, even though I've declared the Uses array to use other
models - I created my own Pages controller - but Cake is now looking
for a Pages model (which doesn't exist).

Is it possible that a missing model DB table is causing this? I don't
have direct access to my server and my server sysad is sick and
missing so I can't check that right now.


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



DreamHost and CakePHP?

2007-04-05 Thread neospirit

Hi all,

Anyone here currently host CakePHP site with DreamHost? Any issues on
deploying CakePHP site?

I'd really appriciate any info shared here. I plan to use their service.

Regards,
Uwie


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



images -> prev, next

2007-04-05 Thread Copot

When I do something like this,

prev(e($html->image('prev.gif')), null, null); ?>
next(e($html->image('next.gif')), null, null); ?>

no links are genereated. It seems to work only with text.

Can someone give me an explaination or a solution?


--~--~-~--~~~---~--~~
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: Components not loading

2007-04-05 Thread AD7six



On 5 abr, 11:03, "bit" <[EMAIL PROTECTED]> wrote:
> I've don't remember overriding the __construct method and I just
> double-checked to confirm that. :-P
>
> Tried printing out the contents of $this->components and all I got was
> Session. Next I tried declaring the components array in AppController
> and see if that changes anything.

Hi bit,

I wondered about that but forgot to directly ask/clarify. If you put
code in your app controller that relies on something being present, it
would be a *very good* idea to put what it relies upon in the same
place ;).

> It did. No more errors from PHP but
> then I find that the Session component is loaded and then the
> components in my declared array gets loaded too - the Session
> component is added twice.

You don't need to put "Session" in your own components array (any of
them, anywhere).

> And the weirdness doesn't stop there, I suddenly get a missing model
> error too, even though I've declared the Uses array to use other
> models - I created my own Pages controller - but Cake is now looking
> for a Pages model (which doesn't exist).

put in your pages controller var $users = false; or var $uses = null;
var $uses = array(); or some other negative permutation (I forget
which) that should go away.

>
> Is it possible that a missing model DB table is causing this?

Doubt it,

hth,

AD


--~--~-~--~~~---~--~~
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 restrict cakephp to certain sections of your site?

2007-04-05 Thread AD7six

Hi BlenderStyle,

Unless there is something wrong with your .htaccess files right now
the url http://domain.com/subfolder/file.swf woud give you the same
result as http://domain.com/app/webroot/subfolder/file.swf . The html
helper should be generating you the 1st form (if not check
your .htaccess files)

On 5 abr, 06:57, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 4/5/07, BlenderStyle <[EMAIL PROTECTED]> wrote:
>
> >http://domain.com/(Cake installation)
> >http://domain.com/project1(some non-Cake website)
> >http://domain.com/project2(another Cake website)
>
> I would suggest that for keeping your real document root clean (and
> doing what is possible)
>
> http://domain.com/defaultcake(Cake 
> installation)http://domain.com/project1(some non-Cake 
> website)http://domain.com/project2(another Cake website)
>
> Then use a mod_rewrite rule(s) to make the URL go 
> tohttp://domain.com/defaultcakeIfhttp://domain.com/is accessed

Hi Tarique,

Why add the complexity (I'm sure you have a valid reason)?

If you have
/Root
  /css
  /js
  index.php
  .htaccess (standard webroot file)
  /anotherdir
etc.
  /anotherCakeapp
index.php
.htaccess (standard webroot file)
etc.
  etc.

/blahBlah/something.html would give you the file /blahBlah/
something.html if it existed; the controller 'something' (or
appropriate error) if you had a cake app in a subfolder named /
blahBlah; or the controller blahBlah and action 'something.html' (or
appropriate error) otherwise.

Maybe relevant:
http://www.noswad.me.uk/MiBlog/ProductionSetup

hth,

AD


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



Firefox error with json.js, cakephp and ajax scriptaculo

2007-04-05 Thread [EMAIL PROTECTED]

Hi,
in my application cakephp I have this code (into view):


echo $javascript->link('prototype');
echo $javascript->link('scriptaculous.js');
echo $javascript->link('json.js');
...
...
...

$options = array("url"=>"/bufferpoints","complete" =>
"prove(request)");
echo $ajax->link('Prova ajax',null,$options);
...
...
 

how to verify cache is working properly

2007-04-05 Thread bingo

Hi,
I don't have much traffic on my website...but for future, I am
starting to implement cache.

Its seems to be working...but how do I verify that its properly
working...

For instance, I set cacheAction only for one action in one controller.
But when I check my tmp/cahce, I only found cache for model and that
too for all the tables. There was no cache folder for view.. Am I
missing something.

Is there any way to check what queries where sent by cakephp before it
rendered the view. I tried setting debug to 3 and it seems it sending
all

Regards,
bingo


--~--~-~--~~~---~--~~
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: /app/webroot access & css.php

2007-04-05 Thread AD7six



On 5 abr, 06:58, "joe" <[EMAIL PROTECTED]> wrote:
> Hi, I am running version 1.1.12.4205.
>
> When I access "/files" (w/o the trailing slash), it redirects to "/app/
> webroot/files/".   Why is it doing this?

If you are using a development style install, it is assumed that
everything is in your webroot folder.

>
> Also, hitting /app/webroot/css.php spits out an error page... which
> contains my local directories!!!
> """
> Notice: Use of undefined constant LIBS - assumed 'LIBS' in  
> MY_FULL_DIR_PATH_HERE on line 35
>
> Fatal error: require() [function.require]: Failed opening required
> 'LIBSfolder.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')
> """
with what debug setting? that file should never be accessed directly,
but if it is (at least in my case) it issues only the text "wrong
filename".

hth,

AD


--~--~-~--~~~---~--~~
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: Validation: beforeSave and setting fields

2007-04-05 Thread Dia

I had the same problem : wanted to modify datas in beforeValidates and
see these changes in the form in validation failed

the topic I opened :
http://groups.google.com/group/cake-php/browse_thread/thread/7d9a099a72d079c5/599bacad094e8d3c?lnk=gst&q=lost&rnum=1#599bacad094e8d3c

this is my explaination, others may correct me if I'm wrong :
$this->data in beforeSave modifies $data of the model but in the form
you see $data of the controller

the only way I found to deal with it :
// controller :
if (!$this->MyModel->save($this->data)) {
  $this->data = $this->MyModel->data;
}

it works but I don't think this is a bad way of coding

if someone could tell about a proper way...


--~--~-~--~~~---~--~~
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: Struggling greatly with validation

2007-04-05 Thread Dia

in your controller :
...
$this->MyModel->set($this->data);
if ($this->MyModel->validates()) {
...


or, if using CakePHP 1.2.x.x :
if ($this->MyModel->create($this->data) and $this->MyModel-
>validates())

the array shouldn't be empty any more in beforeValidate function


--~--~-~--~~~---~--~~
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: Dynamic Images

2007-04-05 Thread GreyCells

Create a cache dir in /img (off webroot) then create an ImgController
with a cache() function (or a diferently named controller/function and
set up a Route).

When a file is not found in /img/cache the ImgController->cache
function is called where you can create the image and place it in
your /img/cache directory. If successful, redirect back to the
original image or pipe the image straight back.

This works extremely well for me, so I hope the functionality doesn't
go away :)

HTH

~GreyCells

On Apr 5, 1:11 am, "rtconner" <[EMAIL PROTECTED]> wrote:
> It seems I'm going to have to work with a few dynamic images. I hate
> doing that, but it seems like it'll have to be done.
>
> >From searching, it seems there used to be a tutorial here:
>
> http://wiki.cakephp.org/tutorials:dynamic-image, which is no longer
> there. Can we recover this tutorial? I would like to look at it, even
> if it is old.
>
> Outside of that, I assume I'll have to do something along the lines of
>  and generate the image in the
> image controller. Anyone have any experience in this. Is there a
> better way to go. I'm certainly open to tips on best practices and
> all.
>
> Things I've figured out are to use the next to lines of code in my
> image controller to get rid of cake printing anything to the output.
>
> $this->autoRender = false;
> Configure::write('debug',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
-~--~~~~--~~--~--~---