virtual subdomain & .htaccess

2007-05-18 Thread tekcorap
Hi all, I have a project and user name value must be subdomain. (e.g. alice.domain.com) and subdomain is must be /user/index/subdomainvalue/ action... for this I use virtual subdomain by .htaccess. RewriteEngine on RewriteCond %{HTTP_HOST} !^(www\.)?example\.com$ [NC] RewriteCond %{HTTP_HOS

trying to understand caching philosophy in cakephp

2007-05-18 Thread bingo
hi bakers, I am trying to better understand caching philosophy in cakephp. I have specific questions 1. Is caching specific to particular session or its general to whole website. If not, how do you cache result of same action for different users i.e. actions give different result for different u

Re: clear cache for element

2007-05-18 Thread bingo
okie..after some search I found this article http://bakery.cakephp.org/articles/view/optimizing-your-cakephp-elements-and-views-with-caching So it seems I can use @unlink(CACHE.'views'.DS.'element__getposts'); to clear the renderedElement However, the problem is my app/tmp/view foler is empty

clear cache for element

2007-05-18 Thread bingo
hi bakers, I have a persistent data on left hand side of a page. I followed ( http://bakery.cakephp.org/articles/view/persistent-data ) this tutorial to create persistent data display To avoid querying database everytime page referesh, I am caching the data. To cache the rendered element I am us

Re: How do I change the path to locale?

2007-05-18 Thread jitka
There is enhancement ticket with low priority for it: https://trac.cakephp.org/ticket/2237 Development version is development version... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to

Re: AJAX & mini dialogs

2007-05-18 Thread Samuel DeVore
here is one I have used that builds on prototype and scripta stuff http://ajaxian.com/archives/tooltipjs-creating-simple-tooltips there are a ton look in google for tooltip netflix On 5/18/07, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > > More of a javascript issue than a Cake one. Google is y

Re: URL problems

2007-05-18 Thread soytuny
How are you setting the action of the form? You might try wrote: > Hi, > > I installed CAKEPHP yesterday. The installation went OK and I can > connect to a database. I also tried to follow the manual provided by > IBM. The first example explained a registration form, but I can't get > it to wor

Re: AJAX & mini dialogs

2007-05-18 Thread Chris Hartjes
More of a javascript issue than a Cake one. Google is your friend for this. Take a look at 'mousovers javascript'. Hope that helps. On 5/18/07, Christoph <[EMAIL PROTECTED]> wrote: > > If you've ever been to and used Netflix, you know that the feature > some really cool functionality (at lea

How do I change the path to locale?

2007-05-18 Thread [EMAIL PROTECTED]
How do I specify a different path to the locale folder (where my eng/ LC_MESSAGES/default.po) for my translations? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Re: Joins across databases with useTable ??

2007-05-18 Thread gwoo
All associations except HABTM can work across database. You need useDbConfig. There are a few threads on this group that explain it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this

Vendor: should it extend AppModel?

2007-05-18 Thread cake_icing
Just a quick question as the subject indicates: when I create a vendor class, should I extend AppModel? I need input in both technical and logical. I suppose logically it should not extend AppModel because it should be outside the application... hence a vendor. But I want to hear from you guys...

URL problems

2007-05-18 Thread chrisdaems
Hi, I installed CAKEPHP yesterday. The installation went OK and I can connect to a database. I also tried to follow the manual provided by IBM. The first example explained a registration form, but I can't get it to work. I don't have a problem with accessing the application by typing http://local

Re: Why do I have to define this?

2007-05-18 Thread Hellbot
$telephone = $this->NameOfModel->read('tel',$id); my favorite :) 2007/5/18, Walker Hamilton <[EMAIL PROTECTED]>: > > I love this one: $this->NameOfModel->id = $id; > $telephone = $this->NameOfModel->field('tel'); > > > didn't know about it until you mentioned it.I guess I still don't > comp

Re: User and Friend model HasAndBelongsToMany relationship

2007-05-18 Thread Victor
AD and jyrgen: thanks for responding. AD: I really appreciate that you answered each of my questions. Very helpful! God Bless You! You clarified things for me. I now see that I don't really need Friend model. I just need a join table (let's just call it friends). I have tried it. It works beauti

