$jobstatus =
$this-Jobstatus-findByTrackingno($this-data['Jobstatus']['track']));
if (empty($jobstatus):
do something;
else:
do something else;
endif;
$this-set('jobstatus', $jobstatus);
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 19
It is so hard to help you with questions like this when we don't know what's
going wrong. Can you be more specific? Can you paste an error message?
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 19 Jul 2010, at 08:12, fadhli - wrote:
?php
class
Here a good tutorial for a contact form!
http://snook.ca/archives/cakephp/contact_form_cakephp
On Jul 19, 4:14 pm, amr_AJ ramruth...@gmail.com wrote:
how to create forms
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You
Put the caching logic in the login action in your controller, and use
the autoRedirect variable, as described here:
http://book.cakephp.org/view/395/autoRedirect
d.
On Jul 19, 4:13 pm, Petter Andreas Strøm past...@gmail.com wrote:
Hi,
Im modifying an existing login function which uses the
Hi,
I'm trying to implement some functionality for hiding buttons(and
info) from a page depending on parameters sat for the specific user
(in the model). Off course to create some restrictions for the
different users.
But im kind of confused how to do this. The way i do it now is like:
1. Cache
Well, I have to explain the topic for the discussion too;
I'm looking for a solution where I can make a function to check if
user have this capability like if(userHasCap('user_edit')). How can i
make a function like this and include it into every view i need it?
Component?
Check out the new
Hi all,
I am having a problem getting data from a model connected to a HABTM
If I have two models, the first being hasMany to the second, then if I
do a find on the second, I can normally access the first models
fields, because a LEFT join is done? However, if the model is
HasAndBelongsToMany
Inherit from Helper class and put it in /views/helpers.
class LegendHelper extends Helper
{
var $helpers = Array(Html);
function legendColor($arg1, $arg2)
{ terun true;}
}
in view use it
$legend- legendColor(1, 5);
Check out the new CakePHP Questions site
for example, i have posts table and i18n table. posts table already
have data in english so i created data of the other language in i18n.
i was wondering if there's a way to retrieve data from posts table
when language is english. or do i have to create english data in i18n
table?
Check out the
Nope, not without using javascript. Tooltips are generated by the
browser and can't be customised.
There are some custom tooltip javascript solutions around, though - do
a search and I'm sure you could find one.
There's a mootools one here:
http://davidwalsh.name/mootools-12-tooltips-customize
hi Petter;
On Tue, July 20, 2010 9:12 am, Petter Andreas Strøm wrote:
Well, I have to explain the topic for the discussion too;
I'm looking for a solution where I can make a function to check if
user have this capability like if(userHasCap('user_edit')). How can i
make a function like this
hi all,
I am trying to execute query with some posted value the query is
like this
$sql = SELECT DISTINCT `csd`.`store_id` ,`csd`.`campaign_id`, `csd`.`date`
, `c`.`campaign_id` ,`c`.`supplier_id` , `cm`.`sub_category_id`
FROM `campaign_store_dates` AS `csd`
LEFT JOIN
Hi, group. I did a blog application in tutorial. I've 2 views like in
tutorial:
edit.ctp:
h1Edit Post/h1
?php
echo $form-create('Post', array('action' = 'edit'));
echo $form-input('title');
echo $form-input('body', array('rows' = '3'));
echo $form-input('id',
Hi. If I understand you correctly you want to pull data from CakePHP
app and show it in Drupal. So why don't you consider using REST or
something similar (web services?). AFAIK cake supports REST. From the
drupal side, you have to write a module to interact with RESTservices
provided by your cake
hii i m developing a project in cake where i want some words to come
before controllers name like as http://www.abc.com/teama/users
http://www.abc.com/teamb/users
Can it is possible i have nothing to do with this word team a and team
b just for displaying .
Can it be possible in cake please
run build_Acl again
On Jul 19, 12:40 pm, matsakaw igebas...@gmail.com wrote:
i struggled with Acl/Auth and i admit i just followed the steps
without FULLY understanding what i did -- to generate the aros, acos
and aros_acos tables using the build_Acl and initDB functions
mentioned in the cake
Hi All,
I recently moved hosts for my site and now it doesn't function. I get
the following errors.
Notice: Undefined index: action in /home/baristaa/public_html/cake/
dispatcher.php on line 142
Notice: Undefined index: controller in /home/baristaa/public_html/cake/
dispatcher.php on line 149
Hello:
I am a newby to Cakephp,
I have some simple data which I don't want to store in database but I
want them to be application wide accessible. for view, controller as
well as model.
For example: I have a array $admin_type, which define 2 types of
system administer,
Hi all! I have a question, I'm making forms using form helper.
What's better, creating forms with tables or with divs? Divs are the only
way to create forms with the cakePHP form helper, right?
I'm not a css master :P, so maybe I don't understand very well why using
divs instead of tables in
hi hugo
On Tue, July 20, 2010 3:07 pm, Hugo M wrote:
Hi all! I have a question, I'm making forms using form helper.
What's better, creating forms with tables or with divs? Divs are the only
way to create forms with the cakePHP form helper, right?
I'm not a css master :P, so maybe I don't
Yeah I agree! Tables are for tabular data. But that site uses tables :O, but
maybe is not the best option.
Thanks I will se what I can do
2010/7/20 Mike Karthauser mi...@brightstorm.co.uk
hi hugo
On Tue, July 20, 2010 3:07 pm, Hugo M wrote:
Hi all! I have a question, I'm making forms using
hi hugo
heres a form similar the remember the milk which doesnt use tables
http://veerle-v2.duoh.com/blog/comments/styling_forms_in_css/
should give you some pointers.
mikek
On Tue, July 20, 2010 4:04 pm, Hugo M wrote:
Yeah I agree! Tables are for tabular data. But that site uses tables :O,
Galymzhan,
Thanks for a great, short answer to a long question. I am a perpetual
newbie when it comes to some of this stuff and I had not looked at
REST yet. I wasn't thinking of HTTP-type access because this app
requires SSL+authentication, but I could probably set up a localhost-
only Apache
Thanks people! Worked out great;)
On Jul 20, 12:29 pm, Mike Karthauser mi...@brightstorm.co.uk
wrote:
hi Petter;
On Tue, July 20, 2010 9:12 am, Petter Andreas Str m wrote:
Well, I have to explain the topic for the discussion too;
I'm looking for a solution where I can make a function to
Thanks people! Worked out great;)
On Jul 20, 12:29 pm, Mike Karthauser mi...@brightstorm.co.uk
wrote:
hi Petter;
On Tue, July 20, 2010 9:12 am, Petter Andreas Str m wrote:
Well, I have to explain the topic for the discussion too;
I'm looking for a solution where I can make a function to
matsakaw,
there are a few scripts floating around the automagically update your
acl tables. This has been working great for me with cakephp 1.3
http://bakery.cakephp.org/articles/view/automatically-load-all-controllers-and-actions-into-aco-tables-for-acl-with-a-cakephp-task
You simply drop the
The reason you can't do this easily is because it goes against Cake's
conventions. Try learning to do things the cake way and it will make
your life way easier in the long run. Especially if you will be
building multiple cake applications in the future!
What you should do is implement Acl to
As a follow up to my former post here is some code to assist you:
/**
* Rebuild the Acl based on the current controllers in the application
*
* @return void
*/
function buildAcl() {
$log = array();
$aco = $this-Acl-Aco;
$root = $aco-node('controllers');
if
Well on a hunch, did you make sure you cleared your tmp and cache
directories? In the past this has fixed most of these weird issues
that pop up in migration for me.
On Jul 20, 4:32 am, AzzBrands stellabra...@gmail.com wrote:
Hi All,
I recently moved hosts for my site and now it doesn't
Drupal does something like this called revisions. You could implement
a much simpler version of this in your application by adding 2 columns
to your database called revision and display. Revision would just be
a revision number and you could use a timestamp as the field so it
would be unique and
Your life would be soo much easier if you were using cake's ACL in
your application. It handles all of the stuff you are trying to do
automagically. It can be a little intimidating for new users but once
you figure it out you will never use anything else again. Here is a
great 2 part tutorial
On Tue, Jul 20, 2010 at 2:18 AM, nicky kamal.d...@gmail.com wrote:
hii i m developing a project in cake where i want some words to come
before controllers name like as http://www.abc.com/teama/users
http://www.abc.com/teamb/users
Can it is possible i have nothing to do with this word team
If you need global variable, use Configure class designed specially
for this.
http://book.cakephp.org/view/43/Configure-Methods
On Jul 20, 3:45 pm, xiaopang yve...@gmail.com wrote:
Hello:
I am a newby to Cakephp,
I have some simple data which I don't want to store in database but I
want
Try attach Session helper explicitly:
class AppHelper extends Helper {
public $helpers = array('Session');
}
On Jul 20, 10:05 am, Galymzhan kozha...@gmail.com wrote:
Hi, group. I did a blog application in tutorial. I've 2 views like in
tutorial:
edit.ctp:
h1Edit Post/h1
?php
On Tue, Jul 20, 2010 at 4:33 AM, Andrew grievea...@yahoo.com wrote:
Hi all,
I am having a problem getting data from a model connected to a HABTM
If I have two models, the first being hasMany to the second, then if I
do a find on the second, I can normally access the first models
fields,
This example is emulating tables with divs which is the same as tables
in the end... for this kind of layout, you have to give the labels the
formhelper adds a fixed width which equals your left column
On 20 Jul., 17:10, Mike Karthauser mi...@brightstorm.co.uk wrote:
hi hugo
heres a form
On Tue, Jul 20, 2010 at 9:20 AM, rakeshyadav rakeshyadav
rakeshyadav@gmail.com wrote:
hi all,
I am trying to execute query with some posted value the query is
like this
$sql = SELECT DISTINCT `csd`.`store_id` ,`csd`.`campaign_id`, `csd`.`date`
, `c`.`campaign_id` ,
The problem here is that FormHelper does not load SessionHelper.
Sub-helpers do not merge automatically (unlike controllers), you have
to do it manually... like so
class AppHelper extends Helper {
var $helpers = array('Session');
function __construct() {
if (is_subclass_of($this,
Hi! I want to add token mail verification but I notice that php is not
entering in register function when creating user (probably Auth component is
registering users automagically). The thing is I need to put somewhere my
code to send a mail to the users email account :S.
I put a die() in
Good advice, thanks ohcibi.
I was using left and right float behaviors but not with fixed width.
2010/7/20 ohcibi i...@dwgadf.de
This example is emulating tables with divs which is the same as tables
in the end... for this kind of layout, you have to give the labels the
formhelper adds a
Lol... I was using create() function and there's no automagic there.
Facepalm xD
2010/7/20 Hugo M ham1...@gmail.com
Hi! I want to add token mail verification but I notice that php is not
entering in register function when creating user (probably Auth component is
registering users
The Schema is simple, user has Username, Password, Email, and the
Group ID that is default for users. Profile just has a user_id, but in
this profile i want to check email, first name and last name when user
registers and assign him his profile. Thanks!
On 19 jul, 01:01, cricket
Hi everyone,
I've asked this a few times on IRC, but I guess it's too
complicated(?) to be answered over IRC.
I'm trying to build a multilingual web site, so I've created the
following route:
Router::connect('/:language/:controller/:action/*', array(),
array('language' = '[a-z]{3}'));
Now,
hi.
i'll try to make it quick :) here is what i wanna do:
a user has the opportunity to place information about him on my
website. for that i wanna provide a template. and this i want the user
being able to to.
he has an empty page in front of him, divided by areas, that need to
be filled with
I recently changed names on one of my sites and moved the entire site to a
different dir on the server.
Everything went smooth enough except now I'm unable to send emails.
Mail sends ok using PHP mail() function but not when using the email
component.
The email is NOT set up for SMTP.
Am I
I thought someone here may have some experience with this. I fetch utf-8
data from a mysql db using:
$this-data = find('all',$options);
From within the controller, if I debug($this-data), I get something like:
[1] = Array
(
[Subdivision] = Array
(
if you actually need to save the keys in some models
like users (id, name, admin_type, ...)
you could take a look at
http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/
thats how I do it - application wide available and easy to extend
(if you ever need more types etc)
careful with
foreach(Cache::read('userCapList') as $userCap)...
!!!
Cache::read() is not in all cases a array to iterate over
sometimes its false etc
so make sure to cast it to an array:
foreach((array)Cache::read('userCapList') as $userCap)...
or do it in 2 steps
On 20 Jul., 16:48,
As an extra piece of information, if I specify the escape option
as 'ISO-8859-1' in the link method of the html helper (
http://book.cakephp.org/view/1442/link), the non-ascii characters are
substituted for html entities, and it renders fine (without the little
question marks). (I am using
I have a model called LeaveOfAbsence. The proper English name for the
pluralized controller would be LeavesOfAbsence rather than
LeaveOfAbsences (similar to the plural mothers-in-law).
Does anyone know to set up inflections for this specific case? It
seems that CakePHP only looks at the last word
And the plot thickens...
If I change the character encoding in core.php to:
Configure::write('App.encoding', 'ISO-8859-1');
Then suddenly the text shows up correctly. Which means that even though I'm
specifying UTF-8 as the character encoding, cake is still using ISO-8859-1
(or Windows-1252?)
Thanks, I'll give it a go
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To
i found the solution here:
http://www.jotlab.com/2009/03/03/cakephp-utf-8/
all you have to do is add 'encoding' = 'UTF8' to database.php
doh!
On Tue, Jul 20, 2010 at 6:59 PM, Kirk k...@kirkkahn.com wrote:
And the plot thickens...
If I change the character encoding in core.php to:
Hi,
I can't seem to import a plugin model when running controller from the
cron_dispatcher. Here is a simple test result.
ver: 1.3.2
cron_dispatcher: http://tricks.cakephp.in.th/comland-line-and-cronjob
1. running from web . [WORKS]
2. running testA function WITHOUT model import from
Good Night,
I'm trying to make the AdminAuth component work on cake_1.2.3.8166.
I did uncomment Configure::write('Routing.admin', 'admin'); on line 67
of the file app/config/core.php.
On the file app/app_controller.php lines 49-50 I have this code:
Thank you for posting your whole experience with this! And congratulations
for figuring it out so quickly.
Cheers,
Matt
On Tue, Jul 20, 2010 at 7:15 PM, Kirk k...@kirkkahn.com wrote:
i found the solution here:
http://www.jotlab.com/2009/03/03/cakephp-utf-8/
all you have to do is add
I know you can fake it with Routes, but I fear you'd end up tweaking URLs in
your views like crazy.
http://book.cakephp.org/view/46/Routes-Configuration
Sorry, I have nothing better.
Matt
On Tue, Jul 20, 2010 at 1:36 PM, desheffer deshef...@gmail.com wrote:
I have a model called
On Tue, Jul 20, 2010 at 4:46 PM, Tomfox Wiranata
tomfox.wiran...@gmail.com wrote:
hi.
i'll try to make it quick :) here is what i wanna do:
a user has the opportunity to place information about him on my
website. for that i wanna provide a template. and this i want the user
being able to
Strange, do you have any configuration related with Email component? if I
can send mail with mail() I can send with the component :S
2010/7/20 Ed Propsner crotchf...@gmail.com
I recently changed names on one of my sites and moved the entire site to a
different dir on the server.
Everything
Nope, nothing. I originally used it right out of the box and I didn't have
to change a thing.
It was working perfectly until I changed to a new dir on my server. It
really makes no sense.
On Tue, Jul 20, 2010 at 8:49 PM, Hugo M ham1...@gmail.com wrote:
Strange, do you have any configuration
Mm... if you have Linux you can check in /etc/php5/apache2/php.ini the
sendmail configuration and the sendmail path. Maybe is put as a relative
path (I don't see a good reason to do that but... who knows :P)
2010/7/20 Ed Propsner crotchf...@gmail.com
Nope, nothing. I originally used it right
I thought it might get annoying... my conversation with myself. But I hope
it helps someone!
On Tue, Jul 20, 2010 at 7:47 PM, MattyHead mattyh...@gmail.com wrote:
Thank you for posting your whole experience with this! And congratulations
for figuring it out so quickly.
Cheers,
Matt
On
On Tue, Jul 20, 2010 at 9:48 PM, cricket zijn.digi...@gmail.com wrote:
On Tue, Jul 20, 2010 at 9:20 AM, rakeshyadav rakeshyadav
rakeshyadav@gmail.com wrote:
hi all,
I am trying to execute query with some posted value the query
is
like this
$sql = SELECT DISTINCT
I'm having errors when trying to execute Pagination I'm not having
this kind of problem on version 1.2.x:
Warning (4096): Object of class JsHelper could not be converted to
string [CORE/cake/libs/view/helpers/javascript.php, line 259]
Notice (8): Object of class JsHelper to string conversion
64 matches
Mail list logo