And without $session-check('Auth.User.id')) there is not helper or
someting that let me use $Auth-isAuthentificate and to return true or
false?
If not I'm thinking to create a helper for this, that user $session
and get me what I want.
On Apr 22, 5:43 pm, francky06l [EMAIL PROTECTED] wrote:
I'm setting it where I'm using it. Since it's based on the domain name
I can set it anywhere. I suppose if you store the user language in a
cookie you could also read it anywhere.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
when logged, you can pass user's data to the view
$this-set('loggedin_user', $this-Auth-user());
and in your view:
if (empty($loggedin_user)) {
// not logged in
}
else {
// logged in
}
On 23 avr, 08:14, candesprojects [EMAIL PROTECTED] wrote:
And without $session-check('Auth.User.id'))
Check out the following links:
http://bakery.cakephp.org/articles/view/jsmin-helper-compress-and-cache-javascript
http://bakery.cakephp.org/articles/view/automatic-javascript-and-css-packer
https://trac.cakephp.org/ticket/2233
http://blog.bradleyboy.com/2007/07/28/assetpackager-for-cakephp/
Hi,
I'm new with Cake, but maybe a way could be to use : $this-Auth-
user('a_boolean_activation_var')
I'm currently learning to use Auth so I'm also interested in other
answers ... :o)
On 23 avr, 08:14, candesprojects [EMAIL PROTECTED] wrote:
And without $session-check('Auth.User.id')) there
I've tried
'conditions' = array('not' = array('id' = $model_ids;
but its not ok :(
it generates: WHERE NOT ((`id` IN (2, 5) ))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this
Hi there,
I there anyone who figured out why the auto-validation is not working
on php4 ...
1. On a php4 server, when I try to enable validation on any fields (by
setting the $validate variable in the model), my site just crash and I
get a blank page when the validation is done.
2. If I test
Hi everybody!
I've reading the posts about validation of related models. I.E.;
http://groups.google.com/group/cake-php/browse_thread/thread/856cda8e27da925f/0e414257fd9e64bb?hl=enlnk=gstq=validate+related+models#0e414257fd9e64bb
I've the same problem: validation errors of related model doesn't
El 23/04/2008, a las 8:40, Hugues escribió:
Anyone already addressed this issues so far?
First of all, check the class var $name in your models and
controllers. It is needed for php4 compatibility, For exemaple:
class Post extends AppModel {
var $name = 'Post';
}
if not present,
when I create an entry in the database with the scaffolding interface,
it's possible to save german umlauts. The scaffolding webpages display
the entered characters correct, except in input fields (if try to edit
such an entry) or drop down boxes. The content is not corrupt, it's
empty. It
Thanks Aaron, that's what I was missing! It seems a little counter-
intuitive, but it works, which is what is most important.
On Apr 21, 10:12 pm, aaron bauman [EMAIL PROTECTED] wrote:
Your HABTM relation is backwards. Course belongsTo Accreditation, and
Accreditation hasMany Course.
The
Can you explain why you want to do this? For what circumstance do
they need a persistent unique value?
The only thing I can think of is to store data on a persistent medium
- ie database or file. And in both of these cases you can easily
generate a unique one (file / row), and just store
ok, I found my problem !
In fact, I already load a default admin template in a beforeRender()
method in the AppController :p
Thank a lot !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to
Anybody has a solution ?
thank !
Cordially,
Neveldo :http://www.neveldo.fr
--~--~-~--~~~---~--~~
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'm trying to follow your suggestion, but with adjustment so that the
component instance is created in either a startup or beforeFilter
method, instead of calling new in every action that needs this
component.
I think I have it done properly, but now I get an error when the
Component tries to
Thanks, i tried that but the pdf stayed all wrong ...
I managed to get the correct .css and now its just like the online
one.
Thanks again.
On Apr 22, 6:56 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
In Mac OS X pdf-support is built into the printing dialog. If you are
using Windows you
Take a look at:
http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/
Regards.
On 23 abr, 11:41, Neveldo [EMAIL PROTECTED] wrote:
Anybody has a solution ?
thank !
Cordially,
Neveldo :http://www.neveldo.fr
--~--~-~--~~~---~--~~
I am getting Error when I send email through PHPMAILER
Warning: fsockopen() [function.fsockopen]:
php_network_getaddresses: getaddrinfo failed: Name or service not
known in /var/www/bidlower/app/vendors/phpmailer/class.smtp.php on
line 122
Warning: fsockopen() [function.fsockopen]:
Where is the CakePHP there?
Try the PHPMailer support.
http://phpmailer.codeworxtech.com/
[]'s
On Wed, Apr 23, 2008 at 8:55 AM, Rocky [EMAIL PROTECTED] wrote:
I am getting Error when I send email through PHPMAILER
Warning: fsockopen() [function.fsockopen]:
On Wed, Apr 23, 2008 at 3:44 AM, rob30 [EMAIL PROTECTED] wrote:
I've tried
'conditions' = array('not' = array('id' = $model_ids;
but its not ok :(
it generates: WHERE NOT ((`id` IN (2, 5) ))
Of course it works. Let's say I have a table called 'teams'.
ibl_stats=# select count(*)
I haven't had this problem in 1.2 - even models which are nested
several levels all get picked up by the form helper. Are you sure
you're naming your form elements using the correct dot notation?
Model.RelatedModel.FieldName
You also have to either explicitly call validates() on each model, or
Sounds like your server is denying outbound connections on port 25
On Apr 23, 7:55 am, Rocky [EMAIL PROTECTED] wrote:
I am getting Error when I send email through PHPMAILER
Warning: fsockopen() [function.fsockopen]:
php_network_getaddresses: getaddrinfo failed: Name or service not
I'm using cake 1.2 and i have many 2 or 3 word models with abundant
belongsTo relationships and I haven't run into this problem.
jump on the bandwagon
/a
On Apr 22, 8:27 pm, Langdon Stevenson [EMAIL PROTECTED]
wrote:
I have finally nailed down the issue and am pleased to find that I am
not
Hello everybody
I'm trying to use the method in subject with no result. CakePHP
1.1.18.
The PHP code in thtml is:
...
echo $html-input(Project/name,array(maxlength=50,class=));
...
echo $ajax-observeField(
ProjectName,
array(
update=web,
hi all ,
I would like to know if any view attribute exists to get the HTTP host
from an cakephp install ( = http://www.example.com ) ? (I don't find
it in the API ...)
Or must I simply use $_SERVER['HTTP_HOST'] ?
Thank !
Cordially,
Neveldo : http://www.neveldo.fr
Neveldo wrote:
...
Or must I simply use $_SERVER['HTTP_HOST'] ?
Don't know, I always use the $_SERVER variable.
Bye
Davide
--
Live life like you're gonna die. Because you're gonna.
William Shatner
you can use env('HTTP_HOST')
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL
Davide wrote:
...
everything works except that it's returned to me that is missing
argument 1 for the controller action.
Solved at moment making the function argument as optional and testing
for the existence of $this-data[Project][name]
thank and bye
davide
--
Live life like you're gonna
hello,
I have this js
function updateopt(id){
id= document.getElementById(id).innerthHTML;
new Ajax.Updater('div2', '/listlevel.thtml', { parameters: { id:
id }});
}
listlevel.thtml is a views and in the same directory than the
index.thml
index.thtml
h1Secteur/h1
?php
echo
mkaelkael wrote:
...
listlevel.thtml is a views and in the same directory than the
index.thml
Don't know if it's right to refer directly to a thtml file, but try remove
the initial slash from /listlevel.. so linking to listlevel...
Bye
Davide
--
Live life like you're gonna die. Because
Actually this sounds like the problem I was describing in my post:
http://groups.google.com/group/cake-php/browse_thread/thread/ea10ef81a0d82741#
And effectively, it looks like a problem in Cake handling some two-
word table relationships.
The problem I had was with tables called users and
Hello all,
I am a seasoned developer and have been building apps with Cake for
some time. Today I came up against a bug that I cannot figure out -
Cake just STOPPED working. I'm using the 1.2 beta on php 5.x and all
has been well throughout this dev. However, I moved a block of code
into the
A strange thing regarding this topic.
I can't understand where's the problem.
Everytime I call the method with the observeField, all my Session data
is lost and so I'm disconnected.
It's the first time I'm using Ajax+AjaxHelper+Cake, so I could do
something wrong.
When I remove the
On Wed, Apr 23, 2008 at 11:37 AM, Davide [EMAIL PROTECTED] wrote:
A strange thing regarding this topic.
I can't understand where's the problem.
Everytime I call the method with the observeField, all my Session data
is lost and so I'm disconnected.
You might have to change some stuff
Chris Hartjes wrote:
You might have to change some stuff in your config/core.php file.
Look for Session.checkAgent
Often you have do
Configure::write('Session.checkAgent', false);
to preserve sessions when using Ajax
Session.checkAgent is not defined in my core.php. I tried defining it
Did you ever find a solution to this? I think I am experiencing a
similar problem. I can write to a session variable, but I can only
read the valid value if I do so before the action completes. Once the
action completes and a new one is called, the session information is
gone. I am extremely
On Wed, Apr 23, 2008 at 11:52 AM, Davide [EMAIL PROTECTED] wrote:
Some other ideas? Cake version 1.1.18.
D'oh -- that stuff I posted is Cake 1.2 specific.
I don't use Cake 1.1 at all, so can't help you there.
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants
Hi all,
I'm trying myself with some ajax ...
My problem is simple : I want to insert in a page the rendered view of
an action (which contain an ajax pagination). To do that, I use
requestAction() method. Right now, it works fine.
But I want to use a different layout for the action if it is an
Ok, I'm sorry ... I just found the $this-params['requested'] method
which make what I want :)
Codially,
Neveldo : http://www.neveldo.fr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this
Thanks. I knew I was doing something slightly wrong, but since what I
had worked, I sort of left it alone.
-Aran
On Apr 22, 2:14 pm, biesbjerg [EMAIL PROTECTED] wrote:
Hi Aranworld,
You should use
var $belongsTo = array('Comment' = array('className' =
'PluginName.Comment'))
On Apr 22,
Hi,
I'm having a very strange problem with Model-del() in CakePHP 1.2.
I've not experienced this before. This code worked well on 1.1, but I
can't see how a porting issue could have come into play here.
Here is my code:
$this-Resource-del($id); // where id is provided as an argument to
the
... but I've now another problem :p
Is it possible to load a view which is not the default view of the
action ?
I try by using $this-view or $this-load-view, but it seems to
doesn't work :(
thank !
--~--~-~--~~~---~--~~
You received this message because you are
Hi everybody,
I'm searching for a day how format a date field from Mysql (-MM--
DD) to 3 form's selects:
- date from mysql : 2008-04-23
- my form fields are build like this:
for ($i=0;$i11;$i++) {
$form-day('DixDate.'.$i.'.date',null,array('id'='date-sel'.$i.'-
dd')).'-'.
Does CakePHP's ACL have anything like Zend_Acl's Assert functionality?
http://framework.zend.com/manual/en/zend.acl.advanced.html
Our application will have a large number of business rules, which we
need to limit access based on various non-constant criteria.
If not built into cake's ACL, could
Yes it is present.
I doubled checked with different classes ... and finally realized that
this is issue is only present when I try to validate some model with
HABTM relations ...
IS this a known issue?
Hugues
On Apr 23, 1:49 am, Fran Iglesias [EMAIL PROTECTED] wrote:
El 23/04/2008, a las
if you need use a view of the same controller try with:
$this-render('name_of_view');
but remember only if you need use a view of the controller if you want
render a element or a view in of other controller try this
$this-viewPath = 'route_of_view_folder';
Thanks, I understand what you are saying but what I need is to be able
to edit mutliple items at once.
For example if I have to edit 20 countries, clicking on every one,
editing it and saving it would take me alot more time then selecting
the ones I need to edit and having them presented in 1
I updated CakePHP 1.2 of latest nightly built version.
The command, cake acl initdb, has revived. Successfully the above 3
tables will be created.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To
On Wed, Apr 23, 2008 at 2:04 PM, phpappdev256 [EMAIL PROTECTED] wrote:
Possible Solutions:
- Modify Router::queryString and have it pass a default delimiter
- Modify http_socket-httpSerialize($data) function to call
http_build_query() directly with a delimiter
File a ticket on
I don't know if this has been addressed yet, but this is a problem...
In router.php the method queryString uses http_build_query($q).
There are 2 problems...
1) http_build_query is a PHP5-only function
2) the delimiter is not passed in the router function, so it defaults
to
Thanks i fouind this one seems quite good.. the one from bradleyboy
looks ok too.. except it did not work with latest version of cake.
http://sandbox2.pseudocoder.com/demo/asset
The only thing that i had a hard time was with prototyope.. it will
not work with jsmin... so i found a cope of:
I've got a section where I'd like to let a user change their username,
with something like:
e.g. $this-Auth-user('username') = $this-data['User']['name'];
However this gives an error, is there a way to do this properly?
Zoltan
www.YYZtech.ca
I am doing print_r($this-data) in my appController in the
beforeFilter() and I get:
Array ( [User] = Array ( [username] = kyle [password] = sample ) )
but when I do it in the UsersContoller in the login() I get:
Array ( [User] = Array ( [username] = kyle ) )
Does anyone know why password data
Also there is this built on top of the packer
http://marcgrabanski.com/code/asset-mapper/
On 23/04/2008, Mech7 [EMAIL PROTECTED] wrote:
Thanks i fouind this one seems quite good.. the one from bradleyboy
looks ok too.. except it did not work with latest version of cake.
Hey Mech7,
The asset helper is my code. Sorry about the whole packed directory
image thing. It's definitely something to be fixed. I generally use
absolute paths in the css files, so it hasn't been a high priority for
me to fix.
-Matt
www.pseudocoder.com
On Apr 23, 2:31 pm, Mech7 [EMAIL
Hey,
Shouldn't you change it in db and update the auth data from the db ?
look at Auth/session how the data is stored.
HTH,
On Wed, Apr 23, 2008 at 8:38 PM, Zoltan [EMAIL PROTECTED] wrote:
I've got a section where I'd like to let a user change their username,
with something like:
e.g.
are you using the AuthComponent ?
afaik Auth unsets the password data after login.
HTH,
On Wed, Apr 23, 2008 at 9:10 PM, Kyle Decot [EMAIL PROTECTED] wrote:
I am doing print_r($this-data) in my appController in the
beforeFilter() and I get:
Array ( [User] = Array ( [username] = kyle
I have a form for which the following validation rules don't work.
There are other validation rules that do work including a custom
regular expression which makes me wonder if it is the fact that these
are not text inputs that is the problem.
Any help is greatly appreciated!
Jee
My code is as
Try addScript() -
http://api.cakephp.org/1.2/class_view.html#42c9e03d9fa609bd09d9530d9ee8266b
You can use it like that:
?php $this-addScript($javascript-link(array('jquery','ui.tabs'))); ?
?php $this-addScript($javascript-codeBlock('$(function() { $
(#album-data ul).tabs(); });')); ?
?php
Can anyone give me any suggestions for adding and editing multiple
models from one form in Cake 1.2?
I found a post on the topic here:
http://groups.google.com/group/cake-php/browse_thread/thread/77183ca04771e348
but I get the following when I attempted it:
Thank Axel, this is what I'm looking for !
In fact, I need for one action an normal view and an ajax view !
thank !
Cordially,
Neveldo : http://www.neveldo.fr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
Hi,
I'am experimenting with the blog tutorial from cookbook in the cakephp
1.2.0.6311
I tried to change the tutorial controller to a scaffolded one in
posts_controller.php:
?php
class NotesController extends AppController
{
var $scaffold;
}
?
Everything is working fine up to the moment
Hi Aaron
Given that this problem has only turned up in the the last release of
1.1 (the site was working happily prior to that), moving to 1.2 would be
overkill (just refactoring alone would take weeks of work). For now I
am moving back to an earlier release, but I would rather find the bug
Hi DF
It would be interesting to see if that problem still presents in a
previous release of 1.1. It certainly sounds like they are related.
Regards,
Langdon
DyingFetus_666 wrote:
Actually this sounds like the problem I was describing in my post:
Why CakePHP choose SimpleTest for their Test Suite?
Because, I wanna use PHPUnit too.
PHPUnit has a extension called Selenium that test web applications (html,
javascript, ajax, etc... website).
I'ts perfect for Web 2.0!!!
Well ... Why CakePHP choose SimpleTest for their Test Suite?
[]'s
On
I'm a dough-head. Sorry, I didn't read your post correctly.
But, would you really need to change the name f any countries? Those
don't change too often. And when one did, I'd think you'd want to
update the main DB record for it rather than the association to some
other model.
If what you want
FormHelper's datetime input type already done exactly this. You don't
have to manually put together the day/month/year fields.
On Apr 23, 12:43 pm, avairet [EMAIL PROTECTED] wrote:
Hi everybody,
I'm searching for a day how format a date field from Mysql (-MM--
DD) to 3 form's selects:
Cake provides perfectly generic, free-form ACL rules. It has built-in
support for controller or action based ACL via the Auth Component, but
you don't need to use either.
I have very fine grained ACOs, and use AROs as roles.
When I do an ACL check, I can write something like $this-Acl-
Great info... Thanks a lot.
On Apr 22, 11:38 pm, biesbjerg [EMAIL PROTECTED] wrote:
I'll bet echo get_class($this-Review) will output 'AppModel'.
The reason is you need to define $uses like this when accessing plugin
models:
var $uses = array('User', 'Reviews.Review');
You should do the
Rolling back to Cake version 1.1.5850 fixes this problem. There are a
lot of changes to model code in the next revision and something in there
breaks Cake as described below.
My PHP knowledge is not strong enough to be able to work out the problem
and successfully fix it. So if anyone
Can I add to this and say ditto?
On Apr 7, 10:19 pm, Juan Luis Baptiste [EMAIL PROTECTED]
wrote:
Hi,
I'm trying to make a view element and reuse it in various views. The
element uses the pagination helper, the problem is that the element
can't see the paginator helper object:
: Undefined
Can't we also load behaviors same way?
Inside /app/models/video.php
var $actsAs = array('Upload' = array('field' = 'video',
'type' = 'video',
72 matches
Mail list logo