Re: to change the decoration of active link

2009-03-23 Thread brian
It should work. But, by 'active', are you referring to the current page? With CSS, 'active' refers to a link as it's being clicked. If you want to style the 'current' link, you will need to add a class. On Mon, Mar 23, 2009 at 1:31 AM, aman batra batra_aman2...@yahoo.com wrote: actually that

Re: Help with routing (/cat/:alias/feed - /:cat/feed)

2009-03-23 Thread brian
Hey, sorry -- I forgot to reply to your earlier question. I don't know why the feed route wouldn't work except that you might want to place it ahead of the more general one. I don't have any experience with parseExtensions so I can't really help with this. FWIW, I will need to use it very soon

Re: Tree structure..

2009-03-23 Thread Aneesh S
Hi, thanks for the response, but i'm havng trouble understanding what the left and right are.?? I mean, i'm not able to get the relation of those two. Pls help me out... Thanks, *Aneesh S Software Engineer *illustris software solutions private limited TBI, National Institute Of Technology

Re: to change the decoration of active link

2009-03-23 Thread aman batra
but actually the problem is that i have many links as isaid before like Today Tomorrow week month year and i want that if i click on week then week remains undecorated and the rest as underlined. But if i add a new class in css say a.nodec{text-decoration:none} and then to my link whick is like

Re: MVC best practice advice needed

2009-03-23 Thread aman batra
I think it is a good practice to have a function in User model that should serve the required purpose than any other approach. On Mar 22, 2:22 pm, mattalexx mattal...@gmail.com wrote: Thank you. On Mar 21, 11:51 pm, mscdex msc...@gmail.com wrote: Sorry, I half-misread your situation. In

Domain names for each user's profile page

2009-03-23 Thread Turgs
Hello In my cake app, each user has their own profile page, which is http://www.example.com/users/profile/{user-name} When user's join my website, I want to give them the ability to attach a domain name to their profile if they choose. So for user-a, a visitor who goes to http://www.user-a.com

Re: to change the decoration of active link

2009-03-23 Thread kai
Someone else may have better advice but I use this: http://www.solitechit.com/2008/06/06/menu-highlighting-with-cakephp-12/ On Mar 23, 12:11 am, aman batra batra_aman2...@yahoo.com wrote: but actually the problem is that i have many links as isaid before like Today Tomorrow week month year and

About cakephp

2009-03-23 Thread Kavi
Fatal error: Class 'Model' not found in E:\wamp\www\mycakeapp\cake\libs \model\app_model.php on line 38 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: to change the decoration of active link

2009-03-23 Thread aman batra
actually the link above just highlights the link where I take the mouse over..but my prob is that if I click on some link and when the next page is loaded then the link I had clicked gets highlighted (which I want to be as text-decoration:none). On Mar 23, 1:09 pm, kai k3ho...@gmail.com wrote:

Re: Release: 1.2.2.8120

2009-03-23 Thread aman batra
Thanks To Team CakePHP Regards, /Terrific On Mar 20, 8:32 pm, Martin Westin martin.westin...@gmail.com wrote: Thanks for this update. And thanks for the public git repo. No more git svn rebase for me :) --~--~-~--~~~---~--~~ You received this message because

Re: Using a page anchor with Pagination links

2009-03-23 Thread Flipflops
@Brian Thanks for the tip. I'll try that out - its much neater. On Mar 20, 4:50 pm, brian bally.z...@gmail.com wrote: Or this should work, also: $paginator-options(array('url' = am(array('#' = 'album-image-gallery'), $this-passedArgs))); On Fri, Mar 20, 2009 at 12:17 PM, Flipflops

Re: About cakephp

2009-03-23 Thread John Andersen
Fine, and what is your problem? :) Would be good if you can explain/show a little more of the problem you are having. For example the code where the error takes place, or the controller you are trying to invoke, etc. Best wishes, John On Mar 23, 7:48 am, Kavi kavijadha...@gmail.com wrote:

Help: Model::Save() doesn't generate the right update query

