Re: How do I see a SQL statement?

2010-01-18 Thread Wayne Fay
> I am getting the SQL error below but its not showing me the actual SQL
> statement that Cake is generating. Is there any way of seeing what it is?

Turn on debug mode.
http://cake-php.blogspot.com/2006/09/21-things-you-must-know-about-cakephp.html

Wayne
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


Cakephp equivalent of mysql_fetch_row

2009-06-14 Thread Wayne

Hi,
 i need a function that returns the number of rows from a table. How
do i do that in cakephp?

Regards,
wayne
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Using distinct and sum in query

2009-06-11 Thread Wayne

Hi, this query here doesn't work

http://bin.cakephp.org/saved/47129

So i tried using sql query browser to check whether my query statement
is correct.

select distinct month(created) as created,
sum(cost) as total_cost
from finances
group by created;

And the result is the same, here's the array

http://bin.cakephp.org/view/614424760

The months are not unique and the costs are not summed up. Please
help, my big thanks to those who would spend time reading this.

Regards,
wayne

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



Re: Open Flash Chart Helper issues

2009-06-10 Thread Wayne

These are the codes

http://bin.cakephp.org/saved/47129  (controller)

http://bin.cakephp.org/view/1136206468  (view)

http://bin.cakephp.org/view/614424760 (array dump)

There was no error message, the graph just doesn't show up. You can
say that the chart was not rendered at all.

Regards,
Wayne
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Open Flash Chart Helper issues

2009-06-10 Thread Wayne

Hi,

I'm using this open flash chart helper to generate graph based on the
values in the database

http://bakery.cakephp.org/articles/view/flashcharthelper-version-3

But i can't get the chart to show up with my current codes. But it did
showed up when i do "$flashChart->setData(array(1,2,4,8));" So it's
not a problem of missing or misplaced helper files. The problem is the
code. I want to display the graph with x-axis as months(distinct) and
y-axis as the the total cost for each month.

My codes,

controller:

