Re: CSS in CakeEmail

2013-05-15 Thread Joost de Keijzer
Your "site" css is probably not very suited for mail styling. Inline styles 
are what's most supported but difficult to manage.

I use https://github.com/ndejong/CakephpEmogrifierPlugin to "convert" 
header 

Routing based on logged in user

2010-04-14 Thread Joost
So here I am, developing my first web application using Cake. And what
a wonderful experience it has been so far :)

Now I'm wondering: I want my site root to be two different controllers/
actions. One for when no user is logged in and one for when someone
has provided valid login credentials.

I tried it with $this->LoadsysAuth->User('id') but that doesn't work.
I get an Undefined property: Dispatcher::$LoadsysAuth error.

Is there a way to actually do this? Can it be done from the routes.php
file or do i need to alter a controller somewhere? Only important
thing is that the url doesn't contain any parameters.

Thanks,

Joost

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

To unsubscribe, reply using "remove me" as the subject.


Re: Sessions

2007-11-12 Thread joost de keijzer

Hi Beno,

Is CAKE_SECURITY is set to "high" in your 1.1.18 apps core.php?
Setting it to "medium" will then probaply fix your problem.

Also see https://trac.cakephp.org/ticket/3507 .

On Nov 12, 1:47 pm, Beno <[EMAIL PROTECTED]> wrote:
> hi I have this problem i do not know if it is a bug in new version of
> cake. After i upgrated from preveious version cake to version
> 1.1.18.5850 the seesions are sometime droped. A tried the older
> version and everithnik is ok. In change log are same updates about
> seesion. Have sombody the same experience ?


--~--~-~--~~~---~--~~
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 dynamically loading other helpers

2007-07-13 Thread mac joost

Hi,

In my plugin a web-developer can add custom helpers. Therefore I load
the needed helpers dynamically. In the controller, this works fine,
but now I want to dynamically load other helpers in my main helper.
This doesn't work, since the view class loads all helpers before any
helper code is excecuted.

Is there a way for a helper to call a helper loaded in the
controller?
DynHelperName::functionName() does not work in my case because then
any 'startup variables' are not loaded in the Helper Class.

Or, how can I load other helpers in my main helper after the view
class has done it's work (maybe by just copiing parts of view.php)?

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: Chinese symbols when testing installation on Mac OS

2007-07-12 Thread mac joost
Hi,

Weird. Have no idea what could be the problem, but the tutorial you
are doing seems quite old (2005). Have you tried the blogpost tutorial
on the CakePHP site?  ?

On Jul 11, 5:59 pm, screenager <[EMAIL PROTECTED]> wrote:
> Hy,
>
> I tried to install CakePHP on my apache server of Mac OS,
> configured my database connection, and going tohttp://localhost/cake
> just worked fine.
>
> Then I wanted to test an example, described 
> onhttp://www.sputnik.pl/cake-old/docs/tutorial
>
> After that, going to the url "http://localhost/cake/posts/index";,
> I didn't see any form, or valid html statements, but instead some
> chinese symbols.
>
> This is the source code of the output :
>
>  class PostController extends AppController {
>
> }
>
> ?>
> 㱢爠⼾਼戾䙡瑡氠敲牯爼⽢㸺†䍬慳猠❐潳瑳䍯湴牯汬敲✠湯琠景畮搠楮‼戾⽌楢牡特⽗敢卥牶敲⽄潣畭敮瑳⽣慫支捡步⽤楳灡瑣桥爮灨瀼⽢㸠潮楮攠㱢㸱㔷㰯
> 戾㱢爠⼾
>
> Going to each random url in that directory, for 
> examplehttp://localhost/cake/posts/indexfoohttp://localhost/cake/posts/index.phphttp://localhost/cake/posts/index.htmlhttp://localhost/cake/posts/indexfooqsdf.php
> ...
>
> gives the same result.
>
> What's wrong ?

