RE: Style a Submit

2009-09-25 Thread Dave Maharaj :: WidePixels.com
Yeah I went with button as the input. All is good. Thanks Dave _ From: Eber Freitas Dias [mailto:eber.frei...@gmail.com] Sent: September-25-09 11:29 PM To: cake-php@googlegroups.com Subject: Re: Style a Submit You also should consider using the tag instead of the default input but

Re: Style a Submit

2009-09-25 Thread Eber Freitas Dias
Ow, by the way, you need to use type="submit": Whatever you want here []'s On Fri, Sep 25, 2009 at 10:58 PM, Eber Freitas Dias wrote: > You also should consider using the tag instead of the default > input button. > > Take a look: http://www.w3schools.com/tags/tag_button.asp > > The button tag

Re: Style a Submit

2009-09-25 Thread Eber Freitas Dias
You also should consider using the tag instead of the default input button. Take a look: http://www.w3schools.com/tags/tag_button.asp The button tag is much more flexible as it is totally customizable, and you can put orther elements inside of it, like images: Then, you just close the form wi

Re: Style a Submit

2009-09-25 Thread brian
The form should have an ID. Just create a CSS rule for #form_id input[type='submit']. Also, Cake's default is to put the submit button in a div with class="submit" so you can use that, also, for your CSS selector. On Fri, Sep 25, 2009 at 6:10 PM, Dave Maharaj :: WidePixels.com wrote: > How can

Re: learning cake

2009-09-25 Thread Marcelo Andrade
On Fri, Sep 25, 2009 at 7:31 PM, Janu wrote: > > I just downloaded cake php and followed the directions. I could see > welcome page. But after making posts when I go to localserver/mysite/ > posts it says > > Not Found > The requested URL /mysite/posts was not found on this server. > > when I go

Re: Best way to accomplish acl for database records owned by a user

2009-09-25 Thread rOger
Thanks again for additional pointers. I got many interesting information how to create a row level based access. We are going to make some tests to see which is the best solution in our case. rOger On Sep 25, 10:23 pm, brian wrote: > On Fri, Sep 25, 2009 at 2:25 AM, rOger wrote: > > > Thanks

Layout and design

2009-09-25 Thread Ziki
Hi, I'm new in cake, i have question about designing, and creating layout for my site, my site is on this domain http://www.hrvatskiportali.com/HPredizajn/ an this isn't made by CakePHP this is my own made. I want to create this same design with jQuery and other stuff in CakePHP but don't know w

learning cake

2009-09-25 Thread Janu
I just downloaded cake php and followed the directions. I could see welcome page. But after making posts when I go to localserver/mysite/ posts it says Not Found The requested URL /mysite/posts was not found on this server. when I go to localserver/mysite then it gives me the welcome page. Am I

newbie table association

