I just noticed I don't have foreign keys set up on my
computers_serials table - is this required for cakePHP to understand
HABTM relationships?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To po
1st Hello to everybody ,I am new to this group .I have just join it
today . It's really nice coming here to see other people's design
related valuable discussions and sharing mine with others. I've
learned alot for sure...Here is my we site looks :
http://www.gznetwork.net/main
I also took t
I'm trying to set up a relationship where a serial number can be used
on multiple computers and computers can have multiple serial numbers.
I have a computers_serials table with computer_id and serial_id
columns. In my Computers model I have "var $hasAndBelongsToMany =
'Serial'; " and in my Serial
Forgot to mention, added the same to line 93
var $editorOptions = array('okText','onComplete',...
--~--~-~--~~~---~--~~
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@go
Im trying to use the 'onComplete' option on the ajax editor (http://
wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor), but
cake's ajax helper wont recognize the option. I added the onComplete
to cake/libs/view/helpers/ajax.php around line 602
$options = $this->_optionsToString($options
No not spam, genuine offer
--~--~-~--~~~---~--~~
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 PROTEC
Additionally, could any one else using the latest SVN try that out...
to see if i'm just freaking out...?!
Thx!
On Mar 21, 2:58 pm, "Seb" <[EMAIL PROTECTED]> wrote:
> I've been pulling my hair out for a few days trying to find out
> whether I was doing something wrong...
>
> I have this 'records
The nighty build of 1.2.x and even 1.1.3.x have some real major
problems when it comes to bake.php I can' build a controller because
it is giving me a Cannot instantiate non-existent class error now.
On Mar 14, 3:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I've been having this error
I've been pulling my hair out for a few days trying to find out
whether I was doing something wrong...
I have this 'records filtering' in place:
[code]
$filter = "LOWER(Article.title) LIKE 'a%'";
// ... more stuff... then I do a...
$this->Article->findAll($filter);
[/code]
Now in version 1.2.0
Check your css file for the 'actions' style, theres probably something
thats stopping it from displaying.
Try removing the div around the two buttons, if both display, then its
the style sheet.
Winston
--~--~-~--~~~---~--~~
You received this message because you
I always make it a habit of explicitly stating the alias in all my
queries like so:
SELECT `Chassis`.`a.equipment_id` FROM (select
`Chassis`.`equipment_id` from chassis as `Chassis` group by
`Chassis`.`equipment_id` LIMIT 3);
Which should give you an array like no matter which mysql/PHP version
I'm updating the with id = indicator to show the progress of
page loading whenever every content(that is, s with id = view0,
view2, vie3,...,view9) is displayed.
for ($i = 0; $i < 10; $i++){
$view = 'view' . $i;
echo "";
$options = array(
'update' => "$view",
'url'
Spam?
theno0b.net is a pretty cool domain name, though.
On Mar 20, 1:05 pm, "xbase" <[EMAIL PROTECTED]> wrote:
> I have a ton of domains that I am offering to sponsor Cake projects
> that the community is working on, i'll provide the hosting and such.
>
> cheersfoodandspirits.com,
> divergingart
Yes, it's an unfortunate side effect of using custom queries,
especially when joins or nested queries are involved. For a project, I
modified the core to use "0" as the alias if the table name returned
didn't match a list of model names. In the database.php file, I
declared a list of all available
I have 2 database tables and I used cake.php to generate the model,
views etc.
It created the action buttons in the div called class="actions". I am
trying to add new buttons so I copied the ones the script set up
exactly and they don't show up next to the old ones.
Here is an example:
How can I add variables to a model without having a corresponding
field in the table? I'm looking for something like the attr_accessor
in RoR. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" grou
I ended up using a regex to get the username and then queried the
database for the username in the controller. From this I got the id.
Probably not the best way, but it seemed like the easiest and the one
that would work on the widest range of platforms.
Mike.
On 3/17/07, Jeremy Pointer <[EMAIL
Thanks pointing me to the direction,
I read ACL , and I understand that ACL can control the action,
but how about group can edit certain fields
e.g.
product table.
id, Name, QTY, SalePrice
-Admin Can edit all the fields above
-Saleman, only can edit on "SalePrice" field ONLY
it means, admin hav
Grant, thanks for the reply
> Some documentation on the paginator is
> athttp://blog.insertdesignhere.com/posts/view/16
This was my starting point for learning how to do this. I am
essentially trying to implement the example in that blog post.
> 1. Have you called $paginator->options() ?
Yes
Some documentation on the paginator is at
http://blog.insertdesignhere.com/posts/view/16
1. Have you called $paginator->options() ?
2. Do you have the appropriate content div for the ajax call (which
you are currently using) to update?
--~--~-~--~~~---~--~~
Yo
I'm trying to get pagination working in Cake 1.2. I have the very
latest (using SVN checkout).
This:
next('Next >>', array('nextPage'=>2), null,
array('class' => 'disabled')); ?>
... renders as:
Next >>Event.observe('link7934', 'click', function(event){ new
Ajax.Updater('content','/groups/', {
Hi cc96ai
> I read ACL , and I understand that ACL can control the action,
> but how about group can edit certain fields
> e.g.
> product table.
> id, Name, QTY, SalePrice
>
> -Admin Can edit all the fields above
> -Saleman, only can edit on "SalePrice" field ONLY
>
> it means, admin have FULL
Thanks barduck
I'm impressed by the amount of help that available on this forum -
it's good to see something so well supported
Anyway, I've found my problem, and as we both suspected - nothing to
do with cake, but IIS
I neglected to uncheck the 'check that file exists' box in the
application e
There is a getModel function from Felix here
http://www.thinkingphp.org/2007/01/22/how-to-properly-create-a-model-instance-manually/
Put that in a component called common and then at the top of the
component you want to use set $components = array('common') to make
the function available.
Then
On 20 Mar, 06:55, "SMD" <[EMAIL PROTECTED]> wrote:
> Hi Saganxis,
>
> I've a plan to integrate Xoops into cakePHP.
>
> -SMD-
OK, so would you like to share it with me??? I was looking for how
Joomla and Drupal do that, but i still can't make Xoops and cake work
together.
I 'd like to partici
I have a ton of domains that I am offering to sponsor Cake projects
that the community is working on, i'll provide the hosting and such.
cheersfoodandspirits.com,
divergingart.com
fearlab.net
justrequestit.com
theno0b.net
totaldecay.com
xbasecore.net
xbaseonline.net
If you have a domain post it
On Mar 20, 2007, at 1:51 PM, codingisfun wrote:
>
> thanks for your answer, in such a short time...
>
> But what if i want to prevent a delete (delete restrict, for example
> when a Category cannot be deleted if it has associated messages)?
I don't believe something like that exists in Cake nat
Hello
I'm trying to make a database call from a component, but independent
from controller.
Is there a way to set the table to use from the component?
class CommonComponent extends Object
{
var $controller = true;
function startup(&$controller)
{
// This
On Mar 20, 2007, at 1:21 PM, codingisfun wrote:
>
> How do i code a 'delete cascade' and a 'delete restrict' in cakephp?
> Do i have to use a inodb database and define the corresponding foreign
> keys or do i have to set a property in de hasmany model?
Some model associations have a "dependent"
How do i code a 'delete cascade' and a 'delete restrict' in cakephp?
Do i have to use a inodb database and define the corresponding foreign
keys or do i have to set a property in de hasmany model?
--~--~-~--~~~---~--~~
You received this message because you are sub
thanks for your answer, in such a short time...
But what if i want to prevent a delete (delete restrict, for example
when a Category cannot be deleted if it has associated messages)?
On 20 mrt, 20:42, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Mar 20, 2007, at 1:21 PM, cod
Have you searched the group? I know AD7 has posted about this topic
before. :)
http://groups.google.com/group/cake-php/browse_thread/thread/f23b1825050ad543/014092749592de70?lnk=gst&q=habtm+search&rnum=3#014092749592de70
On Mar 20, 9:13 am, "Cake In The Face" <[EMAIL PROTECTED]> wrote:
> Need
Is there a way to do this from the stories_controller? (Maybe with
bindModel?) I only need to limit to 3 for one query.
On Mar 20, 11:28 am, Bernardo Vieira <[EMAIL PROTECTED]> wrote:
> Have you tried:
>
> /app/models/category.php
>
> class Category extends AppModel
> {
> var $name = 'Catego
Need a solution to this too.
On Mar 7, 6:38 am, "FredsFriend" <[EMAIL PROTECTED]> wrote:
> Hey
> I've had a bit of a nosey around and can't seem to find the answer to
> my problem.
> I have two tables ( cars, products) and a join table ( cars_products)
> all set up with a HABTM relationship using
Same problem here. Any ideas?
On Mar 7, 8:38 am, "FredsFriend" <[EMAIL PROTECTED]> wrote:
> Hey
> I've had a bit of a nosey around and can't seem to find the answer to
> my problem.
> I have two tables ( cars, products) and a join table ( cars_products)
> all set up with a HABTM relationship usin
On 3/20/07, gwoo <[EMAIL PROTECTED]> wrote:
>
> @sunertl
> you would do better to use cache function. Also, realize that a small
> db query is not that painful. In any case, in 1.2 you can now cache an
> element using the $this->element('whatever', array('cache'=>'+1 day'));
>
woo hoo gwoo
--
(
Hi Penfold,
probably you can look at this bakery article
http://bakery.cakephp.org/articles/view/55
it shows how you can have more than one rules for validation
regards,
bingo
On Mar 19, 7:23 pm, "Penfold" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have been trying to set several validation rul
oh beauty!
yes, it helped!
tnx!
On 20 Mar, 14:19, "hydra12" <[EMAIL PROTECTED]> wrote:
> In your category model, put this:
> var $displayField = 'name';
>
> Name is the name of the db field you want to show instead of the id.
>
> Hope that helps!
> hydra12
>
> On Mar 19, 5:48 pm, "sixlaneve" <[
Hi stevenoone,
I am working on an online bibliography manager. It is based on CakePHP
and JQuery. CakePHP is a great way to get started on building your
application. It takes care of low-level details and then you can focus
on high level functions of your application. CakePHP and JQuery makes
an
gwoo,
sorry for hijacking the thread, won't happen again ;), and thanks for
the info, I'll give it a try.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-p
Can anyone point me to a few complete, well-commented example
applications on CakeForge? I'm basically looking for guidance & best
practices when it comes to developing apps that go beyond the simple
blog tutorial. Personally, I learn better from following real-world
examples than from reading ref
@sunertl
you would do better to use cache function. Also, realize that a small
db query is not that painful. In any case, in 1.2 you can now cache an
element using the $this->element('whatever', array('cache'=>'+1 day'));
--~--~-~--~~~---~--~~
You received this me
@Bernardo
please create new threads. You seem to have hijacked this one.
In any case, add Javascript to your helpers in /app/app_controller.php
if you do not have this file you can copy the one fro the core and add
the helpers array
--~--~-~--~~~---~--~~
You recei
you can try $this->Email->Controller->set
it worked for me
Sam D
On 3/20/07, Ámon Tamás <[EMAIL PROTECTED]> wrote:
>
> Hi how I see no $this->methods tahing effects in email element, but it
> is only in php4. I must to use the $GLOBALS array for it, but it is very
> ugly.
>
> Ámon Tamás írta:
>
On 3/20/07, majna <[EMAIL PROTECTED]> wrote:
>
> or use autosave, with ajax, save as draft, like gmail do.
>
Now *that* is a good solution. Autosave will then update your
session, causing it to not expire. Pretty slick.
--
Chris Hartjes
My motto for 2007: "Just build it, damnit!"
rallyhat.
No one? Nothing?
Ok. Anyway, for lack of better advice I decided that I will just copy
the paginate() method from the base Controller to my controller,
remove the stuff I don't need and add my own logic in between to
validate and replace the parameters.
makes sense?
On Mar 18, 12:44 pm, "ba
I think that what you want to achieve is clear. But I think you have
to set the timeout to more than 20 minutes if you want someone to be
able to send a post more than 20 minutes after loging in, just for
trying set it to something really high, and also set the
session.gc_maxlifetime. No matter ho
Have you tried:
/app/models/category.php
array('className' => 'Story',
'limit' => '3')
);
}
?>
/app/models/story.php
array('className' => 'Category');
}
?>
You might want to add more logic to you join in the Ca
or use autosave, with ajax, save as draft, like gmail do.
On Mar 20, 3:15 pm, "Andre" <[EMAIL PROTECTED]> wrote:
> On 20 Mar, 14:34, "bernardo" <[EMAIL PROTECTED]> wrote:
>
> > Try using this: ini_set("session.gc_maxlifetime","14400");
> > and set CAKE_SESSION_SECURITY to high.
>
> That ini_set t
Hi all!
I've been trying to use helpers in the default layout, so I copied
pages_controller.php to my app's controllers dir, added the javascript
helper to the uses array, and added a call to the javascript helper in
/app/views/layouts/default.thml :
link('myjs');?>
but I get 'Fatal error: Call
If you are using CakePHP 1.2 default values for fields will be auto
populated before saving record.
I see nothing wrong with overriding loadInfo(), that's why it's there for,
but my question is what's the scenario that there are "lots" of fields that
you will be never handling with Cake? Are you
What if the user is editing his account and trying to change the
username or the email to an already existing value?
One way to resolve this is by checking the name in the session and if
it is the same as the current submited name skip the findByUsername
part, but this is not pretty good one, and
Ok, well in my controller, before I pass anything I print_r my
variable, and the output looks like this:
Array (
[0] => Array (
[Section] => Array (
[id] => 1 [name] => topnav )
[Menu] => Array (
[0] => Array (
[id] => 1 [name] => Home [
> If you are using CakePHP 1.2 default values for fields will be auto
> populated before saving record.
I'd very much like to use version 1.2 (behaviours, ... mhm. yummy),
although (no offense) I have had _really_ bad experiences with
"bleeding edge" branches before, so I will wait until all of th
>foreach($menus['Section']['Menu'] as $menu) {
Hi,
it' hard to read code in the google layout... especially pr()
output...;)
looks like the array is numeric...
try:
foreach($menus as $menu) {
echo $menu['Section']['id'];
pr($menu['Menu']);
...
}
greets,
f.
Array (
[0
Still curious about this - using custom tags in 1.2 - is it possible,
and what format is it looking for? It looks like tags.php with a $tags
array merging with the $tags in HTML helper. Is this correct? Does it
load by default and check for custom tags?
On Feb 22, 4:19 pm, "nateklaiber" <[EMAIL P
This is not Cake or PHP problem but how web servers generally work and
serve URLs.
When you request "http://localhost/cake/app/index.php?/posts/index";,
the web server knows that you are looking for the document "index.php"
under directory "/cake/app/" with the parameter "/posts/index". IIS
know
On 20 Mar, 14:34, "bernardo" <[EMAIL PROTECTED]> wrote:
> Try using this: ini_set("session.gc_maxlifetime","14400");
> and set CAKE_SESSION_SECURITY to high.
That ini_set thing should be placed in cake/libs/session.php, right?
If it's so, I've done it, but the problem persists.
Maybe I'm dumb an
On 3/20/07, majna <[EMAIL PROTECTED]> wrote:
>
> function __gc($expires) {
> $db =& ConnectionManager::getDataSource('default');
> $table = $db->fullTableName(CAKE_SESSION_TABLE);
> $db->execute("DELETE FROM " . $db->name($table) . " WHERE " .
> $db
I was hoping someone here could give me a hand. This seems like it
should be simple, and I'm just over complicating things. Basically,
I've got 2 tables: stories and categories. I want to query 3 stories
from each category. My structure is as follows:
stories
- id
- category_id
- story
Following the same example, I've come up with something more dynamic -
but unfortunatly I cannot seem to get it to work, can anyone help me?
First of all, I call the element:
renderElement('topmenu'); ?
Then in the element, I call my menu section manager and request all
menu's (through a hABTM
I found the answer myself...
I disabled caching in the model by setting
$this->Person->cacheQueries = false;
now the app behaves as expected...
Have a nive day!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cak
Hi all !
I have a table from which I only need a subset of its actual columns.
I overwrote loadInfo() in my Model, so that it only returns the needed
subset. (I basically return a fixed array for the time being) this
works as expected in scaffolding, and it works just because none of
the fields I
Then note what Grant Cox said. What you want is the server side
session to last for a long period, then it would seem that session
lasts until the browser is closed, but that is just because the
browser forgets the cookie.
Try using this: ini_set("session.gc_maxlifetime","14400");
and set CAKE_SE
In your category model, put this:
var $displayField = 'name';
Name is the name of the db field you want to show instead of the id.
Hope that helps!
hydra12
On Mar 19, 5:48 pm, "sixlaneve" <[EMAIL PROTECTED]> wrote:
> Hi... sorry... I am a bit thick and I have a problem with this
> dropdown.
>
>
BTW: I've just found this, may be it owrks for you :-)
http://cakeforge.org/projects/yahoouihelper/
On Mar 18, 8:44 am, "symfony" <[EMAIL PROTECTED]> wrote:
> Hey,
> is it possible (with url-rewrite) to adress css-files outside the css-
> folder in webroot? I want to use yui and save it in /vend
I don't understand your line neither, anyway, /vendors isn't visible
from the web browser, I think you must put it inside /app/webroot.
On Mar 18, 8:44 am, "symfony" <[EMAIL PROTECTED]> wrote:
> Hey,
> is it possible (with url-rewrite) to adress css-files outside the css-
> folder in webroot? I w
> $this->controler->webroot.$this->yui_folder . DS . $file . DS .
> $file . ".css";
I don't understand what you are trying to achieve with this line. What
kind of result do you expect to get from this line?
--~--~-~--~~~---~--~~
You received this message because
Back to cake db sessions: (1.1.13.4450 )
cake/ libs/session:
session_set_save_handler(array('CakeSession','__open'),
array('CakeSession', '__close'),
When you are creating multiple records in sequence, always call
Model::create() befote Model::save():
$this->Person->create();
$this->Person->save($data);
-MI
---
Remember, smart coders answer ten questions for every quest
That's right.
By the way, the other framework I'm using is Code Igniter, and the
custom PHP session library is this one:
http://www.codeigniter.com/wiki/PHPSession/.
The way I see it, it would be great to be able to port a Class like
that in CakePHP. For some reasons, I don't like my session to
Im trying to import online registrations into my cakephp application.
The registration data is stored in a db table. Currently my
application queries the pending registration data and loops through
the result set. Splits the data into relevant pieces that are inserted
into cakephp db tables via mo
Yes, probably different php-mysql library or something similar..but
it's really annoying
--~--~-~--~~~---~--~~
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.c
Hello,
I think this is the different mysql version problem.
sawa írta:
> Hi,
> I have 2 installations of cakePHP on 2 servers.
> Both cakePHP versions are 1.1.13.4450
> Both PHP were Version 5.2.0.
> Then one is updated to PHP Version 5.2.0-8+etch1.
> After the update, custom queries which have
Oh, one more clarification:
The query above is just illustration of what happens.
The real query I use is more complicated (more subqueries included)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
Hi,
I have 2 installations of cakePHP on 2 servers.
Both cakePHP versions are 1.1.13.4450
Both PHP were Version 5.2.0.
Then one is updated to PHP Version 5.2.0-8+etch1.
After the update, custom queries which have subqueries started giving
different output.
Here is the example:
PHP Version 5.2.0
Hi how I see no $this->methods tahing effects in email element, but it
is only in php4. I must to use the $GLOBALS array for it, but it is very
ugly.
Ámon Tamás írta:
> Hello,
>
> $this->set not working with email component in php 4. The same code is
> working in php 5.
>
> If I use
>
> $th
Hi Saganxis,
I've a plan to integrate Xoops into cakePHP.
-SMD-
On Mar 20, 11:09 am, "Saganxis" <[EMAIL PROTECTED]> wrote:
> Has anybody tried to integrate cakePHP with Xoops?
> If not, can anybody help me or give a suggestion to integrate these
> two systems??
>
> Thanks
>
> Saganxis
Okay, looks like userDefined isn't implemented yet.
So I tried my luck with beforeValidate() callback, and got it to work
- sort of.
function beforeValidate()
{
$data = $this->data;
if(!empty($this->id))
{
$
I would recommend another way. gwoo's solution means a request to the
db every time(!) the navigation is shown. IMHO too much db-action. I
would create a function in the controls controller like
function updateNavigation() {
$entries = $this->Control->findAll();
$string = '';
80 matches
Mail list logo