$this->set('datamonths',$this->Finance->find('all', array('fields' =>
array('DISTINCT MONTH(Finance.created) AS created','SUM(Finance.cost)
AS cost'),'order' =>'created','group'=>'created')));

view:

echo $flashChart->begin();

$flashChart->setData($datamonths, '{n}.cost','{n}.created');

$flashChart->setLegend('x','Month');
$flashChart->setLegend('y','Expenditure', '{color:#AA0aFF;font-size:
20px;}');

$flashChart->axis('x',array('tick_height' => 5,'3d' => -20),array
('vertical' => true));

$flashChart->axis('y',array('range' => array(0,1,1000)));

echo $flashChart->chart();
echo $flashChart->render();

Please help!

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



Re: Form Validation Question

2009-05-25 Thread Wayne

Anyone? Please help...

On May 22, 7:30 pm, Wayne  wrote:
> Greetings,
>
> I am new to CakePHP and am having trouble displaying the form
> validation errors from my registration form. After extensive research
> online, I feel I am missing something obvious. Maybe I am incorrectly
> assuming that Cake will display the error next to the appropriate form
> field.
>
> Here is my model:
>
> 
> class User extends AppModel {
>   var $name = 'User';
>   var $validate = array(
>     'username' => array(
>        'alphaNumeric' => array(
>           'rule' => 'alphaNumeric',
>           'required' => true,
>           'message' => 'Alphabets and numbers only'
>         ),
>         'between' => array(
>            'rule' => array('between', 5, 15),
>            'message' => 'Between 5 to 15 characters'
>         ),
>         'isUnique' => array(
>            'rule' => 'isUnique',
>            'message' => 'This username has already been taken.'
>            )
>         ),
>         'password' => array(
>            'rule' => array('minLength', '8'),
>            'message' => 'Mimimum 8 characters long'
>         ),
>         'email' => array(
>             'isUnique' => array(
>             'rule' => 'isUnique',
>             'message' => 'This username has already been taken.'
>              ),
>             'email' => array(
>             'rule' => array('email', true),
>             'message' => 'Please supply a valid email address.'
>              )
>          )
>    );
>
>   function validateLogin($data) {
>     $user = $this->find(array('username' => $data['username'],
> 'password' => md\
> 5($data['password'])), array('id', 'username'));
>     if(empty($user) == false)
>       return $user['User'];
>   return false;
>   }
>
> }
>
> ?>
>
> Here is my controller:
>
>  class UsersController extends AppController
> {
>   var $name = "Users";
>   var $helpers = array('Html', 'Form');
>   var $components = array('Auth');
>
>   function index()
>   {
>
>   }
>
>   function beforeFilter() {
>     $this->Auth->allow('register');
>     // $this->__validateLoginStatus();
>   }
>
>   function login() {
>     $this->layout='main';
>     $this->pageTitle='ShotSpin - Shop for products, Write Reviews, and
> Earn Commissions - Login';
>
>     if(empty($this->data) == false)
>       {
>         if(($user = $this->User->validateLogin($this->data['User'])) == true)
>           {
>             $this->Session->write('User', $user);
>             $this->Session->setFlash('You\'ve successfully logged in.');
>             $this->redirect('index');
>             exit();
>           }
>         else
>           {
>             $this->Session->setFlash('Sorry, the information you\'ve entered
> is incorrect.');
>             $this->redirect('login');
>             exit();
>           }
>       }
>   }
>
>   function logout() {
>     $this->Session->destroy('user');
>     $this->Session->setFlash('You\'ve successfully logged out.');
>     $this->redirect('login');
>   }
>
>   // register new users
>   function register() {
>     $this->layout='main';
>     $this->pageTitle='ShotSpin - Shop for products, Write Reviews, and
> Earn Commissions - Register';
>
>     // set the view of errors to false
>     $this->set('error', false);
>
>     // check if we have data
>     if (!empty($this->data)) {
>
>       // pass the data to the model so we can manually validate it
>       $this->User->set($this->data);
>
>       if ($this->User->validates()) {
>
>         // check if the passwords match
>         if ($this->data['User']['password'] == $this->Auth->password($this-
>
> >data['User']['password_confirm'])) {
>
>           // create the user
>           $this->User->create();
>           $this->User->save($this->

Form Validation Question

2009-05-22 Thread Wayne

Greetings,

I am new to CakePHP and am having trouble displaying the form
validation errors from my registration form. After extensive research
online, I feel I am missing something obvious. Maybe I am incorrectly
assuming that Cake will display the error next to the appropriate form
field.

Here is my model:

 array(
   'alphaNumeric' => array(
  'rule' => 'alphaNumeric',
  'required' => true,
  'message' => 'Alphabets and numbers only'
),
'between' => array(
   'rule' => array('between', 5, 15),
   'message' => 'Between 5 to 15 characters'
),
'isUnique' => array(
   'rule' => 'isUnique',
   'message' => 'This username has already been taken.'
   )
),
'password' => array(
   'rule' => array('minLength', '8'),
   'message' => 'Mimimum 8 characters long'
),
'email' => array(
'isUnique' => array(
'rule' => 'isUnique',
'message' => 'This username has already been taken.'
 ),
'email' => array(
'rule' => array('email', true),
'message' => 'Please supply a valid email address.'
 )
 )
   );




  function validateLogin($data) {
$user = $this->find(array('username' => $data['username'],
'password' => md\
5($data['password'])), array('id', 'username'));
if(empty($user) == false)
  return $user['User'];
  return false;
  }

}
?>

Here is my controller:

Auth->allow('register');
// $this->__validateLoginStatus();
  }

  function login() {
$this->layout='main';
$this->pageTitle='ShotSpin - Shop for products, Write Reviews, and
Earn Commissions - Login';

if(empty($this->data) == false)
  {
if(($user = $this->User->validateLogin($this->data['User'])) == true)
  {
$this->Session->write('User', $user);
$this->Session->setFlash('You\'ve successfully logged in.');
$this->redirect('index');
exit();
  }
else
  {
$this->Session->setFlash('Sorry, the information you\'ve entered
is incorrect.');
$this->redirect('login');
exit();
  }
  }
  }

  function logout() {
$this->Session->destroy('user');
$this->Session->setFlash('You\'ve successfully logged out.');
$this->redirect('login');
  }

  // register new users
  function register() {
$this->layout='main';
$this->pageTitle='ShotSpin - Shop for products, Write Reviews, and
Earn Commissions - Register';

// set the view of errors to false
$this->set('error', false);

// check if we have data
if (!empty($this->data)) {

  // pass the data to the model so we can manually validate it
  $this->User->set($this->data);

  if ($this->User->validates()) {

// check if the passwords match
if ($this->data['User']['password'] == $this->Auth->password($this-
>data['User']['password_confirm'])) {

  // create the user
  $this->User->create();
  $this->User->save($this->data);
  $this->redirect(array('action' => 'index'));
  exit;
}

  } else {
// we had a validation error so display that
$this->set('error', true);

// redirect them back to the registration page
$this->redirect('register');
exit;

  }
}
  }

  function __validateLoginStatus()
  {
if($this->action != 'login' && $this->action != 'logout')
  {
if($this->Session->check('User') == false)
  {
$this->redirect('login');
$this->Session->setFlash('You must be log in to view this
page.');
  }
  }
  }

}

?>

And here is my view for the registration page:


Register








There are some problems with your registration.
create('User', array('action' => 'register'));
echo $form->input('firstname', array('label' => 'First Name'));
echo $form->input('lastname', array('label' => 'Last Name'));
echo $form->input('email');
echo $form->input('username');
echo $form->input('password');
echo $form->input('password_confirm', array('type' => 'password',
'label' => 'Confirm Password'));
echo $form->submit();
echo $form->end();
?>



Any insight you can offer would be much appreciated.

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



A Form that is becoming CHALLENGING

2009-02-05 Thread Wayne

Hello All,

I am trying to build a form where:
A registered "User"
Selects from a checkbox list their "Interests"
and also
Selects from a radio list thier "Experience Level" associated with
each "Interest".

An example of the way the form will look follows:

User Information:

User Id  100
Firstname  Joe
Lastname: Jones
  email:  joe_jo...@gmail.com

Interests:  Skill Level:
[ ] MySql  O Beginner O Intermediate
OAdvanced O GURU
[ ] PHP O Beginner O Intermediate
OAdvanced O GURU
[ ] CakePHP O Beginner O Intermediate
OAdvanced O GURU

I have successfully created the tables, models, views and controllers
to accomplish the following.

User Id  100
Firstname  Joe
Lastname: Jones
  email:  joe_jo...@gmail.com

Interests:
[X ] MySql
[X] PHP
[ ] CakePHP

I have been unsuccessfull in building the form to display the skill
level per each Interest and therefore record and users skill level per
selected "Interests"


User Id  100
Firstname  Joe
Lastname: Jones
  email:  joe_jo...@gmail.com

Interests:  Skill Level:
[X ] MySql O Beginner O Intermediate O
Advanced O GURU
[X] PHP O Beginner O Intermediate
O Advanced O GURU
[ ] CakePHP  O Beginner O Intermediate O
Advanced O GURU

I have created the following tables

users
|__ id
|__firstname
|__lastname
|__email
|__username
|__password

interests
|__id
|__interest

interests_users
|__id
|__user_id
|__interest_id

experience_levels
|__id
|__experience_level

experience_levels_interests_users
|__id
|__interests_users_id
|__experience_levels_id


Wayne






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



Re: ERD recommendation

2009-02-03 Thread Wayne Fay

> I was wondering if anyone has any recommendations for a database
> design tool.  I was hoping to use an OSS product.

I generally use Squirrel SQL, or a DB editor in Eclipse/Netbeans IDE
which can connect to "any" database that has a JDBC driver.

For postgres, I also use pgAdmin. This page has more info about
pg-specific tools:
http://postgresql.openmirrors.org/docs/techdocs-9.html

Wayne

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



Re: Anyone built a forum system yet?

2009-01-20 Thread Wayne Fay

> @Brian - Its just a lot of overhead. Ive spoken to many PHP gurus and
> they said storing it in the DB is not the best way. I even looked at
> PHPbb and they didnt do it that way, unless im completely blind.

No offense to your "PHP gurus" but I would suggest that you look at
the code for some more forum software before deciding the DB storage
approach suggested by Brian is "not the best way." And I'm not saying
it is or it isn't -- just suggesting you should look at more
implementations before making a decision.

Many free PHP forums are open source, so it should be fairly simple to
find the proper code and compare:
http://en.wikipedia.org/wiki/Comparison_of_Internet_forum_software

Wayne

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



Re: Politics aside.....

2008-10-30 Thread Wayne Fay

Does that policy change after the election? Or is it a hard and fast
rule, effective "forever"? Perhaps you could write a white paper and
get permission to publish it?

Wayne

On Wed, Oct 29, 2008 at 7:19 PM, Walker Hamilton <[EMAIL PROTECTED]> wrote:
>
> We do get "decent" traffic numbers.
>
> Butwe have a policy of not releasing them. Sorry.
>
> On Oct 28, 2:44 pm, teknoid <[EMAIL PROTECTED]> wrote:
>> Very nice.
>>
>> I imagine that you get some decent traffic there?
>> Any chance you could share some numbers, experiences and how cake is
>> holding up?
>> Maybe a little case study?
>>
>> On Oct 28, 11:33 am, Walker Hamilton <[EMAIL PROTECTED]> wrote:
>>
>> > I just thought I'd let the cakePHP community know that cakePHP is
>> > powering a site and a "utility" service at the Barack Obama website. I
>> > built both of these.
>>
>> > Here's the site:http://radar.barackobama.com/
>>
>> > The utility service isn't anything to look at, but let's just say,
>> > it's provided some much needed "plumbing" for our infrastructure.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Querying Unrelated Models from a Controller

2008-10-10 Thread Wayne

Okay, that works, but it's creating a weird side effect. This is the
line that I've added to my AppointmentsController to import access to
the Template model:

var $uses = array('Appointment','Template');

When I add this, my non-authenticated add function works fine, however
the edit, which checks for access, is broken. I'm doing access this
way:

function beforeFilter()
{
$this->Auth->authorize = 'controller';
}

function isAuthorized() {
   if ($this->action == 'index' || $this->action == 'add') {
return true;
   } else {
 if(!empty($this->data)) {
$appointment = $this->data;
 } else {
$appointment = $this->Appointment->read();
 }
 if( CHECKING CODE FOR VALID ACCESS ) {
return true;
 }
}
return false;
}

Now, with the $uses line commented out, everything in these functions
works when I go to /appointments/edit/##. With the $uses line in, this
line:
$appointment = $this->Appointment->read();
no longer works. It returns false. It's like the id at the end of the
URL is no longer being passed through. Any ideas about why this is
happening?

Thanks for your help,

Wayne.

On Oct 10, 10:12 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> What you're looking for is 
> $uses.http://book.cakephp.org/view/53/components-helpers-and-uses
>
> Or alternatively:
> App::import('Model', 'OtherModel');
> $othermodel = new OtherModel();
>
> On 11 Oct 2008, at 09:56, Wayne wrote:
>
>
>
> > This might be a simple question, but everything I'm trying is not
> > working and it's frustrating the hell out of me.
>
> > I need to do a find() on a model that is not related to the model
> > whose controller I'm currently accessing. I know how to make this work
> > if there's a hasMany or belongsTo sort of relationship between the two
> > models, but in this case, there's not. I've tried creating new
> > instances of the other controller to query, and I've tried to use the
> > static find() method, but neither is working because the model I'm
> > working with doesn't have any knowledge of the existence of the other
> > model. It seems to me there should be some simple way to do this, but
> > I can't find any example of this sort of query in the documentation. I
> > realize that I can use query() to hit the database directly, but I was
> > trying to avoid that, and it seems like CakePHP should be able to find
> > the other model if I could just ask it in the right way.
>
> > Is there some way normal "CakePHP" to do this?
>
> > Thanks for any help you can provide,
> > Wayne Eaker.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Querying Unrelated Models from a Controller

2008-10-10 Thread Wayne

This might be a simple question, but everything I'm trying is not
working and it's frustrating the hell out of me.

I need to do a find() on a model that is not related to the model
whose controller I'm currently accessing. I know how to make this work
if there's a hasMany or belongsTo sort of relationship between the two
models, but in this case, there's not. I've tried creating new
instances of the other controller to query, and I've tried to use the
static find() method, but neither is working because the model I'm
working with doesn't have any knowledge of the existence of the other
model. It seems to me there should be some simple way to do this, but
I can't find any example of this sort of query in the documentation. I
realize that I can use query() to hit the database directly, but I was
trying to avoid that, and it seems like CakePHP should be able to find
the other model if I could just ask it in the right way.

Is there some way normal "CakePHP" to do this?

Thanks for any help you can provide,
Wayne Eaker.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Setting up CakePHP for Reporting

2008-09-23 Thread Wayne Fay

As suggested by Martin, your current way of doing things in Excel may
not be ideal. Rather than looking for a way to rebuild the current
tool with CakePHP, perhaps you should open your mind a bit, close the
Excel sheet, and think about a better way to build a similar tool that
provides the same functionality. CakePHP may or may not be a part of
that solution.

As for the undertone comment, I don't understand what you're trying to
ask or say there.

Wayne

On Tue, Sep 23, 2008 at 12:15 PM, torbjorn <[EMAIL PROTECTED]> wrote:
>
> point well taken, I should not have past in all the vb code. But it
> could be of use for someone, as to research there is no open source
> out there that will do what my current spreadsheet is doing. So, my
> questions was directed towards CakePHP flexibility of being used for
> resoruce scheduling.
>
> And as always there is always an undertone to replies to question
> posted, are there a Google group for CakePHP beginners, no one needs
> to reply. Right!
>
>
>
> On Sep 22, 5:37 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
>> I think you're going to get a much better response with a 5-10 line
>> pseudo code example than the nearly 200 line VB code you've included
>> below. Personally, I wouldn't even consider looking at something like
>> that unless someone is paying me cold hard cash.
>>
>> As for the "calculate the week" issue, did you search the PHP Manual
>> or ask Google? It is pretty obvious:http://us2.php.net/date
>> (Hint: search for the word "week", you're bound to find it.)
>>
>> As for "should you be doing this" -- you might want to consider some
>> open source resource scheduling software before deciding that you must
>> build it yourself. Only after a formal review of a few with the
>> conclusion "we must write our own from scratch" would I consider
>> heading down this path, personally.
>>
>> Wayne
>>
>> On Mon, Sep 22, 2008 at 11:06 AM, torbjorn <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > I thought I seek feedback from this group on what would be the best
>> > direction creating reporting in CakePHP.
>>
>> > My project that I am working on, is to take resource scheduling excel
>> > spreadsheet and move it over to a database, the reason to this is that
>> > the spreadsheet has grown to big, and excel is prone to user entry
>> > mistakes. We have minimized the number of features that we would like
>> > to have initially, to only a handful, to make it in par with the excel
>> > spreadsheet functionality.
>>
>> > 1. User to login to view their assignments
>> > 2. Resource Manager to have a login to be able to do the following
>> >2.1 Load project resource request from an Excel Spreadsheet
>> >2.2 Assign resources to projects
>> >2.3 View resources availability
>> >2.4 View resources Utilization
>> >2.5 Basic Reporting
>>
>> > We been looking at different ways to do this, and decide to settle on
>> > using cakePHP, the team has created the authentication and a menu
>> > system that shows menu items based on users type. We have created the
>> > database structure so we can load project request and assign resources
>> > and store them in a utilization database table.
>>
>> > But we run in to a snag in the design in creating the resource
>> > utilization, the team are split on how we should approach it, so we
>> > asking the group for some advice. The ideas we have are:
>>
>> > Option 1. create a database table that are generated at the time off
>> > assigning resources, the table would hold the user_id, date, year,
>> > month, day, day of week, month_name, quarter, quarter_name and
>> > allocation percentage. The only problem we see with this is that user
>> > could be on more than one project in a week. So, when a resource
>> > manager assign a resource, we would have to search to see if a record
>> > exist for that week and then update it, if not existing week add a new
>> > record.
>>
>> > Option 2. use a "Star Schema" for dimension and facts. The "Star
>> > Schema" tables would be updated by a function that is triggered by the
>> > resource manager. The resource manager selects a function update
>> > allocation, which would start of a process of reading records from the
>> > utilization table, and loop around tills all weeks are filled in. The
>> > "star table" would have three tables Resour

Re: Setting up CakePHP for Reporting

2008-09-22 Thread Wayne Fay

I think you're going to get a much better response with a 5-10 line
pseudo code example than the nearly 200 line VB code you've included
below. Personally, I wouldn't even consider looking at something like
that unless someone is paying me cold hard cash.

As for the "calculate the week" issue, did you search the PHP Manual
or ask Google? It is pretty obvious:
http://us2.php.net/date
(Hint: search for the word "week", you're bound to find it.)

As for "should you be doing this" -- you might want to consider some
open source resource scheduling software before deciding that you must
build it yourself. Only after a formal review of a few with the
conclusion "we must write our own from scratch" would I consider
heading down this path, personally.

Wayne

On Mon, Sep 22, 2008 at 11:06 AM, torbjorn <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I thought I seek feedback from this group on what would be the best
> direction creating reporting in CakePHP.
>
> My project that I am working on, is to take resource scheduling excel
> spreadsheet and move it over to a database, the reason to this is that
> the spreadsheet has grown to big, and excel is prone to user entry
> mistakes. We have minimized the number of features that we would like
> to have initially, to only a handful, to make it in par with the excel
> spreadsheet functionality.
>
> 1. User to login to view their assignments
> 2. Resource Manager to have a login to be able to do the following
>2.1 Load project resource request from an Excel Spreadsheet
>2.2 Assign resources to projects
>2.3 View resources availability
>2.4 View resources Utilization
>2.5 Basic Reporting
>
> We been looking at different ways to do this, and decide to settle on
> using cakePHP, the team has created the authentication and a menu
> system that shows menu items based on users type. We have created the
> database structure so we can load project request and assign resources
> and store them in a utilization database table.
>
> But we run in to a snag in the design in creating the resource
> utilization, the team are split on how we should approach it, so we
> asking the group for some advice. The ideas we have are:
>
> Option 1. create a database table that are generated at the time off
> assigning resources, the table would hold the user_id, date, year,
> month, day, day of week, month_name, quarter, quarter_name and
> allocation percentage. The only problem we see with this is that user
> could be on more than one project in a week. So, when a resource
> manager assign a resource, we would have to search to see if a record
> exist for that week and then update it, if not existing week add a new
> record.
>
> Option 2. use a "Star Schema" for dimension and facts. The "Star
> Schema" tables would be updated by a function that is triggered by the
> resource manager. The resource manager selects a function update
> allocation, which would start of a process of reading records from the
> utilization table, and loop around tills all weeks are filled in. The
> "star table" would have three tables ResourceDimensions, TimeDimension
> and AllocationFacts. I personal think this is the right approach, but
> has a few learning curves for us. When it is triggered, it should loop
> around the user table, if a user do not have an allocation it would
> show 100% available, if a user have many allocation for a week, it has
> to be summed up, and stored. The issue is the utilization data, we
> have start and end date and an allocation, so if the start is 3 feb,
> 08 and end is 3 march 08, with the allocation 10%. The user would be
> allocated for 10% over that period of time, but how do we use date
> function is CakePHP to know what week it is. are there any samples.
>
> Our Excel Spreadsheet has this VB Macro doing the job, instead of
> saving it to a database, it saves it to a row/column,
>
> - Have anyone tried to do this in the past, like to learn about the
> experience and any pitfalls.
> - Is CakePHP suitable for doing "Star Schema" and/or for being the
> framework for a resource scheduling tool?
> - How would be the best way using the macro functions below, have a
> component that runs through, with a model that reads the database and
> write to the database and a view that shows when completed, any ideas?
>
>
> = sample VB Macro code

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: legacy database and conventions

2008-09-19 Thread Wayne Fay

While Cake has conventions, there is absolutely nothing which requires
that you take advantage of them. Given that Cake is a MVC
implementation, you will primarily be dealing with customized models
to support your legacy database.

Models provide $useTable so you can have a model named User that
points at a table named VENDOR_ACCOUNTS.

I would jump into your implementation head-first and see what you can
build. Use this list for specific questions/issues that you run into
along the way. If you think a tutorial concerning this subject would
be helpful, perhaps you will consider documenting your own experiences
and sharing them after you are complete.

Wayne

On Fri, Sep 19, 2008 at 3:22 PM, Miguel <[EMAIL PROTECTED]> wrote:
>
> Hi, cakephp has a lot of tutorials, but for the life of me i cant find
> a tutorial regarding how to use an existing database, this is a
> propietary vendor 's appliance, so changing the schema is not an
> option. they use mssql with fancy table names and custom types, all
> uppercase.
> because of that , i cant use the cake's database lovely conventions
> (controller/table/model names, etc), is there a way to "map" between
> conventions and existing schemes?
> best regards,
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Check out this CakePHP Job Board - Small Problem

2008-09-08 Thread Wayne Fay

Good to hear you made it work. As for the "healthy code" bit, I don't
like the  all over the place personally, but if it works,
this is simply an issue of style preference.

This would be my preference:
image('pdf-icon.gif', array('alt'=>'',
'style'=>'vertical-align: bottom; margin-right: 5px'));
echo $html->link('Information', UPLOADS_URL .
"/{$job['Job']['information_doc']}", array('target' =>'_blank',
'style'=>'color: #000; text-decoration: none'));
  }
?>

Also, rather than inline-styling of the elements with the style=>...
stuff, I would probably make a few CSS classes and apply them. Again,
this is mostly a personal preference.

Wayne

On Mon, Sep 8, 2008 at 2:20 PM, kujina <[EMAIL PROTECTED]> wrote:
>
> Oh wow, I seemed to of corrected it to make it work, it seems to work
> fine now with the following adjusted on the first line:
>
> 
>
> image('pdf-icon.gif', array('alt'=>'',
> 'style'=>'vertical-align: bottom; margin-right: 5px'))
> ?>link('Information', UPLOADS_URL . "/{$job['Job']
> ['information_doc']}", array('target' =>
> '_blank', 'style'=>'color: #000; text-decoration: none')); ?>
> 
>
>
> Can anybody confirm that the code looks healthy?
>
>
>
>
> On Sep 8, 5:51 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
>> This is unfortunately something you will have to solve yourself, or
>> with the assistance of a local PHP expert. Perhaps you can find a
>> decent PHP IDE/editor that will highlight mistakes. Or you could try
>> right-clicking and "view source" on the HTML to see the error. Or
>> check the logs of your webserver or Cake itself to see an error.
>>
>> Wayne
>>
>>
>>
>> On Mon, Sep 8, 2008 at 2:21 AM, kujina <[EMAIL PROTECTED]> wrote:
>>
>> > Hi Wayne
>>
>> > After I made my last post I could see that the changes probably should
>> > be made in the "view.ctp" file.
>> > I put in the code you sugested, (I'm 99.9% sure I did it correctly)
>> > but the job listings pages come up completely blank.
>> > Is it becuase the syntax (is that what you call it?) has a mistake in
>> > it?
>> > I did add an apostrophe to the end of ['information_doc] but that
>> > didnt help.
>>
>> > ...Thanks...
>>
>> > On Sep 8, 4:33 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
>> >> Yes, you would alter the view.ctp file. Something along these lines...
>>
>> >> Wayne
>>
>> >> > AND THE FOLLOWING IS THE view.ctp FILE
>>
>> >>
>> >>Application Pack
>>
>> >> 
>> >>image('pdf-icon.gif', array('alt'=>'',
>> >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> >> $html->link('Application Form', UPLOADS_URL . "/{$job['Job']
>> >> ['application_form_doc']}", array('style'=>'color: #000; text-
>> >> decoration: none')); ?>
>> >> 
>>
>> >> 
>> >>image('pdf-icon.gif', array('alt'=>'',
>> >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> >> $html->link('Job Description', UPLOADS_URL . "/{$job['Job']
>> >> ['job_description_doc']}", array('style'=>'color: #000; text-
>> >> decoration: none')); ?>
>> >> 
>>
>> >> 
>> >>image('pdf-icon.gif', array('alt'=>'',
>> >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> >> $html->link('Information', UPLOADS_URL . "/{$job['Job']
>> >> ['information_doc']}", array('style'=>'color: #000; text-decoration:
>> >> none')); ?>
>> >> 
>>
>> >>- Hide quoted text -
>>
>> - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Check out this CakePHP Job Board - Small Problem

2008-09-08 Thread Wayne Fay

This is unfortunately something you will have to solve yourself, or
with the assistance of a local PHP expert. Perhaps you can find a
decent PHP IDE/editor that will highlight mistakes. Or you could try
right-clicking and "view source" on the HTML to see the error. Or
check the logs of your webserver or Cake itself to see an error.

Wayne

On Mon, Sep 8, 2008 at 2:21 AM, kujina <[EMAIL PROTECTED]> wrote:
>
> Hi Wayne
>
> After I made my last post I could see that the changes probably should
> be made in the "view.ctp" file.
> I put in the code you sugested, (I'm 99.9% sure I did it correctly)
> but the job listings pages come up completely blank.
> Is it becuase the syntax (is that what you call it?) has a mistake in
> it?
> I did add an apostrophe to the end of ['information_doc] but that
> didnt help.
>
>
> ...Thanks...
>
> On Sep 8, 4:33 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
>> Yes, you would alter the view.ctp file. Something along these lines...
>>
>> Wayne
>>
>> > AND THE FOLLOWING IS THE view.ctp FILE
>>
>>
>>Application Pack
>>
>> 
>>image('pdf-icon.gif', array('alt'=>'',
>> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> $html->link('Application Form', UPLOADS_URL . "/{$job['Job']
>> ['application_form_doc']}", array('style'=>'color: #000; text-
>> decoration: none')); ?>
>> 
>>
>> 
>>image('pdf-icon.gif', array('alt'=>'',
>> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> $html->link('Job Description', UPLOADS_URL . "/{$job['Job']
>> ['job_description_doc']}", array('style'=>'color: #000; text-
>> decoration: none')); ?>
>> 
>>
>> 
>>image('pdf-icon.gif', array('alt'=>'',
>> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> $html->link('Information', UPLOADS_URL . "/{$job['Job']
>> ['information_doc']}", array('style'=>'color: #000; text-decoration:
>> none')); ?>
>> 
>>
>>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Check out this CakePHP Job Board - Small Problem

2008-09-07 Thread Wayne Fay

Yes, you would alter the view.ctp file. Something along these lines...

Wayne

> AND THE FOLLOWING IS THE view.ctp FILE
>
   
   Application Pack


   image('pdf-icon.gif', array('alt'=>'',
'style'=>'vertical-align: bottom; margin-right: 5px')) ?>link('Application Form', UPLOADS_URL . "/{$job['Job']
['application_form_doc']}", array('style'=>'color: #000; text-
decoration: none')); ?>



   image('pdf-icon.gif', array('alt'=>'',
'style'=>'vertical-align: bottom; margin-right: 5px')) ?>link('Job Description', UPLOADS_URL . "/{$job['Job']
['job_description_doc']}", array('style'=>'color: #000; text-
decoration: none')); ?>



   image('pdf-icon.gif', array('alt'=>'',
'style'=>'vertical-align: bottom; margin-right: 5px')) ?>link('Information', UPLOADS_URL . "/{$job['Job']
['information_doc']}", array('style'=>'color: #000; text-decoration:
none')); ?>


   

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I edit my posting in this group ?

2008-09-06 Thread Wayne Fay

You don't... This an email list (like a newsgroup), that happens to
have a "message board view" which looks similar to other boards.

To "edit" your post, you simply reply to it, and it shows up in a
thread under the original posting.

Wayne

On Sat, Sep 6, 2008 at 3:35 PM, xfh <[EMAIL PROTECTED]> wrote:
>
> How do I edit my posting in this group ?
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Check out this CakePHP Job Board - Small Problem

2008-09-04 Thread Wayne Fay

I would have a db entry that indicates if Information (and the other
PDF files) has been uploaded with a true/false indicator stored in the
db. Then you simply show or hide the link depending on the indicator.

This should be super simple for you to implement.

Wayne

On Thu, Sep 4, 2008 at 8:20 AM, kujina <[EMAIL PROTECTED]> wrote:
>
> Ok' I'll donate to the project.
>
> The school job board is nearly useable now!
>
> The last thing I need to do is make it so the "Information" download
> in the "application pack" section only apears if you upload a file for
> it.
>
> If I get the "jobs_controller.php" and "view.ctp" available (or the
> relevant code) would you be so kind to show me what I need to change.
> I could zip the whole job board up too, available for download.
>
> ...Thanks...
>
> On Sep 2, 3:07 pm, AD7six <[EMAIL PROTECTED]> wrote:
>> On Sep 2, 1:50 am, kujina <[EMAIL PROTECTED]> wrote:
>>
>> > The $5 goes to AD7six!!!
>>
>> $kujina->donate('http://www.cakephp.org');
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: send mail

2008-09-03 Thread Wayne Fay

> Password" code! I think it's probably a good idea to ignore his emails
> requesting someone else to do his work and only reply to the ones that have
> specific questions whose answers are not easily found on public resources.

Fair enough -- Gmail showed him as "Ranjana" for the first 5 or 6, and
then this one showed as "Ranju" so I didn't realize it was the same
(exceedingly lazy) person...

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: send mail

2008-09-03 Thread Wayne Fay

Google for "cakephp email send" for numerous examples. Emailing the
group for this is just pure laziness.

On Wed, Sep 3, 2008 at 2:19 PM, Ranju <[EMAIL PROTECTED]> wrote:
>
> I want send email with cakephp.pls help me.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: To write my database records in Excel

2008-08-22 Thread Wayne Fay

This is a very common query on this list. Please search the archives.

Also check the bakery for code help, especially this article:
http://bakery.cakephp.org/articles/view/generate-excel-spreadsheets-from-your-database

Wayne

On 8/22/08, Fredy <[EMAIL PROTECTED]> wrote:
>
>  In servlets we hav the option of writing into a Excel / word file
> straight away usin
> contentype() method Is there any similair way to write my mysql
> database records into
> Excel sheet using php or else is there some other way ...
>
> I need to Generate Reports from my database ... dynamic reports(Excel
> sheet ) how to do it in php .
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: the questions rarely answered. why?

2008-07-11 Thread Wayne Fay

Polutan, are you looking at the same CakePHP email list archive that I
am looking at?? Gmail shows me the following # of responses for the
most recent ~30 email threads:
3, 0, 1, 6, 10, 4, 5, 9, 5, 0, 5, 1, 9, 8, 1, 2, 4, 6, 6, 0, 3, 5, 9,
2, 3, 0, 0, 2

I see a few with 0 responses, some with 2 or 3, and many with 5-10. So
it seems like "most questions are answered" contrary to your original
claim. Are you seeing something different that the rest of us?? Or are
you claiming that most of these responses do not actually answer the
question(s) that are posed?

Wayne

On 7/11/08, francky06l <[EMAIL PROTECTED]> wrote:
>
> Yes guys you right ..  after a while you think sometimes "if I answer
> this, it will take ages and probably more following questions will
> raise and I have also a full job, a girlfriend etc ."..
>
> At the very beginning, I was reading a lot the list mainly before
> questionning, then I began to answer ..and there is a lot to learn in
> answering..
> That's the point, I was searching the answer for some peolple, a very
> good learning way ..
> Now, it's very rare that I am interested in a question, I still answer
> though ... but a bit by sequence..
>
> Polutan, you should try to answer to people, you will realize that you
> learn so much that you do not have many questions...
>
> cheers
>
>
> On Jul 11, 7:50 pm, mbavio <[EMAIL PROTECTED]> wrote:
> > There is a reason why Google exists, and I really hate when users post
> > something that can be founded in 20 seconds of Google. Feels like you
> > are wasting my time and yours too.
> >
> > Cheers,
> > mbavio
> >
> > On Jul 11, 9:13 am, "Siebren Bakker" <[EMAIL PROTECTED]> wrote:
> >
> > > I think that at one point or another, we've all started answering a 
> > > question
> > > before realizing that it wasn't actually a question, but actually a 
> > > demand.
> > > For the most part, if anyone takes the time to first do some research, and
> > > still can't find an answer, if they phrase it as a polite question, with 
> > > as
> > > much supporting information as they can think of, and are willing to give
> > > even more information if asked about it, their answers will tend to be
> > > answered, as generally, all of the people who read the google group and 
> > > have
> > > the information sought after, are willing to help out, if nothing than to
> > > point people in the right direction. I know I've been helped a lot through
> > > the group, and I've helped others with things they didn't know. It's a 
> > > kind
> > > of mutual give-and-take here.
> >
> > > In the name of Life, Liberty, and the pursuit of my sanity.
> > > Siebren Bakker(Aevum Decessus)
> >
> > > On Fri, Jul 11, 2008 at 04:53, grigri <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hello :) i'am so sorry before if this post sounds insulting :)
> > > > > i just want to know, why most of questions here is rarely answered?
> >
> > > > > People (including me) get sick of answering the same questions over
> > > > > and over again, often from people with little self-initiative. I think
> > > > > some people (especially php noobs) find it easier to post a question
> > > > > on google groups rather than spend the time poring over the manual,
> > > > > api, blogs, google groups, or cake source code.
> >
> > > > ...and then don't even ask a decent question. A lot of the unanswered
> > > > questions are like "i tried to do {x} and it didn't work - fix it for
> > > > me" [as you can see, not even a question!]. People who don't put the
> > > > time in to phrasing a question properly haven't put the time into
> > > > researching the problem by themselves.
> >
> > > > > Sometimes I begin writing a reply to a post, but halfway through I
> > > > > decide not to post it because it's obvious the person hasn't done any
> > > > > preliminary research or hasn't made the effort of asking their
> > > > > question in a way that is easy to answer.
> >
> > > > Yeah, I do this too. I start off with all the best intentions, then
> > > > think halfway through "I've answered this before..." and stop.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Wayne Madison

Hannibal,

Thanks for the alternative solution for a cakePHP 
table driven solution!

http://dsi.vozibrale.com/articles/view/creating-a-select-box-for-a-related-model

Wayne

On Jun 26, 6:25 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> Dear God.
>
> What kind of developer doesn't want to research? Is there a better way
> to learn how the framework works? The gut of it?
>
> I agree, the docs have their flaws. However..
>
> I started leaning Cake about 6 months ago, from scratch. It was a bit
> tough for the first few days, because of the new terms like
> "controller", "helper", "model" and the whole MVC thing. But once you
> start to look deeper and really, and I do mean *really* comprehend
> things, it starts to be fun.
>
> Honestly, I've never had more fun developing than now when I'm using
> CakePHP. It's been an adventure from the start, just the sheer
> satisfaction of figuring stuff out. And the sheer satisfaction of
> knowing stuff. I may not be an expert now, but I surely know my way
> around. And sure, I will ask a stupid question on the group now and
> then, but only AFTER I've done my research.
>
> I know that people don't always have the privilege to learn Cake at
> their own pace, but this was something to expect, wasn't it?
> Got a new job? New neighborhood? New girlfriend? New framework?
> Research, research, research, research!
> That is not a problem with Cake or the docs. That is just learning.
> This is how we grow as developers and human beings.
>
> Of course, you might be nearing a deadline, and don't need the
> bleeding research right now, but it's hardly the fault of docs. You're
> never going to find an example for every bleeding thing you need, you
> will still need to research.
>
> Sorry for the rant, just had to get that out of my system ;-)
>
> Cheers!
>
> On Jun 25, 9:50 pm, Wayne Madison <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yes! This discussion thread is about Documentation.
>
> > The Current Documentation is "good". On a scale of 1 to 10, it is a 5.
>
> > I say this for a number of reasons.
>
> > 1. It contains deprecated items that are not noted as such.
> > 2. Alternative / Preferred methods to deprecated items are not
> > provided.
> > 3. It provides items without specific examples which can be used and
> > tested by users.
> > 4. It does not provide specific methods to solve specific fundamental
> > web application problems.
>
> > My goal of this thread was to present a problem an a web application
> > builder(user) brings to the Documentation.
>
> > The application builder brings a general question to the
> > Documentation.
>
> > For Example:1)  How do I add a select option driven by a database
> > table to my View(form)?
> >                     2)  How do I eliminate a label on a form eliment?
> >                     3)  How do I change the label on a select
> > option?
>
> > Are the direct and explicit answers to these types of questions beyond
> > the scope of this Documentation?
>
> > The application builder has followed the cakePHP instructions to build
> > their application in accordance with cakePHP methodology and
> > practice.
>
> > The Methods, Controllers and Views were built with cake.php Bake and
> > tested with scaffold.
>
> > This was accomplished in short order!
>
> > Thanks cakePHP!
>
> > Some of the boring repetitive work is out of the way.
>
> > Now the CUSTOMIZATION work begins.
>
> > How do I add a select option driven by a database table to my
> > View(form)?
>
> > The developer finds a solution in the Documentation use
> > generateList().
>
> > The developer applies generateList() to the application.
>
> > Many trials and failures follow.
>
> > Finally, the developer finds that generateList()  is deprecated.
>
> > The notes in the Documentation regarding the deprecation of the
> > generateList() are missing?
>
> > Time Wasted!
>
> > There are no notes on an alternative method!
>
> > More frustration.
>
> > More time.
>
> > More research.
>
> > CakePHP gurus provide the following:
>
> > 1) Use "find" and "Set::combine". Those components are in the
> > documentation.
>
> > or
>
> > 2) Download X,Y or Z web application and decontruct.
>
> > Deconstruction!
>
> > Yes!
>
> > More research.
>
> > More time.
>
> > CakePHP users will try components 2,3, 4 or more times before an erro

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-25 Thread Wayne Madison

Yes! This discussion thread is about Documentation.

The Current Documentation is "good". On a scale of 1 to 10, it is a 5.

I say this for a number of reasons.

1. It contains deprecated items that are not noted as such.
2. Alternative / Preferred methods to deprecated items are not
provided.
3. It provides items without specific examples which can be used and
tested by users.
4. It does not provide specific methods to solve specific fundamental
web application problems.

My goal of this thread was to present a problem an a web application
builder(user) brings to the Documentation.

The application builder brings a general question to the
Documentation.

For Example:1)  How do I add a select option driven by a database
table to my View(form)?
2)  How do I eliminate a label on a form eliment?
3)  How do I change the label on a select
option?

Are the direct and explicit answers to these types of questions beyond
the scope of this Documentation?

The application builder has followed the cakePHP instructions to build
their application in accordance with cakePHP methodology and
practice.

The Methods, Controllers and Views were built with cake.php Bake and
tested with scaffold.

This was accomplished in short order!

Thanks cakePHP!

Some of the boring repetitive work is out of the way.

Now the CUSTOMIZATION work begins.

How do I add a select option driven by a database table to my
View(form)?

The developer finds a solution in the Documentation use
generateList().

The developer applies generateList() to the application.

Many trials and failures follow.

Finally, the developer finds that generateList()  is deprecated.

The notes in the Documentation regarding the deprecation of the
generateList() are missing?

Time Wasted!

There are no notes on an alternative method!

More frustration.

More time.

More research.

CakePHP gurus provide the following:

1) Use "find" and "Set::combine". Those components are in the
documentation.

or

2) Download X,Y or Z web application and decontruct.

Deconstruction!

Yes!

More research.

More time.

CakePHP users will try components 2,3, 4 or more times before an error
isn't kicked out because there is a lack of specific examples.

Did the guru say "find", "find(''list"), find("all"), "findAll()",
"generateList(), etc. etc. etc. which one? They are all in the
Documentation.

How many times does a user have to test "find", "find(''list"),
find("all"), "findAll()", "generateList(), etc. etc. etc. before they
find that the solution to this fundamental form requirement, "a select
option" based upon a database doesn't produce the desired results.

Why?

That component requires the use of another component.

Remember? Set::combine?

More time.

More research.

More testing.

Do you remember the web developers original question which brought
them to the Documentation?

How is a select option based upon a database table added to a
View(form)?

How much time does a user spend to find the component(s) needed to
answer this basic web application question?

How much time does a user spend to find out how, when and where to use
those components with what dependencies (Model, Controller and View)
are required?

More research!

More testing!

Is providing, in the documentation, the answer to this type of
question beyond the scope of the Documentation?

I don't think that it is.

Therefore, I rate the Documentation a 5.

The Documentation at this time is more of a compendium, repository,
alphabetical list of all of the neat things (components) that CakePHP
developers have built.

Cool.

Some of the components in the Documentation are deprecated. Some are
not. Some deprecated items are noted as such and provide alternatives.
Some aren't and don't. Some components have examples on how to they
are to be used. Some don't.

What ever time a user saves by using cakePHP framework will be spent
and then some on research and testing?

That is until the developer has built their own repository of
solutions to common requirements such as how to add a selection option
to a View(form).

Why?

While the components to a solution are in the documentation, the
solution is not and watch out for deprecation!

The need is clear.

Wayne

On Jun 24, 11:15 am, Wayne Madison <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I want to create cakePHP(1.2.0.) Forms to "View", "Add", "Edit",
> "Delete" a "User".
>
> Constraints: 1 (No "Scaffold")
>                    2 (No Deprecated "generateList()")
>
> I want the "Add" and "Edit" form to contain:
>
> 1) A select option box for "title" based upon the values in the
> "titles" table showing fiel

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-25 Thread Wayne Madison

How to add a select option based upon database table to a View(form)

Step 1:

In the Controller (foo_controller) which will be used to produce the
View(Form) "foo.cbt"  that needs a select option populated by table
values

add

var $uses - array('Foo', 'Bar')

after

var $name = 'Foo';

where 'Foo' is the primary Model(table) for the form and 'Bar' is the
Model(table) which will populate the select option.

Step 2:

In that same Controller (foo_controller) add the following code to
collect the data for the select option.

Into the function viewname(){

$data_array = $this->Bar->find('all',array(fields => array('Bar.id',
'Bar.fieldname1')));  //For all of the records in the table

or

$data_array = $this->Bar-findAll('field = value',  array('Bar.id',
'Bar.fieldname1')); //For selected records in the table

and

$data_combine = Set::combine($data_array,
'{n}.Bar.id','{n}.Bar.fieldname');

//The following makes the key,value array available to the view.

$this->set('selectdata',$data_combine);

Step 3

In the viewname View(form) the following structure creates the select
option with the Key Value pair that displays the "name" and passes the
"id" to the database.

echo $form->input('id', array('options'  => array($selectdata)));

Wayne

On Jun 24, 11:15 am, Wayne Madison <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I want to create cakePHP(1.2.0.) Forms to "View", "Add", "Edit",
> "Delete" a "User".
>
> Constraints: 1 (No "Scaffold")
>                    2 (No Deprecated "generateList()")
>
> I want the "Add" and "Edit" form to contain:
>
> 1) A select option box for "title" based upon the values in the
> "titles" table showing field values for "Title" saving "title_id" to
> the "users" table.
> 2) An input box for first_name
> 3) An input box for last_name
>
> I want the "User" "View" form to show:
>
> 1) The "title" selected not the "title_id"
> 2) The "first_name" value
> 3) The "last_name" value
>
> Table One: "Users"
>
> user_id integer primary key auto number
> title_id integer,
> first_name varchar(40)
> last_name varchar(40)
>
> Table One: Data Example:
> user_id titile_id first_name last_name
> 1           1         bill           smith
> 2           2         jane         murphy
> 3           3         elizabeth  baker
>
> Table  Two: "Titles"
> title_id: integer primary key autonumber
> title: varchar(40)
>
> Table Two: Data Example:
> title_id title
> 1         Mr.
> 2         Ms.
> 3         Mrs.
>
> Thanks
>
>  Wayne

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Documentation

2008-06-24 Thread Wayne Madison

Hello,

I want to create cakePHP(1.2.0.) Forms to "View", "Add", "Edit",
"Delete" a "User".


Constraints: 1 (No "Scaffold")
   2 (No Deprecated "generateList()")


I want the "Add" and "Edit" form to contain:


1) A select option box for "title" based upon the values in the
"titles" table showing field values for "Title" saving "title_id" to
the "users" table.
2) An input box for first_name
3) An input box for last_name


I want the "User" "View" form to show:


1) The "title" selected not the "title_id"
2) The "first_name" value
3) The "last_name" value


