How to use not 'IN' in condition in finall()?
$data = $this->Blog->findAll(array('Blog.id' =>
'5'),array
('Blog.blogId','Blog.blogImage','Blog.blogTitle'));
I want to change it so that it finds out id IN (7,8,9). How to do
that?
--~--~-~--~~~---~--~~
You r
Awesome. Thanks, Sam!
On Apr 9, 1:28 am, Sam Sherlock wrote:
> Hi,
>
> Ihave not tried this myself - I am not on dreamhost but give this a read it
> maybe what your looking for
>
> http://www.thoughtglade.com/posts/custom-php-dreamhost-cakephp
>
> hth - S
>
> 2009/4/9 Drinkspiller
>
>
>
> > I h
Hi,
Ihave not tried this myself - I am not on dreamhost but give this a read it
maybe what your looking for
http://www.thoughtglade.com/posts/custom-php-dreamhost-cakephp
hth - S
2009/4/9 Drinkspiller
>
> I have a CakePHP site that is working in a shared host environment on
> Dreamhost. The
I have a CakePHP site that is working in a shared host environment on
Dreamhost. The app and cake dirs are outside of the webroot. The
directory for the site contains the contents of what was /app/
webroot.
Everything works great, except I need to use a custom php.ini.
Dreamhost gives instruction
How would information from a database be used to make custom routes?
Why not just use Cakes default setup.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php
I want to build a function to check a users access for specific
actions for different controllers. I have ACL and AUTH set up
restricting the general access to the controllers in question. Its the
specific actions that relate to the owner of the action where I need
to fine tune it and wondering h
Hi Aurelius,
I use something like this in config/routes.php:
$subdomain = substr(env("HTTP_HOST"), 0, strpos(env("HTTP_HOST"),
"."));
if ($subdomain != 'domain') {
Router::connect('/', array('controller' => 'users', 'action' =>
'view', 'pass' => $subdomain));
}
Regards,
Michael
On 9 Apr.,
Hello everyone, this is my first post here. I'm just starting with
CakePHP and getting familiar with MVC.
I have a question about defining custom routes; if I need some
information from a database to help me with generating custom routes,
would the proper way to do that be to use a controller and
Hi!
I want to have a subdomainrouting from
http://(.*).domain.com mappt to htpp://www.domain.com/users/view/username:$1,
which should be mappt standardwise like a normal cake app.(or mybe
directly).
I Don't really understand much about modRewrite and even less about
cakes dispatcher :-/
Can some
Has anyone have any advice on live validation using the prototype framework?
A good starting place. Searched but found nothing. Also is it possible to
apply live validating to inPlace editors?
Thanks
Dave
--~--~-~--~~~---~--~~
You received this message because
I have a very complex problem that hopefully someone other than myself
has modeled before :)
I am making a site to keep track of ordering information and customer
information for my company as well as any number of resellers,
locations, etc etc. So far I have built the site up to the point
where
You should probably use the ClassRegistry class.
You can instantiate an unrelated model by doing the following:
$ModelName = ClassRegistry::init('ModelName');
... and then use the functions from that variable, e.g...
$ModelName->delete($id);
Hope this helps.
On Apr 8, 10:55 pm, lemp wrote:
I’m building a statistical application and I need to access a function
that return reference values from a model that is unrelated with the
model where I need this data.
What is the best way to achieve this?
--~--~-~--~~~---~--~~
You received this message because y
I have recently worked through a similar problem. I'm building a site
to manage characters, and the organizational structure of a military
unit in a game I run in my spare time. In my case i wanted to have
one table to store all of the organizational levels (I called them
divisions), with a typ
I fixed this in 1.3:
http://thechaw.com/cakephp/commits/view/987e469c2fc151bd5d5377517d43a74c3bdf2ba3#numbers
On Apr 7, 3:27 pm, brian wrote:
> Thanks, both. I'm kicking myself because I did see something about
> this a while back.
>
> Yes, it's complaining about all three. Strange.
>
> This is
Hey,
It worked perfectly. I appreciate your help grigri!!!
Here is what I used:
var $paginate = array('Project' => array('conditions' => '','order'
=> '','limit' => 15));
function index()
{
// Sort Randomly Start
if ($this->Session->check
http://teknoid.wordpress.com/2009/03/11/blacklist-your-model-fields-for-save/
http://book.cakephp.org/view/257/Configuration
On Apr 8, 6:06 pm, "marco.rizze...@gmail.com"
wrote:
> Hi
> I would prohibit saving of some fields that in my edit action in a
> controller .
> I try with $this->Securit
make sure you set the variable in the beforeRender function and not in
the beforeFilter...
cheers
On Apr 8, 5:21 pm, "rich...@home" wrote:
> In my AppController, I set a bunch of view variables in the
> beforeFilter() {} callback.
>
> I use these view variables ($authUser) in the layout to fo
In my AppController, I set a bunch of view variables in the
beforeFilter() {} callback.
I use these view variables ($authUser) in the layout to for e.g. a
welcome block.
If the user goes to a page that doesn't exist, then AppController
isn't loaded at all and these view variables aren't populat
Hi
I would prohibit saving of some fields that in my edit action in a
controller .
I try with $this->Security->disabledFields = array('.); but it
doesn't work.
I have seen that I can set in save method which fields save but I have
many fields so if i can set which field not save it's better fo
$this->Session->sessionTime
http://api.cakephp.org/class/session-component
On Wed, Apr 8, 2009 at 5:22 AM, sarahlou wrote:
>
> I'm sure this must be incredibly simple, but I've searched for ages...
>
> How do I read the expiry time of the current session?
>
> Thanks!
>
> >
>
--~--~-~--
Hi,
I found translate pretty easy to work with provided you follow the
instructions (!). Anyway, the one thing that is stopping me at the
moment is the editng form. I want to be able to add/edit text in two
languages, English and Spanish. So I have set my form fields up to
have names like Faq.nam
> $this->User->validates($this->data); // always return true
> $this->User->save($this->data); // always return true, and try to save
You say it always returns true, but are you testing that in an if block?
On Wed, Apr 8, 2009 at 9:59 AM, Rhee wrote:
>
> Hi,
>
> the data validation in my User Mo
> Wouldn't you want all labels in side a form to appear on the left?
Perhaps I misunderstand the question, I thought he was asking how to
set an specific label in the left side.
> If so then why not do something along the lines of
> label {
> float: left;
> width: 75px;
> di
Hi,
the data validation in my User Model always return true. Can anybody
tell me why?
In Model:
var $validate = array (
'login' => array (
'notempty' => array (
'rule' => array('custom',
VALID_NOT_EMPTY),
Yes it works like that. Just give it a try.. ;-)
On Apr 8, 3:41 pm, scott wrote:
> I am new to cake and understand about plural names for tables.
>
> My question is for names that end in "y" like library
> plural-"libraries", is it possible to name tables this way? If so,
> how?
>
> Thanks in ad
I am new to cake and understand about plural names for tables.
My question is for names that end in "y" like library
plural-"libraries", is it possible to name tables this way? If so,
how?
Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because
To my mind, a controller shouldn't need to know about the ugly
semantics of Javascript dependencies etc - it's entirely presentation
related, is irrelevant to other output types (xml, csv), etc...
And on a practical note, we have client-side guys in the team, who
don't really edit controllers etc
Wouldn't you want all labels in side a form to appear on the left? If
so then why not do something along the lines of
label {
float: left;
width: 75px;
display: block;
clear: left;
text-align: left;
cursor: hand;
}
On Apr 8, 6:31 am, Dardo Sordi
Why not pass something from the controller to the layout and use a
beforeRender?
On Apr 8, 8:12 am, the_woodsman wrote:
> Exactly - the layout renders an analytics element, but it can pass it
> a variable that was set in the actual view.
>
> On Apr 8, 1:40 pm, John Andersen wrote:
>
> > Thanks
And... to share a behavior?
On 7 Apr, 18:11, majna wrote:
> Setup additional view paths in config/bootstrap.php
> $viewPaths = array(ROOT.'common'.DS.'views'.DS);
>
> debug(Configure::getInstance());
>
> On Apr 7, 4:34 pm, Ernesto wrote:
>
>
>
> > Hello.
>
> > Is there a way tosharethe same hel
Set debug > 0 and check for errors.
Check session files store path to be writable by cake.
On Apr 5, 11:32 pm, "Deud'tens" wrote:
> Hello, sorry for my english, I'm french.
>
> I have a god damn problem with sessions of cakephp : they don't work !
> When I flash to another controller/action, ev
Exactly - the layout renders an analytics element, but it can pass it
a variable that was set in the actual view.
On Apr 8, 1:40 pm, John Andersen wrote:
> Thanks for trying :)
>
> Do I understand correctly, that you are invoking/calling/whatever an
> element (Google Analytics) from the layout?
Thanks for trying :)
Do I understand correctly, that you are invoking/calling/whatever an
element (Google Analytics) from the layout?
John
On Apr 8, 2:27 pm, the_woodsman wrote:
> John, let me give it another go!
>
> Googl analytics is still my best example.
>
> I want every single page to h
I have the following routes set up for the front end of my app:
Router::connect('/become-our-client', array('controller' => 'users',
'action' => 'register'));
Router::connect('/contact-us', array('controller' => 'contact',
'action' => 'contact_us'));
Router::connect('/latest-projects', array('c
Assign some specific css selector (setting an id or class in the
wrapping div should work), then set label { display: inline } or float
the things left...
$form->input('lefty-input', array('div' =>array('id' => 'make-me-left')));
HTH,
- Dardo
On Wed, Apr 8, 2009 at 8:26 AM, Danny Lieberman wro
John, let me give it another go!
Googl analytics is still my best example.
I want every single page to have the basic analytics snippet.
I really don't want to have this in every single view- it'd be a big
job to go through all the existing views and add the call to render
the element (not very
This is sort of a classic css question but I have not been able to
position an label on the left side of an input field - it always
slides to the top. When I did get the label on the left-it impacted
the layout of the entire form.
br
Danny
--~--~-~--~~~---~--~~
Yo
I'm sure this must be incredibly simple, but I've searched for ages...
How do I read the expiry time of the current session?
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this
I want the code for search functionality with searching by list
category.
--~--~-~--~~~---~--~~
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
I am still confused about why you want to have something in the
layout, that changes depending on the view!
If the view knows what to present, why does it have to inform layout
about it! The view just invokes the correct element to present.
It sounds to me that you are making it too complicated -
There are several options:
1) One table Employees with relationship to itself, thus able to
contain a hierarchy of employees.
2) Three tables, OrganizationUnits, Positions, Employess, with
relationships as:
- Employees --- are employed in one or more ---> Positions
- OrganizationUnits --- offers o
Thanks for the api plugin info, didnt know that it was there, will be
trying it out sometime, handy to have the api locally as well.
On Apr 8, 2:02 am, Dardo Sordi Bogado wrote:
> > Guess the same goes for the api..
>
> Not quite, you can download the api_generator plugin and configure it
> to r
Thanks Dardo
I've had a few people ask me for it. So I have posted in online
http://rapidshare.com/files/218826372/manual-builder.zip
Dardo, as the creator of this script, if ever you want me to pull it
off, let me know and I will do so.
You created it, I'm just sharing it with your permission.
If you're using Apache2, try adding "AllowOptions all" in addtion to
"AllowOverride All" to your conf file.
-RW
On Mar 31, 11:30 pm, djXternal wrote:
> /htdocs/cake/.htaccess: RewriteEngine not allowed here
>
> this is resulting in a 500 Internal Server error, I have checked for
> the existence
__()function is using Localization & Internationalization if u want the
__()function $this->Session->setFlash(__('Hidden value
changed',true));otherwise
$this->Session->setFlash('Hidden value changed');On Tue, Apr 7, 2009 at 5:11
PM, Toby wrote:
>
> Morning all,
>
> I have a problem with the fo
end(array('type'=>'submit',*'class'=>'button'*,'value'=>'Post
Review','label'=>'Post Review'));?>
for example u add the image to css code
the *button** *css* *cla*ss u add the background image
this onway
*On Tue, Apr 7, 2009 at 9:26 PM, kryska wrote:
>
> Thank you!
>
> It's correct:
>
> submit('m
see the articles. and then fallow step by step
http://book.cakephp.org/view/161/Localization-Internationalization
On Tue, Apr 7, 2009 at 9:49 PM, brian wrote:
>
> See this article:
>
>
> http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-translation-part-2/
>
> On Tue, Apr 7, 20
this is ur code sort('MUNICIPIO',
'Municipio.Nome_municipio'); ?>
this code right code sortBy('Municipio.Nome_municipio', 'MUNICIPIO'); ?>
On Tue, Apr 7, 2009 at 9:34 PM, Celso wrote:
>
> Hi! I have this problem:
>
> sort('MUNICIPIO',
> 'Municipio.Nome_municipio'); ?>
>
> result in:
>
>a
Hi All,
Apologies if this has been answered multiple times before but I can't
seem to find a post which answers this question in full rather than
just a subset of it.
Problem: An employee has zero or more managers and at the same time,
might be managing zero or more employees.
Example: CEO ---
Thanks for all your suggestions everyone.
So if Cake doesn't have a cleaner way to do this, how would I make one
myself?
The ideal would be to mimic the way vars are passed into views from
controllers, i.e in the view, setForLayout('varName', $varValue), and
then $varName just appears in the lay
In Cake docs there are said: 'Saving related data with saveAll() will
only work for directly associated models.". Ok, but could I save
related data with different relation types at the same time? Is it
save?
Example. I have an "User" model and I want to create new user. The
user is "hasMany" rela
Thanks Brian.
This should do the trick.
Much appreciated.
- D
--~--~-~--~~~---~--~~
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
53 matches
Mail list logo