On Tuesday, 29 November 2011 06:56:51 UTC+1, Mamdoohi wrote:
hi
i create my website like joomla so i want two login for admin and
registered user?
with this i can where change in admin then see that in site.
can i do it?
Sure, permission granted.
AD
--
Our newest site for the
can you more explain?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
yes you can, you can use two method, admin_login adn login on user
controller.
On Tue, Nov 29, 2011 at 3:54 PM, Mamdoohi hamid.mamdo...@gmail.com wrote:
can you more explain?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP
thats it!! thaanks!!!1
On 29 Nov., 03:03, dreamingmind dreamingmin...@gmail.com wrote:
or even more specific to the problem is the Text Helper's truncate().
Don
On Nov 28, 7:43 am, Tomfox Wiranata tomfox.wiran...@gmail.com wrote:
Hi,
I am loading data in a div, that is often too
When I return false from isAuthorized() I simply get returned to the
referring page (i.e. the page I was already on).
If your app is behaving different then you've probably set a variable that
is changing the default behavior.
HTH, Paul.
--
Our newest site for the community: CakePHP Video
The warning tells you exactly what to do to remedy the problem.
HTH, Paul.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To
Yip, in some instances, although this should not be heavily relied on, you
need to include different CSS declarations in HTML IF statements, which
also allow for different CSS for different IE versions, another issue if
you supporting older browsers.
HTH, Paul.
--
Our newest site for the
Thanks for the heads up on that Jeremy!
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
CakePHP will do this for you automagically when using Model::saveAll().
HTH, Paul.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To
You do not give any information on what part of authentication you are
struggling with.
Auth will work with users that are associated to roles, after the user it
authenticated you then need to check their level of authorization (two
different things).
I do this with isAuthorized() methods in
Hi there,
ist there an up to date cakesheet for cakephp v2.0.3 like this one for
v1.2: http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf
?!?
Thanks, Butch
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
Hello,
We need a CakePHP developer to help us optimize a custom CRM tool. This is
an internal company tool that was built on Cake 1.3 and recently upgraded
to 2.0.3. Some of the queries have many associations and the queries are
quite memory intensive and slow. We are looking for someone to
Hi all
My apologies if this has been posted already, i just can't seem to
find a solution so i am hoping someone will be kind enough to have a
look and make some suggestions for me...
I'm an experienced PHP dev and sysadmin and am building a small
website, and subsequently hoping to persuade my
I have an AppController.php located on /app/Controller and somehow the
inherited controllers are not loading it. Instead, it loads the one
defined on /lib/Cake/Controller. That's how I am testing:
- Create a new controller such as:
?php
App::uses('AppController', 'Controller');
class
Hi
I need to implement a date picker into my application. I have found
this tutorial:
http://bakery.cakephp.org/articles/agusti/2010/02/02/transparent-datepicker-with-jquery
but unfortunately is not working with my version. Did someone
succeeded to implement it or can someone guide me to another
Also you can have only one login method and just redirect the
authenticated user to different places depending on his role.
On 29 Ноем, 00:56, Mamdoohi hamid.mamdo...@gmail.com wrote:
hi
i create my website like joomla so i want two login for admin and
registered user?
with this i can where
Also you can have one login method and just redirect the authenticated user
to different places depending on his role.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with
If you don't want to keep access information for each record in the
database you can just check for the role after authentication (and also you
can put it in your AppController beforeFilter):
if($this-Session-read('Auth.User.role') == 'admin') {
...
}
--
Our newest site for the community:
Hi Miles,
I cannot get the component to work, so I switched back to my own cookie
login method.
I can successfully login the user with the cookie, however, I only have the
email address and password available.
Is there anyway that i can initialize the user after he logged in?
When i debug
Hi Florin,
You can use http://jqueryui.com/demos/datepicker/. It is really easy to
implement no matter if you are using 1.x or 2.x
Just use the dateFormat option and configure it to match your
database/validation rules.
$( .selector ).datepicker( option, dateFormat, 'yy-mm-dd' );
Best, Jordan
Look s like your models are not being used due to invalid file naming...
Model name should be singular as: Artist.php , Song.php
Also the is a typo, class Post should be Class Artist :
Model/Artists.php
?php
class Post extends AppModel
Probably you don't need the options['joins] as this is
try toggling the debug = 2 in core.php, it helps sometimes…
Andras Kende
On Nov 28, 2011, at 12:40 PM, Weydson wrote:
I have an AppController.php located on /app/Controller and somehow the
inherited controllers are not loading it. Instead, it loads the one
defined on /lib/Cake/Controller.
A couple of errors:
- Your Artist model has this as the first line: class Post extends AppModel. It
should be class Artist extends AppModel.
- Your $options['joins'] statement in your index function of the
songs_controller is unnecessary (and in fact you are not bringing it into your
find
we did it :)
Installing PHPUnit was never easier
https://github.com/dereuromark/PHPUnit-Cake2
a) Drop our plugin into your /Plugin/ folder
b) Run Phpunit.Phpunit install
thats it.
nothing more to do, no include paths, no strange pear installer (since
your Vendor path is already one by default)
I have an app that uses the ACL tables, aro, aro_aco, and aco. When using
cake bake to generate anything it errors out if those tables aren't on a
skiplist. The model skiplist is currently implemented for i18n, so I just
added these tables to that to get baking working. I added the skiplist
I've noticed that if I have conditions on model associations, for
example:
$hasMany = array(
'ActiveUser' = array(
'className' = 'User',
'foreignKey' = 'group_id',
'conditions' = array(
'ActiveUser.active' = 1
I have tried this but it doesn't work for me.
I have downloaded the jquery-ui, put the js inside /app/webroot/js,
included inside my layout, and then create an input like this:
$this-Form-input('expire', array('id'='datepicker'))
Nothing happens when I click inside the text box...
--
Our
You also need the jquery library, and will probably need to actually
write some javascript. It's easy:
script
$(function() {
$(#datepicker).datepicker();
});
/script
If you have done this, and are still getting errors, check your
javascript console to see what is going on.
On Nov 29,
I forgot to tell you but jquery is also included. In the javascript console
there is no error because the date-picker is not triggered.
Can you please tell me where should I put the script you told wrote me?
This one:
script
$(function() {
$(#datepicker).datepicker();
});
/script
Thank
You can put the script anywhere on the page. Anyway, better practice is to
put it before the closing head tag of your layout view.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help
Hi,
I would like to know if there are any requirements to follow when
migrating a cakePHP website from one host and domain to another ?
I am banging my head on the walls for 3 days because I can't manage to
duplicate a functionning website to my preproduction server.
I know my question is kind
If anything I could do in cakephp is to relate a table of news with
commentary. Yes, that is simple but I can not find the solution.
When I make the scaffold I have no problem. The hasMany and belongsTo
is created in the model. But when I select a comment post via a
dropdown menu and it is not
A few starters...
- make sure you copy across the .htaccess files (they are often hidden)
- clear down all your cache files (tmp/cache)
- check the file permissions are right (tmp/)
- make sure the database credentials are correct
What specific issues are you facing?
Jeremy Burns
Class Outfit
Hi all,
I've managed to set up most of my associations and models in CakePHP (I'm a
noobie).
Now I have a very basic question. Let me explain the situation first.
I have got a User, Pet and Post model.
The user hasmany pets, the pet hasmany posts.
The user can also log in.
Now in my
Hi!
I'm just wondering.. if CakePHP is good choice for developing an DMS.
The ACL looks good for it, but is it right to controlling who will
have access to specified document? Do you know any example of DMS
baked by CakePHP?
Thanks in advance,
greeg
--
Our newest site for the community:
especially as beginner you should ALWAYS bake your code first using
the bake shell
cake bake ...
it will produce out of the box code you can already use to create/edit/
view/delete records
step two then is adjusting the baked code to your needs
the advantage: you can easily modify your relations
You could try contacting the Cake Development Corporation: http://cakedc.com
Cheers,
Graham Weldon
http://grahamweldon.com
e. gra...@grahamweldon.com
p. (+61) 0407 017 293
Skype: grahamweldon
On Monday, 28 November 2011 at 10:59 PM, Neeraj Kamdar wrote:
Hello,
We need a CakePHP developer
Jordy,
You could do something like:
1. get all pets .id of a user
$userPets = $this-User-Pet-find('all', array(
'fields' = array('Pet.user_id'),
'conditions' = array(
'Pet.user_id' = $uid
),
));
$petIds = Set::combine($userPets, '{n}.Pet.id');
$posts =
Hi all!
I have a problem and I'm not sure about the a solution. I have two options
of creating a process table.
Option 1: table with 100 or more fields. Ugly, I don't want this. Fields:
process1_costtype1_data1
process1_costtype1_data2
process1_costtype1_data3
process1_costtype2_data1
..etc.
Ah... an another question, what will happen if I add a new process, will
always need to have a bigger index than the previous processes right?
There's a way to have an better identifier in the fields with a hasMany?
Something like:
echo $this-Form-input(Process.process_name.cost_type);
echo
I think you have your belongsTo/hasMany backwards. An artist hasMany
songs, and a song belongsTo an artist.
-d
On Nov 28, 8:18 am, Neil Craig neil.cr...@thedotproduct.org wrote:
Hi all
My apologies if this has been posted already, i just can't seem to
find a solution so i am hoping someone
you shoudnt use scaffolding but bake your code using the bake shell
then you probably discover that all your problems are gone
On 29 Nov., 16:55, joserafael josecam...@gmail.com wrote:
If anything I could do in cakephp is to relate a table of news with
commentary. Yes, that is simple but I can
I have a model (let's called it Sessions) that hasAndBelongsToMany Tags.
Each Session belongsTo a Track
Each Track belongsTo an Event
Each Event belongs to an EventGroup
A User may manage several EventGroups.
For UX purposes, I have condensed the maintenance of all these into one
form. In
If I remember right a core member once wrote that this is a known
limitation of the current conditions array for relations.
Personally, I think this should be addressed in 2.1 as a bugfix to be
fixed (if I add a global condition it should always be applied, no
matter what).
As of right now you
and I think this is the ticket:
http://cakephp.lighthouseapp.com/projects/42648/tickets/1793-model-conditions-not-recursively-applied
On 29 Nov., 22:22, euromark dereurom...@googlemail.com wrote:
If I remember right a core member once wrote that this is a known
limitation of the current
None, that's the problem. I got non error or tips what is not
working... but when I do $article-find('all') I get an empty
result...
thanks
Roland
On 29 Nov., 04:44, José Lorenzo jose@gmail.com wrote:
this should just work, what error are you getting?
--
Our newest site for the community:
Hi all,
I am new to cakephp and im building a basic jobseeking site, my
problem is, i have two form one for employee and second form is for
jobseeker, im saving common data such as firstname, surname, ect.. in
one table, after saving this data i want redirect to relative form
like for emloyee to
Try
if($this-data['user_group']=='2') {
} else {
}
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group,
I know why it's not working, I just cannot figure out how to fix it.
These are my errors:
1. Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id'
in 'where clause'
2. SQL Query: SELECT `Period`.`period_id`, `Period`.`title`,
`Period`.`created`, `Period`.`modified`,
Thank you very much! Indeed it worked.
Just to let the other users know in case they will have the same problem:
1. Download jquery (http://docs.jquery.com/Downloading_jQuery) and put the
file in $project/app/webroot/js (e.q: *$project/app/webroot/js/jquery.js*)
2. Download jquery-ui
Hello,
I can see in my app\tmp\cache\views that all the elements that I Have
cached create in this folder a cached view. The problem is that these
cached views seems to have a very short time of life and even
sometimes they disappear.
For the moment I couldn't find what happen.
The debug level
It looks like the issue is with your non-standard database structure, perhaps.
On your Model/Period.php model, set the primary key to be 'period_id' since
that looks like your primary key:
class Period extends AppModel {
public $primaryKey = 'period_id';
/// Other code here...
}
Let me clarify...
private function isActionable($id)
{
if($this-Session-read('Auth.User.role') == 'admin'){
return true;
}
$post = $this-Period-find('first', array(
'conditions' = array(
'id' = $id,
Actually, that worked... It's perfect
As far as database structure... would this be a standard way of
structuring my tables?
Table 1 (users)
id usernamepassword
Table 2 (posts)
id postuser_idtype_id
Table 3 (types)
type_idtype_name
On Nov 29, 5:48 pm, Graham Weldon
Yeah, so the conventions approach would be to use:
Primary Key: id (int 11, or char 36)
Foreign Key: name_id (int 11 or char 36) where name is the singular name of a
model.
Example:
CREATE TABLE `posts` (
`id` CHAR(36) NOT NULL PRIMARY KEY,
`user_id` CHAR(36) NOT NULL,
`name`
Hi Mamdoohi,
As others have said when you call your models save() method it will
check validation by default. But if for whatever reasons you want to
do manual validation, here's a few methods that I found extremely
helpful:
$this-YourModel-set($this-request-data);
You can use your models set
i think you just have to use
ClassRegistry::init('ModelName);
here
On 29 Nov., 22:38, Roland kreativestal...@gmail.com wrote:
None, that's the problem. I got non error or tips what is not
working... but when I do $article-find('all') I get an empty
result...
thanks
Roland
On 29 Nov.,
No suggestion from anyone! :(
Should I modify CakeMail to make mail validation an option and submit
this to Cakephp ?
OR
if I add the To field direct to the mail header (using addheader
function), do you think it will work?
On Nov 29, 7:23 am, localhost ahm...@gmail.com wrote:
Thank you very
ok.
but all users have one row in users table with username and password and
role_id fields.
so when save my data in session the auth component replace new user with
old user.
what can i do for this?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check
Thanks - this is exactly the issue I am facing. I agree with you; this sort of
renders the conditional associations almost useless and I bet it catches a lot
of people out. It took me an hour or so to realise what was happening.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 29 Nov
Hi All, I've been looking at cakephp 2.0 and wondered if any of the
existing plugins written previously for js/css compression worked with
cakephp 2.0. Does anyone have any plugins or techniques in general they can
share on this?
Thanks!
--
Our newest site for the community: CakePHP Video
Ok, thank for the check list.
I already copied all the files including the 3 htaccess files from the
original host, changed the credentials for the database and made
writable the tmp folder.
What I didn't do and what I just did after reading your message is to
clear the cache folder.
62 matches
Mail list logo