AJAX & mini dialogs

2007-05-18 Thread Christoph
If you've ever been to and used Netflix, you know that the feature some really cool functionality (at least, IMO). When you hover your mouse over a movie title, a little dialog pops up and displays information about that movie. And if you add it to your queue, another dialog pops up and the rest

othAuth: Only showing content to certain levels

2007-05-18 Thread Tane Piper
I'm adding user levels to my content, as some I only want to show some content to certain users. I'm using othAuth, and this is how I currently have my function: function index() { if (!empty($this->othAuth->group('level'))) { $leve

Re: Title in Subject (default)

2007-05-18 Thread Matthias Bauer
On 18.05.2007 15:17 Rodrigo Castilho Galvão Ferreira wrote: > Please, it would be very good for having a heading for standard, for example: Why? Just filter on the List-Id header: List-Id: It's standardized, and way more robust. -Matt --~--~-~--~~~---~--~~ Yo

Re: Why do I have to define this?

2007-05-18 Thread Matthias Bauer
On 18.05.2007 18:22 Enchy wrote: > echo $telephone[0][suppliers][tel]; > > When I do this it moans that I have to define suppliers and tel Because for one, you should be using strings, not barewords: echo $telephone[0]['suppliers']['tel']; And why do you bother with the whole framework thing

Re: How do I use i18n and l10n in CakePHP 1.2?

2007-05-18 Thread [EMAIL PROTECTED]
To specify a different language do this... $this->L10n = new L10n(); $this->L10n->get('eng'); On May 7, 10:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > It took me awhile to track thisd info down about using i18n in CakePHP > 1.2 but here are my notes. > > Internationalization (i18n) >

Re: halfcooked cake?

2007-05-18 Thread hydra12
I don't think it's problem with your view. I deleted a view in one of my projects, and I got an error saying that the view for my controller couldn't be found. What I get when I look at your web page is the default cake setup. It basically says: "OK, cake is installed. Now build something." Wh

SWFupload for cake1.2

2007-05-18 Thread Siegfried Hirsch
After trying SWFupload with cake 1.2, I found, that $this->params['form'] no longer is filled. So I recoded some parts of the SWLupload component from James Revillini for cakePHP 1.2. I was not able to post a comment to the original posting in the bakery http://bakery.cakephp.org/articles/view/sw

Re: Why do I have to define this?

2007-05-18 Thread Walker Hamilton
I love this one: $this->NameOfModel->id = $id; $telephone = $this->NameOfModel->field('tel'); didn't know about it until you mentioned it.I guess I still don't completely understand the stateful-ness of the Model instances... On May 18, 11:57 am, AD7six <[EMAIL PROTECTED]> wrote: > On May 1

Re: Problems when moving cake code to production servers

2007-05-18 Thread Walker Hamilton
Yeah, go to your production servers and find /app/tmp/cache/persistent and you'll see whypartially. Really, you should be able to just clean the cache (models, persistent, views) out and you'll be fine just dropping in new files. On May 18, 11:43 am, merlin <[EMAIL PROTECTED]> wrote: > Hi Al

Re: Why do I have to define this?

2007-05-18 Thread AD7six
On May 18, 6:22 pm, Enchy <[EMAIL PROTECTED]> wrote: > $this->set('telephone',$this->Order->findBySql("SELECT tel FROM > suppliers WHERE id='$id'")); > > echo $telephone[0][suppliers][tel]; > > When I do this it moans that I have to define suppliers and tel Why not just do $this->NameOfModel->

Problems when moving cake code to production servers

2007-05-18 Thread merlin
Hi All, We recently went live with our first cakephp app. Whenever a controller is updated (edit or add) and then deployed to the production server, cake acts like its not there: - DEBUG is set to 0 so we get the "The requested address users was not found on this server." At first I thought

Re: Why do I have to define this?

2007-05-18 Thread soytuny
Moaning scripts, eh? The list can't hear it. The error message would help us diagnose. Maybe your query returned no results. And I think findBySql is old skool, cuz. By that, I mean it's deprecated, use $this->Model->query() instead. On May 18, 9:22 am, Enchy <[EMAIL PROTECTED]> wrote: > $

Re: Obtain count from associations

2007-05-18 Thread buzznut
Looks like it was a problem with cake 1.2 that has been fixed. I was using 1.2.0.4798alpha. I just updated to the nightly build / 1.2.x.x_17.05.2007 and it worked as expected. On May 18, 7:49 am, buzznut <[EMAIL PROTECTED]> wrote: > That is the thread that I have been working off to get this far.

Why do I have to define this?

2007-05-18 Thread Enchy
$this->set('telephone',$this->Order->findBySql("SELECT tel FROM suppliers WHERE id='$id'")); echo $telephone[0][suppliers][tel]; When I do this it moans that I have to define suppliers and tel --~--~-~--~~~---~--~~ You received this message because you are sub

Re: Joins across databases with useTable ??

2007-05-18 Thread Walker Hamilton
yeah, he wouldn't do it that way because he's doing it over two DBs. I think he'll run into problems with thatcake's not really set up to let that happen easily. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Joins across databases with useTable ??

2007-05-18 Thread mehodgson
Is there any reason why you wouldn't use Cake's Built in model relationships. Defining a hasOne or hasMany relationship in the Model should do the trick. On May 17, 4:25 am, floepi <[EMAIL PROTECTED]> wrote: > Hi, > > i would like to make a join over two databases. > > In plain mySQL that is eas

Re: Admin as a plugin

2007-05-18 Thread guitarclap
Thanks for your reply! I agree with everything that you say. To me, it's kinda non conventional to mix the admin_* methods within non .. mostly because you can't look at the controllers and discern which ones have those methods until you open up the file. This way through a plugin you know what

Re: using Subdomain to differentiate page-content

2007-05-18 Thread Walker Hamilton
Hi.I'm doing it for languages. App Controller: 'English', 'ar'=>'Arabic', 'es'=>'Espanol', 'de'=>'Deutsch', 'lt'=>'Lithuanian', 'fr'=>'Francois'); var $components = array('Cookie', 'LanguageDetection'); var $cookieName = 'REMEMBERMEAPPARES'; var $cookieKey = 'ds

Re: Admin as a plugin

2007-05-18 Thread Greg
It also depends on how many people are working on your application. If, say, you have an admin programmer who only works on the admin section of your app, and a public side programmer who sticks to the non-admin areas, the project would be rather difficult to manage if you were to go about the adm

Re: using Subdomain to differentiate page-content

2007-05-18 Thread MJ Ray
BoSc <[EMAIL PROTECTED]> wrote: > What I would like is to use a subdomain to indicate which city to > show: newyork.domain.com/city/show (to show city new york) I think you should be able to read $_SERVER['HTTP_HOST'] from anywhere inside Cake, even the config if you want. Hope that helps, -- M

Admin as a plugin

2007-05-18 Thread guitarclap
I was wondering what the cons were to making 'admin' an actual plugin. It seems to me that this might make the app much more organized since regular and admin_* functions aren't mixed in the same file. What are your thoughts? Is there more overhead doing it this way? --~--~-~--~~-

Re: using Subdomain to differentiate page-content

2007-05-18 Thread Gonzalo Servat
On 5/18/07, BoSc <[EMAIL PROTECTED]> wrote: > > > A bit of a cryptical description, but here goes. > > Suppose I use a Cake app. to show the content of different cities, > Normally I would use a city controller dat accepts some parameters > like: domain.com/citys/show/newyork (to show city 1) > > W

using Subdomain to differentiate page-content

2007-05-18 Thread BoSc
A bit of a cryptical description, but here goes. Suppose I use a Cake app. to show the content of different cities, Normally I would use a city controller dat accepts some parameters like: domain.com/citys/show/newyork (to show city 1) What I would like is to use a subdomain to indicate which ci

Re: Printing Variable in thtml

2007-05-18 Thread Silas da Silva
The proper way to do this seems to be echo $html->tagValue('Order/dateoforder'); tagValue() is in the API for HtmlHelper, but maybe hard to find if you don't know what you're looking for. This will work whether the dateoforder was just sent by a form or if you set the data in your controller

Re: Want to add sum to sql

2007-05-18 Thread Enchy
Ugh Sliv that is why Im asking what do I use instead of Findall in helpers? Where do I read up on what functions to use in a helper because the cakephp functions are not working. On May 18, 3:16 pm, Sliv <[EMAIL PROTECTED]> wrote: > cakephp style coding would be to not grab data from your db usin

Re: Integrating a forum with Cake (ie, Vanilla)

2007-05-18 Thread luke BAKING barker
sorry I did it too :/ -- for th eunified login I guess as well, maybe vendors is best bet, but I guess it depends which authenticating system you wil be using? On May 18, 1:33 pm, luke BAKING barker <[EMAIL PROTECTED]> wrote: > Your form seems to have a stutter :) > > I think the easy way might b

Re: Printing Variable in thtml

2007-05-18 Thread Enchy
Thanks alot. I had to ad a ['0'] On May 18, 2:53 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > I have looked in the htmlhelper api and cant find anything for this. > > > echo $html->input('Order/dateoforder', array('size' => '53') > > > Htmlhelper just echos form elements I just want ec

Re: Title in Subject (default)

2007-05-18 Thread Rodrigo Castilho Galvão Ferreira
...And in Subject Googlegroup, it does not exist? It would not be necessary? -- Rodrigo Castilho Galvão Ferreira On 5/18/07, Sam Sherlock <[EMAIL PROTECTED]> wrote: > yes but you can just filter all mail sent to cake-php@googlegroups.com as > 'cake' > > On 18/05/07, Rodrigo Castilho Galv

Re: Obtain count from associations

2007-05-18 Thread buzznut
That is the thread that I have been working off to get this far. However, the query that I get generated has the Group By statements in the left join which causes the query to fail. On May 18, 7:38 am, Sliv <[EMAIL PROTECTED]> wrote: > You may want to check this > thread:http://groups.google.ch/

Re: Title in Subject (default)

2007-05-18 Thread Sam Sherlock
yes but you can just filter all mail sent to cake-php@googlegroups.com as 'cake' On 18/05/07, Rodrigo Castilho Galvão Ferreira <[EMAIL PROTECTED]> wrote: > > > Sorry, I did not specify where... Subject in Googlegroups CakePHP. > > > Examples: > > [jQuery] Lorem ipsum dolor > > [Rails-spinoffs] Sus

RE: Title in Subject (default)

2007-05-18 Thread Mariano Iglesias
$this->set('title', 'yourpagetitle'); Is more appropiate. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.Maria

Re: Title in Subject (default)

2007-05-18 Thread Rodrigo Castilho Galvão Ferreira
Sorry, I did not specify where... Subject in Googlegroups CakePHP. Examples: [jQuery] Lorem ipsum dolor [Rails-spinoffs] Suspendisse malesuada [css-d] Aliquam cursus enim For CakePHP Group: [CakePHP] MY TITLE Regards, -- Rodrigo Castilho Galvão Ferreira On 5/18/07, Sliv <[EM

Re: Title in Subject (default)

2007-05-18 Thread Sliv
I'm not sure I understand you exactly, but you can put this in a controller to set a title for the view: $this->pageTitle = 'yourpagetitle'); On May 18, 9:17 am, "Rodrigo Castilho Galvão Ferreira" <[EMAIL PROTECTED]> wrote: > Please, it would be very good for having a heading for standard, for e

Re: Obtain count from associations

2007-05-18 Thread Sliv
You may want to check this thread: http://groups.google.ch/group/cake-php/browse_thread/thread/308ea201394f235c/dcf614689114db68 On May 18, 9:06 am, buzznut <[EMAIL PROTECTED]> wrote: > It looks like the GROUP BY in the left join statement is causing the > problem. The following query works and r

Title in Subject (default)

2007-05-18 Thread Rodrigo Castilho Galvão Ferreira
Please, it would be very good for having a heading for standard, for example: [CakePHP] MY TITLE Admin, it could insert for standard? Thanks, -- Rodrigo Castilho Galvão Ferreira --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Obtain count from associations

2007-05-18 Thread buzznut
It looks like the GROUP BY in the left join statement is causing the problem. The following query works and returns the results I want, but doesn't use Cake magic to make it work. SELECT `Project`.`id`, count(`Task`.`project_id`) FROM `projects` AS `Project` LEFT JOIN `tasks` AS `Task` ON (`Proje

Re: Usind Ajax->Submit

2007-05-18 Thread buzznut
Here is how I use it. Quick Add (Task) create('Task',array('onSubmit'=>'return false'));?> input('Task/name'); echo $form->hidden('Task/project_id',array('value'=> $project['Project']['id'])); echo $ajax->submit('Quick Add', array('url'=>'/tasks/quickadd/' . $project['Project']['id'], 'u

Re: Want to add sum to sql

2007-05-18 Thread Sliv
He probably didn't get a reply because the only reply is rtfm... On May 18, 9:17 am, Enchy <[EMAIL PROTECTED]> wrote: > I actually do need this in my model cause I need to sort it by total > in the column, so findall is of no use. > I need this in my main sql query. I have seen a guy ask this sa

Re: Want to add sum to sql

2007-05-18 Thread Enchy
I actually do need this in my model cause I need to sort it by total in the column, so findall is of no use. I need this in my main sql query. I have seen a guy ask this same question in 2006 and never got a reply. On May 18, 2:56 pm, Sliv <[EMAIL PROTECTED]> wrote: > How to use sql functions in

Re: Want to add sum to sql

2007-05-18 Thread Sliv
cakephp style coding would be to not grab data from your db using php mysql functions in a view helper...I'd recommend reading up on the manual and some basic tutorials about cake, mvc, etc. On May 18, 9:13 am, Enchy <[EMAIL PROTECTED]> wrote: > Thanks > > i endend up creating a really quick and

Re: Want to add sum to sql

2007-05-18 Thread Enchy
Thanks i endend up creating a really quick and dirty helper function _gettotal ($oid) { $total = ''; $sql = "SELECT price,quantity FROM Orderitems where oid='$oid'"; $rst= mysql_query($sql) or die("$sql".mysql_error()); while($row = mysql_fetch_array($rst)) { $total += $row['quantity']

Re: Printing Variable in thtml

2007-05-18 Thread Sliv
Read: http://manual.cakephp.org/chapter/controllers http://manual.cakephp.org/chapter/views For example, depending on the controller/view, your example could be as simple as: echo $order['dateoforder'] ... On May 18, 6:03 am, Enchy <[EMAIL PROTECTED]> wrote: > Hi > > I have looked in the htmlhe

RE: 1.2 error message from form::input

2007-05-18 Thread Mariano Iglesias
I know :) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De:

Re: Want to add sum to sql

2007-05-18 Thread Sliv
How to use sql functions in conditions http://cakebaker.42dh.com/2007/05/04/how-to-use-sql-functions-in-conditions/ On May 18, 8:45 am, Enchy <[EMAIL PROTECTED]> wrote: > var $belongsTo = array( 'Orderitem' => > array('className' => 'Orderitem', >

Re: Integrating a forum with Cake (ie, Vanilla)

2007-05-18 Thread luke BAKING barker
Your form seems to have a stutter :) I think the easy way might be in apache or similar to have a path specified that gets routed (maybe better in cake routes.php) that is like /path/to/webroot/Vanilla/ and then it will get ignored by the cake and you can do what you want within it I think try

Re: Printing Variable in thtml

2007-05-18 Thread Jon Bennett
> I have looked in the htmlhelper api and cant find anything for this. > > echo $html->input('Order/dateoforder', array('size' => '53') > > Htmlhelper just echos form elements I just want echo the value of > Order/dateoforder onscreen. > How do I do this, I looked in the API but cant find it. a

Want to add sum to sql

2007-05-18 Thread Enchy
var $belongsTo = array( 'Orderitem' => array('className' => 'Orderitem', 'conditions'=> '', 'order' => 'item ASC', 'limit' => '',

ACL (again) in 1.2

2007-05-18 Thread Dave J
I do realise that this topic comes up often and i have read and searched the group for answers and i'm at the point of trying to decide the best way to implement ACL. I'm just wondering if ACL in 1.2 works at all (doesn't matter if its not documented yet, i understand that completely), but

Re: Problems installing phpGACL-Plugin with Cake

2007-05-18 Thread bujanga
Search this group for: "phpGACL could not be installed" On 5/18/07, JuergenE <[EMAIL PROTECTED]> wrote: > > Hello group > > I have spent hours trying to install phpGACL-Plugin with CakePHP and I > have spent hours to find a solution. > > I use CakePHP 1.1.14.4797, phpGACL Plugin 1.0.2b, phpGACL 3

Re: Usind Ajax->Submit

2007-05-18 Thread [EMAIL PROTECTED]
I've forgetten to say that the div "viewadmin" in another view (the index.html) where initially I've loaded modify.html and then I would load "controlName/actionName". On 18 Mag, 10:48, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm new in CakePHP > I have a question. > Can anyone make me a

Printing Variable in thtml

2007-05-18 Thread Enchy
Hi I have looked in the htmlhelper api and cant find anything for this. echo $html->input('Order/dateoforder', array('size' => '53') Htmlhelper just echos form elements I just want echo the value of Order/dateoforder onscreen. How do I do this, I looked in the API but cant find it. L --~--

Usind Ajax->Submit

2007-05-18 Thread [EMAIL PROTECTED]
I'm new in CakePHP I have a question. Can anyone make me an example of use of $ajax->submit? My code is: Input:input('input/input', array('size'=> '60','value'=>0))?> 'viewadmin', 'url' => '/controlName/ actionName' ); echo $ajax->submi

Problems installing phpGACL-Plugin with Cake

2007-05-18 Thread JuergenE
Hello group I have spent hours trying to install phpGACL-Plugin with CakePHP and I have spent hours to find a solution. I use CakePHP 1.1.14.4797, phpGACL Plugin 1.0.2b, phpGACL 3.3.7, PHP 5.1.4 on my local server and MySQL 4.1.20. I use the document http://dev.sypad.com/installing-phpgacl-plugi

Re: halfcooked cake?

2007-05-18 Thread Changoso
the thing is I do have the controller set correctly.. i suppose what i cant seem to configure ollright is the views. tha baker is not making the add, edit or view.ctp in the view folder On May 17, 7:59 am, hydra12 <[EMAIL PROTECTED]> wrote: > What is the name of your controller? Most cake pr

Re: 1.2 error message from form::input

2007-05-18 Thread yangz
Great, it works perfectly now. On May 18, 9:07 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Update to latest SVN branch. > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So

Re: learn cakephp and develop a system

2007-05-18 Thread Davide
rtanz wrote: > ... > an intermediate php user like me to learn how to use cake and develop > ... On my blog I've summed up some resources for learning CakePHP in a post[1]. HTH Davide 1. http://edivad.wordpress.com/2007/04/06/learning-cakephp/ --~--~-~--~~~---~--~-