Re: How many elements are really too many??

2009-02-07 Thread p...@otaqui.com
Hi, I haven't done any very heavy element rendering myself, but I know that element output can be cached if suitable for your application, which would help you out a lot. Pete On Feb 7, 9:36 pm, Abhimanyu Grover wrote: > Also, I would like to add, there is no requestAction() used in these > he

Re: Wamp alias Bad Request (400) Error

2009-02-07 Thread Drinkspiller
I did this and modified my hosts file (C:\Windows\System32\drivers\etc \hosts) and now it works. Thanks, Miles J! On Feb 8, 12:07 am, Miles J wrote: > This is how my apache vhosts is setup. > > Instead of localhost/milesj/ it would just be milesj/ > > >         ServerAdmin webmas...@localhost >

Re: Wamp alias Bad Request (400) Error

2009-02-07 Thread Miles J
This is how my apache vhosts is setup. Instead of localhost/milesj/ it would just be milesj/ ServerAdmin webmas...@localhost DocumentRoot C:/xampp/htdocs/milesj ServerName milesj Options Indexes FollowSymLinks Includes ExecCGI Al

Re: I blocked the cookies, let the 'Session.cookie' to transfer in my parameter.(but can't use)

2009-02-07 Thread Rimoe
hi, everyone. i want to add the session_id() as a parameter for every link, where should I put the parameter in, It'll very simple. Thanks ,thanks. rimoe 2009/2/7 Rimoe > which one can help me? > according to my function of redirect, > > why is it I can't login like have a cookie. > >

Wamp alias Bad Request (400) Error

2009-02-07 Thread Drinkspiller
For as many links as there are on this issue, I can't seem to get a clean install of Cakephp working with WAMP. I get a 400 Bad Request error. Mod rewrite is on. AllowOverride all is set. A clean install works if the directory is a sub directory of the WAMP default root (C:\wamp\www\test) but wh

Re: strange link problem

2009-02-07 Thread cronet
you made my day! Thank you... I'm using a css framework (very new to me), and made a mistake. I insert the print.css for all media... On 8 Feb., 02:00, brian wrote: > Ah, you meant the display. My apologies, I wasn't thinking properly. > > Anyway, it looks like you have some CSS along the

Re: strange link problem

2009-02-07 Thread brian
Ah, you meant the display. My apologies, I wasn't thinking properly. Anyway, it looks like you have some CSS along these lines: a:after { content:" (" attr(href) ") "; } Either that, or it's javascript doing it. That's a technique best used for print styles, so the URL is printed. On Sat, Feb

Re: strange link problem

2009-02-07 Thread cronet
Hard to discribe... please look at this Image: img90.imageshack. us/my.php? image=bild12op1.png It shows my view (top), the site (middle) and the sourcecode (lower). On 8 Feb., 00:54, brian wrote: > On Sat, Feb 7, 2009 at 6:47 PM, cronet wrote: > > > Hi, > > > i got a problem with my links,

Re: strange link problem

2009-02-07 Thread Miles J
Its because pages are routed in your app/config/routes.php. Disable that route if you want /pages/ in front of it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to

Re: strange link problem

2009-02-07 Thread brian
On Sat, Feb 7, 2009 at 6:47 PM, cronet wrote: > > Hi, > > i got a problem with my links, created with cakephp. (I don't think > its a cake problem, but perhaps someone of you can give me a hint, > anyway) > > If I write something like: > link("test", array("controller"=>"pages", > "action"=>"test

strange link problem

2009-02-07 Thread cronet
Hi, i got a problem with my links, created with cakephp. (I don't think its a cake problem, but perhaps someone of you can give me a hint, anyway) If I write something like: link("test", array("controller"=>"pages", "action"=>"test")); ?> the output is: Test (/pages/test) the strange thing: in

Re: How many elements are really too many??

2009-02-07 Thread Abhimanyu Grover
Also, I would like to add, there is no requestAction() used in these helpers. They just make use of Html and Form helper to output blocks to the CMS. On Feb 8, 2:31 am, Abhimanyu Grover wrote: > Hi there again, > > As our application grows more and more, no. of elements used per page > are incre

How many elements are really too many??

2009-02-07 Thread Abhimanyu Grover
Hi there again, As our application grows more and more, no. of elements used per page are increasing day by day. Right now we're at avg. 5 elements per page. What do you guys think of it? Elements, for sure would slow down the app a bit, but what are your views on it? How many elements are too m

Re: How to clear element cache?

2009-02-07 Thread nurvzy
private function clear_cache(){ $cleared = clearCache('element__latest_news', 'views', ''); if(!$cleared) $this->log('Unable to clear cache.'); } Worked like a charm! I didn't know basics had a clearCache function, I was looking in the Cache class. Thanks for that tip. Nick On Feb 7,

Re: Dreamweaver - Getting Code Coloring and Design View to work on CTP files

2009-02-07 Thread mohammad al-ani
hi i found it in notepad++ just open langs.xml in installation directory and search for the php word and you will get the language node like this add the extension ctp in the extension attribute like this and have cool programming : ) On Sat, Feb 7, 2009 at 11:45 PM, mohammad al-ani wrote:

Re: Dreamweaver - Getting Code Coloring and Design View to work on CTP files

2009-02-07 Thread mohammad al-ani
thank you for this powerful tip. and I hope to get a same as it to coloring ctp file with notepad++ On Sat, Feb 7, 2009 at 9:19 PM, Leonard Teo wrote: > > Just adding here so that others can find the information later > > If you use Dreamweaver, by default, you'll find that you can't fire up

Dreamweaver - Getting Code Coloring and Design View to work on CTP files

2009-02-07 Thread Leonard Teo
Just adding here so that others can find the information later If you use Dreamweaver, by default, you'll find that you can't fire up your views in the code or design views. Using Dreamweaver preferences, you can set it up so that Dreamweaver will load the file but you will not get code color

Re: Collecting data from array depending on Association

2009-02-07 Thread mscdex
On Feb 7, 5:11 am, WebbedIT wrote: > Not sure why mscdex advises removing the id field from the join table, > I include one in all my join tables without issue, but happy for > mscdex to elaborate and inform us of some performance improvement that > may cause :) If you are solely using the 'id'

Re: How to clear element cache?

2009-02-07 Thread mscdex
Try using the clearCache function instead, as documented here: http://api.cakephp.org/file/basics.php#function-clearCache Also, be sure to check the return values of these functions to see if it is in fact saying it was successful or not. On Feb 7, 2:10 am, nurvzy wrote: > So I've been reading d

Re: Database question, How do I represent a zero in a zero to one relationship?

2009-02-07 Thread brian
Yeah, it's a DB thing. In Cake terms, I think it'd be covered by belongsTo, as you suggested. On Sat, Feb 7, 2009 at 10:04 AM, WebbedIT wrote: > > How does that differ from belongsTo? Or is this discussing > relationships at db level rather than cake model association? > > > --~--~-~--

Re: Help with linked image swap

2009-02-07 Thread brian
The last param, false, tells Cake to not escape the "title" (your image, in this case). But you need to pass an 'escape' option in $htmlAttributes to keep them from being escaped, also. echo $html->link( $html->image('navigation/nlOn-curved.gif'), 'http://www.external.com',

Re: Call to undefined method IniAcl::allow()

2009-02-07 Thread Gwoo
Now, that i think about it about it..IniAcl::allow() was never implemented because Ini was intended to be written first so only check was needed. Feel free to submit an enhancement ticket. If you want to work test case and a patch that would be great. --~--~-~--~~~---~-

Re: IIS and isapi_rewrite 3

2009-02-07 Thread Jo
thanks, but this solution seems to be outdated. Does anyone have a recent experience with the combination cakephp + iis + isapi_rewrite 3 ? On Feb 7, 1:37 am, Son Dat Giang wrote: > I found it via > googlehttp://markmail.org/message/mjpds44riiet3kvr#query:iis_rewrite%20cake... > may it be helpf

Re: HTML Helper issue in Blog Tute

2009-02-07 Thread Alfredo Quiroga-Villamil
Do you have var $helpers = array('Html') in your controller or AppController ? Regards, Alfredo On Sat, Feb 7, 2009 at 9:41 AM, jim wrote: > > This is not showing as a link in my browser: > > link($post['Post']['title'], "/posts/view/".$post > ['Post']['id']); ?> > > > Just looks like this: >

HTML Helper issue in Blog Tute

2009-02-07 Thread jim
This is not showing as a link in my browser: link($post['Post']['title'], "/posts/view/".$post ['Post']['id']); ?> Just looks like this: link($post['Post']['title'], "/posts/view/".$post['Post']['id']); ?> Any ideas? I'm new to Cake and I assume it's a helper issue. I am not sure wheter the

Re: Database question, How do I represent a zero in a zero to one relationship?

2009-02-07 Thread WebbedIT
How does that differ from belongsTo? Or is this discussing relationships at db level rather than cake model association? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send em

Re: Linking three tables?

2009-02-07 Thread geoff
Thanks mscdex. That's a really helpful link. I really appreciate the help. I might give it a bash again in CakePHP. I've been wanting to get these associations waxed, but I also have a project that needs to be completed, so I was about to just do it in CodeIgniter - it's a framework that I've use

Re: Database question, How do I represent a zero in a zero to one relationship?

2009-02-07 Thread Webweave
Just means that there is a child table that has at most one row that is related to the parent, but also could have none. On Feb 7, 1:53 am, WebbedIT wrote: > Forgive me for asking what seems a dumb question .. but what is a zero > to one relationship (don't snigger too loudly ... but I'll never

Re: Can a variable defined in one view file be used in another ?

2009-02-07 Thread Webweave
Personally, I like the ability to pass variables to elements, it allows me to reuse them on the same view. For instance I have a page that displays two tables of the same type of data: one is volunteer time slots that people can still sign up for, and the other is to show the time slots that the

Re: Collecting data from array depending on Association

2009-02-07 Thread WebbedIT
Got your email, but will reply in here ... seems I got things slightly wrong as I forgot that Cake only joins hasOne and belgonsTo associations by default and as such you cant run a $this->Event->find () call with a condition from the EventsUsers join table. Simple way to get around this should b

Re: cakeError

2009-02-07 Thread teknoid
@maxmil and @ianh Well all good points... in those instances it makes sense having multiple error handling events for the app... I guess the intended idea is that: 1. You can override the 404 page with something generic, like "Whoa, something went wrong... you can do this, this and that". For t

Re: I blocked the cookies, let the 'Session.cookie' to transfer in my parameter.(but can't use)

2009-02-07 Thread Rimoe
which one can help me? according to my function of redirect, why is it I can't login like have a cookie. 2009/2/6 Rimoe > Hi, > everyone, thank you for your read this topic. > > I blocked the cookies. > I don't want to save the 'Session.cookie' in cookies. > only let the 'Session.cookie' to t

Re: How to get the field's name from the associated model by id?

2009-02-07 Thread Vitaly
Thanks a lot for such a detailed answer! I finally made it work: $this->paginate['Instrument'] = array('contain' => array('Group' => array('Sector'))); $instruments = $this->paginate('Instrument'); $this->set('instruments', $this->paginate()); On Feb 7, 2:48 pm, WebbedIT wrote: > If you just wan

Re: Collecting data from array depending on Association

2009-02-07 Thread dyml
It runs smooth. Thought i tell you what i did: ==this is my event controlller var $uses = array('User'); function show() { $this->set('events', $this->User->find('all', array ('conditions'=>array('id' => $this->Auth->user('id'); } ==Relations User hasMany Event User H

Re: cakeError

2009-02-07 Thread maxmil
Thanks for your blog post that is a good way to avoid the white screen issue. What sort of error would i want to show in a production environment? Well, i like to use the error handling mechanism for recoverable errors. Say a controller method is called with incorrect parameters or a user tries

Re: Collecting data from array depending on Association

2009-02-07 Thread dyml
Okey, i have done that know. Though im getting a SQL error that is shouldn't get: Warning (512): SQL Error: 1054: Unknown column 'EventsUsers.user_id' in 'where clause' [CORE\cake\libs\model\datasources\dbo_source.php, line 514] Query: SELECT `Event`.`id`, `Event`.`user_id`, `Event`.`title` FROM

Re: Using Configure class in custom AppError

2009-02-07 Thread Dr. Loboto
AppController::beforeFilter() isn't called if no controller found to serve request. So yours Configure just do not contain values you need on "Missing Controller" errors as they wasn't set. On Feb 6, 8:54 pm, oleonav wrote: > Hi there, > > I have some variables set using the Configure class in t

Re: Can a variable defined in one view file be used in another ?

2009-02-07 Thread WebbedIT
Should you be using $this->set in a view? Set is used in the controller to pass a variable to the view then you pass on those variables to the element within the element call ... $this->element('view', array('var1' => $var1, 'var2' => $var2)); My previous query still remains unanswered though a

Re: how to update qty each time

2009-02-07 Thread WebbedIT
Maulik, I know it's daunting as a newbie with CakePHP (I've been working with it on and off for 3 months now and I'm still finding my feet <- busy with other things and slow learner) but this is your third post in a day which is very vague and each time someone has replied advising you to start y

Re: Can a variable defined in one view file be used in another ?

2009-02-07 Thread Dr. Loboto
$this->set('var', $var) in view make $var avaliable in elements. On Feb 5, 11:42 am, Malcolm Krugger wrote: > Suppose I define a variable in one .ctp file..i.e header.ctp $veryimp > > and if I renderelement another subheader.ctp file inside the > header.ctp file > > How can I access the value of

Re: How to get the field's name from the associated model by id?

2009-02-07 Thread WebbedIT
If you just want to fetch and display the name then you can use 'containable' which allows you to specify exactly which models you want to fetch data from. Add var $actsAs = array('Containable'); to /app/app_model.php (as you pogress with cake you are likely to need this behaviour in all models)

How to get the field's name from the associated model by id?

2009-02-07 Thread Vitaly
Instruments belong to Groups and Groups belong to Sectors. In the index.ctp of InstrumentsController I'd like to display not only the Group, but Group's Sector also. However, the $instruments array contains only sector_id which I can access like this: $instrument['Group']['sector_id'] I can access

Re: Find with two levels of recursion in where clause

2009-02-07 Thread WebbedIT
Sorry to come back to this so late but thought I'd make a note on your solution. There should be no need to call $modelB = ClassRegistry::init('B'); as modelA should be related to modelB allowing you to use $this->modelA->modelB->unbindModel(array('belongsTo' => array('C))); $this->modelA->bindM

Re: How to Manage Multidimensional Array in Cakephp

2009-02-07 Thread WebbedIT
Maulik, That is a very generalised question. I advise you begin building your app and when you come to a specific real-time problem post your query along with some example code and someone will be happy to help. --~--~-~--~~~---~--~~ You received this message becau

Re: Call to undefined method IniAcl::allow()

2009-02-07 Thread fain182
no one knows a solution? should i write a bug report? someone that use iniacl successfully can send me his acl.ini.php? thank you pietro On Fri, Feb 6, 2009 at 9:22 AM, fain182 wrote: > On Thu, Feb 5, 2009 at 10:18 PM, Gwoo wrote: >> >> try Configure::write('Acl.classname', 'INI_ACL'); > > i t

Re: Collecting data from array depending on Association

2009-02-07 Thread WebbedIT
First things first, your relationships are a bit mixed up ... both models should HABTM each other, you're confusing things by trying to create User hasMany Event. Remove users_id from events table, specify that User HABTM Event and rely on the join table to relate things. Not sure why mscdex adv

Re: Help with linked image swap

2009-02-07 Thread Zolthar
Thanks for the update, I had tried something similar, although did not succeed as quotes were converted to ". Here is what I attempted: link( $html->image('navigation/nlOn-curved.gif'), 'http://www.external.com',

Re: Database question, How do I represent a zero in a zero to one relationship?

2009-02-07 Thread WebbedIT
Forgive me for asking what seems a dumb question .. but what is a zero to one relationship (don't snigger too loudly ... but I'll never learn by being too embarrassed to ask!) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: need help with Views and models

2009-02-07 Thread WebbedIT
It's pretty hard from the information above to work out what you need help with. Seeing only the views gives us limited information and I can see no link from category to recipe above. Does this mean you are unable to see the view for recipes or category when visiting /recipes/ view/xx or /categ

Re: cakeError

2009-02-07 Thread ianh
@Teknoid; subsequent to my earlier posting I did find your blog post and changed from writing Configure::write('debug', 1) at the point of calling cakeError to setting debug to 1 in the __construct() method of app_error so many thanks for pointing out that this could be done. You asked what error

how to update qty each time

2009-02-07 Thread Maulik
hello i m going to dvlop cart in cart i have to update qty how i do it --~--~-~--~~~---~--~~ 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 fro

Re: Cookie->write not working with localhost

2009-02-07 Thread WebbedIT
Default WAMP works a treat .. only had to activate mod_rewrite and my cake app ported down to localhost without issue and I am using Auth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to thi