ok, after a lot of tries and errors :) i got it to work,
i was trying a login funtion in my users controller with something
like:
if(!empty($this->data)) {
$this->cleanUpFields();
if (!$this->Auth->login( $this->data))
I would also like to know how to implement something similar to this.
On Feb 23, 2:14 pm, "Oneill" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Here a dutch friend which needs some wisdom.;-)
>
> I am trying to build my own mini cms... Who doesn't... ;-)
>
> I would love to get my urls like this : /w
@topic
I still haven't figured out why it didn't work but it only appeared
when using scaffolding, I baked my views, controllers and models now
and it works fine. I guess it is some server issue. (and yes the file
index.thtml cake tries to include is on the server, in the scaffolding
folder)
@sub
Check this thread from the group :
http://groups.google.com/group/cake-php/browse_thread/thread/5826289a9601a1e/643fb072b0eb13f1?lnk=gst&q=ajax+image+link&rnum=2&hl=en#643fb072b0eb13f1
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you ar
I would like to attach an ajax-call to an image, instead of a text-
link, but I can't get it to work.
My code is:
link('/icons/edit.png', '/posts/edit/'.$post['Post']
['id'], array('update' => array('post_'.$post['Post']['id'],
'second'))); ?>
--~--~-~--~~~---~--~---
If you need to get how many articles are in a specific Category ID (or a
group of category IDs, or all categories) then set up a model for your HABTM
join table. If your models are named Category and Content, and you've set up
the HABTM on Category (so your join table is named contents_categories)
Hello
I think I got the idea behind "simple form authentication", I'm trying
to put the new Auth component of cakephp 1.2 at work, but I am unable
to make the login works. It seems it get lost somewhere in the
identify function, I can see in the debug that the Auth object doesn't
get a reference
Followed the same tutorial and ran into the same problems.
I had to to these changes in order to get it working:
> In /app/models/user.php
- change line 7 into: function validateLogin($data)
> In /app/controllers/users_controller.php
- change line 15 into: $this->__validateLoginStatus
Falagar:
I wish I had an answer to your question, but I don't. Still though,
could I take a moment of your time and ask how you got cake running on
a subdomain? I've done the same thing as you, set up a "dev"
subdomain in order to experiment with cake but I can only get urls
running through /ap
sorry, this is my code:
array('className'=> 'Content',
'joinTable'=>
'contents_categories',
'foreignKey' => 'category_id',
'associationForeignKe
No it's not. i want to put one article into many categories.
now i've put $hasAndBelongsToMany into my Category model so i get
categories but with all articles.I need ONLY number of articles in
category and i dont want to use count($data['Article']) in PHP !!
--~--~-~--~~---
I think Nookie had originally intended to let Articles belong to more than
one category, and each category could have more than one article. That's why
HABTM relations exist.
-MI
---
Remember, smart coders answer ten questi
Your problem is wrong designed DB. It should be like this:
categories:
- id
- name
articles
- id
- category_id
- title
- contnet
There is no need in join table here.
On 25 фев, 08:36, "Nookie" <[EMAIL PROTECTED]> wrote:
> my tables:
>
> categories:
> - category_id
> - name
>
> articles
> - a
my tables:
categories:
- category_id
- name
articles
- article_id
- title
- contnet
articles_categories:
- article_id
- category_id
now i want to get all categories with the number of articles in it.
now in my Category model i have something like this :
public function countContents($catego
Hi, thanks for your help. Here's some feedback on the issue.
I checked the settings for session.auto_start and it's set to off,
what I did is to add "php_value session.auto_start 1" in a .htaccess
file on the subdirectory since I don't have access to php.ini
What I did is to separate the JpGrap
My vendor folder looks like this:
vendors/PEAR: all PEAR inside, so you can find:
vendors/PEAR/Cache/*
vendors/PEAR/Translation2/*
vendors/PEAR/PEAR.php
etc.
Then on vendors/pear.inc.php I have a file with this:
define('PEAR_PATH', dirname(__FILE__) .
try commenting out the associations in your model. then try a bake. if
it works, you probably have your associations set up incorrectly.
On 24 Feb, 22:43, "Seb" <[EMAIL PROTECTED]> wrote:
> The only thing I can say... if anyone else runs into that, is have a
> look at the assumptions Bake makes i
Thanks - do you just have a simple vendor file doing the includes for
the packages in their standard locations or move the individual
packages into subfolders under vendors?
On 24 Feb, 18:45, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> I have used all sorts of PEAR packages as vendors in Cake
If you have Number -> belongsTo -> Person, have you tried:
$this->Number->generateList(array('Number.person_id'=>null));
Can you set your DEBUG to 2 and dump the SQL generated by the above query?
-MI
---
Remember, smart c
*sight* this framework is great but makes me feel very blonde :)
I have: numbers BELONGS TO persons
In the Add Person I have $this->Person->Number->generateList();
Now I get *all* telephone numbers of course. I only want to list the
ones which aren't assigned yet. Feeding it additional conditio
The only thing I can say... if anyone else runs into that, is have a
look at the assumptions Bake makes in regards to associations... a guy
on IRC had the same issue, and forced a $belongsTo instead of $hasOne
(as was his data model) and it worked...
hth,
Seb.
On Jan 16, 3:46 am, "lucaspirola"
probably 'Pretensao.descricao ASC' instead of 'descricao ASC' ?
don't you have any SQL messages when turning DEBUG to 3 ?
clement
On 2/24/07, Norman <[EMAIL PROTECTED]> wrote:
>
> Is there any black magic on sorting select boxes?
>
> In the controller, Im trying:
>
> $this->set('pretens
Hi
you need another table, call it orderlines for instance, with these
fields:
order_id
item_id
quantity
... and maybe some more
and a belongsTo Order association
When you retrieve an Order, you'll get its Orderlines too
On 24 fév, 16:18, "mike" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a
Thanks it is almost working now.. it works pretty much everywhere
except for pages like home.thtml.. Also when there is an error it
destriys the entire page and i don't see the messages anymore 0_o
On Feb 19, 9:04 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> > Well what i want accomplish is pre
Nazdar,
24. 2. 2007, Mariano Iglesias napisal:
> Set the value on $this->data to null for that field:
Great, it works perfectly. Thanks a lot.
if ($this->data['Waypoint']['altitude'] == '') {
$this->data['Waypoint']['altitude'] = null;
}
$this->Waypoint->save($this->data)
Only my suggestio
I have used all sorts of PEAR packages as vendors in CakePHP with no
problem. These are some of the packages I used in different CakePHP
applications:
* PEAR::Cache
* PEAR::File
* PEAR::HTTP
* PEAR::Mail
* PEAR::Translation2
* PEAR::Net
* PEAR::PayPal
* PEAR::Validate
All of them as CakePHP vend
Set the value on $this->data to null for that field:
$this->data['Waypoint']['altitude'] = null;
$this->Waypoint->save($this->data);
You can see this on cake/libs/model/datasources/dbo_source.php:
function update(&$model, $fields = array(), $values = array()) {
// ...
if ($value
Hello,
I have database model with field "altitude". This field is in MySQL
defined as:
`altitude` decimal(5,1) default NULL,
So this field can be NULL.
But when in edit form user leave this field empty and I try update
model:
$this->Waypoint->save($this->data)
CakePHP generates this wrong quer
Ye, i want to wiew ir!
2007/2/23, ianh <[EMAIL PROTECTED]>:
>
>
> Hi all,
>
> I've been putting together an online event registration system in
> CakePHP that will be a hosted, commercial web app. I'd love to hear
> from anyone who is interested in testing the app in its current form,
> even use i
On 2/24/07, Mech7 <[EMAIL PROTECTED]> wrote:
>
>
> Is there any tutorial or documentation how i can work with
> relationships in Cake. For example from the blog tutorial i would like
> to add a tag system so i would have the tables:
>
> - posts
> - tags
> - tags2posts
>
> One post can have many tag
On 2/24/07, Mech7 <[EMAIL PROTECTED]> wrote:
>
>
> Is there a constant or variabele to find out what the base url for the
> cakephp directory is ? for if it is not in the root?
>
>
http://manual.cakephp.org/chapter/constants
Go to section 3: CakePHP Path Constants
[EMAIL PROTECTED]
--~--~---
Hi all,
I have a small problem and wonder if I could get some advice on the
best way to overcome it.
What I want is an orders table where I can input data such as items,
order reference, notes, delivery date etc. The table will be linked to
a customer table. What I'm stuck on however if the best
On Feb 24, 3:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> John, I was definitely getting memory errors. But DEBUG set at 3 would
> not show the error, just a blank page would return.
Debug of 3 will dump the controller, and everything linked to the
controller to the screen. With debu
Is there any tutorial or documentation how i can work with
relationships in Cake. For example from the blog tutorial i would like
to add a tag system so i would have the tables:
- posts
- tags
- tags2posts
One post can have many tags, but one tag can have many posts. How can
i filter this sort o
Is there a constant or variabele to find out what the base url for the
cakephp directory is ? for if it is not in the root?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, se
Is there any black magic on sorting select boxes?
In the controller, Im trying:
$this->set('pretensoes', $this->Candidato->Pretensao-
>generateList(null,'descricao ASC'));
The related "pretensoes" table have a "descricao" column. Im using var
$displayField = 'descricao' at the pretensoes model.
John, I was definitely getting memory errors. But DEBUG set at 3 would
not show the error, just a blank page would return.
The pagination component saved my life, I am succesfully browsing
40,000+ records doing ajax calls (50, 100 or 200 at a time).
On Feb 24, 6:03 am, "mindcharger" <[EMAIL PROT
Hi all i have using $html->file
in upload function i need only upload only for image how to validate
in javascrpt and cakephp
Thanks and Regards,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To
What's the error message?
Eric
On 2/23/07, crazed_climber <[EMAIL PROTECTED]> wrote:
>
>
> I have double checked all my naming conventions numerous times and for
> some reason my controller (Menus) is looking for a Model looking Menus
> instead of Menu. Any help will be greatly appreciated.
>
>
Also, you can increase the memory assigned to a PHP script (just look
into php.ini) so the script can use more memory, which in your case
means extra capabilities to hanlde more data...
Cheers
On Feb 23, 9:36 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Feb 23, 2007, at
Yep...Tarique's absolutely right!!
You want to see all the "notices" while developing...because "notices"
are something you don't want your customer tonotice!! :-)
I think that it would be pretty straightforward to correct those
"notice" causes...
cheers
On Feb 24, 4:24 am, "Dr. Tarique Sa
Hello,
Do you have a valid index.thtml page for the model "Article"?
Sorry to ask such a stupid question, but sometimes when stupid things
happens you must ask stupid quesions...
Your problem is interesting, because when you access http://dev.reya.de/articles
you actually have a page returned, b
Hi Andy,
Thanks for the reply!
You mean when adding a page to the database you should insert the
url??
But how about when I insert a new module, like a news module?? Than it
shouldn't be connected to the pagescontroller... Correct me if I'm
wrong...
How will those things work together?
Greetz,
hi,
i'm interested in integrating the HTML_Quickform PEAR package into
cakephp. The reason is to use its functionality for multipage forms.
there are a couple of old threads in the group about this but nothing
to convince me that this is a good / bad idea. i read somewhere that
pear packages wil
Who ever is interested. I completed my first site using cake. It's for
a local record store here in Montreal.
www.inbeatstore.com
Cake Version: 1.1.13.4450
Additional Components:
- ob_Auth for login to administration panel.
- Pagination from paging through "news letters" and record releases.
-
On Feb 24, 5:42 am, "Jeff B" <[EMAIL PROTECTED]> wrote:
> I'm trying move a cakephp site to a new host. Bluehost.com and I have
> a problem where I'm not sure the origin.
>
> It appears not to be loading the objects for the models that i'm
> trying to include in $uses. What would be keeping it
46 matches
Mail list logo