Table One: "Users"


user_id integer primary key auto number
title_id integer,
first_name varchar(40)
last_name varchar(40)


Table One: Data Example:
user_id titile_id first_name last_name
1   1 bill   smith
2   2 jane murphy
3   3 elizabeth  baker


Table  Two: "Titles"
title_id: integer primary key autonumber
title: varchar(40)


Table Two: Data Example:
title_id title
1 Mr.
2 Ms.
3 Mrs.


Thanks


 Wayne




On Jun 24, 12:11 pm, John David Anderson <[EMAIL PROTECTED]>
wrote:
> Bakers,
>
> How are we doing? What is the most confusing? What's most needed and  
> missing? I have a punchlist of my own, but I'm looking for input from  
> you guys, especially the new ones.
>
> Thanks,
>
> John

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-24 Thread Wayne Madison

Hello,

I want to create cakePHP(1.2.0.) Forms to "View", "Add", "Edit",
"Delete" a "User".

Constraints: 1 (No "Scaffold")
   2 (No Deprecated "generateList()")

I want the "Add" and "Edit" form to contain:

1) A select option box for "title" based upon the values in the
"titles" table showing field values for "Title" saving "title_id" to
the "users" table.
2) An input box for first_name
3) An input box for last_name

I want the "User" "View" form to show:

1) The "title" selected not the "title_id"
2) The "first_name" value
3) The "last_name" value

Table One: "Users"

user_id integer primary key auto number
title_id integer,
first_name varchar(40)
last_name varchar(40)

Table One: Data Example:
user_id titile_id first_name last_name
1   1 bill   smith
2   2 jane murphy
3   3 elizabeth  baker

Table  Two: "Titles"
title_id: integer primary key autonumber
title: varchar(40)

Table Two: Data Example:
title_id title
1 Mr.
2 Ms.
3 Mrs.

Thanks

 Wayne

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP and Subscription Based Billing

2008-05-21 Thread Wayne Fay

I'd probably implement it with ACL and then tack the subscription
piece on top such that ACL (access or not due to subscription status)
would control access to the app. I'd probably have a job that would
update the ACL table every day based on subscription status.

Sounds like it would be pretty trivial to implement, actually. Of
course, I could be wrong. Let us know once you implement it.

Wayne

On Wed, May 21, 2008 at 1:35 PM, mmayes <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Does anybody have any experience or recommendations on setting up a
> CakePHP app as a monthly subscription service (ala Basecamp, etc.)? I
> have a client that wants to do something like this, and I would very
> much like to bake it up. I've done a couple of the typical ecommerce
> sites using out of the box packages with SSL, so I'm familiar with the
> basics.
>
> Cheers!
> Matt
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how could i config cakephp with sqlite support

2008-02-18 Thread Wayne Fay

Not positive, but you probably need to specify a complete path to the
test.db file.

Wayne

On 2/18/08, shotchen <[EMAIL PROTECTED]> wrote:
>
> my Environment is windowXp,php5.25,LightTPD-1.4.18-1-
> Win32,sqlite3.5.6;
>
> i made "The Cake Blog Tutorial"  example,but i get a error like this
>"Warning (2): sqlite_popen() [function.sqlite-popen]: file is
> encrypted or is not a database [CORE\cake\libs\model\datasources\dbo
> \dbo_sqlite.php, line 94]"
> my database.php config like below:
> class DATABASE_CONFIG {
>var $default = array(
>'driver' => 'sqlite',
>'connect' =>'sqlite_popen',
>'persistent' => false,
>'host' => 'localhost',
>'port' => '',
>'login' => '',
>'password' => '',
>'database' => 'test.db',
>'schema' => '',
>'prefix' => '',
>'encoding' => ''
>);
> }
> if i change the datebase to mysql ,it work well。
> my database.php's config like this:
> class DATABASE_CONFIG {
>var $default = array(
>'driver' => 'mysql',
>'persistent' => false,
>'host' => 'localhost',
>'port' => '',
>'login' => 'root',
>'password' => 'test',
>'database' => 'cakephp',
>'schema' => '',
>'prefix' => '',
>'encoding' => ''
>);
> }
> please tell me what is wrong with my config?
>
> >
>

