Hi,
I think your problem is the '\n', because that way the line feed
doesn't get interpreted, try it with "\n" instead.
Best regards,
Michael
manu schrieb:
> Hello all,
>
> I'm new to cake (and php btw).
> I'm looking for a way to format a plain textarea text in html. I don't
> want to use an
Yes, this is a known issue, not sure if it has been addressed yet.
However, my solution to this problem was to use an element (or two) to
display the data and cache it that way. My homepage (http://
www.brisbanepowerhouse.org/) is actually made up from two elements
sitting in my view.
eg.
eleme
Ok, I can't seem to solve this problem for the life of me. I have a
User model and a Zipcode model. Zipcode hasMany users. I want them to
join on User.zip = Zipcode.zip. I have to join on Zipcode.zip and not
Zipcode.id because a zipcode can have many rows because of several
city names, etc. I know
Set 'dependent'=>true in your $hasMany definition. See
http://manual.cakephp.org/chapter/models for more details.
On Dec 4, 2:56 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi, I'm new to cakePHP and I'm wondering if there is an easy way to
> setup automatic referential data integrity
http://tempdocs.cakephp.org/#TOC89602
--~--~-~--~~~---~--~~
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 [EMA
Hi guys,
I've been having issues with caching the view of the homepage, and
previous posts regarding the subject (
http://groups.google.co.uk/group/cake-php/browse_thread/thread/2f005c48b785426a/5019bc5f68475195
) only seem to have come up with workarounds involving redirecting
from the htaccess
Is right to use sanitize in controller(index function) or do i have
to clean the array inside some model function, if yes?
How do i send $data array from controller function to model function?
Thanks in advance.
--~--~-~--~~~---~--~~
You received this message beca
Thanks Nate, Maritn,
Just a few questions more:
1. How do i send or use $this->data inside the afterSave
function in Model?
2. Do i have to use:
$this->data['Report']['id'] = $this->Benchlink->getLastInsertId();
Before to save the second model or cakephp can automatically
handle that?
Tha
Hi, I'm new to cakePHP and I'm wondering if there is an easy way to
setup automatic referential data integrity so that when I delete a
parent, all of it's children are automatically deleted? Right now I
have a $hasMany relationship setup in the parent's model and a
$belongsTo relationship setup in
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 f
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
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 subscrib
I gained a greater understanding about cakephp by baking my models,
controllers and views, and analysing how cake does it by default.
Maybe you should try this? Once you understand how cake does it, then
it should be easier to figure out what cakes like and what you need to
change to get it to wor
I'm not sure if you've got this part sorted, but here is how I do
something similar in my app.
I have Films hasMany Ratings.
My films table has a field called "average_rating" which is updated
every time a new rating is added (whenever someone votes).
Here is a cutdown version of my Rating mode
Or you can set Router::parseExtensions('xml'), then you dont have to
specify layout, cake will take care of it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cak
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
Exactly, this is related with the primary key for your model. See
http://groups.google.com/group/CakePHP-es/t/9503e9e1222d1a08?hl=es (in
spanish) as his original request. ;)
Regards,
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
On Dec 3, 2007 8:25 PM, kristofer <[EMAIL PROTECTED]> wrote
Can you post your model? I don't think you should validate the id
field. Have the DB auto_increment the id field instead.
On Dec 3, 1:29 pm, dandreta <[EMAIL PROTECTED]> wrote:
> Hi!
> I have a problem and I cant solve it. I hope you can help me.
> I have a table called Records with fields Id and
I know this doesn't answer the question, but if you integrate tinymce
it will make your textarea look like MS Word and format the text into
html accordingly.
try changing $body to $this->data['ModelName']['nameOfFormField']
(adjusting ModelName and nameOfFormField respectively)
On Dec 3, 6:06 pm
The form data once it's submitted should be posted to your controller
function and show up in an array ($this->data)
You're going to need something like str_replace('\n', '', $this-
>data[Model][field]);
On Dec 3, 6:06 pm, manu <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm new to cake (and php
Model validation rule (checkUnique method got from tempdocs :-) ):
=
var $validate = array(
'name' => array(
'on'=>'create',
'rule' => array('checkUnique'),
'message' => 'Name is not unique!',
shouldn't be a problem.
try using print_r($this->data); die(); in your controller to see if
the data gets posted correctly.
On Dec 3, 5:59 pm, Brian <[EMAIL PROTECTED]> wrote:
> I have a form where 2 of the fields are always 0 when insterted into
> the database. It's the first_name and last_name
Thank you very much to everyone who replied to my question, your
advice and suggestions are much appreciated and very helpful.
Jon.
On Dec 3, 2007 3:16 PM, the_woodsman <[EMAIL PROTECTED]> wrote:
>
> Yes, with your tag cloud example, the core functionality for this
> might be best placed in the
Hello all,
I'm new to cake (and php btw).
I'm looking for a way to format a plain textarea text in html. I don't
want to use an html editor, but just want something like this:
', $body); ?> but it doesn't work.
Is there a cake helper, or method which could do that? Is there
another php way to d
I have a form where 2 of the fields are always 0 when insterted into
the database. It's the first_name and last_name fields below. All the
other fields are inserted correctly. If i have a typo in my code the
database will be set to NULL but on this form I'm getting zeros
inserted into the database
Or actually, try:
$this->layoutPath = 'xml';
$this->layout = 'default';
obviously that second line is optional - as 'default' is what should
be used anyway.
On Dec 4, 7:48 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> I expect it will work with
> $this->layout = 'xml'.DS.'default';
>
> On Dec 4, 4
I expect it will work with
$this->layout = 'xml'.DS.'default';
On Dec 4, 4:15 am, Andreas <[EMAIL PROTECTED]> wrote:
> Hi
>
> I've been trying to use the xml layout but it's not going too well
> since the layout file itself is located within a subfolder called xml
> (xml/default.ctp) and I'm not
Mcrypt is a PHP module - and its installation is quite independent
from Cake.
http://au.php.net/mcrypt
There is a newer Cookie component on the bakery (
http://bakery.cakephp.org/articles/view/encrypted-cookie-component )
which also uses mcrypt.
On Dec 4, 6:14 am, skoggins <[EMAIL PROTECTED]> w
What is a "pure html tag" ?
If you mean a form element that is not named with cake conventions,
look in $this->params['form'] in your controller.
On Dec 4, 2:18 am, firefox <[EMAIL PROTECTED]> wrote:
> how can i get a value from a pure html tag to my controller?
--~--~-~--~~
Instead of give you bad info, I'll give you the source:
http://manual.cakephp.org/chapter/models
search for this heading:
Saving Related Model Data
With that said, you can correct me on the following if I'm wrong.
You should be able to do something like
$this->Employee->Address->save($this->data)
Hi All,
I am trying to use the RosSoft cookie component to implement a
"Remember Me" functionality but it uses the Mcrypt engine and I am
unclear how to add this module to cake. Can anyone help me out?
Thanks!
--~--~-~--~~~---~--~~
You received this message becau
I have a from under an Employee view / model / table like this
https://www.website.com/employees/register.
register is a form that needs to input data into several diff tables.
The form works great for inserting data into the employee table but
not sure how to get it to insert into the employee_a
I think I have it working using the dbo_oracle from the new version of
Cake. I scrapped trying to use pear.
On Dec 3, 1:16 pm, Greg Baker <[EMAIL PROTECTED]> wrote:
> I seem to be having a little trouble getting cake to connect to Oracle
> using Pear. The config file says to use 'driver' => 'pe
Hey Robert...
Been out of town...I'll try to post my entire view and controller code so
you can see...
--
View this message in context:
http://www.nabble.com/Paginating-search-results%2C-keeping-search-criteria%2C-and-not-messing-with-the-view-tf4899190.html#a14136056
Sent from the CakePHP mai
Hi!
I have a problem and I cant solve it. I hope you can help me.
I have a table called Records with fields Id and Name.
I create model, controller and views with bake. In the model I
validate that Id and name do not be empty and in the controller I have
add function:
function add() {
Hi
I've been trying to use the xml layout but it's not going too well
since the layout file itself is located within a subfolder called xml
(xml/default.ctp) and I'm not sure how to reach it with $this->layout
= '';?
Andreas
--~--~-~--~~~---~--~~
You received this
hi,
its seems fine, but you might be able to save lot of lines by using
the
http://bakery.cakephp.org/articles/view/an-improvement-to-unbindmodel-on-model-side
extension
Regards,
Ritesh
On Dec 3, 10:36 am, designvoid <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I'm in the process of building my fi
how can i get a value from a pure html tag to my controller?
--~--~-~--~~~---~--~~
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 g
I seem to be having a little trouble getting cake to connect to Oracle
using Pear. The config file says to use 'driver' => 'pear-
drivername' (which I assume would be pear-oci8), but this does not
work. So I tried using 'driver' => 'pear' which got me a little
further.. Here's a snippet of my c
The second method will still work with 1.2
On Dec 3, 3:38 pm, salimk786 <[EMAIL PROTECTED]> wrote:
> It says Class 'Set' not found
> I'm on Cake 1.4 not the 2.
>
> Thanks.
>
> On Dec 3, 4:30 am, grigri <[EMAIL PROTECTED]> wrote:
>
> > // Method one : use Set::extract()
> > $data = $this->Attr
It says Class 'Set' not found
I'm on Cake 1.4 not the 2.
Thanks.
On Dec 3, 4:30 am, grigri <[EMAIL PROTECTED]> wrote:
> // Method one : use Set::extract()
> $data = $this->Attribute->findAll(...);
>
> $ids = Set::extract($data, '{n}.Attribute.id});
> $status_arr = array_combine($ids, Set::ex
Hi all!
I'm in the process of building my first app with Cake and was
wondering if someone could look over some code and let me know if what
I have done is correct or waay off base...
Its basically a few lines to get 3 different arrays populated with
data from 2 tables via a HABTM releationship.
Try this:
if(!empty($this->data)) {
foreach ($this->data["Tiposviajesusuario"] as
$tipo) {
$t["usuario_id"] = $u["id"];
$t["tipo_id"] = $tipo;
Yes, with your tag cloud example, the core functionality for this
might be best placed in the model.
One reason to go through requestAction to call the model functionality
is to reuse views.
For example, perhaps your list of top ten posts in a specified
category should appear the same way in load
>From my previous post I discovered what was wrong. In a plugin, in
case of model relation the className must be set with the
pluginname.classname.
Suppose a clt plugin and in a model such relation:
ie var $belongsTo = array('Client' => array('className' =>
'clt.Client'))
--~--~-~--~
> 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 greete
Hi,
PunBB create a cookie that way :
setcookie($cookie_name, serialize(array($user_id, md5($cookie_seed.
$password_hash))), $expire, $cookie_path, $cookie_domain,
$cookie_secure, true);
i dont find how CakePHP could read it.
I've read the cookie component and all i conclude is I need to make my
>
> I wouldn't go that far. It's just a little annoying, because you have
> to set that kind of thing up manually. It can be done, though.
>
Of course, it can be done, but it needs some queries more and array
manipulation to make it handy. It also can be done without this
behaviour (i.e. lang co
Thanks, Grant. Didn't think it would be that easy...
The only issue I have is that the tables in this external database are
not standard. For example student IDs are not stored in an 'id'
field.
However I'm sure I will get past that limitation.
Greg
On Dec 3, 3:02 am, Grant Cox <[EMAIL PROTEC
Wild guess : Try putting all your (relevant) keys in the db LONGINT(or
similar). looks like you reached 32 768 on some autoincrement/identity
or smth .
If the value of the key at autoincrement field reached or passed the
limit of the type you put in there, then you get errors.
Also the int is
On Dec 3, 2007 1:02 AM, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> Connecting to multiple databases is easy. Just add the extra
> connection to your /app/config/database.php, and have the appropriate
> var $useDbConfig in your Student model class.
If I understand Greg Baker's problem correctly, I'
On Dec 2, 7:56 pm, Adam Royle <[EMAIL PROTECTED]> wrote:
> Using elements is what you want. Inside the elements you can use
> requestAction to get at any data you wish to use. You can return an
> array of data directly, or render a view. See tutorial here for an
> example (and also how to cache th
i had a problem some time ago when an autoincrement id field didnt have enough
storage space (it was set to signed SMALLINT, which gives you 32767 id's before
it wraps around)
now i make a habit of checking the type of the id column to make sure its
either
INTEGER or BIGINT
it could be that
Hello i'm using the las version of cakephp1.2
i have a problem with Model->save
this is my source
---
if(!empty($this->data)) {
foreach ($this->data["Tiposviajesusuario"] as $tipo) {
$t["Tiposviajesusuario"]["usuario
If you think that having many records is an issue (which it's not), empty
out the tables without changing any code and try again.
--
Baz L
Web Development 2.0: Web Design, CakePHP, Javascript
http://www.WebDevelopment2.com/
On Dec 3, 2007 5:21 AM, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> On Dec
We run cake under subdomains on our server. We have 3 instances of
our site, www.CLIENT.com, staging.CLIENT.com, and dev.CLIENT.com
each subdomain has it's own 'installation' of cake. it's not a
"true" extension, but it will work.
-matt
On Dec 2, 3:33 am, "Louie Miranda" <[EMAIL PROTECTE
> Thank you for fast reply. Without this feature this is in fact usless
> in medium/large or even small project...
I wouldn't go that far. It's just a little annoying, because you have
to set that kind of thing up manually. It can be done, though.
Still, this is near the top of my wish-list of
'_method' for making a REST request. simulate a http method (PUT,
DELETE...)
On Dec 3, 6:47 pm, Serge Rodovnichenko <[EMAIL PROTECTED]> wrote:
> $form->create() produces a 'form' tag, followed by hidden field
> '_method'. What purpose of this option?
--~--~-~--~~~---~
> The Translate behavior uses the beforeFind() callback, which sadly is
> not supported on associated models. Even sadder, there are no plans to
> fix this.
>
>
> No, it doesn't make sense to me either. It looks like the model
> association code is distributed over both the model and the
> datas
The Translate behavior uses the beforeFind() callback, which sadly is
not supported on associated models. Even sadder, there are no plans to
fix this.
See https://trac.cakephp.org/ticket/3638 and
https://trac.cakephp.org/ticket/1183
No, it doesn't make sense to me either. It looks like the mode
On Dec 3, 11:45 am, bruceharrod <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I have a cake app which logs and handles Orders and Quotes. Everything
> has been working well up to now but as of last night, the Quotes model
> doesn't want to save any more records.
>
> I currently have about 30K quot
How to fetch translated fields form associated models?
My Example:
Models (extrected important parts):
class System extends AppModel {
var $actsAs = array('Translate' => array('name', 'description'));
var $belongsTo = array(
'SystemType' => array('classNam
Hello All,
I have a cake app which logs and handles Orders and Quotes. Everything
has been working well up to now but as of last night, the Quotes model
doesn't want to save any more records.
I currently have about 30K quotes already, could this be the problem?
Just to test, I reverted back to
Hello All,
I have a cake app which logs and handles Orders and Quotes. Everything
has been working well up to now but as of last night, the Quotes model
doesn't want to save any more records.
I currently have about 30K quotes already, could this be the problem?
Just to test, I reverted back to
How to fetch translated fields form associated models?
My Example:
Models (extrected important parts):
class System extends AppModel {
var $actsAs = array('Translate' => array('name', 'description'));
var $belongsTo = array(
'SystemType' => array('classNam
Hi all,
I tried quite a few searches here and in google, without luck.
I am looking for a twitter clone... I am not interesting in emulating
twitter to be honest, but I like the "simple and essential" system,
that could be use for other kinds of projects such as an intranet.
any idea where I ca
P.S. Cake 1.2 from SVN.
On Dec 3, 1:47 pm, Serge Rodovnichenko <[EMAIL PROTECTED]> wrote:
> $form->create() produces a 'form' tag, followed by hidden field
> '_method'. What purpose of this option?
--~--~-~--~~~---~--~~
You received this message because you are sub
$form->create() produces a 'form' tag, followed by hidden field
'_method'. What purpose of this option?
--~--~-~--~~~---~--~~
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@g
// Method one : use Set::extract()
$data = $this->Attribute->findAll(...);
$ids = Set::extract($data, '{n}.Attribute.id});
$status_arr = array_combine($ids, Set::extract($data,
'{n}.Attribute.status'));
$value_arr = array_combine($ids, Set::extract($data,
'{n}.Attribute.value'));
...
// Method t
Hi All
Just ran through the typical "notes" example on IIS using scaffold to
do the CRUD. I called up:
http://localhost/php/cake/app/?notes
and get the "List Notes" screen. However, clicking on "New Note" leads
to the following invalid URL:
/php/cake/app/index.php/notes/add
(which, btw, crashes p
Hey bakers,
as some of you might already know there wil be a talk about CakePHP @
FOSDEM 2008 (Free and Open source Software Developers' European
Meeting) by our favorite project manager - gwoo (http://www.fosdem.org/
2008/schedule/events/246).
There will also be a Firebug talk , php6 talk , DevRo
I'm fairly new to Cake too, so maybe I will hit something helpful
here.
The tutorial examples tend to make it look like 1 controller for 1
model
and 1 model for 1 controller.
This is not at all true. A controller can also use many models or
even none.
I think of a controller as the organizatio
72 matches
Mail list logo