Re: basic website with cake.

2006-09-04 Thread [EMAIL PROTECTED]

MrTufty.
I don't want a pre-buildt CMS! That is why I have chosen cake. So far I
have done some small projects just to get familiar with cake. (Recipes
page etc.) Believe me I have already been studying the manual, wiki
etc. - If you could answer some of my questions in my first post I
would really appreciate it.

Best regards. 
Asbjørn Morell.


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



Re: NiftyCube and Cakephp: Not working

2006-09-04 Thread Bert Van den Brande

Hmm ke :)

On 9/5/06, NickCarlson <[EMAIL PROTECTED]> wrote:
>
> Yeah. That's not the real domain of my server.
>
>
> >
>

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



Re: NiftyCube and Cakephp: Not working

2006-09-04 Thread NickCarlson

Yeah. That's not the real domain of my server.


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



Re: NiftyCube and Cakephp: Not working

2006-09-04 Thread Bert Van den Brande

When I click on your js file link , it fails to open it ?

On 9/5/06, NickCarlson <[EMAIL PROTECTED]> wrote:
>
> I'll explain a bit more:
>
> The following source code works perfectly if placed within a static
> html file on my hard drive. We'll call this file c:/test/test.html.
> Note: This file isn't running under cakephp, it's simply just an html
> file.
> 
>  "http://www.w3.org/TR/html4/strict.dtd";>
> 
> 
> Nifty Corners: Javascript and CSS rounded corners
> 
> 
> 
> body{padding: 30px 0 0;background:#FFF;
> font: 100.01%/1.3 Verdana,Arial,sans-serif;text-align:center}
> div#box{width: 18em;padding: 20px;margin:0 auto;
> background:#E6E6E6;color:#000}
> h1{font: lighter 200% "Trebuchet MS",Arial sans-serif;color: #208BE1}
> h1,p{margin:0;padding:10px 20px}
> 
>  src="http://www.nicks-remote-server.com/niftycube.js";>
> 
> window.onload=function(){
> Nifty("div#box","big");
> }
> 
> 
> 
> 
> Nifty Corners Cube™
>
> One call. Two parameters. Three sizes.
> 
> 
> 
> ***
>
> This is almost exactly the same as example 1 from the niftyCube
> website. (http://www.html.it/articoli/niftycube/index.html)
>
> Now, I have a current cakephp default app up and running. I create my
> default.thtml file under /app/views/layouts/, and put the above code
> into the file. When I browse to the app directory, the html is
> rendered, however, niftyCube is not functioning (ie, the div's corners
> are not rounded).
>
> After looking at the rendered source code, I see that it is exactly the
> same code present on the local html file c:/test/test.html. Why would
> the local file work perfectly in tandom with niftyCube, while the
> cakephp default.thtml template not work with niftycube? As you can see
> above, the javascript file is on a remote server (which I control). I
> did this for test purposes.
>
> I'm really stumped here. The only thing I can think of is that the
> internals of Cake are parsing the thtml file, but not allowing the
> Javascript to work correctly.
>
> Any input would be greatly appreciated.
>
> Nick
>
>
> >
>

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



Re: NiftyCube and Cakephp: Not working

2006-09-04 Thread NickCarlson

Ok. I got it working. Hopefully my troubles will help the next person
who comes across this.

1. Make sure to use cake's java script helper to point to the js file,
as well as adding the js functions. I used $javascript->linkOut and
$javascript->codeBlock, respectively.

2. Make sure too manually add niftyCorners.css to whatever template
you'll be using niftyCube in. You can use the html helper for this if
you like. Normally, the niftycube.js file would add this css file
dynamically. However, for some reason, the javascript fails to add the
css file. Thus, the corners don't appear rounded.

Well, that only took about 2 hours to fix. :/


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



Re: NiftyCube and Cakephp: Not working

2006-09-04 Thread NickCarlson

I'll explain a bit more:

The following source code works perfectly if placed within a static
html file on my hard drive. We'll call this file c:/test/test.html.
Note: This file isn't running under cakephp, it's simply just an html
file.

http://www.w3.org/TR/html4/strict.dtd";>


Nifty Corners: Javascript and CSS rounded corners



body{padding: 30px 0 0;background:#FFF;
font: 100.01%/1.3 Verdana,Arial,sans-serif;text-align:center}
div#box{width: 18em;padding: 20px;margin:0 auto;
background:#E6E6E6;color:#000}
h1{font: lighter 200% "Trebuchet MS",Arial sans-serif;color: #208BE1}
h1,p{margin:0;padding:10px 20px}

http://www.nicks-remote-server.com/niftycube.js";>

window.onload=function(){
Nifty("div#box","big");
}




Nifty Corners Cube™

One call. Two parameters. Three sizes.



***

This is almost exactly the same as example 1 from the niftyCube
website. (http://www.html.it/articoli/niftycube/index.html)

Now, I have a current cakephp default app up and running. I create my
default.thtml file under /app/views/layouts/, and put the above code
into the file. When I browse to the app directory, the html is
rendered, however, niftyCube is not functioning (ie, the div's corners
are not rounded).

After looking at the rendered source code, I see that it is exactly the
same code present on the local html file c:/test/test.html. Why would
the local file work perfectly in tandom with niftyCube, while the
cakephp default.thtml template not work with niftycube? As you can see
above, the javascript file is on a remote server (which I control). I
did this for test purposes.

I'm really stumped here. The only thing I can think of is that the
internals of Cake are parsing the thtml file, but not allowing the
Javascript to work correctly.

Any input would be greatly appreciated.

Nick


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



NiftyCube and Cakephp: Not working

2006-09-04 Thread NickCarlson

Has anyone been able to get NiftyCube and Cakephp to work correctly? I
spent ages coding an html/css template with niftycube. Now, I'm trying
to import it into my cakephp app, and I've lost all the functionality
from niftycube.

I've tried every combination I can think of to include the proper css
and js files into my app, and still no go.

Anyone have any pointers?

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



Re: IMPORTANT CakePHP Security Fix

2006-09-04 Thread calzone

I have a unique situtation where I am using javascript to write cookies
and I am evaluating these cookies to make determinations about the
session and whether to output the javascript or not.

I'm loathe to split this logical block of code just so I can put my
session management in the controller instead of having a single call in
the view.

I guess I'll just have to use $_SESSION[]


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



Re: IMPORTANT CakePHP Security Fix

2006-09-04 Thread Larry E. Masters aka PhpNut
You should not be writting session data from a view anyway, it is not broken.There is no $session->write();-- /*** @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  -~--~~~~--~~--~--~---


Re: IMPORTANT CakePHP Security Fix

2006-09-04 Thread calzone

It appears that $session->write() is broken.

Please, before applying dramatic changes, documentation about how to
transition would be really helpful.  I can't seem to find a single
reference to the new session helper anywhere other than here.


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



Ajax Autocomplete - No Errors, No Worky

2006-09-04 Thread Garth Braithwaite

My Autocomplete is failing, but I can not see what the problem is.

_Aan Controller_

class AansController extends AppController {
var $name = 'Aans';
var $uses = array('Aan','Student');
var $scaffold;
var $helpers = array('Html', 'Javascript', 'Ajax');
function add(){
$this->layout = 'forms';
$this->set('students',$this->Student->findAll());
$this->pageTitle = 'DIFR | Approved Absence Notification | 
Cashman
Middle School';
if (!empty($this->data)) {
if ($this->Aan->save($this->data['Aans'])) {

$this->redirect('aans/review/'.$this->Aan->getLastInsertId());
}
}
}
}

_Student Controller_
class StudentsController extends AppController {
var $name = 'Students';
var $helpers = array('Html', 'Javascript', 'Ajax');
var $scaffold;
function autocomplete(){
$this->set('students',$this->Student->findAll("last_name LIKE
'{$this->data['Student']['last_name']}'"));
$this->layout = "ajax";
}
}

_Add View_

div.auto_complete {
position :absolute;
width :250px;
background-color :white;
border :1px solid #888;
margin :0px;
padding :0px;
}
li.selected {
background-color: #ffb;
}

formTag(); ?>
Autocomplete Last Name:autoComplete('Student/last_name',
'/students/autocomplete')?>


I have uploaded the Scriptaculous and prototype library to webroot/js/
and my ajax layout looks like
link('prototype') ?>
link('scriptaculous') ?>

I don't know what I am missing, but it is not working.  Any help would
be great.

Thanks,
Garth


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



Re: basic website with cake.

2006-09-04 Thread MrTufty

For what you want, I'd probably recommend a pre-built CMS, because
otherwise it's going to kill you. There's so much design stuff before
you can even get into the programming, believe me - I know.

If you do want to go ahead - read up on the things other CMSes have.
Decide what you need and what you don't need, and junk the rest. Then
spend a few days at least planning out how you're going to do it (this
part, if done properly, will save you a fair bit of time later - but
don't worry too much, Cake works well for agile development so you
don't need to design it all in advance, just plan the basics).

Any static text blocks that won't change much can probably use the
PagesController that already exists, you can just stick your html into
the /views/pages/ directory if you want that. But if you want complete
editing functions it'll be harder.

Give it some more thought anyway, if you still think it's worth the
effort then maybe some of us can point you in the right direction.


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



Re: Quote escaping patch for $javascript->object()

2006-09-04 Thread nate

This issue has already been patched.  In the future, please direct all
bug reports and patches to https://trac.cakephp.org/

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



Blogs written in Cake

2006-09-04 Thread Hershel Robinson

I am looking for a recommendation for blog software written in Cake 
which I can integrate into a Cake site. I am writing the Cake site with 
the plans of using Cake 1.2 with it when it comes out.

Thanks,
Hershel

-- 
Web Site Construction by Gallery Robinson
http://galleryrobinson.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
-~--~~~~--~~--~--~---



Re: How can I add admin directory under cakephp framework?

2006-09-04 Thread John Zimmerman
http://jzimm.freeshell.org/files/admin_routing.archiveYou can dowload it using the above link.  It will download a file called 'admin_routing.archive' which you will have to rename to 'admin_routing.mov' to play in QuickTime.
I tried to gzip it but firefox still tried to play it with the quicktime plugin.I will leave the file up for a couple of days unless my bandwidth quota gets consumed.
On 9/4/06, John Zimmerman <[EMAIL PROTECTED]> wrote:
Link to zip file to follow in about 10 mins.Will leave it up for a day or two, unless PhpNut wants me to take it down.
On 9/4/06, davide <
[EMAIL PROTECTED]> wrote:Larry E. Masters aka PhpNut wrote:> 

http://cakephp.org/screencasts/view/5Is there a way to have the screen cast in a downloadable version? Forexample in a zipped format. The content filtering of the company I workfor, block every type of video/audio and I can't see the casts.
Thanks and byeDavide--By the power of Greyskull...



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


Re: How can I add admin directory under cakephp framework?

2006-09-04 Thread John Zimmerman
Link to zip file to follow in about 10 mins.Will leave it up for a day or two, unless PhpNut wants me to take it down.On 9/4/06, davide <
[EMAIL PROTECTED]> wrote:Larry E. Masters aka PhpNut wrote:> 
http://cakephp.org/screencasts/view/5Is there a way to have the screen cast in a downloadable version? Forexample in a zipped format. The content filtering of the company I workfor, block every type of video/audio and I can't see the casts.
Thanks and byeDavide--By the power of Greyskull...

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


basic website with cake.

2006-09-04 Thread [EMAIL PROTECTED]

I would like to create a cake cms for my website:
http://www.inmedia.dk/
Text and images should be stored in the database. Does anyone have a
clue about how I should approach this? I am thinking about creating a
login form - if a user has validated I will display a modify/delete
bottom below each element (text/image) - this logic will be placed in
each view!! (are this ok?) There will only be one admin user. So far I
have created the following controllers:

ccases  (customer cases),
ccases_pictures (ccase_id, file_id)
text (all text, e.g. about us, contact, description etc),
files,

How do I put all this together? Should I create a page controller with
one action for each tab? (forside, om-os, det-kan-vi, cases, kontakt)
(translated: home, about-us, skills, cases, contact)

Best regards.
Asbjørn Morell.


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



Re: The MySQL UTF8 Issue

2006-09-04 Thread nate

https://trac.cakephp.org/browser/branches/1.2.x.x

The future is 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
-~--~~~~--~~--~--~---



Re: MySQL Error Messages

2006-09-04 Thread John Zimmerman
Here is what I ended up doing that seems to work for the limited testing I have given it.  Thanks to "lamby" for the lastError tip as well on IRC.
$this->Session->setFlash('Please correct errors below.', 'flash_error');
//check for mysql errors like unique failures$connection =& ConnectionManager::getInstance();
$source =& $connection->getDataSource($this->MyModel->useDbConfig);
$db_error   =  $source->lastError();
if ( strstr($db_error, 'Duplicate') ) {
    $this->MyModel->invalidate('myfieldname');
}I am only enforcing unique on one field in my table.  This would break if possibly another database throws an error that does not contain 'Duplicate' in the error message for a unique failure.  It might also fail if more than one field in the table is has the unique attribute (if that is even reasonable to do).
ThanksOn 9/4/06, AD7six <[EMAIL PROTECTED]> wrote:
Try this:http://groups.google.com/group/cake-php/search?group=cake-php&q=nate+db+errorI often find that sticking "nate" on the end of searches narrows down
results to a manageable number (with relavent results) ;)Cheers,AD7six

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


Re: The MySQL UTF8 Issue

2006-09-04 Thread Andreas Waidelich

sounds good. looking forward to Cake 1.2.

2006/9/4, nate <[EMAIL PROTECTED]>:
>
> Cake 1.2 now supports this natively.  Just add 'encoding' => 'UTF-8' to
> your database configuration and the querying is taken care of
> automatically at the database level.
>
>
> >
>


-- 

e> [EMAIL PROTECTED]
w> http://andreas-waidelich.de
m> +49.177.423 09 48

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



Re: The MySQL UTF8 Issue

2006-09-04 Thread nate

Cake 1.2 now supports this natively.  Just add 'encoding' => 'UTF-8' to
your database configuration and the querying is taken care of
automatically at the database level.


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



Re: protecting methods in Othauth

2006-09-04 Thread mathaios

Thank you for your reply, I made a typing error in the post. In my
files the line is written correctly.

Even writing one restriction, es. $othAuthRestrictions =
array("show/8"); makes all the "show" parameters protected, not only
the "8", I do not understand what I'm missing here, sigh...


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



Re: MySQL Error Messages

2006-09-04 Thread AD7six

Try this:

http://groups.google.com/group/cake-php/search?group=cake-php&q=nate+db+error

I often find that sticking "nate" on the end of searches narrows down
results to a manageable number (with relavent results) ;)

Cheers,

AD7six


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



Re: How can I add admin directory under cakephp framework?

2006-09-04 Thread davide
Larry E. Masters aka PhpNut wrote:
> http://cakephp.org/screencasts/view/5

Is there a way to have the screen cast in a downloadable version? For
example in a zipped format. The content filtering of the company I work
for, block every type of video/audio and I can't see the casts.

Thanks and bye
Davide

-- 
By the power of Greyskull...



signature.asc
Description: OpenPGP digital signature


Re: The MySQL UTF8 Issue

2006-09-04 Thread Andreas Waidelich

to reduce the number of SET NAMES queries add a static boolean
variable to your AppModel an set it to false. Check the value of the
variable in your constructor and execute SET NAMES only, if it has not
been done before. E.g.

class AppModel extends Model{
static $utf8IsSet = false;

function __construct(){
if(!self::$utf8IsSet) {
$this->execute("SET NAMES 'utf8'");
self::$utf8IsSet = true;
}
parent::__construct();
}
}


-- 

e> [EMAIL PROTECTED]
w> http://andreas-waidelich.de

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