Re: Model find() to return object; instead of array (?)

2008-04-02 Thread Grant Cox
I'm not sure of any method - but why do you think that all your rows as arrays will use up more memory than the same amount of data wrapped in objects? Is it just a pass by reference vs pass by copy issue? At the heart of it the dbo_source.php file takes the data from the database query as an ar

Model find() to return object; instead of array (?)

2008-04-02 Thread R. Rajesh Jeba Anbiah
It's very crucial to have the find() or similar returns DB object instead of full array--as for any data export module, we cannot dump the whole array which would result in memory error. IIRC, someone provided how to do that in CakePHP, but I lost the link; but, when I google, the closest I

Re: Array of named arguments(?) - pagination related

2008-04-02 Thread R. Rajesh Jeba Anbiah
On Apr 3, 4:02 am, Lisa <[EMAIL PROTECTED]> wrote: > maybe you mean like this? > > http://groups.google.com/group/cake-php/browse_thread/thread/675b44ae... It's talking about retaining search param which is already here http://groups.google.com/group/cake-php/web/frequent-discussions?version=

Re: Query Question

2008-04-02 Thread Dan
I figured it out $this->Game->bindModel( array('hasOne' => array( 'CategoriesGame' => array( 'className' => 'CategoriesGame' ) )),

Re: Application Index Controller

2008-04-02 Thread jonknee
Not a problem, it just needs a route set up in config/routes.php, something like: Router::connect('/', array('controller'=>'home', 'action'=>'index')); That's for 1.2, the syntax is a bit different for previous versions but the idea is the same. Route '/' to a controller and action. --~--~--

Re: UTF8 monthname in date-picker

2008-04-02 Thread Elmo
Is this fixed? I am running into the same issue from the 1.2.x.x_27.03.2008 I don't want to have to upgrade if I don't have to (and introduce other bugs). -E On Mar 27, 10:38 am, Molt <[EMAIL PROTECTED]> wrote: > Anyway, now i tried the nightly of 2008-03-25 and it does not like > this way :( >

Re: Retrieve all articles from more then one categories?

2008-04-02 Thread Dan
I think you need to use findAll not findBy $this->set('articles', $this->Category->findAll('Category', "Category.slug IN 'tutorials', 'photoshop'")); not sure of the exact syntax so the above probably doesn't work but I believe findAll is what you're looking for. --~--~-~--~~---

Re: Login redirect issue ...

2008-04-02 Thread John R
So strange .. when I hit login FROM the subdomain, this is my $_SESSION: Array ( [Config] => Array ( [userAgent] => XXX [time] => 1207229748 [rand] => X [timeout] => 10 ) [Auth] => Array ( [redirect] => http://sample.domain.com/contest ) ) The [redirect] is fine .. When I do a successfu

Re: Rendering a View manually

2008-04-02 Thread Adam Royle
Hi Matt, A possible solution would be to use wget to do the bulk of the work for you. I did this with cake not too long ago and it worked really well. With the recursive option it can automatically download linked pages, images, css, javascript, etc, and replace the links with relative links. Th

DarkAuth and HABTM Relationship

2008-04-02 Thread lirc201
Just when I thought I have CakePHP figured out, I get a curve ball. I'm trying to integrate DarkAuth into my site. I have a users table, group table both with "id" columns and then a join table (HABTM) with group_id, and user_id columns. I don't understand why Cake believes I need to have a User

Application Index Controller

2008-04-02 Thread Antonio Labriola
Hi all, This might sound a bit stupid, but im new to cake, and I could not find an answer to this question in any of the documents. I have cake in my root directory of my app, i have configured the db info and cake told me everything was all set. It told me to edit that main view, i could ed

Re: Rendering a View manually

2008-04-02 Thread Joel
Object::requestAction() is, in most cases, evil. 99% of the time when you think that you need requestAction, what you really need is to take a step back and look at what it is you are trying to accomplish. Reasons for being evil: 1) Every time you call requestAction, a new Dispatcher cycle is st

Re: document root in shared hosting

2008-04-02 Thread Raistlin Majere
I am hosting with StoneRocket.net On 30 mar, 06:20, Stephen Orr <[EMAIL PROTECTED]> wrote: > Which, so long as your RewriteBase directive takes the form of: > > RewriteBase /directory > > Will be exactly right. If this isn't working for you, I suggest > contacting your hosting company for further

Re: Rendering a View manually

2008-04-02 Thread [EMAIL PROTECTED]
It sounds to me like what you're after is Object::requestAction. This will allow you to effectively grab a page that the site might produce and put it into a variable, which gives you the ability to collect those pages into your zip file. Simon http://www.simonellistonball.com/ --~--~-~--

Re: Rendering a View manually

2008-04-02 Thread Joel
In your Controller: $view =& ClassRegistry::getObject('view'); >From this you can call $view->render(); Matt wrote: > Hello group, > > One of my Controller methods generates a zip file containing parts of > my application which can be viewed in a standalone mode. One of its > key functions will

Please help! CakePHP + TinyMCE + MCImageManager Problems

2008-04-02 Thread 1nsane
Hey guys, I'm having problems getting the MCImageManager to work with TinyMCE and CakePHP. Everything works fine with CakePHP and TinyMCE, but after installing the MCImageManager plugin (using the instructions on your wiki), I can't seem to get the plugin working. The problem seems fairly simple

Re: Array of named arguments(?) - pagination related

2008-04-02 Thread Lisa
maybe you mean like this? http://groups.google.com/group/cake-php/browse_thread/thread/675b44ae3a3a29f7/821fd9ba9e955b5f?hl=en#821fd9ba9e955b5f --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To po

Re: Logical organization best practice

2008-04-02 Thread b logica
I'd say that you should put most of your logic in the controller method that the requestAction() is calling. From there, use $this->set('some_variable', $some_value) and then lay out your HTML in the view. But, without knowing the details of your situation, it's difficult to say. On Wed, Apr 2,

Rendering a View manually

2008-04-02 Thread Matt
Hello group, One of my Controller methods generates a zip file containing parts of my application which can be viewed in a standalone mode. One of its key functions will be to render some of the app's pages to .html files and add them to the zip. I'm fairly new to Cake and not au fait with how i

Re: Logical organization best practice

2008-04-02 Thread Matt
Hi Baz, b, Thanks for your responses. I like the idea of using Cake's caching framework - a cache is a more appropriate place to store the generated data, rather than pushing it back to the database every time. I'm still slightly confused about the logical place to put the code which actually ge

Re: Model Associations and Validations

2008-04-02 Thread Chris Hartjes
On Wed, Apr 2, 2008 at 4:55 PM, bmopro <[EMAIL PROTECTED]> wrote: > > When i use the edit action in my user model i have the following to > grab the users info from the table... > $this->User->findById($id) > This returns an array that is HUGE! > It includes all my validation contained in my

Model Associations and Validations

2008-04-02 Thread bmopro
When i use the edit action in my user model i have the following to grab the users info from the table... $this->User->findById($id) This returns an array that is HUGE! It includes all my validation contained in my User model, and all of the associations. Obviously i just need the users info to e

bake not working when app is above webroot

2008-04-02 Thread twitchylegs
I changed my setup so I could run multiple applications but couldn't get bake to work when the app files were above the webroot. Any ideas why? Setup was the following -root: /var/www/app -app1 /var/www/app/app1 -app2 /var/www/app/app2 -core: /usr/lib/cake/ www.example.com/app1/index.php www.exam

Re: Discussion on cakephp-official-resources

2008-04-02 Thread Sliv
I didn't, the group owner did. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PRO

Re: retrieving aggregated data from the model

2008-04-02 Thread acoustic_overdrive
Great, thanks for the tips - I will try them out and see how I get on. Jamie On Apr 2, 2:07 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Sun, Mar 30, 2008 at 3:51 PM,acoustic_overdrive > > > > <[EMAIL PROTECTED]> wrote: > > >  What's the recommended way to use aggregate functions like SUM

Re: Query Question

2008-04-02 Thread Dan
Thanks for the note but I can't get conditions to work because it's a HABTM relationship. I tried $this->paginate('Game', "Category.name = 'puzzle'"); but it gives me SQL Error: 1054: Unknown column 'Category.id' in 'where clause' The query doesn't join Category to Game so it has no idea what

Re: Login redirect issue ...

2008-04-02 Thread [EMAIL PROTECTED]
Unfortunately not, I tried once to debug the problem, but I gave up as I was tired I think (and that the problem wasn't major -> not acting on production site) Base of research : what is the behavior of $_SESSION['Auth'] ['redirect'] after a successful login. Good bughunting ;) On 2 avr, 01:34,

Re: works in localhost, not works in www.toreadandtowrite.com

2008-04-02 Thread [EMAIL PROTECTED]
'host' => must point to your MySQL server ! Also check username and password your hostporvider gave you. On 2 avr, 07:08, Stephen Orr <[EMAIL PROTECTED]> wrote: > Probably. > > Suggestion - ask your HOST what the correct settings should be. > > On Apr 1, 11:23 pm, Raistlin Majere <[EMAIL PROTECT

Retrieve all articles from more then one categories?

2008-04-02 Thread Mech7
Does anybody know how i can get all results based on more then one item with a HABTM relation. for example i have: $this->set('articles', $this->Category->findBySlug(array('php', 'photoshop'))); But i will only get the articles from the first category: This is the query it will make: SELECT `C

Re: ajax->updater calls wrong action

2008-04-02 Thread [EMAIL PROTECTED]
Answers : no, by default evalScript is set to false. So be careful if you put javascript into your called pages or not. If you do, don't forget to write your javascript functions like this : thisIsMyJSFunction = function(arg1, arg2){ } It's a common mistake to write it as "function myJSFunctio

Re: Anybody using html->addCrumb() html->getCrumbs?

2008-04-02 Thread [EMAIL PROTECTED]
I'm thinking the same thing as you, currently, I'm using it in a project that uses a tree behavior to display it's content. So I like to display the parent of the page before the page itself in the breadcrumbs. To do this, I had to create a function into my view that would populate the breadcrumb.

Re: WAMP and CakePHP

2008-04-02 Thread Baz
Wow Ok, I think your best bet is Xampp Lite http://www.apachefriends.org/en/xampp-windows.html#646 On Wed, Apr 2, 2008 at 1:50 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I like to use InstantRails (http://rubyforge.org/frs/? > group_id=904&release_id=17517

Re: WAMP and CakePHP

2008-04-02 Thread [EMAIL PROTECTED]
I like to use InstantRails (http://rubyforge.org/frs/? group_id=904&release_id=17517) as an easy, semi-portable, CakePHP development environment. You can delete all the rails stuff if you don't want it or just leave it there but it supports PHP fine and it's a breeze to setup. Dave On Apr 2, 11:

Re: Anybody using html->addCrumb() html->getCrumbs?

2008-04-02 Thread Zoltan
There's a few threads on breadcrumbs (addCrumb) that cover how to use it. http://groups.google.com/group/cake-php/browse_thread/thread/9bf3a18b1fa72fd2/2093b766d75d46d9 http://groups.google.com/group/cake-php/browse_thread/thread/21592590569f6433/56d5a3746a43e618 Zoltan www.yyztech.ca On Apr 2,

Re: hit counter or custom annalytics

2008-04-02 Thread Dardo Sordi Bogado
> Hi - > I am trying to build a simple site tracking system to gather some simple > analytics on a site we are using. > I can not use a third party analytics system like Google Analytics because > the site is on an internal network only and we need to track some site > specific information, suc

Overriding IMAGES and IMAGES_URL

2008-04-02 Thread wralph
Hi, I am on shared web hosting and I have a directory setup like so: app/ - Frontend application admin/ - Backend application cake/ - Cake core I have an add item page inside admin, which uploads images to admin/ webroot/img and I want to be able to access these from the frontend directory with

Anybody using html->addCrumb() html->getCrumbs?

2008-04-02 Thread aranworld
It seems most logical to me that I would want to use addCrumb() from within the controller -- maybe even a standard piece of overridable logic within the app_controller ... and then use getCrumbs() from within the view. Or, is this logic wrong? If you are using the HTML helper's crumb functional

Re: Problems with Acl/Auth

2008-04-02 Thread aranworld
I agree with Dardo. The key is to take a good look at the queries being generated. I am using Auth and ACL using 'crud' mode. It works fine as advertised. I am also using the Acl Behavior. I assume you are using that, but just in case, you need to make sure you are using the Acl Behavior in y

WAMP and CakePHP

2008-04-02 Thread UTDStudent
I am a college student who is currently trying to set up a WAMP installation to run a school project on. Do any of you fine folks have any recommendations for a setup. PS - Normally I'd like to learn Linux and use a LAMP, but I am pressed for time. Thanks --~--~-~--~~~--

Re: Ajax Link Generation

2008-04-02 Thread [EMAIL PROTECTED]
Just had another thought, you could also store the result of $ajax- >link() in a variable ($linkData= $ajax->link()) then use regular expressions to separate the Cdata from the link data and echo them in separate places. On Apr 2, 11:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I don't

Re: Ajax Link Generation

2008-04-02 Thread [EMAIL PROTECTED]
I don't think it's possible to have the ajax helper generate the CData portion separately. I would do one of the following: 1) write the code out by hand. 2) create a hidden $ajax->submit button to submit your ajax call then create a link around your node that calls a javascript function to initia

Re: autosave implementation: using onChange to click $ajax->submit

2008-04-02 Thread b logica
You could use setInterval() to fire the submit() (if changes have been made). On Wed, Apr 2, 2008 at 12:50 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I set up a form to autosave with ajax by using an elements onChange() > function to click the $ajax->submit() element. This seems like

Re: Query Question

2008-04-02 Thread [EMAIL PROTECTED]
you set your conditions in the paginate variable. Example: class GamesController extends AppController { var $name = 'Games'; var $paginate = array( 'Game' => array( 'limit'=>10, 'order'=> 'Game.id ASC',

Re: Adding an extra column (sub query) to a model using associations

2008-04-02 Thread b logica
Your English is far better than my Dutch (Oranje Boven!) I wonder if this thread will be helpful to your sutuation as well: http://groups.google.com/group/cake-php/browse_frm/thread/f7508c11b6f785ff# On Tue, Apr 1, 2008 at 5:07 PM, Maff^ <[EMAIL PROTECTED]> wrote: > > First of all, thanks for

Re: Help: is it feasible to use multiple .po files?

2008-04-02 Thread b logica
Yes, but you should use __d() instead of __() to translate. Look at the method in cake/basics.php. In a nutshell, you would use it like: __d('common', 'some string to translate') __d('common', 'some string to translate', true) __d('msgid_will_use_in_ctp_file1', 'some string to translate', true)

Query Question

2008-04-02 Thread dan
Games HABTM Categories I need to $this->paginate('Game'); where Category.name = 'puzzle' Is this possible? Tried using bindModel but can't figure it out. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP"

autosave implementation: using onChange to click $ajax->submit

2008-04-02 Thread [EMAIL PROTECTED]
I set up a form to autosave with ajax by using an elements onChange() function to click the $ajax->submit() element. This seems like the easiest to implement solution to me but will this be overtaxing the server with elements like textareas which would change with each keystroke? If so, any ideas

hit counter or custom annalytics

2008-04-02 Thread For Sale Sticker
Hi - I am trying to build a simple site tracking system to gather some simple analytics on a site we are using. I can not use a third party analytics system like Google Analytics because the site is on an internal network only and we need to track some site specific information, such as user. I

Re: Problems with Acl/Auth

2008-04-02 Thread mbavio
I was doing exactly the same thing you want to do: function isAuthorized() { if ($this->Acl->check(array('foreign_key' => $this->Auth->user('id'), 'model' => 'User'), inflector::camelize($this->name).'/'.$this->params['action'], '*')) {

Re: beforeSave & behaviours

2008-04-02 Thread Sam Sherlock
yep sweet!! needs some refinement but sweet it works. happy baking - S On 02/04/2008, grigri <[EMAIL PROTECTED]> wrote: > > > If you can assume that the settings in actsAs are valid, you can do > this: > > class Photo extends AppModel { > var $actsAs = array( > 'Upload' => array('some' =>

Re: Is cakePHP alive?

2008-04-02 Thread mbavio
Troll fear? :) Cheers, mbavio On Apr 1, 7:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks :) > Now I can be happy again ;) > > > > Yes, in error report Zend Optimizer is mentioned :( > > On 1 Bal, 08:09, Grant Cox <[EMAIL PROTECTED]> wrote: > > > I'll bet that what is actuall

Managing requirements with CakePHP

2008-04-02 Thread Sake
Hi Everyone, I thought I'd make a specific post for this. I'm interested in starting a CakePHP project. I've posted the details in my cakeforge project here: http://cakeforge.org/forum/forum.php?thread_id=16937&forum_id=790 I'm curious if anybody has any feedback on my idea and whether or not a

Array of named arguments(?) - pagination related

2008-04-02 Thread R. Rajesh Jeba Anbiah
When trying more than one pagination on a page, the pagination is getting weird as it's resetting with the single named args (like page: 1). So, is there anyway to mention the array of named argument--so as to attach it to the model? (say, model[page]:1 or so?) -- Email: rrjanbiah-at-Y!com

Re: Let's help each other!

2008-04-02 Thread Sake
Thanks for approving my project! Basically, here is the details: http://cakeforge.org/forum/forum.php?thread_id=16937&forum_id=790 If anybody is interested to help, it would be much appreciated. I'd also like some feedback on my idea. On Apr 1, 6:30 pm, Sake <[EMAIL PROTECTED]> wrote: > That's

Discussion on cakephp-official-resources

2008-04-02 Thread R. Rajesh Jeba Anbiah
Off topic, but I'm just interested to know how have you made this sticky? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

Re: beforeSave & behaviours

2008-04-02 Thread grigri
If you can assume that the settings in actsAs are valid, you can do this: class Photo extends AppModel { var $actsAs = array( 'Upload' => array('some' => 'settings') ); function save($data = null, $validate = true, $fieldList = array()) { // Prepare new config $config = array_m

Pagination within a model

2008-04-02 Thread rikdc
Hello, This is more a conceptual question. I thought the "best" place to perform a search on the database would have been within a model so a findBySearch() method exists. But this isn't too hot with linking in with the controller and pagination. Unless I had a Model->constructSearchParameters()

Re: beforeSave & behaviours

2008-04-02 Thread Sam Sherlock
but from where do I call the attach detach? here is what I am planning to try - read the setting of Upload behavior to an array - update the dir setting - detach the set behaviour - attach the modified one where do I use the attach / detach behaviour calls?? On 02/04/2008, grigri

Re: beforeSave & behaviours

2008-04-02 Thread grigri
Since the introduction of the behaviors collection, I don't think the code in that article will work as it relies on the behavior objects being properties of the model, which they aren't any more. Behaviors can be attached/detached at runtime with the `attach` and `detach` methods, but reconfigur

Re: beforeSave & behaviours

2008-04-02 Thread [EMAIL PROTECTED]
This might be useful to you. It allows you reconfigure the behaviours as well. http://www.sanisoft.com/blog/2007/06/26/attach-detach-behaviors-at-run-time-in-cakephp-models/ Simon http://www.simonellistonball.com/ --~--~-~--~~~---~--~~ You received this message be

Re: beforeSave & behaviours

2008-04-02 Thread Sam Sherlock
thanks for the information guys. On 02/04/2008, grigri <[EMAIL PROTECTED]> wrote: > > > Another thing, the actsAs array is only queried when the behavior > collection is created. Changing it won't (AFAIK) affect the already- > created behavior. Not 100% sure of the official method of configuring >

Re: retrieving aggregated data from the model

2008-04-02 Thread Chris Hartjes
On Sun, Mar 30, 2008 at 3:51 PM, acoustic_overdrive <[EMAIL PROTECTED]> wrote: > > What's the recommended way to use aggregate functions like SUM()? > > I'm building an accounting application that so far has three models: > > - Client hasMany Transaction > - Transaction hasMany TransactionItem

Re: beforeSave & behaviours

2008-04-02 Thread grigri
Another thing, the actsAs array is only queried when the behavior collection is created. Changing it won't (AFAIK) affect the already- created behavior. Not 100% sure of the official method of configuring at runtime. How about overriding the save method directly? class Photo extends AppModel {

Re: beforeSave & behaviours

2008-04-02 Thread [EMAIL PROTECTED]
Another way to do it is to write a behaviour which does the alteration and include that in the actsAs array before the upload behaviour. They are run in order, so the upload behaviour will see what your behaviour did. That way you don't need to mess with the 3rd party code. Simon http://www.simon

Re: beforeSave & behaviours

2008-04-02 Thread Sam Sherlock
yep just seen that. Guess that means no then can't be done. Unless customise the behaviour. I guess there is a reason for behaviors beforeSave being called before the models beforeSave On 02/04/2008, grigri <[EMAIL PROTECTED]> wrote: > > > Behavior beforeSave() callbacks are called before the

Re: mutliple domains on 1 site

2008-04-02 Thread TWIOF
Might be easier to do it in the app_controller with a statement to setect the appropriate layour via: var $layout = 'layout_name'; On Apr 2, 12:03 pm, Barry <[EMAIL PROTECTED]> wrote: > How do I set a different layout in the bootstrap.php file? > > On Apr 1, 1:02 pm, "Dardo Sordi Bogado" <[EMAIL

Re: beforeSave & behaviours

2008-04-02 Thread grigri
Behavior beforeSave() callbacks are called before the Model's beforeSave() callback. On Apr 2, 12:43 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > I have and Event Model that hasMany Photos > > I am using an upload behaviour and wish to save photos in a directory by the > event Slug > > the bel

Re: ajax->updater calls wrong action

2008-04-02 Thread da_student
and you're right with the asynchronous, thanx for that. is it possible, that i don't need the valScripts either? (works without right now, so I'll just give it a shot) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Help: is it feasible to use multiple .po files?

2008-04-02 Thread neeocis
Dear all, I am trying to figure out that is it possible and or feasible to use multiple .po files for each language like... /app/locale/eng/LC_MESSAGES/common.po /app/locale/eng/LC_MESSAGES/msgid_will_use_in_ctp_file1.po /app/locale/eng/LC_MESSAGES/msgid_will_use_in_ctp_file2.po - /app/loc

Re: ajax->updater calls wrong action

2008-04-02 Thread da_student
hey, thanks for your answer. but it didn't work either. I found out, that it has something to do with the variables, I'm handing over (like: controller/action/var). If I don't have a var, the link doesn't work, if I have one, it works. So my solution right now is to just call "\'../tasktable/1\'",

Setup Cake on Windows IIS server with other non-Cake sites

2008-04-02 Thread joeB
My company has just launched a new Cake website and things worked well (using Helicon ISAPI_rewrite on Windows 2003 server running IIS 6.0). Problem is we have legacy sites that also need to run on this server until I can get them implemented in Cake. I'm having problems setting up these non-cak

beforeSave & behaviours

2008-04-02 Thread Sam Sherlock
I have and Event Model that hasMany Photos I am using an upload behaviour and wish to save photos in a directory by the event Slug the below code is in the photo model the actsAs infor is updated but the new information is ignored function beforeSave() { $this->actsAs['Upload']['src'

Re: SSL enable for some site sections

2008-04-02 Thread djiize
you can setup a callback with: $this->Security->blackHoleCallback = 'switch2secure'; and in your controller: function switch2secure($param) { // param will be array('secure') in your case // redirect to https } On 2 avr, 11:49, Kusok <[EMAIL PROTECTED]> wrote: > I need to enable https for some

Re: break the code for controller file

2008-04-02 Thread [EMAIL PROTECTED]
You can't just include procedural functions in the middle of a class and expect them to be methods. Includes are not a pre-compiler directive. What you'll need to do is to define every function at least in your controller class file, then you could in theory include the contents of that function.

Re: mutliple domains on 1 site

2008-04-02 Thread Barry
How do I set a different layout in the bootstrap.php file? On Apr 1, 1:02 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > > Another more elegant, and much more Cakey approach would be to set the > > viewPaths in the bootstrap based on the $_SERVER['HTTP_HOST']. > > Or (still based on $_SE

Re: break the code for controller file

2008-04-02 Thread manuj bansal
I have tried it down by making simple php file (quality.php) and then add functions in quality.php from animals controller then i use include("quality.php") in animals controller but it doesn't work On Wed, Apr 2, 2008 at 4:12 PM, Adam Royle <[EMAIL PROTECTED]> wrote: > > Well, CakePHP is just re

Re: break the code for controller file

2008-04-02 Thread Adam Royle
Well, CakePHP is just regular PHP, so you can still do includes or whatever you want. What is your controller code doing that takes so many lines of code? Adam On Apr 2, 8:28 pm, mans <[EMAIL PROTECTED]> wrote: > but these functions are not reusable and I am also not interesting in > making comp

Re: mutliple domains on 1 site

2008-04-02 Thread TWIOF
Thanks Simon, I was arriving at this conclustion myself. I guess I'd use $_SERVER(http_host) to select $useDbConfig in the app model, and set a default files path in app controller. Managing the whole thing from a "root" user controll panel might be tricky. Unless when loged in as root you coul

Re: break the code for controller file

2008-04-02 Thread mans
but these functions are not reusable and I am also not interesting in making components. Is their not some solution like (as in simple php we use include or require) we made some file and include it in controller ? On Apr 1, 5:21 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > Well, two th

Re: mutliple domains on 1 site

2008-04-02 Thread Stephen Orr
For the database side all I use is a constructor DATABASE_CONFIG(), which checks whether or not the site is running on localhost. If it is, I use the settings I've previously defined in the file (following the same convention as the default setup). I'm working on expanding my overall concept at t

SSL enable for some site sections

2008-04-02 Thread Kusok
I need to enable https for some site sections. I am using the SecurityComponent::requireSecure to define the actions I need to be secured. The question now is how to switch from http to https when that action is triggered. So I have a login controller and an index action, when that action is hit w

Re: retrieving aggregated data from the model

2008-04-02 Thread grigri
> When listing transactions I also want to know the total value of each > and so I could do this with some SQL like this: > > SELECT > SUM(TransactionItem.amount), > Transaction.title > FROM transaction_items AS TransactionItem > LEFT JOIN transactions AS Transactio

Re: mutliple domains on 1 site

2008-04-02 Thread [EMAIL PROTECTED]
Another thing we use here is dirty hack includes in config files: This is my standard database.php file: Which we use to save having to mess about with config on deployment. A similar solution would work for TWIOF's case, and may be the simplest option. Simon http://www.simonellistonball.com/

Re: mutliple domains on 1 site

2008-04-02 Thread [EMAIL PROTECTED]
We did something a bit like this in the past. It wasn't actually based on host name, but could easily be adapted. Basically, we had a reporting application based on an externally populated database (proving Cake can even work - sort of - without the convention part and still be helpful). Each cus

Re: RSS feeds in cake

2008-04-02 Thread anupom
Hi Novice, The method 1 should work fine as well. Which Cake version are you using? On Mar 28, 2:35 am, "Novice Programmer" <[EMAIL PROTECTED]> wrote: > Hello Anupom, > > i tried this tutorial only.. method 2 works for me.. but i can't get method > 1 to work.. though finally i decided that metho

Re: mutliple domains on 1 site

2008-04-02 Thread TWIOF
I'm after a similar solution, however insted of a different look and feel for different sub-domains I have the following: One CMS managing similar mini sites (all same functionality), each with it's own db and static files (images, styles etc..). So using a separate apps dirs seems a little exes

Re: mutliple domains on 1 site

2008-04-02 Thread Barry
Thanks for all the help. The more I'm getting into cake the more I'm liking it. Would very much appreciate it if I could get hold of this code. Barry On Apr 1, 10:43 pm, Stephen Orr <[EMAIL PROTECTED]> wrote: > Sure thing. I'm pretty certain my method isn't optimal, but it does > work (and as a