--~--~-~--~~~---~--~~
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: Sanitize & html helper double converting htmlentities

2007-06-26 Thread mac joost

Hi Jonathan,

Thanks for the replies and getting me in a direction.

Setting the "value" key in $html->input() doesn't work. The
htmlentities conversion, using the Cake h() function, is done way
furtheron ($html->input() calls _parseAttributes() in  which calls
__formatAttribute()). What I did find there is the "escape" key!

Setting "escape"=>false in the attribute array of $html->input() does
the trick!

The only problem left is that a "\" will get double-escaped (Sanitize
wil escape it, after which de DBO also escapes it.

On Jun 26, 5:13 pm, "Jonathan Langevin" <[EMAIL PROTECTED]> wrote:
> BTW, to further explain, when tagValue is called, that is when htmlentities
> is executed. FYI :-)
>
> On 6/26/07, Jonathan Langevin <[EMAIL PROTECTED]> wrote:
>
>
>
> > ~line 406 of html.php (html helper, cake 1.1)
>
> > if (!isset($htmlAttributes['value'])) {
> > $htmlAttributes['value'] = $this->tagValue($fieldName);
> > }
>
> > looks like if you do the following, you'll avoid the htmlentities:
> > echo $html->input($modelName."/".
>
> > > $key, array("class"=>"text","value"=>"HTML HERE"), true);
>
> > On 6/26/07, mac joost <[EMAIL PROTECTED]> wrote:
>
> > > Thanks for the reply.
>
> > > I'm mainly using Cake 1.1. I need to change my templates to use Cake
> > > 1.2 and will maybe do this later this week.
>
> > > As for the code, it's quite straight forward:
> > > I have a classifieds_controller which adds a classified add to the
> > > database:
> > > /* part of function save() */
> > > if(isset($this->params['data'])) {
> > > if($this->Classified->validates($this->params['data'])) {
> > > uses('sanitize');
> > > $Sanitize = & new Sanitize();
> > > $Sanitize->cleanArray($this->data['Classified']);
> > > $this->Classified->save($this->data);
> > > }
> > > }
>
> > > For my form (I use my manager plugin) the code is just:
> > > echo $html->input($modelName."/".$key, array("class"=>"text"), true);


--~--~-~--~~~---~--~~
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: Sanitize & html helper double converting htmlentities

2007-06-26 Thread mac joost

Thanks for the reply.

I'm mainly using Cake 1.1. I need to change my templates to use Cake
1.2 and will maybe do this later this week.

As for the code, it's quite straight forward:
I have a classifieds_controller which adds a classified add to the
database:
/* part of function save() */
if(isset($this->params['data'])) {
if($this->Classified->validates($this->params['data'])) {
uses('sanitize');
$Sanitize = & new Sanitize();
$Sanitize->cleanArray($this->data['Classified']);
$this->Classified->save($this->data);
}
}

For my form (I use my manager plugin) the code is just:
echo $html->input($modelName."/".$key, array("class"=>"text"), true);


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



Sanitize & html helper double converting htmlentities

2007-06-26 Thread mac joost

Hi,

When I use Sanitize to clean user-input and then create a form using
the html helper, 'special characters' like '&' get double converted:
- Sanitize converts '&' into '&', which is then stored in the
database.
- html helper functions convert '&' into '&amp;'.

I would like to use both these functionalities of CakePHP, but this
doesn't work for me. Any suggestions?

Thanks!

-- joost


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



move private subversion repository to CakeForge

2007-05-29 Thread mac joost

Hi,

I created a project on CakeForge for a product I developed in my own
subversion repository. Now I would like to move my own repository into
CakeForge keeping all revisions (using svnadmin dump > DUMPFILE and
svnadmin load < DUMPFILE).

svnadmin load does not work on remote repositories and I can't seem to
login to CakeForge using ssh.

Is there a solution to this?

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



ANN: CMS plugin for CakePHP "manager"