2009-03-23 Thread 333...@gmail.com
Hi all, In the UrlsController I have the action stopTracking() (see bellow) that gets list of indexes of urls which I want to set `research` = -1 for: But the $this-Url-save(); generate update query with `research` not changed. For instance: INPUT: $this-data['Url']['tracking'] = arrray(0 =

Re: Hidden field together with Security Component

2009-03-23 Thread Robert
I had similar problem. Do You create hidden field in javascript? It is not permitted with the security component. Sc checks if form has the same fields it has on the server side... rt On 22 Mar, 11:34, Xavier Orduna xavier.ord...@gmail.com wrote: Hi All, First of all, congratulations for

$ajax-observeField

2009-03-23 Thread Manisha P
Hello Everyone, I have dynamic listing of some categories and on click on each of them, I want to show related user listing. I want to use Ajax for this and have to pass category id to that ajax function. I have tried remoteFunction() for this, but I did not get how to send category id to that

Re: my date field is not blank, but cake thinks it is

2009-03-23 Thread iFeghali
On 20 mar, 11:53, GrantB gr...@grantb.net wrote: Why would this date field fail validation?  All of the dropdowns are here is the place to look at: http://api.cakephp.org/view_source/validation/#line-395 regards, ~IF. --~--~-~--~~~---~--~~ You received this

Re: Help: Model::Save() doesn't generate the right update query

2009-03-23 Thread Daniel Chcouri
Solved! Probably punbb bug. When sending the value 0 (which is fine for that task) punbb generate valid query. I've defined `research` to be tinyint(1) in the `urls` table. Mysql let `research` range to be: -128 to 127 (1 byte signed integer). I assume that CakePHP looked on `research` as 1 bit

Re: Newbie needs help with hidden input helper

2009-03-23 Thread cpeele
Hello again, I have tried your suggestion but it still does not read the value from the session. I will paste my entire controller code here. Thanks again: ?php class EventsController extends AppController { var $name = 'Events'; var $layout = 'layout1'; var

Re: Accessing other table/model from main controller

2009-03-23 Thread Smelly Eddie
Constantin My understanding is this; Using $uses will load every listed model when that model is loaded, even if they are not used in particular action. Using Controller::loadModel('ModelNameYouWantToLoad'); will only load that model when that particular line is read. It is useful if you

Re: Paginator links in 1.2.2

2009-03-23 Thread Martin Westin
I created a ticket yesterday and jperras fixed the problem already (!) If you have a problem with this in version 8120 you can sync to the 1.2 branch or get the latest paginator any way you prefer: https://trac.cakephp.org/changeset/8125 /Martin On Mar 23, 10:41 am, Mauricio Morales

Re: scaffold

2009-03-23 Thread Alejandro Weintz Aguilar
Thank you guys, moving forward to Bake On Sat, 2009-03-21 at 06:43 -0700, BrianRehg wrote: You can manually override the scaffolding by creating your own custom actions(update, delete etc) within the controller. You can bake these actions or you manually add them yourself. You will also be

Re: method signature madness

2009-03-23 Thread welzie
I'm sorry, but I just don't get it. I am only passing TWO arguments to $Html-link and it works. I looked at $Html-link and it doesn't seem to do any parameter counting. I understand your point about me only passing two parameters, but please tell me why it works when calling $Html-link. //use

Re: MVC best practice advice needed

2009-03-23 Thread oliver.pra...@googlemail.com
I dont get why you even have that process of marking them (or how you Mark them). Just add a function that checks expiration and put it in the beforeFilter ... On Mar 23, 8:20 am, aman batra batra_aman2...@yahoo.com wrote: I think it is a good practice to have a function in User model that

CakePHP as a part of project

2009-03-23 Thread Aivaras
Hello dear developers, I am wondering if it is possible to use CakePHP as a part of project. I mean I'd love to have some old code, but would still love to use CakePHP. I cannot convert everything to cakephp so that is why I need my old code to work also. Any suggestions? Thanks in advance,

Re: Getting app base URL even in a shell

2009-03-23 Thread Martin Westin
You need two things: Servername and path to the application root. Problem is those things are governed by Apache and Cake's shell cant really figure out which vhost you want by itself. At least I never got it. What I did was to add a parameter to the shell call where I provide the hostname I

Re: to change the decoration of active link

2009-03-23 Thread brian
On Mon, Mar 23, 2009 at 4:26 AM, aman batra batra_aman2...@yahoo.com wrote: actually the link above just highlights the link where I take the mouse over..but my prob is that if I click on some link and when the next page is loaded then the link I had clicked gets highlighted (which I want to

Re: Newbie needs help with hidden input helper

2009-03-23 Thread brian
On Mon, Mar 23, 2009 at 9:10 AM, cpeele chris.peel...@gmail.com wrote:        function add()        {                if (!empty($this-data)) {                        $this-data += array('User' = array('user_id' = $this-Session- read('User.user_id')));                        if

Re: Accessing other table/model from main controller

2009-03-23 Thread brian
should be: Using $uses will load every listed model when that controller is loaded, even if they are not used in particular action. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

wizard component header errors

2009-03-23 Thread crankin
After I submit the first step in the form, I get this message: Warning (2): Cannot modify header information - headers already sent by (output started at /export/httpd/data/architecture/sitemanager/cake/ libs/configure.php:476) [CORE/cake/libs/controller/controller.php, line 577] I'm on a

Re: method signature madness

2009-03-23 Thread brian
On Mon, Mar 23, 2009 at 10:58 AM, welzie wel...@gmail.com wrote: I'm sorry, but I just don't get it.  I am only passing TWO arguments to $Html-link and it works.  I looked at $Html-link and it doesn't seem to do any parameter counting.  I understand your point about me only passing two

Re: wizard component header errors

2009-03-23 Thread Marcelo Andrade
On Mon, Mar 23, 2009 at 1:53 PM, crankin cranki...@gmail.com wrote: After I submit the first step in the form, I get this message: Warning (2): Cannot modify header information - headers already sent by (output started at /export/httpd/data/architecture/sitemanager/cake/

Re: Auth Component Custom Login

2009-03-23 Thread iFeghali
Hello Martin, Thank you for you answer. I had to implement my custom methods find() and hashPassword() in the user model. I end up with: hashPasswords: 1) find username in database 2) if username not found, fail 3) check user type. if type = local then return Security::hash() 4) if type = nis,

requestAction (v1.22) - User input being returned to calling action, preventing form validation

2009-03-23 Thread Hoddy
Hi version 1.22 I am trying the run a form using requestAction, however the user input ($this-data) is being returned to the calling action when i submit the form, which is preventing the form validation from running in the requested action. I call requestAction like this ..

Re: Tree structure..

2009-03-23 Thread mscdex
On Mar 23, 2:52 am, Aneesh S aneeshs.em...@gmail.com wrote: thanks for the response, but i'm havng trouble understanding what the left and right are.?? I mean, i'm not able to get the relation of those two. Pls help me out... The lft and rght fields are used for positioning purposes of the

Re: requestAction (v1.22) - User input being returned to calling action, preventing form validation

2009-03-23 Thread Max Granados
Well, I think I don't undestand very well what are you trying to do, I use requestAction in an proyect Im working. $results = $this-requestAction('/diferentController/function/'. $parameter); and in that function I validate and work with the info, as a tip requestAction doesn't accept or return

Cache a dynamic javascript and create a view which uses this javascript (present in the cache)

2009-03-23 Thread RamyaK_CS
Hello Need some help!! I want to cache a dynamically created javaScript and use it from cache in further requests. i.e. I have a dynamic string, say, $data = 'document.write(hi)'; I want to cache it as an external js, so I used the below sentence. cache('views'. DS. 'test.js',

Re: Auth Component Custom Login

2009-03-23 Thread Martin Westin
I'm glad I could be of some help. I wrote a ActiveDirectory authenticator in php long ago and I still like these integrated authentications. I hope it works well for you. Database queries are usually pretty fast and shouldn't cause you too many problems for this type of intranet application.

Re: CakePHP as a part of project

2009-03-23 Thread Martin Westin
That would depend very much on your old code and on how you see the integration between the two. For example, using CakePHP for a sub-app in example.com/blog/ and keeping the rest of the (imagined) CMS in legacy code should be fairly simple... just as long as the .htaccess files don't cause

Re: Domain names for each user's profile page

2009-03-23 Thread Martin Westin
I do a lot of domain-specific stuff for dealing with configurations. Your new friend is called $_SERVER['SERVER_NAME'] :) I parse that to pick out the part of the domain name I need to load the correct configuration. You can do the same and use that to load the correct user profile. I would try

Re: Help: Model::Save() doesn't generate the right update query

2009-03-23 Thread Miles J
Is there a reason your doing a read() for each item in the loop? Your just doing a ton of unnecessary queries. This would do the same exact thing. $this-Url-id = $stopTrackingId; $this-Url-save(array('research' = -1), false); --~--~-~--~~~---~--~~ You received

Re: Help: Model::Save() doesn't generate the right update query

2009-03-23 Thread Miles J
Oh and also this is even shorter then the previous code: $this-Url-id = $stopTrackingId; $this-Url-saveField('research', -1); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

Re: Help: Model::Save() doesn't generate the right update query

2009-03-23 Thread Daniel Chcouri
No there isn't, it's just that I've tried many ways to do it. The version I've post is just the last one I've tried. Thanks for your comment. Daniel 2009/3/23 Miles J mileswjohn...@gmail.com Oh and also this is even shorter then the previous code: $this-Url-id = $stopTrackingId;

Strange behavior with belongsTo association

2009-03-23 Thread RyOnLife
VideoItem model: var $belongsTo = array('User', 'VideoList', 'Video'); From the controller: $vi = $this-VideoItem-findById(18); pr($vi); The array only contains data for Video, not User or VideoList. When I modify the association by removing Video: var $belongsTo = array('User', 'VideoList');

Re: Strange behavior with belongsTo association

2009-03-23 Thread Miles J
Make sure your relations match correctly and that your associations do not have the same name. If they have the same name, it will break if 2 identical associations are matched. Can we also see your table structure and associations. --~--~-~--~~~---~--~~ You

Re: Strange behavior with belongsTo association

2009-03-23 Thread RyOnLife
Thanks for offering to help. Below I have pasted **ModelName** and included table structure and associations. **User** CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `fb_id` int(11) NOT NULL, `created` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT

Getting all functionality in non architectural requests

2009-03-23 Thread rartavia
Hello there, My problem is I need to now how to make a request that does not goes all the way through the architecture. I'm wondering how to get all the functionality (helpers, Internationalization, etc) you get on views and layouts in regular pages since if I have /app/ webroot/page1.php that

custom/advanced setup

2009-03-23 Thread matt
hi all, i'm pretty new to cakephp and i'm having a difficult time getting it setup the way i want. just to test, i originally set it up using the production method, went through the blog tutorial, and everything was working fine. now i need to reorganize things so that: - i can create separate

Re: $html-tableCells and colspan

2009-03-23 Thread Juan B . Giménez
Hi! echo $html-tableCells(array(array( array(some text., colspan='6') ) )

limit access to a site?

2009-03-23 Thread Aurelius
Hi! I Would like to limit the access to a controller function in the same way as .htaccess would do it with these lines: Order deny,allow Deny from all Allow from 85.127.249.210 How can I achieve that? thx Aurelius --~--~-~--~~~---~--~~ You received this message

Use a cached javascript

2009-03-23 Thread RamyaK_CS
Hi Need some help I have cached an javascript, how can I use it in the view. I used $javascript-link() function, but it is looking in /app/webroot/ js folder. Instead I want to get the script from cache. Is there any way we can do it? Best Regards, Ramya

Re: limit access to a site?

2009-03-23 Thread Graham Weldon
class AppController extends Controller { var $allowedHosts = array('127.0.0.1', '::1', '85.127.249.210'); var $accessDeniedRedirect = ... // Define your action to redirect to here. function beforeFilter() { if (!in_array(env('REMOTE_ADDR'), $this-allowedHosts)) {

Re: Use a cached javascript

2009-03-23 Thread joshua
Can I know how did you do it? On Tue, Mar 24, 2009 at 8:18 AM, RamyaK_CS karri.ra...@gmail.com wrote: Hi Need some help I have cached an javascript, how can I use it in the view. I used $javascript-link() function, but it is looking in /app/webroot/ js folder. Instead I want to get the

Re: Use a cached javascript

2009-03-23 Thread Ramyak
Hi, I have a dynamic string, say, $data = 'document.write(hi)'; I want to cache it as an external js, so I used the below sentence. cache('views'. DS. 'test.js', $data, $expires); This successfully created test.js in my cache folder i.e. in the / app/tmp/cache/views folder Now I

Re: Use a cached javascript

2009-03-23 Thread joshua
How about read it from cache and echo it directly? http://book.cakephp.org/view/764/Cache On Tue, Mar 24, 2009 at 8:42 AM, Ramyak karri.ra...@gmail.com wrote: Hi, I have a dynamic string, say, $data = 'document.write(hi)'; I want to cache it as an external js, so I used the below

Re: Getting all functionality in non architectural requests

2009-03-23 Thread mscdex
On Mar 23, 3:10 pm, rartavia royarta...@gmail.com wrote: In an app that has no data source (I know it may sound weird) what config should it be done for correct performing. If your model(s) do not utilize a database connection, put this line in your model class: var $useTable = false;

Re: custom/advanced setup

2009-03-23 Thread brian
I'm sure this can be done but I have to wonder if it's a good idea. Making a single core library is one thing, but what you're describing seems like a recipe for deployment problems down the road. When I first started fiddling with Cake, my first inclination was to centralise the core libs.

Re: limit access to a site?

2009-03-23 Thread Miles J
Perhaps take a look at the SecurityComponent. --~--~-~--~~~---~--~~ 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

Re: custom/advanced setup

2009-03-23 Thread Miles J
This exaplains all of what you want: http://book.cakephp.org/view/35/Advanced-Installation I do the same thing on my site. My /cake/ is beneath my root, and I have many apps/domains include that folder. --~--~-~--~~~---~--~~ You received this message because you

Re: Getting app base URL even in a shell

2009-03-23 Thread mattalexx
Thank you for you suggestions. From Martin's suggestion, I thought I would do this: app/config/app.php: ?php $config['App']['base_url'] = 'http://www.example.com'; ? app/config/bootstrap.php ?php Configure::load('app'); ? app/vendors/shells/cron.php ?php // ... $base_url =

Re: Getting app base URL even in a shell

2009-03-23 Thread mattalexx
Okay, App is reserved so I changed it to MyApp. On Mar 23, 9:06 pm, mattalexx mattal...@gmail.com wrote: Thank you for you suggestions. From Martin's suggestion, I thought I would do this: app/config/app.php: ?php $config['App']['base_url'] = 'http://www.example.com'; ?

cache

2009-03-23 Thread computing1...@gmail.com
Hi everyone when I use cake , I see cache have many paramaters such as expires, $data ,$option, I wondering where expires is. I looked for many folders, but I cant. Please help me. Best regards --~--~-~--~~~---~--~~ You received this message because you are

CakeFest Berlin 2009 officially announced

2009-03-23 Thread Nate
After much hype and speculation, the next CakeFest event, which will take place in Berlin beginning July 9th, has been officially announced. You can read the full details, along with some other important announcements on the Bakery: http://bakery.cakephp.org/articles/view/cakephp-deutschland

Re: Tree structure..

2009-03-23 Thread Aneesh S
Yes i got that, but what is the actual relationship of those. What does the values of lft and rght indicate in connection with positions. - *Aneesh S Software Engineer *illustris software solutions private limited TBI, National Institute Of Technology Calicut Kerala, India - 673601 Tel No +91 495

Re: cache

2009-03-23 Thread Sam Sherlock
look in APP/tmp/cache/views/ expires being the point at which the cached file becomes stale - S 2009/3/24 computing1...@gmail.com computing1...@gmail.com e expires is. I looked for man --~--~-~--~~~---~--~~ You received this message because you are subscribed