--~--~-~--~~~---~--~~
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: Send E-mail

2008-02-15 Thread Wayne Fay

First off, make a little test.php plain PHP file that verifies that
you can send email using PHP's built-in email functionality:
http://us2.php.net/mail

Then make a little test in a Cake controller that you can call
directly which does the same thing. Then you can worry about the
emailcomponent etc.

Wayne

On 2/15/08, dandreta <[EMAIL PROTECTED]> wrote:
>
> Hi!
> I am developing my application with Cake 1.2 and I want to have send e-
> mails functionality.
> Inside pages folder, I have the view to send e-mail with the basic
> fields: Destination, Subject and Message(body). I have been reading
> about EmailComponent in Bakery's article
> (http://bakery.cakephp.org/articles/view/brief-overview-of-the-new-
> emailcomponent) but I have not managed to apply it because e-mail does
> not send. Simply I want to be able to send e-mails with text only.
> How I can do it?
> Do you Know any link or tutorial where it explains?
> Have I configure anything to be able to send e-mails?
> Thanks and 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: using substring with findAll

2008-01-31 Thread Wayne Fay

You should turn on debugging to see the actual SQL that is being
executed, and then try running it in Mysql.

Wayne

On 1/31/08, roliver <[EMAIL PROTECTED]> wrote:
>
> Can anyone tell me if it is possible to use the 'substring' keyword in
> Model->findAll()   I'm trying to do this but I keep getting the mysql
> error "you have an error in yoru sql near...blah..blah) The query I'm
> using is below.
>
> $data = $this->find(array('campaign_id as id'=>
> $id,'substring(upload_date,1, 10)'=>'2008-01-31'),
> array('imp','clicks','ctr','cpc','cost','pos','conv','conv_rate','cost_per_conv'))
>
> If can't then what should I use Model->query() ?
>
> 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: Error testing my View Helper with SimpleTest -- class not found

2008-01-30 Thread Wayne Fay

That did it. Thanks so much Matias, I figured it was something like
that. I tried 'Helpers' and other stuff but never just plain 'Xslt' in
the second parameter.

Wayne

On 1/29/08, Matias Lespiau <[EMAIL PROTECTED]> wrote:
>
> Sorry I made a mistake, the correct syntax is App::import('Helper', 'Xslt');
>
> That should work.
>
> What's going on here is that Cake hasn't loaded your helper class so you
> can't instanciate it.
>
>
>
> On 1/28/08, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > That doesn't seem to change anything for me, for whatever reason. I
> > don't suppose you have a sample project or something that I could
> > download and try?
> >
> > Wayne
> >
> > On 1/28/08, Matias Lespiau <[EMAIL PROTECTED]> wrote:
> > > Before the XsltHelperTest class call App::import('Helper',
> 'XsltHelper');
> > >
> > > Good luck and happy testing!
> > >
> > > --
> > > Matias Lespiau
> > > http://www.gignus.com/
> > >
> > >
> > > On Jan 28, 2008 4:46 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > > >
> > > > So I've created my own View helper (it just dispatches to the XSL
> > > > module), and now I want to test it with SimpleTest etc.
> > > >
> > > > My class is named XsltHelper and has a function docToDoc:
> > > > class XsltHelper extends AppHelper {
> > > >function docToDoc($xml, $xsl) {
> > > >$xslt = new xsltProcessor();
> > > >$xslt->importStyleSheet($xsl);
> > > >$result = $xslt->transformToDoc($xml);
> > > >$xslt = null;
> > > >return $result;
> > > >}
> > > > }
> > > >
> > > > Everything works fine in my views, I've tested it there already.
> > > >
> > > > Now I want to get this helper under test, so I've created a
> > > > xslt.test.php under tests/cases/helpers and it looks like:
> > > >
> > > > class XsltHelperTest extends UnitTestCase {
> > > >var $in = 'Hello XSL';
> > > >var $xsl = '  > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> > > > version="1.0"> > > > select="."/>';
> > > >var $out = 'Hello
> > > XSL';
> > > >//var $helpers = array('Xslt');
> > > >
> > > >function setUp() {
> > > >$this->Xslt =& new XsltHelper();
> > > >}
> > > >
> > > >function testDocToDoc() {
> > > >$res = $this->Xslt->docToDoc($in, $xsl1);
> > > >$this->assertEqual($out1, $res);
> > > >}
> > > >
> > > >function tearDown() {
> > > >unset($this->Xslt);
> > > >}
> > > > }
> > > >
> > > > But I'm getting this error:
> > > > Individual test case: helpers\xslt.test.php
> > > >
> > > > Fatal error: Class 'XsltHelper' not found in
> > > >
> > >
> C:\dev\cake\cake_1.2.0.6311-beta\app\tests\cases\helpers\xslt.test.php
> > > > on line 24
> > > >
> > > > Anyone know what I'm doing wrong? I can find very little documentation
> > > > online regarding testing your own Helpers. I tried adding the var
> > > > $helpers line but it didn't do anything for me, so I commented it out.
> > > >
> > > > Thanks!
> > > > Wayne
> > > >
> > > >
> > >
> > >
> > >
> > > >
> > >
> >
> >
>
>
>
> --
> Matias Lespiau
> http://www.gignus.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: Error testing my View Helper with SimpleTest -- class not found

2008-01-28 Thread Wayne Fay

That doesn't seem to change anything for me, for whatever reason. I
don't suppose you have a sample project or something that I could
download and try?

Wayne

On 1/28/08, Matias Lespiau <[EMAIL PROTECTED]> wrote:
> Before the XsltHelperTest class call App::import('Helper', 'XsltHelper');
>
> Good luck and happy testing!
>
> --
> Matias Lespiau
> http://www.gignus.com/
>
>
> On Jan 28, 2008 4:46 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > So I've created my own View helper (it just dispatches to the XSL
> > module), and now I want to test it with SimpleTest etc.
> >
> > My class is named XsltHelper and has a function docToDoc:
> > class XsltHelper extends AppHelper {
> >function docToDoc($xml, $xsl) {
> >$xslt = new xsltProcessor();
> >$xslt->importStyleSheet($xsl);
> >$result = $xslt->transformToDoc($xml);
> >$xslt = null;
> >return $result;
> >}
> > }
> >
> > Everything works fine in my views, I've tested it there already.
> >
> > Now I want to get this helper under test, so I've created a
> > xslt.test.php under tests/cases/helpers and it looks like:
> >
> > class XsltHelperTest extends UnitTestCase {
> >var $in = 'Hello XSL';
> >var $xsl = '  > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> > version="1.0"> > select="."/>';
> >var $out = 'Hello
> XSL';
> >//var $helpers = array('Xslt');
> >
> >function setUp() {
> >$this->Xslt =& new XsltHelper();
> >}
> >
> >function testDocToDoc() {
> >$res = $this->Xslt->docToDoc($in, $xsl1);
> >$this->assertEqual($out1, $res);
> >}
> >
> >function tearDown() {
> >unset($this->Xslt);
> >}
> > }
> >
> > But I'm getting this error:
> > Individual test case: helpers\xslt.test.php
> >
> > Fatal error: Class 'XsltHelper' not found in
> >
> C:\dev\cake\cake_1.2.0.6311-beta\app\tests\cases\helpers\xslt.test.php
> > on line 24
> >
> > Anyone know what I'm doing wrong? I can find very little documentation
> > online regarding testing your own Helpers. I tried adding the var
> > $helpers line but it didn't do anything for me, so I commented it out.
> >
> > Thanks!
> > Wayne
> >
> >
>
>
>
> >
>

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



Error testing my View Helper with SimpleTest -- class not found

2008-01-28 Thread Wayne Fay

So I've created my own View helper (it just dispatches to the XSL
module), and now I want to test it with SimpleTest etc.

My class is named XsltHelper and has a function docToDoc:
class XsltHelper extends AppHelper {
function docToDoc($xml, $xsl) {
$xslt = new xsltProcessor();
$xslt->importStyleSheet($xsl);
$result = $xslt->transformToDoc($xml);
$xslt = null;
return $result;
}
}

Everything works fine in my views, I've tested it there already.

Now I want to get this helper under test, so I've created a
xslt.test.php under tests/cases/helpers and it looks like:

class XsltHelperTest extends UnitTestCase {
var $in = 'Hello XSL';
var $xsl = ' http://www.w3.org/1999/XSL/Transform";
version="1.0">';
var $out = 'Hello XSL';
//var $helpers = array('Xslt');

function setUp() {
$this->Xslt =& new XsltHelper();
}

function testDocToDoc() {
$res = $this->Xslt->docToDoc($in, $xsl1);
$this->assertEqual($out1, $res);
}

function tearDown() {
unset($this->Xslt);
}
}

But I'm getting this error:
Individual test case: helpers\xslt.test.php

Fatal error: Class 'XsltHelper' not found in
C:\dev\cake\cake_1.2.0.6311-beta\app\tests\cases\helpers\xslt.test.php
on line 24

Anyone know what I'm doing wrong? I can find very little documentation
online regarding testing your own Helpers. I tried adding the var
$helpers line but it didn't do anything for me, so I commented it out.

Thanks!
Wayne

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



Re: Cake without a SQL database

2008-01-24 Thread Wayne Fay

Realistically, it would probably be easier for you to move to a Mysql
database and use Cake the "regular" way than to try to find a way to
keep using your XML etc. Otherwise you could try to see about
implementing a driver for your XML file, and just pretend the XML file
is a database. But this sounds like a lot more work to me.

Wayne

On 1/24/08, sam <[EMAIL PROTECTED]> wrote:
>
> Does anyone have any thoughts on this matter?
>
> On Jan 21, 9:21 pm, sam <[EMAIL PROTECTED]> wrote:
> > I am working on porting my current web site over to a MVC framework.
> > Right now I am evaluating Cake PHP.  I have gone through the blog
> > tutorial and it all makes sense when the back end is a standard SQL
> > database.
> >
> > At present my web site is driven via a XML file and by hard drive
> > queries (images on the hard drive).  How would I go about implementing
> > a model that is powered by these types of sources?
> >
> > Sam
>
> >
>

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

2007-12-12 Thread Wayne Fay

I would expect that there is a way to auto-login a user from a URL by
encrypting their username and password and passing them into a
vBulletin "log user in" url/webpage. This is how I would do it, but I
don't know vBulletin well enough to tell you specifics. And if such a
page does not exist in vBulletin, you should be able to add one
without a lot of trouble, I'd hope/expect.

Wayne

On 12/12/07, Lakshmi S <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> We are trying to integrate vBulletin with a CakePHP application. The
> requirement is that when a user clicks the 'Forum' link within the Cake
> app, he should be redirected to the vBulletin index page and be
> automatically logged in.
>
>
> At the point of click, we will have the user's vBulletin username and
> password. Could you advise the code necessary to perform an automatic
> sign-in into vBulletin given these two credentials?  What is actually
> happening is that the session is expiring on the application end when the
> login into VBulletin happens.
>
> We  are able to work when CakePHp does not come into picture.  However when
> we use CakePHP, the VBulletin object is not visible and we have no way to
> figure out how to pass the details between the sessions of CakePHP and
> VBulletin. They do not work from inside CakePHP due to the vB object
> visibility problem.
>
>
> We would appreciate if anyone could help us out in this regard and get this
> problem sorted out immediately.  This could be done in a commercial basis
> and the e-mail id where you can contact us is this or
> [EMAIL PROTECTED]
>
> Thanks in advance for thr helpit would be really appreciated if someone
> could help out sort this out.
>
> Regards,
>
> Lakshmi
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 Cake App In The Wild

2007-12-12 Thread Wayne Fay

Just so you know, the orange background does not line up properly for
me with the text boxes. So its hard to actually see/type the code. I'm
using IE6. ;-)

Also, it might be nice to have a "enter your pickup code" thing
somewhere that sends you to the proper http://.../{code} so you don't
have to type in a random url just to pick up your text.

Wayne

On 12/11/07, AJ <[EMAIL PROTECTED]> wrote:
>
> I totally agree with that sentiment. But remember, this was meant to
> be as quick and dirty as possible, with the caveat that it's NOT the
> place to do anything super sensitive. As I was building this to fill
> my own need, I knew I didn't want to go through the hassle of logins
> and passwords. Auto-generating is an idea, but then I've got to write
> it on a post-it (or my hand) until I pick it up. Again, defeating its
> purpose.
>
> AJ
>
> On Dec 3, 9:45 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> > > Just launched an extremely basic web app using the 1.2 alpha. It's
> > > called ClipRunner and basically served my own need of getting basic
> > > text data from one computer to another.
> >
> > >http://www.cliprunner.com
> >
> > When I first tried to use it, I entered some text, clicked on 'clip
> > it' and was greeted by a 'this code is already in use'
> >
> > I wonder if it might be preferable to have this auto generated
> > somehow, or perhaps have that as an option.
> >
> > also might be nice to allow people to create an account and save
> > 'clips' within, as I for one wouldn't want to have serial numbers as
> > publicly accessible.
> >
> > hth
> >
> > jon
> >
> > --
> >
> > jon bennett
> > w:http://www.jben.net/
> > iChat (AIM): jbendotnet Skype: jon-bennett
>
> >
>

--~--~-~--~~~---~--~~
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 Do I install Mcrypt in Cake?

2007-12-03 Thread Wayne Fay

Mcrypt is a PHP module that must be turned on in your server's php.ini
file... so I'm not quite sure what you believe that you have
downloaded.

You should probably ask RosSoft to help you with the Cookie Component
if you are unable to figure it out. This might involve paying him/them
some money for their time.


On 12/3/07, skoggins <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I am trying to use RosSoft's cookie component and it uses Mcrypt so I
> downloaded it but can't figure out what I'm supposed to do with it
> now.  Put files in the vendor folder I guess.  Can anyone help?
>
> 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: Multiple language support?

2007-12-03 Thread Wayne Fay

This is built into the core of CakePHP. Look at i18n examples in the Bakery.


On 12/3/07, skoggins <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> My client would like her website to have support for multiple
> languages.  Does anyone know the best way to do this?  Is there any
> CakePHP functionality I should be looking at?
>
> 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: Display Dynamic Images in Cake??

2007-11-27 Thread Wayne Fay

Did you set the headers correctly (content type etc)?
Do you have a space (or more than one) appearing at the beginning of
your image file which would cause these problems?

What PHP barcode generation library are you using?

Wayne

On 11/27/07, jonathan <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> This seems to have come up a number of times before, but I have not
> found a definitive answer.  I am trying to generate a dynamic image
> (in this case, a barcode from a PHP barcode generation library).  I
> have tried every combination of headers, views, layouts, etc. and
> still all I get is the raw image string (in view source) and not the
> image properly rendered.  Even when I try to save the image to the
> filesystem, it is blank.  I know the library works, because I paste
> almost identical code outside of Cake and all is perfect.
>
> Does anyone have a definitive way to display image data in Cake?
> (Version 1.1x please ;)
>
> Thanks much,
> Jonathan
> >
>

--~--~-~--~~~---~--~~
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: Link has expired

2007-11-20 Thread Wayne Fay

What migration system are you talking about?? What "link" has expired?


On Nov 20, 2007 1:44 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> The link for the zip file has expired.  Is anyone using this migration
> system?  What are people using for migrations?
>
> >
>

--~--~-~--~~~---~--~~
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: Sad Question

2007-11-18 Thread Wayne Fay

Sorry for the confusion, I was really responding to the original post,
specifically:

> So, the question:
> Since I have followed every single tutorial I could find on the web
> about installing Cake on IIS for the last 3 days (this includes me
> testing if I could just put Apache on Windows which does not work) I
> really have no other choice but to switch frameworks.

And I'm just replying to let Christopher know that Windows + Apache +
Mysql + PHP + Cake works great/fine for me and many others. I'm
curious why he says "Apache on Windows does not work"...

Wayn

On 11/17/07, Baz <[EMAIL PROTECTED]> wrote:
> I assumed he was trying to use PHP under IIS.
>
>
> On Nov 17, 2007 5:06 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > I run Apache plus Cake and Mysql on Windows all the time. And servers
> > are generally Apache on Linux. I change the config file at the start
> > of a new project, sync the rest over during development, and
> > everything just works.
> >
> > Wayne
> >
> >
> >
> >
> > On 11/17/07, Baz <[EMAIL PROTECTED]> wrote:
> > > I say slap WAMP on there and call it a day :D.
> > >
> > > Sorry dude, it does suck.
> > >

--~--~-~--~~~---~--~~
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: Sad Question

2007-11-17 Thread Wayne Fay

I run Apache plus Cake and Mysql on Windows all the time. And servers
are generally Apache on Linux. I change the config file at the start
of a new project, sync the rest over during development, and
everything just works.

Wayne