2007-05-02 Thread mac joost

Hi,

I would like to share with you the first public release of my Manager
plug-in for CakePHP!
It is a generic content editor for your Cake app. When installed, it
reads your app's models and allows you to create, edit or delete
items.

It should work on any Cake app, but I have not been able to test this
extensively. In fact: I've only made 1 Cake site where this plug-in is
used as a backend...
I hope people will share their experiences with me so I can improve on
the Manager.

Please feel free to try it and give comment or suggestions. You can
download the plugin at:
http://www.dekeijzer.org/downloads/manager.html

Joost


--~--~-~--~~~---~--~~
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: Conditional belongsTo based on field values

2007-03-28 Thread mac joost

Hi,

> var belongsTo can support conditions have you tried using them?

Conditions would not work in my case since the model to bind to would
be conditional, not the query itselve.

> if you want them to be dynamic try combination bind and unbind models

I will look into this. I'm planning to do this in the afterFind in the
model...

Thanks for the reply's!


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



Conditional belongsTo based on field values

2007-03-28 Thread mac joost

Hi,

I'm building a site for an art magazine. Among other things, they have
articles and advertisements.

On the homepage they want to publish one list with articles and
advertisements. Which articles or advertisements and the order of them
all are hand-picked.

To do this I've made a Home model with the following fields:
- id (auto_increment)
- linked_model (name of model: Article or Advertisement)
- linked_id (id of item in the linked_mode)
- publication_date (to set order of list)

For the homepage I find all Home items and collect all relevant info
based on the linked_ fields. I do this manually now, but it would be
really easy if there is a way to create a sort of conditional
belongsTo, based on the values of the linked_model field.

Is this in any way possible?
Is there a better way to solve this problem?

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: Spam-protected, accessible forms?

2007-03-26 Thread mac joost

Hi,

I would absolutely recommend the Akismet service (http://akismet.com/)

Felix has written a Model for it which is really easy to implement in
your controller. No other view or model changes needed.

See:

http://cakeforge.org/snippet/detail.php?type=package&id=18


--~--~-~--~~~---~--~~
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 editor() and wysiwyg editor

2007-03-16 Thread mac joost

Not exactly an answer, but http://bakery.cakephp.org/articles/view/60
has an instruction on using TinyMCE in Cake.

On Mar 16, 5:07 pm, "Cavallo" <[EMAIL PROTECTED]> wrote:
> Hi
>
> Is possible to use in $ajax->editor() a wysiwyg (tinymce, FCK,...) ?
> And if it is then how ? It would be realy nice if this would be
> possible.
>
> Thanks
>
> Regards


--~--~-~--~~~---~--~~
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: routing to a plugin

2006-10-10 Thread mac joost

Hi,

Don't know if this helps or is what you mean, but on the bottom of:
http://manual.cakephp.org/chapter/plugins

it says:
"You can have a default controller with the name of your plugin. If you
do that, you can access it via /[plugin]/action. For example, a plugin
named 'users' with a controller named UsersController can be accessed
at /users/add if there is no plugin called AddController in your
[plugin]/controllers folder."

In your case: when you have a plugin "test" with a default
TestController you can access it with "/test" without extra routing.

-- macjoost


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



plugin cookie path changes from 1.1.6 to 1.1.7

2006-09-04 Thread mac joost

Hi,

Just spent a whole morning on this.

I'm developing a CakePHP plugin that needs sessions. Ran into a lot of
troubles when I changed from CakePHP 1.1.6 to 1.1.7

It turned out that the Cookie path in 1.1.6 is set to "/", while in
1.1.7 it is set to "//".

Also, the path is case sensitive (on my Mac OS X server at least) and
_lowercase_. This means that if you try to acces
"http://localhost/Plugin/"; you don't get the session data because the
cookie path is "/plugin/"

Not quite sure if this is intended functionality.

Hope this helps...


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