dangit, dangit, dangit..I need to research the helpers more.Thanks for the snippet, I will go back and recode the appropriate sections of my code.On 8/20/06,
sicapitan [EMAIL PROTECTED] wrote:
AD7 is right, tablecells does this automatically, and you can set theclaternating
:)
nate - i had already tried that.
basically, i use the same db as used by rdBloggery.
but my application runs in /app/ and the blog in /rdBloggery/
even wheni was storing sessions in the db, i was not able to auto log the person into rdBloggery if he already logged on in my application in
i m thinking of reading the chapter on plugins and see if i can move rdBloggery under /app/plugins though...
On 8/21/06, Mandy Singh [EMAIL PROTECTED] wrote:
:)
nate - i had already tried that.
basically, i use the same db as used by rdBloggery.
but my application runs in /app/ and the blog
Simplerules wrote:
No matter what I do it won't work here is the code:
//Get User Data;
$Profile = $this-Session-read('User');
if(isset($Profile['Username']))
{
$this-set('logged_in', TRUE);
$this-set('username', $Profile['Username']);
Hi All,
nate wrote:
var $paginate = array('limit' = 20, 'order' = ...); // Anything you
can pass to Model::findAll can be set here
Is it going to be possible to specify which relationships are included
in the main model query in 1.2, or to specify constraints for
subsequent queries (I´m
Hi Mandy,
Plugins will 'suffer' the same problem as a seperate app, I wrote a
short blog on the topic and how to work around it. It's possible that
the same approach would work for multiple apps, haven´t tried that.
http://www.noswad.me.uk/blogs/view/28
Cheers,
AD7six
PS. I´d welcome comments
it would be great to have some kind of outgoing dispatcher method. so
that controller-redirect and all the helpers translate the urls. then
we could have one place to define the translation of the urls and one
to map the english urls to controller methods.
if you follow the concept of degradable
Hello fellow bakers!
first of all I'd like to tell you that I am an experienced php
developer for years, firstly with plain procedural way, last year OOP
and now I started baking with cakePHP, so I am really new to MVC
concept.
I decided that my first baked application would be a classifieds
Hi Dear
Members,
FOLLOWING R THE JOBS OF THIS
WEEK:
Job Title
Job Posted By
IT
Recruiter
keriosolutions.inc
Req-0304 -Microsoft / Citrix System Engineer
keriosolutions.inc
Req-0285 - SQL / Oracle DBA
keriosolutions.inc
Hey guys, i just installed othauth, injected the logic in
app_controller, created some users, groups, incremented $gid a bit and
set $strict_gid_check to false in the component configuration (yes i
know this is not a clean method, i will fix this later and pass the
right stuff to the login
Isn't that info available in $data['Category']? Given the
relationships you've established I think it would be there.
On 8/21/06, ShepherdWeb [EMAIL PROTECTED] wrote:
Color and Product are hasAndBelongsToMany to each other
Product belongsTo Category
Category hasMany Product
I'm using
Perhaps I need to be more specific. I am importing the data from a
.csv file, so I am building the data structure myself, and the
information from the Manual does not explain how to create a data
structure for multiple hasMany records. So far I have managed to save
Member records, and I had no
On Aug 21, 2006, at 9:21 AM, Zoltan wrote:
A bit of a newbies question here, but what is the correct way to
handle
tables like 'city', should I name it 'cities' or 'citys'?
Have you tried it?
Should be 'cities'.
-- John
--~--~-~--~~~---~--~~
You
Yes, I tried it and it seemed to work at first, then got some errors
about missing controllers. This was about a week ago, but going from
memory I used something like:
class City extends AppModel
{
var $name = 'City';
}
and
class CitiesController extends AppController
{..}
Does this look
On Aug 21, 2006, at 9:33 AM, Zoltan wrote:
Yes, I tried it and it seemed to work at first, then got some errors
about missing controllers. This was about a week ago, but going from
memory I used something like:
class City extends AppModel
{
var $name = 'City';
}
and
class
Thanks nate, lots of help.
Jez.
--~--~-~--~~~---~--~~
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
Is there a way to set it in the config for the app?
(i use dreamweaver and want to keep the code highlighting, etc.)
mouth wrote:
ad 1)
create file app/views/test.php with content:
?php
require_once 'cake'.DS.'libs'.DS.'view'.DS.'view.php';
class TestView extends View {
var $ext =
Brian French wrote:
Is there a way to set it in the config for the app?
Just make file app/app_controller.php with this content:
?php
class AppController extends Controller {
var $view = 'test';
}
?
(i use dreamweaver and want to keep the code highlighting, etc.)
I don't understand what
Dreamweaver has highlighting and other bells and whistles built into it
which i like.
they are based on the extension of the file you are editing. if im
editing an html file, it highlights the html as well as if i was
editing a php or asp, etc. file. Dreamweaver doesn't recognize the
'thtml'
I have a database schema with categories and products that are joined
with categories_products table. This makes it so a product can be
assigned to multiple categories.
I would like to find all of the products that belong to a category.
I've tried:
usually when I am starting a site that might have funky plurals I make a page that calls the Inflector class with the various calls for the words to see what cake thinks the plurals will be, if they are not what I expect, I either add them in the config/inflectors.php or change my thinking ;)
On
Hello. I have a model called 'Room'. I need to let user submit as many
rooms at once as he wants by placing javascript 'Add room' button.
Each time user press this button it pastes one more set of fields to
let user enter another room information. And in the end there is submit
button which
Morning Mutabor,
I did a similar thing with Config values. I printed all of my Config
values on a single page and allowed the user to edit them at one time.
When creating the form I employed non-standard CakePHP form input
naming conventions and then interpreted these at the controller level.
Hello Mike.
Thank you very much for the quick reply. This is definitely a nice and
elegant way to handle it. I think I should use it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this
I am using this to set cookies:
setcookie($Name, $Value, time()+$Length)
and it works, except the cookies are not accessible in CAKEPHP.
The cookies (unlike the CAKEPHP cookie) are set to cake_1.1.7.3363/
while CAKEPHP is set to cake_1.1.7.3363 ; When I do a print_r($_COOKIE)
I only find the
no worries.
if you run in to trouble you might also have to look at using:
$this-Room-create();
this method prepares your model for insertion each time. otherwise
once you use the model to save data it sets the id of that model and
then each subsequent save will be an update instead of an
@Jimmy -
Check out this WIKI entry:
http://wiki.cakephp.org/docs:method:read
I hope this helps!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
Nope. It's not there.
--~--~-~--~~~---~--~~
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]
How do I do a raw SQL query?
I need to access a table called 'Users', which belongs to
UsersController, in a component Logins - is there a way to do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP
On Aug 21, 2006, at 4:48 PM, Simplerules wrote:
How do I do a raw SQL query?
If at all possible, I would use model functions, but you can also
always use the query() and execute() functions of the model as well.
I need to access a table called 'Users', which belongs to
UsersController,
Yes, it has a Model.
'Users' is a fully working area, but I need to access some data from
the table Users in this component.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group,
On Aug 21, 2006, at 4:55 PM, Simplerules wrote:
Yes, it has a Model.
'Users' is a fully working area, but I need to access some data from
the table Users in this component.
Just to clarify, are you using Cake vocabulary here?
Is your question that you want to know how to access and use
I'm working on a similar scenario right now. I haven't found a
solution yet.
Maybe some seasoned Cake veterans will chime in on this
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to
Yes.
--~--~-~--~~~---~--~~
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,
You'll end up using $this-requestAction() for logic that spans
multiple models.
--~--~-~--~~~---~--~~
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
Hi,
my problem:
I have a controller called - ProductCatsController with an action
- admin_index
I have a /views/productcats/admin_index.thtml file
But the this url /admin/product_cats/ says Missing View in the
title.. and some
Notice: Undefined variable: javascript in
Is there a way to see what is the View file (and its path) that cakePHP
is trying to render in this action ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
the problem seems to be you are using some helpers , and you didn't
include the HTML helper, which contains the function $html-link()
just add the html helper to your controller.
tell us if it works :)
spark!
On 8/21/06, purepear [EMAIL PROTECTED] wrote:
Hi,
my problem:
I have a
I found that I can use find() instead of read(), and set recursive = 2
to return category.title, however, this returns way more data than I
need and drastically affects performance. Not a usable solution.
--~--~-~--~~~---~--~~
You received this message because
I just installed the latest cakephp release and tried doing the cake
blog tutorial. This one:
http://manual.cakephp.org/chapter/20
Here is the error I got:
Warning: Invalid argument supplied for foreach() in
/www/cakefun/cake/libs/controller/controller.php on line 604
Warning: Invalid
from the cakephp manual, quoted below, you can see how adding a few
parameters to the findAll function you can limit the number of rows
retrieved:
example:
$this-User-findAll('',null, '', 20, 2);
this gets the second page of results, containing 20 items each.
If you use a variable $page, for
Here's my solution. It's not the most elegant in the world, but it
gets the job done. If anyone has a suggestion for a better way, please
chime in.
$categoryData = $this-requestAction('/categories/select/');
$this-Product-Color-id = $color_id;
So how would I use a function in the model User, from a seperate
component?
:)
--~--~-~--~~~---~--~~
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
Can someone give me an idea of how to output a date in a certain
format? In this case I am trying to only output the month in the view.
Can I add a simple function to:
$a['Post']['created']
to make it output just a month or various date formats?
I have searched but haven't been able to apply
have you looked at the php date function? http://php.net/date or you
can do what I did and make a custom helper function that allows one to
custom format dates. like
function niceShort($date_string, $format='l j F Y', $return = false) {
$timestamp =
Thanks, I'll have to try that once I get a little more advanced.
I am trying to apply different variations of PHP date functions to it.
I am hoping to put a simple function around the 'created' variable
above. Something like:
date('mask', created).
you need to convert the date string to a unix timestamp before you can
use it in date() you can use the Time helper function toUnix to
accomplish this or look at
http://us3.php.net/manual/en/function.strtotime.php for the string to
time function.
the unix timestamp is probably your sticker on
don't forget the Time helper
http://manual.cakephp.org/chapter/helpers
http://api.cakephp.org/class_time_helper.html
On 22/08/06, c_doug [EMAIL PROTECTED] wrote:
Thanks, I'll have to try that once I get a little more advanced.
I am trying to apply different variations of PHP date functions
I need some help with something which looks like the cat chasing it's
tail, to me, but I am a beginner!
I have a component which I call from the default.thtml view, as I want
it in a sidebar, and that is defined there. But in fact, I would like
that component displayed/active only when the
hey dood,
i don't know if this would be the best method but you can access the
controller from your views and layouts via:
$this-controller
so you can check for the controller name
if ($this-controller-name == 'Blahs') {
display
}
or for the modelClass
if ($this-controller-modelClass ==
Hey all,
A quick query.
I prefer to include conditions as an array but was curious how to set
conditions other than:
field = 'value'
i.e. Model-findAll(array('field' = 'value'))
Specifically I am trying to grab all records in the last month. But it
would be good to know if there was a quick
Hi there,
It seems that Models associated via $hasMany are not done so via JOIN's. Rather, they are called as a separate query with the id of the calling model. Why is this?
This results in some strange behavior when certain conditions in the $fields array are defined.
e.g.
Product
$this-Model-findAll(array('field' = '= value'))
On 8/21/06, Mikee Freedom [EMAIL PROTECTED] wrote:
Hey all,
A quick query.
I prefer to include conditions as an array but was curious how to set
conditions other than:
field = 'value'
i.e. Model-findAll(array('field' = 'value'))
While we're talking implementations, I thought I'd chime in with how I
solved this problem).
My implementation was for editing Translations (I may post about my
i18n implementation in another topic soon enough). One example
specifically is for a user's first and last name (if I'm posting a
a that simple.
thanks mate
On 22/08/06, Samuel DeVore [EMAIL PROTECTED] wrote:
$this-Model-findAll(array('field' = '= value'))
On 8/21/06, Mikee Freedom [EMAIL PROTECTED] wrote:
Hey all,
A quick query.
I prefer to include conditions as an array but was curious how to set
no worries ;) open a ticket on the documentation, it should be in
there, but couldn't find it either ;)
On 8/21/06, Mikee Freedom [EMAIL PROTECTED] wrote:
a that simple.
thanks mate
On 22/08/06, Samuel DeVore [EMAIL PROTECTED] wrote:
$this-Model-findAll(array('field' = '=
56 matches
Mail list logo