On 11/17/07, Baz <[EMAIL PROTECTED]> wrote:
> I say slap WAMP on there and call it a day :D.
>
> Sorry dude, it does suck.
>
> On Nov 17, 2007 2:19 PM, Christopher E. Franklin, Sr. <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Hi, John. Thanks for the reply and I totally agree with you on this
> > one but, the descision was made based on an idiot in Indiana who
> > already signed and payed 2.5 million to Microsoft to come in and
> > revamp our whole communications network from Great Plains accounting
> > servers to all TV channel and newspapers web sites to be transferred
> > to a server farm in the middle of no-where.  The requirement is that
> > the site can easily be copied from our directories to thiers lol!
> >
> > Yes I do need a new job lol!  This pays crap especially for
> > California.  This company pulls in 175 mil profit a year (this is a
> > subsidary) and I barely make double min wage.  It sucks but, it's the
> > only work I can find that deals with computers. The alternative is
> > installing alarm systems for Brinks or something in attics at 120
> > degrees.  Until I finish with my Bachelors, I am stuck.
> >
> > On the error, it seems that once I port over Cake to IIS6, uncomment
> > the correct line in core.php and clean out tmp, it still will not load
> > components and helpers. Some load, some do not. Namely the Session
> > component, Cookie component and the Html helper.
> >
> > Doing some tests in app_controller in the beforeFilter() method, I
> > tried to manually load all sorts of helpers and components.  Those in
> > particular stop the site dead in it's tracks.
> >
> > Another peculiar thing, if I uncomment the App.baseUrl config in
> > core.php I get an error about the cake_logger not knowing what
> > LOG_ERROR is, even though it is clearly defined in core.php. (This is
> > from a fresh cake install).
> >
> > I will say this, I am at home right now on my laptop that has Vista
> > and looking at IIS7, I can get a fresh install of cake to work
> > complete with the urls looking like this: index.php?url=/controllers/
> > controllerMethod/params1
> > But, when I put my BFS (Big F* Site) up there, I get the same
> > errors about cake not being able to load components, helpers, models
> > and controllers.  Works fine on Apache with mod_rewrite, sucks on IIS
> > with nothing.
> >
> > I am also hoping that since, IIS7 has HttpRedirect module built in to
> > it, I can get something going that is sort of like mod_rewrite. /shrug
> >
> > Here's to hoping I can get something going this weekend.
> >
> > On Nov 16, 3:16 pm, "John David Anderson (_psychic_)"
> > <[EMAIL PROTECTED]> wrote:
> > > On Nov 16, 2007, at 4:00 PM, Christopher E. Franklin, Sr. wrote:
> > >
> > >
> > >
> > > > I have been working with CakePHP for about a year now and have written
> > > > a company website in that year that totals in about 150MB of combined
> > > > PHP code.  This whole time, I have been using MySQL, Linux, and Apache
> > > > to do my coding and testing but, recently, the corporate higher-ups
> > > > issued a mandate that all web servers are going to be IIS(6/7).
> > >
> > > > Upon hearing this, we installed Windows Server 2003 RC2 w/ IIS6.0 and
> > > > tried to port over the cake code. Low and behold, it doesn't work. Not
> > > > just a little bit but, in a bad way that the site stops dead in it's
> > > > tracks from not being able to load select components and helpers such
> > > > as , Session, Cookie, Html, Javascript, etc.
> > >
> > > You're gonna need to provide a lot more details for some help. But...
> > >
> > >
> > >
> > > > Today is my 3rd day fighting with this and my question is sad now
> > > > because, my manager wants me to abandon cake alltogether.  So, that's
> > > > going to be 1.1 years worth of code, down the tube unless I can get
> > > > Windows IIS working with Cake (with or without re-write).
> > >
> > > ...let me get this straight.
> > >
> > > 1. Freaking huge web application works on current platform (150MB of
> > > code - is that like 5 or 6 million lines? I hope I'm reading that
> > > 

Re: Altering size of buttons emitted by FormHelper

2007-11-16 Thread Wayne Fay

I've tried that too, and it doesn't work. If you check the source code
for FormHelper, the end() method only takes one parameter, whereas the
submit() method takes 2 like you'd expect.

https://trac.cakephp.org/browser/trunk/cake/1.2.x.x/cake/libs/view/helpers/form.php

So I'm just going to switch over to $form->submit().

Wayne

On 11/15/07, francky06l <[EMAIL PROTECTED]> wrote:
>
> Modify you css, or pass the style with : $form->end('Submit',
> array('style' => 'width: 10px;'));
>
> 10px seems short anyway.. :-)
>
> On Nov 15, 8:35 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > Apparently my CSS is doing something funky, because the login button
> > on my app is a couple hundred pixels wide.
> >
> > I will try to track down the CSS that is causing this, but in the mean
> > time, can someone please tell me how to apply the "size" attribute to
> > the $form->end() call? I already tried:
> > end('Submit', array('size'=>'10'));?>
> > end('Submit', array('width'=>'10'));?>
> >
> > I'm guessing I might need to use 'options' or 'style' or something...
> >
> > Wayne
> >
>

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



Altering size of buttons emitted by FormHelper

2007-11-15 Thread Wayne Fay

Apparently my CSS is doing something funky, because the login button
on my app is a couple hundred pixels wide.

I will try to track down the CSS that is causing this, but in the mean
time, can someone please tell me how to apply the "size" attribute to
the $form->end() call? I already tried:
end('Submit', array('size'=>'10'));?>
end('Submit', array('width'=>'10'));?>

I'm guessing I might need to use 'options' or 'style' or something...

Wayne

--~--~-~--~~~---~--~~
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: Transform column names

2007-11-12 Thread Wayne Fay

Assuming your db supports views, I'd probably just build some
read/write db views that hide the ugly column names with the names
you'd prefer to use, and then use the views as the $table for your
model etc.

Wayne

On 11/12/07, mmalca <[EMAIL PROTECTED]> wrote:
>
> Iam looking for a way to transform column names (behaviour perhaps?).
> I have an existing database with very confusing column names (like
> FP002EX - remember Fortran) and would like to display/use/edit them in
> cakephp via friendlier name: eg FP002EX -> title
>
> Something like:
>
> class MyModel extends AppModel {
> var $actsAs = array('transnames');
> var $transNames = array('FP002EX'=>'title',...);
> }
>
> controller usage:
> $this->data['MyModel']['title'] = 'New title'; // would set FP002EX
> $this->save($this->data);
>
> Is there an existing solution to my problem? Can someone point me to
> the best way for implementing this behaviour?
> Tnx
>
>
> >
>

--~--~-~--~~~---~--~~
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: Why use formhelpers?

2007-11-12 Thread Wayne Fay

I don't disagree with many of your comments.

I've run into some form issues too, but I've posted them and some have
already been resolved:
https://trac.cakephp.org/ticket/3317
https://trac.cakephp.org/ticket/3354
https://trac.cakephp.org/ticket/3412

I don't think  should be automatic either. Perhaps post a couple
bugs (with patches!) and track them for a bit. If they make sense,
they will probably be accepted.

Wayne

