Re: special i18n problem

2009-04-08 Thread John Andersen
If I understand you correctly, then you have content that are not related to a specific country and you have country specific content. One thing is to use I10n to change the presentation language, the other is to change the content from non specific to country specific. In that case you may look

Re: Route All Missing View Errors To App Controller Method

2009-04-08 Thread deedod
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

saveAll - saving different relation types at the same time

2009-04-08 Thread Raph
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 related

Re: The right way to pass vars from a view to the layout?

2009-04-08 Thread the_woodsman
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

Re: Offline version of the CakePHP manual.

2009-04-08 Thread psykro
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

Re: Offline version of the CakePHP manual.

2009-04-08 Thread psykro
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 dardoso...@gmail.com wrote: Guess the same goes for the api.. Not quite, you can download the api_generator plugin and

Re: Modeling an Employee/Company Hierarchy

2009-04-08 Thread John Andersen
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

Get session expiry time

2009-04-08 Thread sarahlou
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

Re: Problem with $this-Session-setFlash(__('Hidden value changed'));

2009-04-08 Thread Elavazhagan chidambaram
__()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 goo...@toby-g.net wrote: Morning all, I have a problem

Re: multi-language support with different fields suffix

2009-04-08 Thread Elavazhagan chidambaram
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 bally.z...@gmail.com wrote: See this article: http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-translation-part-2/ On

Re: Paginator with table name.field

2009-04-08 Thread Elavazhagan chidambaram
this is ur code ?php echo $paginator-sort('MUNICIPIO', 'Municipio.Nome_municipio'); ? this code right code ?php echo $paginator-sortBy('Municipio.Nome_municipio', 'MUNICIPIO'); ? On Tue, Apr 7, 2009 at 9:34 PM, Celso cels...@gmail.com wrote: Hi! I have this problem: th?php echo

Re: The right way to pass vars from a view to the layout?

2009-04-08 Thread the_woodsman
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

Re: Putting a label on same line as an input field

2009-04-08 Thread Dardo Sordi Bogado
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

custom routes issue

2009-04-08 Thread Johnny
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',

Putting a label on same line as an input field

2009-04-08 Thread Danny Lieberman
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 --~--~-~--~~~---~--~~

Re: The right way to pass vars from a view to the layout?

2009-04-08 Thread John Andersen
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 -

Re: RewriteEngine not allowed here - 500 Internal Server Error

2009-04-08 Thread Rhett Waldock
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 trobr...@gmail.com wrote: /htdocs/cake/.htaccess: RewriteEngine not allowed here this is resulting in a 500 Internal Server error, I have checked for

Re: button with image

2009-04-08 Thread Elavazhagan chidambaram
?php echo $form-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 kryskasan...@gmail.com wrote: Thank you!

search functionality

2009-04-08 Thread nam
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

Modeling an Employee/Company Hierarchy

2009-04-08 Thread Shien
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

Re: The right way to pass vars from a view to the layout?

2009-04-08 Thread John Andersen
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 elwood.ca...@gmail.com wrote: John, let me give it another go! Googl analytics is still my best example. I want

Re: The right way to pass vars from a view to the layout?

2009-04-08 Thread the_woodsman
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 j.andersen...@gmail.com wrote: Thanks for trying :) Do I understand correctly, that you are invoking/calling/whatever an element (Google

Re: Sessions lost

2009-04-08 Thread Dr. Loboto
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 deudt...@gmail.com 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

Re: share elements, helpers etc across multiple apps

2009-04-08 Thread Ernesto
And... to share a behavior? On 7 Apr, 18:11, majna majna...@gmail.com 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 e.fanz...@gmail.com wrote: Hello. Is there a

Re: The right way to pass vars from a view to the layout?

2009-04-08 Thread jsundquist
Why not pass something from the controller to the layout and use a beforeRender? On Apr 8, 8:12 am, the_woodsman elwood.ca...@gmail.com 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

Re: Putting a label on same line as an input field

2009-04-08 Thread jsundquist
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

Re: The right way to pass vars from a view to the layout?

2009-04-08 Thread the_woodsman
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

table naming convention question

2009-04-08 Thread scott
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 you

Re: table naming convention question

2009-04-08 Thread Rhee
Yes it works like that. Just give it a try.. ;-) On Apr 8, 3:41 pm, scott scottpowe...@gmail.com 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?

Data validation always return true

2009-04-08 Thread Rhee
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),

Re: Putting a label on same line as an input field

2009-04-08 Thread Dardo Sordi Bogado
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;        

Re: Data validation always return true

2009-04-08 Thread brian
$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 cahy...@gmail.com wrote: Hi, the data validation in my

Re: Multiple language supports

2009-04-08 Thread ian . hill
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

Re: Get session expiry time

2009-04-08 Thread brian
$this-Session-sessionTime http://api.cakephp.org/class/session-component On Wed, Apr 8, 2009 at 5:22 AM, sarahlou sa...@hexagonwebworks.com 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!

Prohibit saving of some fields

2009-04-08 Thread marco.rizze...@gmail.com
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 for

AppController not loaded for missing controller pages

2009-04-08 Thread rich...@home
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 username block. If the user goes to a page that doesn't exist, then AppController isn't loaded at all and these view variables

Re: AppController not loaded for missing controller pages

2009-04-08 Thread Myname
make sure you set the variable in the beforeRender function and not in the beforeFilter... cheers On Apr 8, 5:21 pm, rich...@home richardath...@gmail.com wrote: In my AppController, I set a bunch of view variables in the beforeFilter() {} callback. I use these view variables ($authUser)

Re: Prohibit saving of some fields

2009-04-08 Thread majna
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 marco.rizze...@gmail.com wrote: Hi I would prohibit saving of some fields that in my edit action in a controller . I try

Re: Pagination with Random Order?

2009-04-08 Thread TGurske
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

Re: $this-set(compact()) not working

2009-04-08 Thread Nate
I fixed this in 1.3: http://thechaw.com/cakephp/commits/view/987e469c2fc151bd5d5377517d43a74c3bdf2ba3#numbers On Apr 7, 3:27 pm, brian bally.z...@gmail.com wrote: Thanks, both. I'm kicking myself because I did see something about this a while back. Yes, it's complaining about all three.

Re: Modeling an Employee/Company Hierarchy

2009-04-08 Thread Timothy Western
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

Use another model function from an unrelated model

2009-04-08 Thread lemp
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

Re: Use another model function from an unrelated model

2009-04-08 Thread Joe Critchley
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

Filter find results based on membership of sites or organizations

2009-04-08 Thread redcomet
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

Live Validation

2009-04-08 Thread Dave Maharaj :: WidePixels.com
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

Subdomains and Routes

2009-04-08 Thread Aurelius
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

Question about Routes and honoring MVC

2009-04-08 Thread Martin
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

Re: Subdomains and Routes

2009-04-08 Thread schneimi
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., 01:17,

CheckAccess function

2009-04-08 Thread Dave
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

Re: Question about Routes and honoring MVC

2009-04-08 Thread Miles J
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