Hello all :)
I use the Translate Behavior normaly but I'm not sure if the way I'm
using it is the correct, that's why I need your help !
Tha way I use it is this
var $actsAs = array(
'Translate'=>array(
'name'=>'nameTranslated'
)
);
Where name is the field name
Hi All,
I'm having an issue with using HABTM with pagination...
My app has a users and roles table - users HABTM roles, roles have
many users.
In my users index controller I'm trying to limit the pagination
results so that only users with certain roles are displayed.
At the moment I have:
$thi
The best human name validation - not empty one.
On Sep 1, 9:29 pm, Bryan Paddock wrote:
> Ah in the end I removed the validation completely... realized that putting
> such restrictions on names is not the best idea (eg unicode chinese/jap
> names etc)
>
>
>
> On Mon, Aug 31, 2009 at 5:14 PM, Dr.
You can specify 'id' directly in input method like this:
$form->input('User.SecurityAccess.'.$aco_id, array(
'id'=>"UserSecurityAccess$aco_id",
)
);
But the reason the problem is happening in the first place the syntax
of your input fieldname, with $aco_id at the end... try this instea
Use SINGLE QUOTES when need quotes in tag attributes. It is the basics
of HTML.
link(
$html->image('an_image.jpg'),
'/image/a_link.php?test',
array(
'class' => 'image',
'escape' => false,
'onClick' => "pageTracker._trackEvent('category',
Sensitive, sensitive - as all other Cake functions.
"$a === $b" is strict equality, true only when type and content of
arguments are same.
http://www.php.net/manual/en/language.operators.comparison.php
On Sep 2, 12:49 am, abc wrote:
> Is app::import case sensitive or insenitive in its argument
A few things to keep in mind are:
* Don't just validate against the MIME type submitted by the client,
verify the MIME type by inspecting the uploaded file directly.
* Image transformations help to prevent some exploits (i.e. by
stripping comment metadata).
* Uploaded files shouldn't be directly
Use the var_dump of php,
ob_start();
var_dump($activeuser);
$dump_string = ob_get_clean();
Now dump the string,
On Sep 1, 12:06 pm, McScreech wrote:
> Hello,
>
> I am learning to trace through my code to debug results that I don't
> understand.
> I have the following setup (in part
.htaccess files are present. And like I mentioned in my original post
I copied the files I had locally (that are not working) to bluehost
and they work there. I have removed the hash in front of the
loadmodule statement as well. So as far as I can tell mod_rewrite is
enabled, but the cake welco
If i only use die(debug($this->{$model})); I got the dump of object.
If i only use die(debug($this->alias)); I got the Grupos_de_contenido
It means what the error occurs is not in the first time what
getColumnType function is called. Then the die(debug($this->
{$model})); is killing the applicat
You're right brian, two radios for every group, so the two radios
shown have different ids but another group has the same id.
Any ideas to correct this?
Thanks!!
On 28 Ago, 17:12, brian wrote:
> I think the problem is not so much the value of the labels' "for"
> attribute (NOT the id, which
Reference site: http://stickmanlabs.com/accordion/
I used this accordion for couple of sites and working fine however I
have problem setting it up with CakePHP environment.
my code:
title 1
aaa
title 2
Hello,
I am learning to trace through my code to debug results that I don't
understand.
I have the following setup (in part):
(And apologies for running on in my attempt to describe the
situation.)
in app_controller.php:
var $uses = array('User');
var $components = array('Acl', '
I need to write an admin application where user can only see their own
stuff and admins can see all the stuff.
But I am a bit confused which way I need to look. Should I look into
using ACLs or ?
Think of a book site where users can only see and edit the books they
posted and admins can see
Here's what I've done in the view:
data['Blogurl']['url']); $i++){
echo $form->input("Blogurl.url.$i", array('label' => 'URL'));
}
?>
input('BlogurlUrl', array('name' =>
'data[Blogurl][url][]','id' => '', 'label' => 'URL'));?>
Is app::import case sensitive or insenitive in its arguments,
App::import('Model',) is same as App::import('model',.)
>From the source code it feels like case sensitive (i do not know what
three equal operator does ===)
Extract from configure.php
function __overload($type, $name) {
How to not escape Javascript in html helper link without having to use
Javascript outside $html->link?
I try to achieve:
- the quotes in the onClick event, either single or double quotes
But the result I get when viewing pagesource is:
- note the escaped quotes
- I tried single and
Hi,
I am not quite sure how to search for how to tackle this problem so
aplogies - perhaps someone could send me in the direction of a
relevant post?
I have a model:
-pages
I want another model to hold the links between pages so would have
-links
with fields:
-id, page_from_id, page_to_id
w
@woodsman - No I agree with you.
I was simply showing him the media view because you he wanted to
supply downloads/files to users.
On Sep 1, 4:21 am, the_woodsman wrote:
> RE The media view - I try and avoid this unless it's a real security
> requirement, as it means every request for a simple
I don't suggest that you modify the core files like that. It will lead
to problems down the road when you want to upgrade. The hint to put
the debug statements in there was just that--for debugging. It would
be better to track down precisely what the problem is in your own
code. The thing is, I'm
Hahaha, I KNEW it was something simple that I was missing, and that
was it. Thanks brian!
--~--~-~--~~~---~--~~
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
Glad to help. But how is it a problem? Is that causing display issues
somehow? It shouldn't, AFAIK.
On Tue, Sep 1, 2009 at 8:17 AM, WebbedIT wrote:
>
> brian, you are a class act ... of course I used that little helper,
> doh! Will just have to remove that helper when I put the site into
> produ
Hi brian
I solved the problem:
if ($model != $this->alias && !empty($model) && isset($this->
{$model})) { // Line 948
return $this->{$model}->getColumnType($column);
}
instead:
if ($model != $this->alias && isset($this->{$m
+1 on checking to ensure that your ".htaccess" file is present.
On Sep 1, 2:16 am, "fatnic...@googlemail.com"
wrote:
> Did you make sure you copied over ALL of the files from the Cake
> download? Even the hidden ones? Sounds like the .htaccess file is
> missing.
>
> On Sep 1, 2:04 am, ajoberstar
Ah in the end I removed the validation completely... realized that putting
such restrictions on names is not the best idea (eg unicode chinese/jap
names etc)
On Mon, Aug 31, 2009 at 5:14 PM, Dr. Loboto wrote:
>
> Your function does all right - alphanumeric values only as you did
> nothing with it
hi brian, thanks for reply
I made the changes you mentioned in the models and now the error is
the same but in another line:
Fatal error: Can not access empty property in / sitiotmp/www2/
nuevositio/cake/libs/model/model.php on line 948
I added lines before the 948 and got the "DUMP 1"
After th
eh? why refuse to name the fields using CakePHP's conventions ...
effectively stopping you from using the perfectly good saveAll()
method to save both your Blog and multiple BlogUrl data with full
validation all in one call? Are you confident that you can write a
better function than the one alr
brian, you are a class act ... of course I used that little helper,
doh! Will just have to remove that helper when I put the site into
production I suppose.
Thanks for pointing out what should have been obvious :)
--~--~-~--~~~---~--~~
You received this message be
RE The media view - I try and avoid this unless it's a real security
requirement, as it means every request for a simple image requires
CakePHP to handle it, vastly increasing the load on yoru servers, and
the latency for that file.
An alternative is to save each file based on a UUID, or similar
It is usually in apache/conf/httpd.confprobably you have comment on it
#LoadModule rewrite_module modules/mod_rewrite.so
remove hash # to look like this
LoadModule rewrite_module modules/mod_rewrite.so
and restart server
and now you have rewrite enabled!
Hope it helps,
Kornelije Sajler
On Tue,
HEY JUST CHECK IN UR SERVER SETTINGS WETHER THE MODE REWRITE IS ENALED OR
NOT...
YOU CAN FIND IT UNDER PHP SETTINGS OR SOMETHING LIKE THAT.
ENABLE IT .
On Mon, Aug 31, 2009 at 11:16 PM, fatnic...@googlemail.com <
fatnic...@googlemail.com> wrote
Hi,
I read a feed into a cache. I do have a specific Cache::config() for
this cache var. When the cache var expires I try to fill it again. But
sometimes this "filling" fails. Therefore I want to extend the cache
lifetime with additional 5 minutes before I fill it again, but when
the cache has alr
Hi Dave,
If the field being validated is located in a table, wherein the users
id also is, then you can create a unique index on the combination
(field + user_id) for the table, thus having the database taking care
of the validation.
Enjoy,
John
On Aug 31, 8:13 pm, "Dave Maharaj :: WidePixel
Did you make sure you copied over ALL of the files from the Cake
download? Even the hidden ones? Sounds like the .htaccess file is
missing.
On Sep 1, 2:04 am, ajoberstar wrote:
> I did an install of CakePHP on my local device (Windows XP) with an
> Apache server. I did the install to the letter
In this case just use plain SQL in paginate() and paginateCount().
On Aug 31, 9:52 pm, Dean C wrote:
> Hi folks,
>
> I can't use a View for the union query as it requires parameters. Even
> if I take away the fulltext, and then do a fulltext search on the
> view, MySQL can't then delegate the in
http://book.cakephp.org/view/152/Adding-your-own-Validation-Methods
On Sep 1, 12:13 am, "Dave Maharaj :: WidePixels.com"
wrote:
> I need to add a custom validation rule but cant quite figure out how to do
> it.
>
> The field being validated has to be unique specific to the user. So User1
> can u
@Joel
Do you have any insight into the reason for keeping Cake1.2 on PHP
5.2?
At the moment the latest stable CakePHP will not run on the latest
stable PHP. Since this just sound odd I imagine there was a
discussion, reasons weighed for and against, tests done and all that.
I ask since my curren
thanx a lot!!
On Aug 28, 8:07 pm, brian wrote:
> You can put something like this in your view:
>
> echo $html->css('the_filename_without_extension', 'stylesheet',
> array('media'=>'screen'), false);
>
> http://api.cakephp.org/class/html-helper#method-HtmlHelpercss
>
>
>
> On Fri, Aug 28, 2009 at
38 matches
Mail list logo