On 11/12/07, MikeK <[EMAIL PROTECTED]> wrote:
>
> Ths is not meant to be disrespectful in anyway -- I love cake and it
> has been a productivity boon, and I respect all that contribute to it.
> However as I continue to develop cake code I have found myself
> wondering why I am using the form helpers at all. It has been moving
> through various CSS templates that has brought me to this point.
>
> I find myself spending lots of time reading form helper code to figure
> out what it wants, and looking at emitted code to figure out what it
> did. When I could have just coded the html myself with far less
> trouble. Furthermore it's not particularly more readable code as a
> result of using helpers. (the only thing that I hate more is messing
> with CSS).
>
> Half the time I am writing code to make the helpers NOT emit a div
> where I don't want one. Other times it is to specify css classes where
> necessary in html anchors to go with a css style -- or to redefine the
> emitted div for a label to be what I need to to be. Generally I'm of
> the opinion that these helpers shouldn't emit ANY divs -- it's very
> uncakelike to force a view/css structureon a developer -- seems to me
> they should be completely independent.
>
> Is it me or is there truly diminishing returns here? For example:
>
> input('boat', array('error' => 'Boat is required',
> 'div' => '', 'class' => 'field', 'label' => array('class' => 'left',
> 'text' => 'Boat:')));?>
>
> input('favorite lure', array('div' => '', 'class' =>
> 'field', 'label' => array('class' => 'left', 'text' => 'Favorite
> Lure:')));?>
>
> submit('Update', array('div' => false, 'class' =>
> 'button', 'id' => 'submit'));?>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Add Syntax Coloring to .thtml files with JEdit?

2007-11-08 Thread Wayne Fay

I was wondering why mine just worked, and just realized why -- all my
thtml and ctp files start with  wrote:
>
> in jedit select Utilities -> Global Options.
> Then in the left navigation click on 'Editing'.
> In the first box 'change settings for mode' scroll down until you find
> php.
> Uncheck the Global settings checkbox.
> Then in the textbox that says File name Glob:  change the entry from
> *.{php3,php4,php,phtml,inc}
> to
> *.{php3,php4,php,phtml,inc,thtml}
>
> Click 'ok'
> Then restart Jedit.  Boom Baby.
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Add Syntax Coloring to .thtml files with JEdit?

2007-11-06 Thread Wayne Fay

You may need to add/install the PHPParser plugin, if you don't already
have it. Or upgrade to the latest (dev) version of jEdit.

Wayne

On 11/6/07, Robert Sosinski <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am starting to use JEdit with CakePHP, however .thtml files do not
> show any syntax coloring.  Is there some way I can change 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
-~--~~~~--~~--~--~---



Re: Space before layout content - Resolved

2007-11-02 Thread Wayne Fay

> > similar utility? Essentially, any space in any non-view file (outside
> > of  tags) should be identified and eliminated.
>
> I use Ant for my build process out of Eclipse and have just looked up
> regular expressions in Ant.  You could easily use the "ReplaceRegExp"

Ideally we could cook up a way to check for spaces (and perhaps even
remove them automatically) using Cake itself. It would be like the
bake utility; we could have a "validate" utility. That would be nice!

Wayne

--~--~-~--~~~---~--~~
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: Router::disconnect ?

2007-11-01 Thread Wayne Fay

I would probably do something in a beforeFilter(), to check how it was
called and reply back with an error (or redirect) if it is a standard
GET or POST.

Wayne

On 11/1/07, Cristian Vrabie <[EMAIL PROTECTED]> wrote:
>
> hey, i want to make the access to one of my controllers private (i just
> use it internally to render content in another controller). how can i
> make the router to do that? is there a Router::disconnect 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: XML Parsing Error: xml declaration not at start of external entity

2007-10-31 Thread Wayne Fay

Yes, this is a not-uncommon PHP error, and it causes problems in many places.

Wayne

On 10/31/07, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> Fixed it. CakePHP users beware of leaving spaces in your model,
> controller, view etc..  This error was a pain to track down.  All it
> takes is one space and your fun bus is up on blocks for RSS...  Only
> took a couple of days to track down...
>
> On Oct 31, 12:11 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
> > XML Parsing Error: xml declaration not at start of external entity
> > Location:http://ihang10.com/rss/posts
> > Line Number 1, Column 2: 
> > -^
> >
> > All pages in my cakePHP install add one space at the beginning of
> > every document. It causes an overall foobar on my rss feed.  I have
> > altered the layout default.thml page to be UTF-8 NO BOM's in
> > dreamweaver.  I have also done the same in rss.thtml I still have one
> > space this error is driving me crazy like an itch I can't scratch.
> > Has anyone run into this my fun bus seems to be up on
> > blocks...
> >
> > I have also read this section of  
> > http://logs.cakephp.nu/cakephp/chat.log.2007-05-27
> >
> > *   18:14   rnickel  
> > *   18:14   rnickel ^
> > *   18:14   rnickel that's what firefox tells me
> > *   18:14   AD7six  rnickel that is not an error message.
> > *   18:14   rnickel I didn't code the opening xml code
> > *   18:14   rnickel parsing error - heh
> > *   18:15   sgumby_ maybe you left spaces after the closing ?> 
> > of your
> > controller
> >
> > *   18:24   rnickel Line Number 1, Column 5:  > encoding="UTF-8" ?>
> > *   18:24   rnickel ^
> > *   18:26   AD7six  rnickel you have 4 characters which are before the
> > xml declaration that you need to find. do anything that will issue a
> > header and you'll then get a php "cannot do xyz because output started
> > in /offending/file/open/me/and/delete/the/space/on/line:1" error
> > message.
> > *   18:27   jerrylee([EMAIL PROTECTED]) left
> > irc: "so late here, see you guys"
> > *   18:27   Rik`_   ([EMAIL PROTECTED]) joined
> > #cakephp.
> > *   18:28   rnickel AD7six I have found where the xml helper's 
> > header()
> > function, but what would call and output this header?
> > *   18:28   rnickel I'm not too sure how the inner workings of 
> > cake-php
> > works at the moment, just how to use it haha
> > *   18:29   AD7six  rnickel this has nothing to do with cake.
> > *   18:29   sgumby_ ([EMAIL PROTECTED])
> > left irc: "This computer has gone to sleep"
> > *   18:29   ivan_24_somebody knows something about i18n feature 
> > in
> > cakephp 1.2
> > *   18:29   rnickel AD7six: it doesn't? cake is generating all 
> > this
> > content...
> > *   18:29   ivan_24_i need to know what defaut.po catch cake 
> > when the
> > confing.language is not set or is set wrong.
> > *   18:29   AD7six  rnickel really? I would say your code is.
> > *   18:30   AD7six  rnickel put 
> > as the first line of your layout. then read the error messages.
> > *   18:30   Lucian  ivan_24: when no config.language is set, cake
> > doesn't catch any default.mo file
> > *   18:30   rnickel All I did was add the following to the
> > routes.php :Router::parseExtensions();, and in my services.ctp (within
> > the xml directory of course) I have this: 
> > *   18:30   rnickel 
> > *   18:30   rnickel 
> > *   18:31   Rik`([EMAIL PROTECTED]) left irc:
> > Read error: 110 (Connection timed out)
> > *   18:31   ivan_24_i wonder if the idea of cakephp is that you 
> > have
> > tu set your msgid'S in the .po (i.e app/locale/spa/LC_MESSAGEs/
> > default.po) with your default language and when if the
> > config.languaje="@#?~" for example the locale doesnt exist and dont
> > found the locale, then the output of the function __("my sentence") is
> > "my sentence"
> > *   18:31   Nickchange: Rik`_ -> Rik`
> > *   18:32   Lucian  ivan_24: true, when no local file is found, __("my
> > sentence") returns "my sentence"
> > *   18:32   rnickel AD7six: I did the header thing, and my 
> > browser was
> > forwa

Re: Space before layout content - Resolved

2007-10-30 Thread Wayne Fay

Thanks for following up, Langdon. This is a not-uncommon issue with
PHP, unfortunately. I wish there was a simple way to check non-view
PHP files for spaces -- anyone have a working regexp for grep or a
similar utility? Essentially, any space in any non-view file (outside
of  tags) should be identified and eliminated.

Wayne

On 10/30/07, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
>
> This was caused by a space before the  difficult to track down.  I discovered that the space was being
> introduced when the models were loaded.  By checking all of the models I
> discovered the error.  Once removed, there was no more problem.
>
> Hope this might be helpful to someone else in the future.
>
> Regards,
> Langdon
>
> Langdon Stevenson wrote:
> > I am developing an action (in a Cake 1.1 app) that outputs xml and have
> > hit a problem that has been mentioned here before but never resolved.
> >
> > I am getting a single space character before the output of the layout
> > begins.
> >
> > I have checked other regular html pages and they too have this problem,
> > but given the not-so-strict parsing of HTML it doesn't cause a problem.
> >
> > Has anyone else resolved this issue in Cake 1.1?  Does anyone know where
> > to start looking for this extra character?
> >
> > Regards,
> > Langdon
>
> >
>

--~--~-~--~~~---~--~~
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: PDF Creation in Cake 1.2

2007-10-30 Thread Wayne Fay

It doesn't make a lot of sense to have this kind of discussion in a
private email thread... It is a lot more helpful to keep these
discussion in the public forum, to benefit other current and future
users of Cake who want to create PDFs.

Wayne

On 10/30/07, kodienz <[EMAIL PROTECTED]> wrote:
>
> If anyone feels like emailing me:
>
> [EMAIL PROTECTED] and help a newbie create a prototype please
> please feel free!!!
>
>
> >
>

--~--~-~--~~~---~--~~
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: SWF files and cakephp

2007-10-30 Thread Wayne Fay

There have been several emails recently about SWF with Cake. Do a
search in the Google Group for Flash or SWF, perhaps one of those
threads will be of help.

Wayne

On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi everybody, I have a swf application album working 100%, but when I
> try to use it with cakephp I have some problems:
>
> I put the file on /webroot/files/ directory, BUT, in the .fla file my
> designer wrote the paths like "./images". "./foo". I've been trying to
> change those paths to "/files/foo" and some things work, others dont.
> Is there a way I can place my swf file normally (just like my designer
> gave it to me) without modifying anything at all? maybe .htaccess
> file? I need to tell apache not to process that like cakephp
>
>
> >
>

--~--~-~--~~~---~--~~
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 on NON obligatory fields and allowEmpty

2007-10-30 Thread Wayne Fay

Hey that's quite nice. Thanks for posting it back to the thread, I'll
probably use that soon...

Wayne

On 10/30/07, senser <[EMAIL PROTECTED]> wrote:
>
> Finally I solved it:
>
> 'reminder'=>array( 'date'=>array('rule'=>array('date',
> 'format'=>'ymd'), 'allowEmpty'=>true, 'required'=>false),
>
> 'length'=>array('rule'=>array('between', 10, 10),
> 'allowEmpty'=>true, 'required'=>false),
>
> 'valid_date'=>array('rule'=>array('validReminderDate'),
> 'allowEmpty'=>true, 'required'=>false))
>
> Hope it's helpful for other bakers
>
> On Oct 30, 8:51 am, senser <[EMAIL PROTECTED]> wrote:
> > Yes, I know for this method, but don't think it's a solution.
> >
> > The only working variant I succeed is:
> > 'reminder'=>array( 'required'=>false,
> >     'allowEmpty'=>true,
> > 'rule'=>array('date', 
> > 'format'=>'ymd'),
> > 'rule'=>array('between', 10, 10),
> > 'rule'=>array('validReminderDate'))
> >
> > But in this way I can set just one error_message
> >
> > On Oct 30, 7:59 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> >
> > > Roll it back to a previous version if you don't like this one...
> >
> > > Wayne
> >
> > > On 10/30/07, senser <[EMAIL PROTECTED]> wrote:
> >
> > > > I've read that the correct way is  to set error messages in layouts,
> > > > but not in models.
> > > > But even if I use a code like this:
> >
> > > > 'reminder'=>array( array('required'=>false),
> > > > array('allowEmpty'=>true),
> > > > array('rule'=>array('date', 
> > > > 'format'=>'ymd'),
> > > > 'message'=>'Invalid date format'),
> > > > array('rule'=>array('between', 10, 
> > > > 10), 'message'=>'Length is
> > > > 10 symbols'),
> > > > 
> > > > array('rule'=>array('validReminderDate'), 'message'=>'Date
> > > > can not be in the past'))
> >
> > > > I still get an error "Error in field Reminder" when the field is
> > > > replete correctly.
> >
> > > > P.S. I'm terribly sorry that I upgraded to this new version of CakePHP
> > > > - I've already been trying correct my code for two days - buttons has
> > > > gone away (http://groups.google.com/group/cake-php/browse_thread/
> > > > thread/53731efd48b0c4b/ef2d193a5c0ae668?lnk=gst&q=button
> > > > +1.2.0.5875#ef2d193a5c0ae668), validation rules are broken .
> > > > and who knows what else
> >
> > > > On Oct 30, 12:28 am, francky06l <[EMAIL PROTECTED]> wrote:
> > > > > Well to receive a different message, you need to associate message
> > > > > into your rule or in your view :
> >
> > > > > array('rule'=>array('between',
> > > > > 10, 10), 'message' => "invalid range"),
> >
> > > > > I use the cake1.2 branch
> > > > > cheers
> >
> > > > > On Oct 29, 3:28 pm, senser <[EMAIL PROTECTED]> wrote:
> >
> > > > > > I've chaged the code in my Model in this way:
> >
> > > > > > var $validate=array('reminder'=>array( 'required'=>false,
> > > > > > 'allowEmpty'=>true,
> > > > > > 'rule'=>array('date', 
> > > > > > 'format'=>'ymd'),
> > > > > > 'rule'=>array('between

Re: Validation on NON obligatory fields and allowEmpty

2007-10-29 Thread Wayne Fay

Roll it back to a previous version if you don't like this one...

Wayne

On 10/30/07, senser <[EMAIL PROTECTED]> wrote:
>
> I've read that the correct way is  to set error messages in layouts,
> but not in models.
> But even if I use a code like this:
>
> 'reminder'=>array( array('required'=>false),
> array('allowEmpty'=>true),
> array('rule'=>array('date', 
> 'format'=>'ymd'),
> 'message'=>'Invalid date format'),
> array('rule'=>array('between', 10, 10), 
> 'message'=>'Length is
> 10 symbols'),
> array('rule'=>array('validReminderDate'), 
> 'message'=>'Date
> can not be in the past'))
>
> I still get an error "Error in field Reminder" when the field is
> replete correctly.
>
>
> P.S. I'm terribly sorry that I upgraded to this new version of CakePHP
> - I've already been trying correct my code for two days - buttons has
> gone away (http://groups.google.com/group/cake-php/browse_thread/
> thread/53731efd48b0c4b/ef2d193a5c0ae668?lnk=gst&q=button
> +1.2.0.5875#ef2d193a5c0ae668), validation rules are broken .
> and who knows what else
>
> On Oct 30, 12:28 am, francky06l <[EMAIL PROTECTED]> wrote:
> > Well to receive a different message, you need to associate message
> > into your rule or in your view :
> >
> > array('rule'=>array('between',
> > 10, 10), 'message' => "invalid range"),
> >
> > I use the cake1.2 branch
> > cheers
> >
> > On Oct 29, 3:28 pm, senser <[EMAIL PROTECTED]> wrote:
> >
> > > I've chaged the code in my Model in this way:
> >
> > > var $validate=array('reminder'=>array( 'required'=>false,
> > > 'allowEmpty'=>true,
> > > 'rule'=>array('date', 
> > > 'format'=>'ymd'),
> > > 'rule'=>array('between', 10, 10),
> > > 
> > > 'rule'=>array('validReminderDate')));
> >
> > > Now thigs seems to work but I cannot set different
> > > valdiaton_error_messages - for any validation rule i receive "This
> > > field cannot be left blank" when the field is invalid. Here is a part
> > > of my  view:
> >
> > > print $form->input('Comment.reminder', array('type'=>'text',
> > > 'length'=>10, 'maxlength'=>10,
> > > 
> > > 'error'=>array('date'=>'Invalid date format',
> > > 'length'=>'Length is 10 symbols', 'valid_date'=>'Date can not be in
> > > the past')));
> >
> > > On Oct 29, 4:01 pm, francky06l <[EMAIL PROTECTED]> wrote:
> >
> > > > Sorry did not read the complete code, but I have something like this
> > > > that works :
> >
> > > >   'email'   =>
> > > > array(array('allowEmpty' => true,
> > > >'rule' =>
> > > > 'checkEmails'))
> >
> > > > On Oct 29, 2:54 pm, senser <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hi,
> >
> > > > > After upgrading to CakePHP 1.2.0.5875 from 1.2.0.5427 I can't set
> > > > > validation for form fields that are NO obligatory. Untill now I used
> > > > > this code ana everything seemed to work fine:
> >
> > > > > /MODEL SNIPPET/
> > > > > var
> > > > > $validate=array('reminder'=>array( 
> > > > > 'required'=>array('rule'=>array('required'=>false)),
> > > > >   
> > > > >   'allow_empty'=>array('rule'=>array('allowEmpty'=>true)),
> > > > &

Re: Problem embedding flash movie into my view

2007-10-29 Thread Wayne Fay

Have you checked the HTML produced by the view to confirm the path?
Copy and paste the URL from the  tag and see if it works. I
think you might be missing a "/" somewhere... or something.

Wayne

On 10/29/07, Aero <[EMAIL PROTECTED]> wrote:
>
> I'm trying to embed a flash movie into one of the views on my cakePHP
> site. For some reason whenever i try to do this the movie fails to
> show up. The html/php code I am using is:
>
>  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
> swflash.cab#version=8,0,0,0" width="250" height="175" id="fileUpload"
> align="middle">
> 
> 
>
> Which I pretty much copied and pasted from the default html file that
> flash produces. The path to the movie is correct, so I have no idea
> what I could be doing wrong. If anyone has some suggestions, or can
> point me to a tutorial on where I can learn to do something similar to
> this please let me know. 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: Reversible encrypt functions in Cake?

2007-10-26 Thread Wayne Fay

Ah nevermind, I see it now:
https://trac.cakephp.org/browser/trunk/cake/1.2.x.x/cake/libs/security.php

Thanks.

On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> Must be new, I've got cake_1.2.0.5427alpha and there's no
> Security.cipher(). I'll go check a more recent build...
>
>
> On 10/26/07, nate <[EMAIL PROTECTED]> wrote:
> >
> > Check the cipher() function in the Security class.
> >
> > On Oct 26, 2:06 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > > I solved the problem with mcrypt (so I can build my own stuff if
> > > necessary) but I'm still wondering if anyone else has advice on
> > > reversible encryption in Cake...
> > >
> > > Wayne
> > >
> > > On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi bakers,
> > >
> > > > I need a reversible encrypt function in Cake, and I need to be able to
> > > > use it in a non-Cake PHP class as well. Basically I've got an export
> > > > function that is nontrivial and previously written in PHP, and instead
> > > > of rewriting things to make it work in Cake, I'm planning to encrypt
> > > > the URL parameters with Cake and then decrypt them in my export
> > > > function.
> > >
> > > > I wrote a little EncryptionHelper using some code I took from
> > > >www.php.combut it doesn't seem to be working in Cake though it works
> > > > fine in "standard" PHP. I had to uncomment the
> > > > "extension=php_mcrypt.dll" line in php.ini of course.
> > >
> > > > Here's the error:
> > > > Fatal error: Call to undefined function mcrypt_get_iv_size() in
> > > > C:\dev\cake\app\views\helpers\encryption.php on line 18
> > >
> > > > Here's the code:
> > > > $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
> > > > $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
> > > > $key = "This is a very secret key";
> > > > return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256,
> > > > $key, $text, MCRYPT_MODE_ECB, $iv)));
> > >
> > > > So it seems like I can't use these built-in PHP functions for some
> > > > reason... Any advice?
> > >
> > > > Wayne
> >
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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: Reversible encrypt functions in Cake?

2007-10-26 Thread Wayne Fay

Must be new, I've got cake_1.2.0.5427alpha and there's no
Security.cipher(). I'll go check a more recent build...


On 10/26/07, nate <[EMAIL PROTECTED]> wrote:
>
> Check the cipher() function in the Security class.
>
> On Oct 26, 2:06 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > I solved the problem with mcrypt (so I can build my own stuff if
> > necessary) but I'm still wondering if anyone else has advice on
> > reversible encryption in Cake...
> >
> > Wayne
> >
> > On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > > Hi bakers,
> >
> > > I need a reversible encrypt function in Cake, and I need to be able to
> > > use it in a non-Cake PHP class as well. Basically I've got an export
> > > function that is nontrivial and previously written in PHP, and instead
> > > of rewriting things to make it work in Cake, I'm planning to encrypt
> > > the URL parameters with Cake and then decrypt them in my export
> > > function.
> >
> > > I wrote a little EncryptionHelper using some code I took from
> > >www.php.combut it doesn't seem to be working in Cake though it works
> > > fine in "standard" PHP. I had to uncomment the
> > > "extension=php_mcrypt.dll" line in php.ini of course.
> >
> > > Here's the error:
> > > Fatal error: Call to undefined function mcrypt_get_iv_size() in
> > > C:\dev\cake\app\views\helpers\encryption.php on line 18
> >
> > > Here's the code:
> > > $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
> > > $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
> > > $key = "This is a very secret key";
> > > return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256,
> > > $key, $text, MCRYPT_MODE_ECB, $iv)));
> >
> > > So it seems like I can't use these built-in PHP functions for some
> > > reason... Any advice?
> >
> > > Wayne
>
>
> >
>

--~--~-~--~~~---~--~~
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: Reversible encrypt functions in Cake?

2007-10-26 Thread Wayne Fay

I solved the problem with mcrypt (so I can build my own stuff if
necessary) but I'm still wondering if anyone else has advice on
reversible encryption in Cake...

Wayne

On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> Hi bakers,
>
> I need a reversible encrypt function in Cake, and I need to be able to
> use it in a non-Cake PHP class as well. Basically I've got an export
> function that is nontrivial and previously written in PHP, and instead
> of rewriting things to make it work in Cake, I'm planning to encrypt
> the URL parameters with Cake and then decrypt them in my export
> function.
>
> I wrote a little EncryptionHelper using some code I took from
> www.php.com but it doesn't seem to be working in Cake though it works
> fine in "standard" PHP. I had to uncomment the
> "extension=php_mcrypt.dll" line in php.ini of course.
>
> Here's the error:
> Fatal error: Call to undefined function mcrypt_get_iv_size() in
> C:\dev\cake\app\views\helpers\encryption.php on line 18
>
> Here's the code:
> $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
> $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
> $key = "This is a very secret key";
> return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256,
> $key, $text, MCRYPT_MODE_ECB, $iv)));
>
> So it seems like I can't use these built-in PHP functions for some
> reason... Any advice?
>
> Wayne
>

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



Reversible encrypt functions in Cake?

2007-10-26 Thread Wayne Fay

Hi bakers,

I need a reversible encrypt function in Cake, and I need to be able to
use it in a non-Cake PHP class as well. Basically I've got an export
function that is nontrivial and previously written in PHP, and instead
of rewriting things to make it work in Cake, I'm planning to encrypt
the URL parameters with Cake and then decrypt them in my export
function.

I wrote a little EncryptionHelper using some code I took from
www.php.com but it doesn't seem to be working in Cake though it works
fine in "standard" PHP. I had to uncomment the
"extension=php_mcrypt.dll" line in php.ini of course.

Here's the error:
Fatal error: Call to undefined function mcrypt_get_iv_size() in
C:\dev\cake\app\views\helpers\encryption.php on line 18

Here's the code:
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = "This is a very secret key";
return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256,
$key, $text, MCRYPT_MODE_ECB, $iv)));

So it seems like I can't use these built-in PHP functions for some
reason... Any advice?

Wayne

--~--~-~--~~~---~--~~
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: Model Name Magic Needed

2007-10-25 Thread Wayne Fay

Thinking about it more... You should probably be able to get away with
just the $uses = Katch and the class Katch model name change, plus the
$this->Katch changes.

This would allow you to keep your CatchController etc which keeps your
URLs looking like you want.

Or you could just add some routes to point /catch/ to /katch/ and do
what I suggested originally.

Wayne

On 10/25/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> In your controller, you'd need  $uses = array('Katch');
>
> Here's what I would do:
> 1. Commit all your code into SVN.
> 2. Do a global find and replace Catch for Katch in your files.
> 3. Do a global find and replace catch for katch in your files.
> 4. Fix the $name in model Katch.
>
> That should generally fix things. You may also have some small issues
> with foreign keys named "catch_id" so you'll need to think about that
> too.
>
> Wayne
>
> On 10/25/07, MikeK <[EMAIL PROTECTED]> wrote:
> >
> > We are trying...
> >
> > So would this have a chance?
> >
> > In model:
> >
> > class Katch extends AppModel
> > {
> >var $name = 'Catch';
> >
> > And in controller
> > var uses = array('Catch')
> >
> > Also wouldn;t we have to change every reference to the Catch model
> > ($this->Catch... to $this->Katch) and all references to the data it
> > pulls out from ($data['Catch']['field'] to $data['Katch']['field']?
> >
> > Just trying not to go down the long road of modding 5000 lines of code
> > till we know what works...
> >
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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: Model Name Magic Needed

2007-10-25 Thread Wayne Fay

In your controller, you'd need  $uses = array('Katch');

Here's what I would do:
1. Commit all your code into SVN.
2. Do a global find and replace Catch for Katch in your files.
3. Do a global find and replace catch for katch in your files.
4. Fix the $name in model Katch.

That should generally fix things. You may also have some small issues
with foreign keys named "catch_id" so you'll need to think about that
too.

Wayne

On 10/25/07, MikeK <[EMAIL PROTECTED]> wrote:
>
> We are trying...
>
> So would this have a chance?
>
> In model:
>
> class Katch extends AppModel
> {
>var $name = 'Catch';
>
> And in controller
> var uses = array('Catch')
>
> Also wouldn;t we have to change every reference to the Catch model
> ($this->Catch... to $this->Katch) and all references to the data it
> pulls out from ($data['Catch']['field'] to $data['Katch']['field']?
>
> Just trying not to go down the long road of modding 5000 lines of code
> till we know what works...
>
>
> >
>

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

2007-10-25 Thread Wayne Fay

Use Webdeveloper plugin for Mozilla (or similar) to tell you what
styles are affecting those black rows. You must be missing something,
somewhere.

Wayne

On 10/25/07, Daniel <[EMAIL PROTECTED]> wrote:
>
> There is no "black" or "#000" in that css file.
>
>
> >
>

--~--~-~--~~~---~--~~
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: sqlite autoincrement row versus id NOT-autoincremented

2007-10-24 Thread Wayne Fay

David... read the URL you sent again, specifically:

If a table contains a column of type INTEGER PRIMARY KEY, then that
column becomes an alias for the ROWID. You can then access the ROWID
using any of four different names, the original three names described
above or the name given to the INTEGER PRIMARY KEY column. All these
names are aliases for one another and work equally well in any
context.

Wayne

On 10/24/07, Olexandr Melnyk <[EMAIL PROTECTED]> wrote:
> You can have auto-incremented columns with SQLite.
>
> Define a single integer column as primary key and that should do the job.
>
>
> On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hello all!
> >
> > I'm a re-newly cake user and I'm currently trying to make my cake
> > using a SQLite database.
> > I'll the 15minute blog tutorial as a reference.
> > Now, once I get the database connected correctly (verified and working
> > with bake script), I do a simple table :
> >
> > CREATE TABLE posts (
> > id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
> > title VARCHAR(50),
> > body TEXT,
> > created DATETIME DEFAULT NULL,
> > modified DATETIME DEFAULT NULL
> > );
> >
> > ok, now that is a standard mysql query and it is recognised, however,
> > the AUTO_INCREMENT is not a definition in sqlite. Thus when inserting
> > a row using the standard posts/add , the id stays empty. Then it is
> > impossible to do editing/deleting because there is no id.
> >
> > After reading this page :
> http://www.sqlite.org/autoinc.html that is
> > explaining the way to use the only auto-incremental feature of this
> > kind of database :
> > replacing "id" by the auto-generated "rowid" (and not visible throught
> > SQLiteManager)
> >
> > I wonder if I should put a ticket about that ? So the dbo_sqlite.php
> > script be updated to automatically use "rowid" insteand of "id" into
> > querys.
> > What is your thought about that ?
> > Do I make myself clear anoff ?
> > Is there someone reading this using a sqlite database ?
> >
> > Thanks
> > David
> >
> >
> > http://omelnyk.net/
> > > >
> >
>

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

2007-10-24 Thread Wayne Fay

Check your CSS and the HTML source.

Wayne

On 10/24/07, Daniel <[EMAIL PROTECTED]> wrote:
>
> I am following the CakePHP tutorial from IBM and I get a single black
> row appearing in the users table.  So I added another record and then
> I get the black row again but with a second row appearing normally.
> It is like as though the text is black on black.
>
>
> >
>

--~--~-~--~~~---~--~~
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: saveField breaks in new 1.2 release

2007-10-24 Thread Wayne Fay

Looks like you're only getting a SELECT executed. Are you sure the
$ids variable has proper values in it -- if not, the foreach() won't
run and saveField() will never get called.

Add some debugging statements to your code and check the debug log
after executing this method a few times.

Wayne

On 10/24/07, LW <[EMAIL PROTECTED]> wrote:
>
> Well, I don't doubt that saveFields works in 1.2
> I just don't get why it's not working in my code after the update and
> i thought maybe something changed in the way saveField is used or
> something like that. I'd appreciate any help on this, what code do you
> need to see?
>
> Maybe the response i get might help:
>
>  id="cakeSqlLog_1193212061471ef89d060722_06944581" summary="Cake SQL
> Log" cellspacing="0" border = "0">
> 1 query took 0 ms
> 
> NrQueryErrorAffectedNum.
> rowsTook (ms)
> 
> 
> 1SELECT COUNT(*) AS `count` FROM `images` AS
> `Image`   WHERE `Image`.`id`  =  134 11 "text-align: right">0
> 
> 
>
> thanks,
> Lutz
>
>
> On 24 Okt., 00:53, "Mariano Iglesias" <[EMAIL PROTECTED]>
> wrote:
> > I suggest you post your code, since Model has an awesome test coverage: in
> > cake/tests/cases/libs/model/model.test.php you can see for example the
> > function testSaveField() which tests for saveField() calls, and all tests
> > are succeeding. Therefore saveField() IS WORKING on 1.2.
> >
> > -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 LW
> > Enviado el: Martes, 23 de Octubre de 2007 04:34 p.m.
> > Para: Cake PHP
> > Asunto: Re: saveField breaks in new 1.2 release
> >
> > Doesn't work means the db-records are not updated, the saveField data
> > is not saved. it doesn't give me an error message or any entry in the
> > cake debug log though.
>
>
> >
>

--~--~-~--~~~---~--~~
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: saveField breaks in new 1.2 release

2007-10-23 Thread Wayne Fay

What does "doesn't work" mean, can you be more specific? And can you
provide the stack trace or some debug log?

Wayne

On 10/23/07, LW <[EMAIL PROTECTED]> wrote:
>
> Hi,
> i just updated to the new release (of 1.2) and I'm having one problem
> I can't resolve:
>
> I'm updating my db from a sortable list through this function:
>
> function order_images(){
> $ids= $this->params['form']['imgList'];
> $i = 1;
> foreach($ids as $id){
>   $this->Image->id = $id;
>   $this->Image->saveField('sort', $i++);
> }
>   $this->autoRender = false;
>   }
>
> It used to work fine befre the update, now it doesn't.
>
> any ideas?
>
>
> >
>

--~--~-~--~~~---~--~~
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: About the definition of 'singular' and 'plural' in naming conventions

2007-10-22 Thread Wayne Fay

The plural/singular code is in the Inflector class, under cake/libs.
And as AD76 added, you can add your own rules by editing
app/config/inflections.php.

Wayne

On 10/22/07, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> On Oct 22, 9:44 pm, skyblueink <[EMAIL PROTECTED]> wrote:
>
> 
> Did you try any of your questions? You could have checked all of those
> possibilities in less time than it took to write your message ;). In
> any event if you don't get what you expect add your own inflection
> rules and then you will.
>
> pr (Inflector::pluralize('person')); die;
>
> 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: Problem with bake

2007-10-21 Thread Wayne Fay

I suspect, if you had a sufficiently high level of logging and tracing
in your network and on the various servers involved when that error
message popped up, that you'd discover something interesting, probably
timeouts to your Mysql instance.

PHP doesn't just randomly report "server has gone away" -- there must
be a reason. I'll assume you're in a shared server environment and you
have no control over the load of your machines.

Wayne

On 10/20/07, Conrad <[EMAIL PROTECTED]> wrote:
>
> Of which none appys the mysql server is working fine for all other
> applications
>
> On Oct 19, 5:59 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > RTFM :-)http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
> >
> > Wayne
> >
> > On 10/19/07, Conrad <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I am having the same problems - in trying to create controller for
> > > 'user' .
> > > I get the message
> > > 1. DESCRIBE `users` 2006: MySQL server has gone away
> > > BUT the controller is written.
> >
> > > in trying to create views I get this (index.thtml)
> > >
> 
> > > List Users
> >
> > > 
> > > 
> > >Created
> > >Actions
> > > 
> > > 
> > > 
> > >
> > >
> > >link('View','/users/view/' .
> $user['User']['id'])?
> >
> > >link('Edit','/users/edit/' .
> $user['User']['id'])?
> >
> > >link('Delete','/users/delete/' .
> $user['User']
> > > ['id'], null, 'Are you sure you want to delete id ' . $user['User']
> > > ['id'])?>
> > >
> > > 
> > > 
> > > 
> > >
> ---
> > > Bake.php finds the tables or it would not display the names for
> > > choice.
> >
> > > Thanks,
> > > Conrad
> > > On Oct 18, 9:16 am, Jakobloekke <[EMAIL PROTECTED]> wrote:
> > > > Hi guys,
> > > > I'm new to cakephp, and I'm stuck with a problem using the bake
> > > > script:
> >
> > > > I can bake a DB configuration without problems.
> > > > When I try to bake a model, my terminal prints out some sql-errors,
> > > > but I can create a new model manually.
> >
> > > > When I try to bake a controller I get the following error, and:
> > > > Fatal error: ConnectionManager::getDataSource - Non-existent data
> > > > source default in /Library/WebServer/cake1.2.x.x/cake/libs/model/
> > > > connection_manager.php on line 111
> > > > Then the bake script terminates.
> >
> > > > Can anyone tell me where I went wrong?
> >
> > > > thanks,
> > > > Jakob
>
>
> >
>

--~--~-~--~~~---~--~~
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: Views folder having deeper folder levels? Like views/admin/admin1/index.ctp?

2007-10-20 Thread Wayne Fay

Sounds like a site begging for a CMS (Content Management System) of some kind.

Wayne

On 10/20/07, Soulcatcher <[EMAIL PROTECTED]> wrote:
>
> Basically, i was asked to organize stuff inside views folder so that
> people who have no idea about cakephp can do some small changes
> directly to views.
>
> Ideally my views folder should mirror organization's structure. For
> example, they have Events section that has several events and each
> event has several html document describing it.
>
> So they have something like that:
> Events/
> Events/EventA/description.html
> Events/EventB/description.html
> Events/EventC/description.html
> Events/EventC/SubEventC/description.html
>
> So in cakePHP i have Events controller - so views folder has events
> folder - but that folder can contain only .ctp files (no folders)
> since they correspond to functions inside events controller.
>
> Is there any way to specify ctp file inside function? Or how do people
> actually tackle this problem - because in a big site it's not very
> convenient to have hundreds of ctp files in some controller folder
> without having any structure w/o folders.
>
>
> >
>

--~--~-~--~~~---~--~~
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, Controllers y Elements

2007-10-20 Thread Wayne Fay

To make that concrete...
class UsersController extends AppController {
   var $uses = array('Muppet', 'Fraggle', 'Smurf');
}

This is covered in the Cake manual too:
http://manual.cakephp.org/chapter/controllers

Wayne

On 10/20/07, the_woodsman <[EMAIL PROTECTED]> wrote:
>
> I can at least help with b)
>
> Controllers can have access to many, unrelated models, by having more
> than one item in the uses array.
>
> Good luck with the other stuff!
>
> On Oct 19, 2:07 pm, Pinholecam <[EMAIL PROTECTED]> wrote:
> > I've been looking for some answers to my problems but after a couple
> > of hours of searching, I'll answer that.
> >
> > a)   I would need to query differents models form a component. How to
> > do it?
> >
> > b)   Looking at the manual it seems that each model has one controller
> > and one controller has one model. In addition, if I have some kind of
> > assosiation between models, for one controller it's possible to query
> > the other models associated. But if I don't have any association? How
> > can I query other models? (When I talk about models, maybe I should
> > talk about tables). I assume that it's possible to query directly by
> > $this->Mymodel->query(), but I would use Cake DB functions.
> >
> > c)   Elements: this are pieces of code(view) that repeat in a part of
> > your site, so in order to not to repeat it. I've also seen that it's
> > not possible to query from elements directly to the database, but you
> > get information from the function set of your controller. If the query
> > and its bussiness logic is more than one line, you're also duplicating
> > code, so the answer is: can you type a function from a component that
> > sets the information to the view? So to set the information, just call
> > the component's funtion from a controller/action.
> >
> > Thanks to all the help u can give 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 bake

2007-10-19 Thread Wayne Fay

RTFM :-)
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

Wayne

On 10/19/07, Conrad <[EMAIL PROTECTED]> wrote:
>
> I am having the same problems - in trying to create controller for
> 'user' .
> I get the message
> 1. DESCRIBE `users` 2006: MySQL server has gone away
> BUT the controller is written.
>
> in trying to create views I get this (index.thtml)
> 
> List Users
>
> 
> 
>Created
>Actions
> 
> 
> 
>
>
>link('View','/users/view/' . 
> $user['User']['id'])?
> >
>link('Edit','/users/edit/' . 
> $user['User']['id'])?
> >
>link('Delete','/users/delete/' . 
> $user['User']
> ['id'], null, 'Are you sure you want to delete id ' . $user['User']
> ['id'])?>
>
> 
> 
> 
> ---
> Bake.php finds the tables or it would not display the names for
> choice.
>
> Thanks,
> Conrad
> On Oct 18, 9:16 am, Jakobloekke <[EMAIL PROTECTED]> wrote:
> > Hi guys,
> > I'm new to cakephp, and I'm stuck with a problem using the bake
> > script:
> >
> > I can bake a DB configuration without problems.
> > When I try to bake a model, my terminal prints out some sql-errors,
> > but I can create a new model manually.
> >
> > When I try to bake a controller I get the following error, and:
> > Fatal error: ConnectionManager::getDataSource - Non-existent data
> > source default in /Library/WebServer/cake1.2.x.x/cake/libs/model/
> > connection_manager.php on line 111
> > Then the bake script terminates.
> >
> > Can anyone tell me where I went wrong?
> >
> > thanks,
> > Jakob
>
>
> >
>

--~--~-~--~~~---~--~~
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: want to update more than one fields in one query

2007-10-19 Thread Wayne Fay

You'll have a lot more luck on this list if you carefully (and fully)
explain what you have vs what you want in complete English sentences.

Wayne

On 10/19/07, manuj bansal <[EMAIL PROTECTED]> wrote:
>
> i want to update and add more than one fields in one query in
> cakephp1.2
>
> becuse it is running many queries at at time in one bye one
>
> thanks in advance
>
>
> >
>

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



Re: homepage with CakePHP (newbie question)

2007-10-19 Thread Wayne Fay

This doesn't seem like something that Cake should help you with.
Instead, add a job that runs after your cron shell that calculates
those things and inserts them into a 4th table in your database.

Then build a Cake view on top of that new table.

Wayne

On 10/19/07, Eric <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
>
> I have just started using CakePhp, and I have a trouble to find how to
> manage my idea.
>
> So, here is the principle:
> I have 3 tables updates on a daily basis by cron shell from another
> software.
> I would like to have a homepage in my CakePhp site, showing me
> statistics like : last date update, number of records per tables, and
> so on.
>
> To be honnest, I do not see how to proceed. No trouble to make pages
> table per table...
>
> Thanks in advance for your help.
> Eric
>
>
> >
>

--~--~-~--~~~---~--~~
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: Newbie question re URLs

2007-10-19 Thread Wayne Fay

To put it simply, there is magic happening that you don't see.

If you don't call it yourself in the Controller method,
$this->render() is called for you. Other magic finds the correct view
name to use based on the action name (though you can override this to
specify an alternate) and which layout to use (unless you override).

Wayne

On 10/19/07, jakeone <[EMAIL PROTECTED]> wrote:
>
> I'm confused.  Why do URLs in Cake typically point to "controller/
> action" and not "view/action"?  I would have thought a link was
> presenting something to the user, i.e. a view, not an action.
>
> The Cake manual's blog tutorial has a link as follows:
>
> echo $html->link('Add Post', '/posts/add');
>
> and when you look at the Post controller's add action you see:
>
> function add()
> {
>   if (!empty($this->data))
>   {
> if ("this->Post->save(%this->data))
> {
>   $this->flash('Your post has been saved.', '/posts');
> }
>   }
> }
>
> I don't see how that displays the Add Post form (i.e. view) to the
> user... Or am I missing the point?
>
> 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: pretty-print (indent) view output

2007-10-18 Thread Wayne Fay

If you file a bug, perhaps someone in the Cake Dev team will implement
it. But this seems to be a low priority enhancement to me.

What you're basically proposing is somehow in-lining htmltidy (or
similar) into the HTTP response, so that all HTML output from Cake is
formatted nicely before it is sent to the user's web browser. I can
see this perhaps being useful in development, but wouldn't want it
turned on in a production environment.

Thinking about it some more, I recall that there is an Apache module for this --
http://mod-tidy.sourceforge.net/

Wayne

On 10/18/07, Rex <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I see that in cakephp a view output is not properly indented. This
> makes it very difficult to debug a problem.
> I suggest that all cakephp (HTML) output should be indented properly
> so that when we try to view-source using mozilla, we get a
> beatutifully formatted code which all humans can see and understand
> clearly.
>
> regards,
> Rex
>
>
> >
>

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



Where do non-Cake PHP files go in structure?

2007-10-18 Thread Wayne Fay

On my dev servers, I am able to export to Excel with no troubles. In
the production server, it just comes out as text directly in the web
browser. So there seems to be something weird with that environment,
and I assume the headers are not being written out properly.

So, I built a little plain jane export.php script that establishes its
own mysql connection and uses sql and echo to write the file out to
Excel. And it works just fine.

Where should I put this file in the /cake/app directory? In webroot?
And is there a special way/url I should use to call/access it?

Wayne

--~--~-~--~~~---~--~~
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: Output of RSS contains spaces

2007-10-18 Thread Wayne Fay

Which helper? I probably have the same one in my controller, unless
its a custom-built one. And if its not custom, then a bug needs to be
filed so it can be fixed.

Wayne

On 10/18/07, Charlie van de Kerkhof <[EMAIL PROTECTED]> wrote:
>
> Found it. Was in a helper that I included but not used. :(
> Thnx anyway...
>
> On Oct 18, 6:56 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > I am getting a single space at the beginning of my CSV file.
> > Fortunately for me, the space is not a problem. And in my case, all
> > the code is being echo'ed from my Controller method directly, so there
> > are no .thtml or .ctp files in my app that are being called.
> >
> > So I assume this space is coming from somewhere deep inside Cake (??).
> > But I don't know where (yet). I'm using 1.2.0.5427. I haven't tried
> > with any later builds of 1.2.
> >
> > Wayne
> >
> > On 10/18/07, Charlie van de Kerkhof <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi,
> > > I'm trying to get the RSS functionality working in CakePHP 1.2 Working
> > > just fine, but it gives me 1 space before the opening header  > > So the RSS is not recognized as such.
> > > I opened every ctp file that is used by this action but none of them
> > > conatins spaces before or after the PHP tags.
> > > Even the models and controllers used by this action!
> >
> > > I'm stuck. anyone had the same experience and found a solution?
> >
> > > thnx!
> > > - Charlie
>
>
> >
>

--~--~-~--~~~---~--~~
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: Output of RSS contains spaces

2007-10-18 Thread Wayne Fay

I am getting a single space at the beginning of my CSV file.
Fortunately for me, the space is not a problem. And in my case, all
the code is being echo'ed from my Controller method directly, so there
are no .thtml or .ctp files in my app that are being called.

So I assume this space is coming from somewhere deep inside Cake (??).
But I don't know where (yet). I'm using 1.2.0.5427. I haven't tried
with any later builds of 1.2.

Wayne

On 10/18/07, Charlie van de Kerkhof <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I'm trying to get the RSS functionality working in CakePHP 1.2 Working
> just fine, but it gives me 1 space before the opening header  So the RSS is not recognized as such.
> I opened every ctp file that is used by this action but none of them
> conatins spaces before or after the PHP tags.
> Even the models and controllers used by this action!
>
> I'm stuck. anyone had the same experience and found a solution?
>
> thnx!
> - Charlie
>
>
> >
>

--~--~-~--~~~---~--~~
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: Dropdown in CakePHP

2007-10-17 Thread Wayne Fay

I'm sure the developers of CakePHP would appreciate your contribution.
Write up a "small paragraph" explaining this and file it in the bug
tracker.

Wayne

On 10/17/07, Paolo <[EMAIL PROTECTED]> wrote:
>
> Thank yiu very much, but I solved the issue now, in the same eact way
> you told me! Thanks again!
>
> By te way, why isn't hte manual more complete, for understanding this
> I had to read at least 100 posts and 10 pages of api, when it could be
> easily explained in a small paragraph in the manual!
>
>
> On 17 Ott, 17:36, dw <[EMAIL PROTECTED]> wrote:
> > Hi Paolo,
> >
> > To accomplish this, you would first set a variable in the edit
> > function of the Post controller using generateList:
> >
> > $this->set('categories', $this->Post->Category->generateList(null,'descr
> >
> > ASC',null,"{n}.Category.id","{n}.Category.descr"));
> > (see Model::generateList in the API for the generateList arguments)
> >
> > Now the categories data is available for you to use in the Post's Edit
> > view.
> > Something like this:
> >
> > $html->selectTag('Post/category_id', $categories, 
> > $html->tagValue('Post/category_id'), array(), array(),false, true)));
> >
> > (Again see HtmlHelper::selectTag in the API to understand the
> > arguments)
> >
> > Hope this helps.
> > -dave
> >
> > On Oct 17, 8:21 am, Paolo <[EMAIL PROTECTED]> wrote:
> >
> > > Hi all!
> >
> > > I'm new to Cake and already have a problem. I'm creating the editing
> > > page for a model. It's something like:
> >
> > > Post
> > >id
> > >category_id
> > >...
> >
> > > Category
> > >id
> > >name
> > >...
> >
> > > so that the Post model has a "belongTo" association like:
> >
> > >  var $belongsTo = array('Category' =>
> > > array('className'=> 'Category',
> > > 'conditions'   => '',
> > > 'order'=> '',
> > > 'foreignKey'   => 'category_id'
> > > ));
> >
> > > Now in the Post edit page I need a dropdown with values from the
> > > category table. How can I access the generateList method of the
> > > Category Model from the view? Or otherwise, I could also create a
> > > method in the Post controller thta calls this method, but then again,
> > > how can I accees this from the view? IF this is not the correct way,
> > > could you pleae point out which is the correct way to do this?
>
>
> >
>

--~--~-~--~~~---~--~~
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: Form manipulation

2007-10-16 Thread Wayne Fay

I'm curious... why do you care if fields are removed?

Wayne

On 10/17/07, 2000Man <[EMAIL PROTECTED]> wrote:
>
> Anyone?
>
>
> >
>

--~--~-~--~~~---~--~~
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: Stable vs Development

2007-10-16 Thread Wayne Fay

I'm using 1.2 on a production server with no issues to speak of.

Wayne

On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> hey guy,
>
> I got a question for those of you using version 1.2 alpha.
>
> So far i have based my applications on previous stable versions of
> cake, and now i was looking into trying into starting a new
> application based on 1.2, because it has quite a few interesting new
> features.
>
> The thing that wories me is that it being still an alpha version, bugs
> might appear along the way.
> This application would be on a production server and it might not be
> the best thing to have uncontrolled bugs appear.
>
> So .. any oppitions and advice?
>
> Thx
>
>
> >
>

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



Re: How to paginate HABTM results?????????

2007-10-15 Thread Wayne Fay

Read this thread:
Pagination for model with association (cake 1.1)

Wayne

On 10/15/07, DGPhoebus <[EMAIL PROTECTED]> wrote:
>
> Okay I have a Products table, a Categories table and a
> Categories_Products join table.  A HABTM relationship has been
> defined.  So when I hit /categories/view/4  I get the Category
> definition pointed to by $id=4 and all the products assigned to
> category #4.
>
> How do I paginate the products?  Please someone help cause I have hit
> a brick wall on this one
>
> Sincerely stumped Daniel
>
>
> >
>

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

2007-10-15 Thread Wayne Fay

Your original email is not clear. Its one huge clump of text that just
rambles on.

Break it up into short 2-3 sentence paragraphs. And be more clear with
what you have, what is happening, and what you want. Perhaps someone
will respond more positively to that.

Wayne

On 10/15/07, d34db0lts <[EMAIL PROTECTED]> wrote:
>
> i tried fixing my problem by using this article:
>
> http://bakery.cakephp.org/articles/view/rails-like-data-validation
>
> unfortunately, it didn't help, i'm having issues with the helper...can
> anybody shed some light? some hope???
> On Oct 14, 8:09 pm, d34db0lts <[EMAIL PROTECTED]> wrote:
> > Hey guys, i have this little app that i'm having problems with.
> >
> > the index page lists all the records but in that same index page there
> > is a form that uses function add in the controller to process the
> > form, but my problem is that i need a way to display if the user
> > forgot to enter anything in the input field. i've been looking around
> > at it seems like the way it is done is with a tagErrorMsg but like i
> > said, the form is in index.thtml but the form logic is in function
> > add()...so i can't have function add() tell funcion index() to display
> > a message to the user to remind him/her to enter something in the
> > input field.
> >
> > i've looked at requestAction and elements, but i can't come up with an
> > answer...so if anybody can point me in the right direction, i would
> > really appreciate 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: Warning (512): Method HtmlHelper::formTag does not exist [CORE/cake/libs/view/helper.php, line 148]

2007-10-15 Thread Wayne Fay

Those tags have all been deprecated. This post should help:
http://cake.insertdesignhere.com/posts/view/15

Wayne

On 10/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hello Wayne,
> I appreciate your help but I'm still a little confused.
> I get the warnings below.
>
> Warning (512): Method HtmlHelper::formTag does not exist
> Warning (512): Method HtmlHelper::inputTag does not exist
> Warning (512): Method HtmlHelper::passwordTag does not exist
> Warning (512): Method HtmlHelper::submitTag does not exist
>
> What would the "new replacement tags" be for version1.2?
> Do you know of any code samples for ver 1.2 dealing with forms, I
> can't seem to find anything I need in the docs.
>
> Peter
>
>
>
> On Oct 12, 5:12 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > That code was written for Cake v1.1. The formTag method has been
> > deprecated in v1.2. You'll need to revert to v1.1 or rewrite the code
> > to use FormHelper directly.
> >
> > Wayne
> >
> > On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Does anyone know why I get this warning. And how do I get around it?
> > > I'm using cake_1.2.0.5427alpha the code comes from IBM's tutorial at:
> > >https://www6.software.ibm.com/developerworks/education/os-php-cake1/s...
> > > Their code:
> >
> > > formTag('/users/register') ?>
> > > Please fill out the form below to register an account.
> > > Username:
> > > inputTag('User/username', array('size' => '40')) ?>
> > > tagErrorMsg('User/username', 'username is
> > > required') ?>
> >
> > > Password:
> > > passwordTag('User/password', array('size' => '40')) ?
> >
> > > tagErrorMsg('User/password', 'password is
> > > required') ?>
> >
> > > Email Address:
> > > inputTag('User/email', array('size' =>
> > > '40','maxlength'=>'255')) ?>
> > > tagErrorMsg('User/email', 'email is invalid') ?>
> >
> > > First Name:
> > > inputTag('User/first_name', array('size' => '40')) ?
> >
> > > tagErrorMsg('User/first_name', 'first_name is
> > > required') ?>
> >
> > > Last Name:
> > > inputTag('User/last_name', array('size' => '40')) ?>
> > > tagErrorMsg('User/last_name', 'last_name is
> > > required') ?>
> >
> > > submitTag('register') ?>
> > > 
>
>
> >
>

--~--~-~--~~~---~--~~
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 data type of id field being set to 'double'

2007-10-13 Thread Wayne Fay

Try adding a beforeSave() method in your model that sets the datatype
to "string" for the UUID member with PHP's settype().

Or modify the UUID method itself so the first character in your UUID
is always "A" or another alpha char.

Wayne

On 10/13/07, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
>
> I have a Cake project that uses a unique id string generated by PHP as
> the id for each table (to allow ids to be unique across the entire project).
>
> However I have an odd edge case problem where by occasionally the UUID
> function will throw up a string that is all numeric (with a period .
> separating the two halves) rather than being a mix of alpha and numeric.
>
> When this happens Cake constructs the find and delete queries without
> quotes around the id string.  This results in MySQL interpreting the
> string as type: DOUBLE, so I get a query error.
>
> Can anyone point me to the code in the Cake core that makes this
> decision about encasing the id in quotes so that I can have a look at
> fixing this issue?
>
> My solution for now is to simply test new ids and ensure that they use a
> mix of character types, but it would be better to fix the root of the
> problem.
>
> Thanks in advance.
>
> Regards,
> Langdon
>
> >
>

--~--~-~--~~~---~--~~
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: CakePHP 1.2 - Form select

2007-10-13 Thread Wayne Fay

You'll need to provide more information about what you're doing and
what is happening. Many of us are very successfully using select boxes
in our forms with Cake 1.2, so it seems to be something specific to
your environment or your code.

Wayne

On 10/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm trying to put up a registration form for my website but
> unfortunately I encountered this problem, I can't retain the form-
> >select value during validation. How can I retain the value being
> selected on my $form->select while on the process of validation. I've
> been trying to search for answers using google but I havent found one.
> I'm using CakePHP 1.2alpha.
>
> Hope someone could help me.
>
> Thank you very much.
>
>
> Regards,
>
> Wendell
>
>
> >
>

--~--~-~--~~~---~--~~
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: Translateable countrylist for a selectbox?

2007-10-13 Thread Wayne Fay

You mean something like this?
http://bakery.cakephp.org/articles/view/country-select-list-helper

Wayne

On 10/13/07, burzum <[EMAIL PROTECTED]> wrote:
>
> Im looking for something like this to use it for a $form->select()
>
> array('
>  'ger' => __('germany'),
>  'eng' => __('england'),
>  ...
> )
>
> Has anyone done this already and want to share it? If not is anyone
> interested in completing the list and sharing it? I would like to do
> two versions, one with the three-letter countrycode and one with the
> numeric countrycode.
>
>
> >
>

--~--~-~--~~~---~--~~
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: Warning (512): Method HtmlHelper::formTag does not exist [CORE/cake/libs/view/helper.php, line 148]

2007-10-12 Thread Wayne Fay

That code was written for Cake v1.1. The formTag method has been
deprecated in v1.2. You'll need to revert to v1.1 or rewrite the code
to use FormHelper directly.

Wayne

On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Does anyone know why I get this warning. And how do I get around it?
> I'm using cake_1.2.0.5427alpha the code comes from IBM's tutorial at:
> https://www6.software.ibm.com/developerworks/education/os-php-cake1/section4.html
> Their code:
>
> formTag('/users/register') ?>
> Please fill out the form below to register an account.
> Username:
> inputTag('User/username', array('size' => '40')) ?>
> tagErrorMsg('User/username', 'username is
> required') ?>
>
> Password:
> passwordTag('User/password', array('size' => '40')) ?
> >
> tagErrorMsg('User/password', 'password is
> required') ?>
>
> Email Address:
> inputTag('User/email', array('size' =>
> '40','maxlength'=>'255')) ?>
> tagErrorMsg('User/email', 'email is invalid') ?>
>
> First Name:
> inputTag('User/first_name', array('size' => '40')) ?
> >
> tagErrorMsg('User/first_name', 'first_name is
> required') ?>
>
> Last Name:
> inputTag('User/last_name', array('size' => '40')) ?>
> tagErrorMsg('User/last_name', 'last_name is
> required') ?>
>
> submitTag('register') ?>
> 
>
>
> >
>

--~--~-~--~~~---~--~~
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: Pagination for model with association (cake 1.1)

2007-10-12 Thread Wayne Fay

I think you can stop hitting send... Five copies of the same email is enough.

Wayne

On 10/12/07, Alpha <[EMAIL PROTECTED]> wrote:
>
> Dear Andy,
>
> You mean you view the Category and want to see and paginate the
> related products?
>
> -> yeah , exactly~
>
> Easiest way it to make /products/byCategory/$catId work. I.e. display
> in that page the Category details and then do exactly the same as you
> would with the index.
>
> -> Do you mean that I should~
>
> 1> create new function byCategory in the products model
> 2> do pagination for the return products
> 3> get the catid from the category model.
> 4> put the web link ( /products/byCategory/$catId) in the view of
> Category
> 5> have the result in the view of Products
>
> I will try my best to work on itThanks for the direction~
> Will share with you all if I get it done~
>
> Again, Million 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: Modules?

2007-10-11 Thread Wayne Fay

RTFM is a perfectly reasonable response to a question like this...

Honestly, have you read the manual? Plugins are covered in some depth.
Your question makes it obvious that you have not (pure laziness?),
which makes people less likely to bother responding to your
question(s). Go read it now!! And print it for future reference!!

Wayne

On 10/11/07, Christian Winther <[EMAIL PROTECTED]> wrote:
>
> No, the plugin part is right
>
> But the first part about you not bothering to search for answer first is also 
> true
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of stefanb
> Sent: 11. oktober 2007 13:39
> To: Cake PHP
> Subject: Re: Modules?
>
>
> So a plugin is not the same as a module? Now I'm confused.
>
> On Oct 11, 12:43 pm, dardosordi <[EMAIL PROTECTED]> wrote:
> > Though the first half is the correct one.
> >
> > On Oct 10, 10:24 am, stefanb <[EMAIL PROTECTED]> wrote:
> >
> > > Thank you for the second half of your reply. The first half didn't
> > > help me at all.
> >
> > > On Oct 10, 3:12 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> >
> > > > Did you even bother to look in the manual or the group ?
> >
> > > > Its called plugins in cake
> >
> > > > -Original Message-
> > > > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> > > > stefanb
> > > > Sent: 10. oktober 2007 10:36
> > > > To: Cake PHP
> > > > Subject: Modules?
> >
> > > > Does Cake support the use of modules?
> >
> > > >www.example.com/module/controller/action/var1/val1/var2/val2
>
>
>
>
> >
>

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

2007-10-11 Thread Wayne Fay

You can't. Unless the user clicks a "logout" button, you have no idea
when the user leaves your site or closes the browser.

Wayne

On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> HI
> I have this banal problem but I can't resolve it.
> I would destroy a CakeSession when the user close the browser or exit
> from my web site.
> How can I do it?
> Many thanks
> Marco
>
>
> >
>

--~--~-~--~~~---~--~~
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: code in Title bar

2007-10-11 Thread Wayne Fay

I'd assume you've got some bad code in your layout file, probably default.ctp.

Wayne

On 10/10/07, befidled <[EMAIL PROTECTED]> wrote:
>
> I've got a lot of code from my cake app showing up in my title bar.
> What could be causing this?
>
> http://www.tolerase.com/items
>
>
> >
>

--~--~-~--~~~---~--~~
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: cakePHP and ecommerce security reisks

2007-10-09 Thread Wayne Fay

Assuming you have reasonable security in your database (strong
passwords with normal expiration periods, hard to guess user names,
updated db software), I don't know why you'd care about this.

Would it *really* be a big problem if you were forced to publish your
data model on your website? What does this do for someone who has no
ability to access the database?

Wayne

On 10/9/07, Comida411 <[EMAIL PROTECTED]> wrote:
>
> I am a new bee to cake PHP and I have a concern on the way cake expses
> the data model of the application in the view.Since we have to follow
> a naming convention for cake to update the model automatically from
> the view. I see there is a risk of exposing once's data model.
>
> Example:
> I have a user table  "users"   with fields 1) email_address 2)
> password
>
> On my view when I use cake sysntax like below
>  input('User/email_address', array('size' => '40'))?
> >
>
>
> When the page is rendered if some one does a view source he can
> clearly see the table name and the coloum name.
>
> Is it not a security risk?
>
> thank you for your response..
> Sincerely
> Comida411
>
>
> >
>

--~--~-~--~~~---~--~~
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: Help with basic file structure

2007-10-09 Thread Wayne Fay

In Cake, they all go in your default layout:
masthead + primary navigation + footer =>
cake\views\layouts\default.ctp (or .thtml)

Just add  in the middle where you
want your content to appear.

Wayne

On 10/9/07, brianfidler <[EMAIL PROTECTED]> wrote:
>
> I'm brand new to Cake and struggling a little with the best way to
> structure my files. Prior to cake I typically had an 'includes'
> directory and a 'templates' directory. In the 'includes' directory I'd
> usually put all of my database query code and logic files. In my
> 'templates' directory I'd usually put template files that would then
> include the appropriate file from the 'includes' directory.
>
> I understand the logic of MVC but am just at that critical point where
> I'm trying to understand how to do in Cake, what I used to do in a
> more standard PHP way.
>
> Any help would be great, here are some specifics that I need help
> with...
>
> A typical site I work on will have the following blocks of
> information:
>
> 1) masthead
> 2) primary navigation
> 3) content
> 4) footer
>
> In CakePHP would each of these be separate views? Would the masthead
> and footer go into a layout so that they can get reused? Would the
> primary navigation, if it's generated from the database, be a view
> with a model and controller?
>
> Just  looking for some direction. 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
-~--~~~~--~~--~--~---



  1   2   >