2009-09-25 Thread spooknick
hi there I want to make a product model that has a country_of_fabrication and a country_to_sale_too. Of course, both of these fields are related to the same countries table. In the product add view I want to have two SELECT elements populated with the countries table entries (the well known countr

Re: autocomplete program

2009-09-25 Thread Jonathon Musters
Will youI have stuff then. To... How big of a spoon do you have Lol On 9/25/09, Bert Van den Brande wrote: > Want me to travel to your city and code the project as well ? > > Anyway, have a look here : > http://bakery.cakephp.org/articles/view/autocomplete > > It will get you at least

Style a Submit

2009-09-25 Thread Dave Maharaj :: WidePixels.com
How can you style a submit with a CSS style in directly in the echo $form->end('Save'); I want to use a CSS sprite which has the various states but when nothing i try works. Has anyone done this? Ideas? Dave --~--~-~--~~~---~--~~ You received this message beca

Re: Best way to accomplish acl for database records owned by a user

2009-09-25 Thread brian
On Fri, Sep 25, 2009 at 2:25 AM, rOger wrote: > > Thanks for your answers!! > > @brian: It looks rather complex to accomplish such a "easy" task so I > think there must be an easier way to get the same result... Yeah, sure it's complex. As I pointed out, though, the example I posted goes a littl

Re: simple "contain" question

2009-09-25 Thread brian
Do you mean that you only want that one model to implement it? Yes, you can do that. The syntax is exactly the same as with AppModel: var $actsAs = array('Containable'); or (PHP5 only) public $actsAs = array('Containable'); On Fri, Sep 25, 2009 at 1:46 PM, lorenx wrote: > > hi all. > > is i

Re: How to user imagemagik in cakephp

2009-09-25 Thread Jonathon Musters
Have you checked that php is now showing it with a phpinfo(); ? more information and details are needed On Fri, Sep 25, 2009 at 2:31 PM, brian wrote: > > Well, what's the problem? Are you getting errors? Do you see anything > in Cake's error log? What about Apache's? Can you use ImageMagick

Re: find with HABTM problem

2009-09-25 Thread Wladiston Paiva
unfortunately not always possible. because the database already exists. I am only deploying the system in PHP (currently Delphi). and the base is in Firebird. I had problems with the Auth component because of the Firebird, I believe the problem is the integration of the cake with the firebird. I a

Re: find with HABTM problem

2009-09-25 Thread brian
What does the find() code look like? It's possible that the problem is with your unconventional column names. It might work better if you use, eg. 'areainteresse_pessoa' for the join table and 'pessoa_id' for the key. Or it might be something else. On Fri, Sep 25, 2009 at 11:30 AM, Wladiston Pa

Re: How to user imagemagik in cakephp

2009-09-25 Thread brian
Well, what's the problem? Are you getting errors? Do you see anything in Cake's error log? What about Apache's? Can you use ImageMagick from a terminal? Can you use it from a plain (non-Cake) PHP script? On Fri, Sep 25, 2009 at 9:28 AM, Vijay Kumbhar wrote: > Hello Jonathan, > > Thanks for the r

Re: Search-Engine: Extend results with random records if there are no 'real' results

2009-09-25 Thread brian
On Fri, Sep 25, 2009 at 8:47 AM, braaan wrote: > > i can't use ORDER BY RAND() on every page because > then the user would get different results on every refresh. Well, it wouldn't be very random, otherwise, would it? > i thought about doing the data-fetching myself (and extend if there > are t

Re: find('threaded') doesn't find any children

2009-09-25 Thread brian
On Fri, Sep 25, 2009 at 12:22 PM, Chris wrote: > > This might be the way you, brian, want it to work, however, I am in > George's boat.  I expected this to pass the conditions to the children > find() calls and build the threaded list based on that.  Instead, it > does a simple find('all') with c

Re: international SEO routing

2009-09-25 Thread danfreak
My solution is to rewrite the Router::base in your app_controller.php beforeFilter() - //INTERNAZIONALIZATION if(Configure::Read('Multilingual.enable')){ //$this->base = $this->base.'/'.$this->params['language'].'/'; if(__RQL__ != '' && __RQL__ !=

Re: how to cache admin pages

2009-09-25 Thread brian
I don't know if Cake avoids the cache for admin pages but, personally, I don't see any point in caching them, anyway. Your server wouldn't likely get very many hits for them. On Fri, Sep 25, 2009 at 7:01 AM, irshad wrote: > > Hello, > > I am using cakephp 1.2 for developing my project. I am cach

Re: Problem viewing data...

2009-09-25 Thread brian
And when you have debug set to 2, what does the query look like? On Fri, Sep 25, 2009 at 9:19 AM, mig_akira wrote: > > > Ok just did that, here's the output: > > prjr2009/controllers/users_controller.php (line 88) > id: 2 > > So the ID is correct, but it's still showing the user with id: 1 ! I'm

Re: How can I build a navigation menu in cakephp?

2009-09-25 Thread brian
On Fri, Sep 25, 2009 at 12:34 AM, Barney wrote: > > thanks, what's caching result? can you give me more tips please > The server stores a version of the result so that, on subsequent requests, it need not request the data from the DB, filter it, turn it into a view (the HTML). Although there are

simple "contain" question

2009-09-25 Thread lorenx
hi all. is it possible to set the containable behaviour of a model in its model file? just to set it once, staticly... maybe with the ability to change it on the fly when needed... thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Including non-plugin element from within plugin

2009-09-25 Thread Michael Clark
Solved with: create('User', array('url'=>array ('plugin' => null, 'action' => 'login')));?> On Sep 24, 5:39 pm, michaelc wrote: > I'm experiencing an interesting problem wherein I include from within > a view in a plugin an element which contains a form (the users login > form, that is).  Howeve

Re: how to use migration in Cakephp

2009-09-25 Thread Marcelo Andrade
On Fri, Sep 25, 2009 at 8:16 AM, Vijay wrote: > > Hello All, > > I am wandering for the migration concept in cakephp. > > I also followed the steps from the following URL, > > http://bakery.cakephp.org/articles/view/cakephp-yaml-migrations-and-fixtures-without-pear > > Also followed the instructi

Re: Find Value in $this->data

2009-09-25 Thread iFeghali
> So, if it is not in the array I wanted to give a message out. This > does not work for some reason, did I missunderstand the in_array > function? Any idea to achieve it otherwise? yes. in_array should be used with a scalar array. you have got a multi- dimensional array (matrix in your case). tr

Re: Setting up Auth is breaking my Add and Edit functions on all controllers.

2009-09-25 Thread gparra
Does anyone have a good sense of whether this is could be considered a bug and if so, how can i submit it as one to the CakePhp community? My code works how I want it to work, but it certainly doesn't look like what I think CakePhp intended, I don't want to build my whole site using it and one da

Re: changing $session->flash('auth'); layout

2009-09-25 Thread adam
Thanks. I finally sucked up my "Oh woe is me" and just *gasp* changed the css styles to fit what cake automatically outputs. MUCH better now. On Sep 24, 10:27 pm, brian wrote: > Gotcha. Auth uses 'default' layout when calling > $this->Session->setFlash(). Have a look at SessionHelper::flash()

Re: Find Value in $this->data

2009-09-25 Thread lordG
You could try the isset function. isset($this->data['Ingredient'] [$value['In']['ingredientname']]). But if $this->data['Ingredient'] [$value['In']['ingredientname']] is null, it will also return false. isset checks if variable exists and is not null. --~--~-~--~~~---~-

Re: secure link using hmtl->link helper..

2009-09-25 Thread iFeghali
Anyone found the solution ? I am on the same boat. Best, ~IF. --~--~-~--~~~---~--~~ 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 g

Re: RequestActions and Fatal errors

2009-09-25 Thread lordG
Ok, I solved my problem partially be adding to a custom AppError class... function __construct() { ob_clean(); parent::__construct(); } I still had some output coming out from the view that called the requested action, but I moved that code into the elements/actions being called. However, n

Re: Find Value in $this->data

2009-09-25 Thread Cristian Cassina
Did you try to cycle it with a foreach and search within? Never used the in_array function. I'll take a look at it. foreach($this->data['Ingredient'] as $ingredient): if($ingredient == $ingredient_chosen) { echo "found!"; } else { echo "not found!"; } endfore

RequestActions and Fatal errors

2009-09-25 Thread lordG
Hi guys, I have a scenario where we are using requestAction which hits a fatal error internally. The following actions happen correct, and the system displays a costom error page. However, the View contents still have the contents from the view the RequestAction was called from. How do we clear

Re: find('threaded') doesn't find any children

2009-09-25 Thread Chris
On Sep 18, 12:17 pm, brian wrote: > On Fri, Sep 18, 2009 at 9:19 AM, George H wrote: > > > Hi everyone, > > > Been ripping my hair out on this one, have no idea why it's not > > working. Hopefully someone here can find something wrong with my code. > > > I have a model called Regions. There ca

Re: HTML5 Options

2009-09-25 Thread Miles J
Well you SHOULD NOT edit the core files. If you want to extend that form helper, create your own form helper and have it extend the original. class MyFormHelper extends FormHelper { } Also we dont know what your talking about when you mention line numbers, because you edited the file and moved t

Find Value in $this->data

2009-09-25 Thread Luke
Hi Guys, I am trying to find out if a Value in the $this->data Array excists. Here the structure of the Array: Array ( [Recipe] => Array ( [recipe_name] => ) [Ingredient] => Array ( [1] => Array ( [ingredientnam

www.ccshoe.cn

2009-09-25 Thread 11
www.ccshoe.cn --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googleg

find with HABTM problem

2009-09-25 Thread Wladiston Paiva
hi peoples, i have two models is cakephp: class Pessoa extends AppModel { var $name = 'Pessoa'; var $primaryKey = 'codigo'; var $hasAndBelongsToMany = array( 'Areainteresse' => array( 'className'=> 'Areainteresse', 'joi

neighbors sort

2009-09-25 Thread mklappen
Hi Is there a way I can sort a query and then have the find (neighbors) based on that sort? I'm trying to sort my results by title and then would like prev/next elements returned by neighbors to be the prev/next title in alpha order. However, neighbors is returing the prev/next ids which are not

Re: MAMP + CakePHP issues

2009-09-25 Thread Martin Westin
On 1 I second the opinion that vhosts are the way to go. I have never ever ever bothered modifying htaccess files just to get a few apps to run under localhost/one, /two and so on. You are on a Mac and in perfect position to setup in a way that is 100% identical to a production deployment. You ne

Re: Best way to accomplish acl for database records owned by a user

2009-09-25 Thread FrederickD
I came across this same issue. You can call it "row level access". An article that pointed me in the right direction was this one: http://teknoid.wordpress.com/2009/04/22/simplistic-example-of-row-level-access-control-with-auth-security-and-app-model-in-cakephp/. I took that article and expanded

Re: MAMP + CakePHP issues

2009-09-25 Thread FrederickD
Hi Fahd! I can advise you on the first question, but not the second. I had been using MAMP but decided to take it off and go with a stock approach. It took a little bit, but works solidly now. What makes it very easy is to use a cheap product called VirtualHostX. You can find it at http://www.mac

Re: Specific HABTM relation

2009-09-25 Thread yellow
solution is here: articles_controller function add (or edit): ... foreach($this->data['Category']['Category'] as $num => $category){ $this->data['CategoriesModel'][$num]['model_id'] = $this->data ['Article']['id'];

Re: Specific HABTM relation

2009-09-25 Thread yellow
I've found solution with binding models on the fly: articles_controller function add (and function edit) ... foreach($this->data['Category']['Category'] as $num => $category){ $this->data['CategoriesModel'][$num]['model_id'] = $this->data ['Article']['id']; $this->data['Categories

HTML5 Options

2009-09-25 Thread Dave
Hi, I'm attempting to add new options to the Form handler for cakephp 1.2.5. So far i've been able to edit cake/libs/view/helpers/form.php Adding function email($fieldName, $options = array()) { $options = $this->_initInputField($fieldName, array_merge(

Re: Redirect After Using render('action')

2009-09-25 Thread Tony Thomas
Thanks Brian, I thought that might be the case. On Sep 24, 7:30 pm, brian wrote: > Whether Cake spits out a CSV file or redirects to another > controller/action, headers need to be sent to the client, but you > can't send headers for both simultaneously. > > If you really want the form to disap

Re: How to user imagemagik in cakephp

2009-09-25 Thread Vijay Kumbhar
Hello Jonathan, Thanks for the reply. I have tried the following links, http://www.imagemagick.org/script/install-source.php#unix using the instructions in the above link pages i have installed the image magik. Also i was searching for the uses from , http://www.imagemagick.org/Usage/ But i

Re: Problem viewing data...

2009-09-25 Thread mig_akira
Ok just did that, here's the output: prjr2009/controllers/users_controller.php (line 88) id: 2 So the ID is correct, but it's still showing the user with id: 1 ! I'm starting to think it's mocking me =P brian-263 wrote: > > > Put debug("id: ${id}") in your controller. Maybe it's not what yo

Re: Trouble with installation

2009-09-25 Thread leop
If you are, then make sure that you have .htaccess files in all the right places. I have found that Ubuntu often doesn't copy them with the other stuff (usually just the one in the root of the structure you're copying). You shouldn't need to do anything with permissions on the cake folder as it o

Re: Trouble with installation

2009-09-25 Thread leop
I had a problem with Ubuntu as well, but I think you are passed this stage: To enable mod rewrite, you need to add a symbolic link to the module definition file, which lives in /etc/apache2/mods-available, to the folder: /etc/apache2/mods-enabled. Do this by first changing to the mods-enabled fo

Search-Engine: Extend results with random records if there are no 'real' results

2009-09-25 Thread braaan
Hello, i'm coding a very basic search-engine at the moment. the admin is able to add some records manually and then users can search for them. as there are not many records added by the admin the results are 0 quite often. if the result-count is 0 i want to extend the results with random records.

Specific HABTM relation

2009-09-25 Thread yellow
First some introduction... My implementation: Category HABTM Article and Article HABTM Category Category HABTM Gallery and Gallery HABTM Category Category HABTM Link and Link HABTM Category Category HABTM Document and Document HABTM Category ... Database table for joins: CREATE TABLE IF NOT EXI

Re: Trouble with installation

2009-09-25 Thread thiago oliveira
you need ability in apache the mod_rewrite.so and rewrite.load in folde /apache/mods-enabled cd /etc/apache2/mods-enabled ln -s /etc/apache/mods-available/mod_rewrite.so ln -s /etc/apache/mods-available/ rewrite.load /etc/init.d/apache2 restart 2009/9/25 Cristian Cassina > > Nigel, > > could it

Re: How to user imagemagik in cakephp

2009-09-25 Thread Jonathon Musters
More information About whAt you tried, results, and what your looking to get would be helpful On 9/25/09, Vijay wrote: > > Hello All, > > I am trying to work with image magik for one application. > > I am not getting any satisfying solution for this. Can anybody please > help me out. > > > --

Re: Routing offsite

2009-09-25 Thread leop
Okay, sorted. I did it this way: RedirectMatch ([A-Za-z0-9-]+)\.html$ http://website.co.uk/$1.html I used the alphanum regexp instead of (*.) in order to drop the cake webroot portion of the URL, i.e. only return the portion after the final '/' On 25 Sep, 12:12, leo wrote: > I have bu

Database structure and json_encode()

2009-09-25 Thread midas
I am creating an itinerary system where user will be able to record his trips, add one starting point where his journey begins, unknown number of stops on his way and finally one ending point. Now I am wondering how to create a meaningful database structure so one will be able to search every grou

Re: autocomplete program

2009-09-25 Thread Bert Van den Brande
Want me to travel to your city and code the project as well ? Anyway, have a look here : http://bakery.cakephp.org/articles/view/autocomplete It will get you at least half way there ... On Fri, Sep 25, 2009 at 1:46 PM, Jiru wrote: > > Hii CakePHP programmers, > > Any body can give me the compl

autocomplete program

2009-09-25 Thread Jiru
Hii CakePHP programmers, Any body can give me the complete source code for Autocompletion in text boxes. i expect the code with whole .ctp in the view and php file in the model , controller php file ajax file and css. Help me. The value should read from the database. regards, jiru

Re: Using same Auth component in admin and client

2009-09-25 Thread vinodkalpaka
I have tried this one, this is similar to the previous code. Actually it should get result, but somehow fails. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cak

how to cache admin pages

2009-09-25 Thread irshad
Hello, I am using cakephp 1.2 for developing my project. I am caching the pages, i am able to cache pages easily and it is working fine but i am not able to cache admin pages. Means i am not able to cache the pages having "admin/..." in the url. I am able to cache this type of url eg: http://loc

How to user imagemagik in cakephp

2009-09-25 Thread Vijay
Hello All, I am trying to work with image magik for one application. I am not getting any satisfying solution for this. Can anybody please help me out. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group

how to use migration in Cakephp

2009-09-25 Thread Vijay
Hello All, I am wandering for the migration concept in cakephp. I also followed the steps from the following URL, http://bakery.cakephp.org/articles/view/cakephp-yaml-migrations-and-fixtures-without-pear Also followed the instructions but i found that it created on migrate folder in my applica

Routing offsite

2009-09-25 Thread leo
I have built a simple storefront that bolts onto an existing php website. The CakePHP application (the store) includes the dynamic menu from the existing CMS. The urls in the menu are relative, e.g. href="publications.html" and all have the '.html' extension. I need to route these pages to outsid

Re: Translate field names

2009-09-25 Thread rich...@home
No, you only want to translate the label, not the field name : echo $form->input("field_name", array("label"=>__("field_name"))); On Sep 25, 9:19 am, emmexx wrote: > On 25 Set, 02:18, brian wrote: > > > __('field_name') > > Do you mean that I can use in a view something like the following? > >

Re: eCommerce question

2009-09-25 Thread danfreak
Thanks Andy! --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegr

Re: Suitable editor or IDE

2009-09-25 Thread Bert Van den Brande
This has been discussed in the past, see http://groups.google.com/group/cake-php/browse_thread/thread/714e54499d4c67d4/8322cfb65bebe93f?lnk=gst&q=ide#8322cfb65bebe93ffor a buckload of options :) On Fri, Sep 25, 2009 at 9:44 AM, Aivaras wrote: > Hey, > > You would surely love Zend studio! Just

Re: Translate field names

2009-09-25 Thread emmexx
On 25 Set, 02:18, brian wrote: > __('field_name') > Do you mean that I can use in a view something like the following? echo $form->input(__('date')); Thanks maxx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Routing Plugins

2009-09-25 Thread WebbedIT
@jorge/christian: If you want to discuss a different topic, do so in a new thread don't simply change the topic of an existing thread which has nothing to do with your alternative subject. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Suitable editor or IDE

2009-09-25 Thread Aivaras
Hey, You would surely love Zend studio! Just create a new project, and then add all cakePHP folder into your current project, I bet you will be surprised! Hope this helps, Faifas On Fri, Sep 25, 2009 at 10:29, Selva manickaraja wrote: > Hi, > > I wish to do all my php project development usin

Suitable editor or IDE

2009-09-25 Thread Selva manickaraja
Hi, I wish to do all my php project development using Cake in a stable editor or IDE. Is there any that I can get hold of? Please advice. Thank you. Warmest Regards, Selvam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Integrating CakePHP with Adobe Flex

2009-09-25 Thread Cristian Cassina
Hello everyone, yesterday I had a look at Flex. Pretty impressive for making RIAs. Then I saw it's possible to interface Flex to PHP. My imagination went even further, wondering if it's possible to interface it with Cake. It seems that, for Cake 1.1, this was reality thanks to AmfCakePHP, but