Retrieving Posts with comments

2010-11-30 Thread Ernesto
Hello i have a simple app that's very similar to the cookbook Blog tutorial i want to retrieve all Posts having at least one comment. right now i'm doing this way: $posts = $this-Post-find(all, array(contain = array(Comment)); foreach ($posts as $index = $post) { if

Custom validation rules and saveAll

2010-09-30 Thread Ernesto
hello. i have 2 models Article hasMany Component in my Component model i wrote a custom validation rule that relies on data from Article model. how can i get this data? $this-Article-find doesn't work because that function loads data from the database.. and i need the going-to-be-saved data

cake flashing 2 different flash messages.

2010-09-06 Thread Ernesto
Hello. i have a problem that can't resolve. my app_controller::beforeFilter has a simple authorization script (ACL is a total overkill in my case) that returns errors via a flash() message. my CRUD actions are defined in app_controller but one controller doens't allow to delete items at all, so

How to determine if the current page is a Flash() or not

2010-09-03 Thread Ernesto
Hello. is there any way to determine if the current page is loaded by a controller::flash() call? i'm working in the controller::beforeRender(). Thx Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

SaveAll weird behavior

2010-07-12 Thread Ernesto
Hello. i have and app with 3 models, associated in this way class Item extends AppModel { var $name = Item; var $belongsTo = array(Category); var $hasMany = array( Fathers = array( className = Relationship,

Stuck with a validation rule in secondary model

2010-07-12 Thread Ernesto
Hello. i have 2 models - Item hasMany Part my Item::add() view is something like this echo $form-input(code); echo $form-input(description); echo $form-input(require_length); //this is a boolean input echo $form-input(require_width); //this is a boolean input echo $form-input(Part.0.id); echo

Re: Stuck with a validation rule in secondary model

2010-07-12 Thread Ernesto
i solved using Classregistry::getObject(Item); if there's any clever/lighter method let me know :P On 12 Lug, 17:04, Ernesto e.fanz...@gmail.com wrote: Hello. i have 2 models - Item hasMany Part my Item::add() view is something like this echo $form-input(code); echo $form-input

Cannot get this find() to work :(

2010-07-08 Thread Ernesto
Hello. i have this situation: Order hasMany Insertions hasOne Article i'm working in OrdersController i want lo load all Articles with at least one Insertion in a specific Order. results should also be sorted by Article.code how can i do? Check out the new CakePHP Questions site

two way encryption in CakePHP

2010-07-05 Thread Ernesto
Hello. is there any built-in function for crypt/decrypt strings? i've only found a component Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP

Need CSV import: best practices?

2010-06-30 Thread Ernesto
Hello. i need to import data from a CSV file in two of my app's model. what's the best place to code the import routine? - a behavior - a vendor class - appModel Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this

Re: need a little help with my OrderingComponent

2010-06-18 Thread Ernesto
wrote: I would think that maybe initialize is too early! Have you tried to move it to the startup, which is invoked after beforeFilter()? I do all my component processing in the startup, only saving settings in the initialize method. Enjoy,    John On Jun 17, 1:07 pm, Ernesto e.fanz

need a little help with my OrderingComponent

2010-06-17 Thread Ernesto
Hello. i just wrote a simple component that keeps track of latest user's sorts in every index view of every controller in my app for example if an user sorts Orders by date_created (default is code) the component will write in session - the page the user was viewing - the sort field - the sort

Auth with dynamic homepage

2010-06-14 Thread Ernesto
Hello. i have a simple app using AuthComponent. this app has a lot of -flash and -redirect, most of them pointing to / is there any way i can modify the dispatcher homepage? this will avoid 2134343 conditions in every flash or redirect. i'm using cake 1.3.2 Check out the new CakePHP Questions

Paginator, belongsTo and a model using data from an external DB

2010-05-31 Thread Ernesto
hello. my app has 3 models: - Order belongsTo Shipment - Order belongsTo Customer Customer data is retrieved from an external DB (customers are shared across other non-php apps) i'm trying to paginate results from Order::index(); when i order by Customer.name cake throws some SQL errors. i

model::updateAll not triggering model::beforeSave

2010-05-28 Thread Ernesto
Hello. i noticed that model::updateAll isn't triggering model::beforeSave is this a bug or an intended behavior? alternatives? (right now i switched to model::save) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received

Re: 404 error since updating to 1.3

2010-05-26 Thread Ernesto
same problem here. rolled back to RC4 :) On 26 Mag, 12:24, Ed Propsner crotchf...@gmail.com wrote: I just updated to 1.3 stable from RC4 yesterday and I've been having the same exact problem (amongst a few others) ever since. I have to toy with it some more but it seems to only happen when

Re: 404 error since updating to 1.3

2010-05-26 Thread Ernesto
are you guys using SecurityComponent? On 26 Mag, 16:05, Ernesto e.fanz...@gmail.com wrote: same problem here. rolled back to RC4 :) On 26 Mag, 12:24, Ed Propsner crotchf...@gmail.com wrote: I just updated to 1.3 stable from RC4 yesterday and I've been having the same exact problem

Re: render a different element for different user groups

2010-05-19 Thread Ernesto
{     echo $this-element(... user version ...); } ...Brenda On May 18, 8:10 am, Ernesto e.fanz...@gmail.com wrote: Hello. i have 3 elements standard_leftbar, admin_leftbar and customer_leftbar. is there any smart way to render one of those elements in my view, based on User's

render a different element for different user groups

2010-05-18 Thread Ernesto
Hello. i have 3 elements standard_leftbar, admin_leftbar and customer_leftbar. is there any smart way to render one of those elements in my view, based on User's group_id, provided by the Auth component? sry for my bad english bye Check out the new CakePHP Questions site http://cakeqs.org and

Currently logged user in Cake 1.3 Final

2010-05-14 Thread Ernesto
Hello. is there any way to retrieve the currently logged user in CakePHP 1.3? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: Currently logged user in Cake 1.3 Final

2010-05-14 Thread Ernesto
server based admin point of view) or display information about 'me' when I am logged in? The latter is achieved by looking inside $this-Auth-user(); Jeremy Burns jeremybu...@me.com On 14 May 2010, at 13:51, Ernesto wrote: Hello. is there any way to retrieve the currently logged user

Re: Currently logged user in Cake 1.3 Final

2010-05-14 Thread Ernesto
found it! lol :D On 14 Mag, 15:26, AD7six andydawso...@gmail.com wrote: On May 14, 3:18 pm, Ernesto e.fanz...@gmail.com wrote: i mean display information about 'me' when I am logged in :) sry for my engRish lol btw i pr'ed $this-Auth from one of my controllers but there's no User var

At least one related record condition

2010-05-04 Thread Ernesto
Hello. is there any simple way to implement the At least one related record conditions to Cake model's associations? for example: i have an Order model hasMany Items. an order cannot be empty. it must contain at least one item (i.e. related record) Check out the new CakePHP Questions site

Re: saveAll rolling back my transactions

2010-03-29 Thread Ernesto
myISAM. i'll check OrderControllers validation errors On 26 Mar, 16:18, Lucca Mordente luccamorde...@gmail.com wrote: Maybe your database table engine does not support transactions. What engine are you using? Lucca Mordente On 26 mar, 09:28, Ernesto e.fanz...@gmail.com wrote: Hello

saveAll rolling back my transactions

2010-03-26 Thread Ernesto
Hello. i have 2 models (Item and Order) joined together by a HABTM relationship. since i need some additional fields (quantity) in the join table i splitted the HABTM in 2x hasMany. after that i coded a Order add form wich gives me this data array Array ( [Order] = Array (

possible bug with virtualFields

2010-03-10 Thread Ernesto
Hello. i have a simple app running 2 models Order hasMany Item Item belongsTo Order the code field in in both models but in ItemModel this is a virtual field var $virtualFields = array(code = CONCAT(Order.code, '-', Item.n)); here's the problem: $myItem = $this-Item-find(all, array(

updateAll problem in 1.3RC1

2010-03-10 Thread Ernesto
Hello $this-Order-updateAll(array(date_purchase = date(Y-m-d H:i:s)), array(id = $order_id)); throws this error Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '16:31:34 WHERE

check if a view file exists

2010-02-19 Thread Ernesto
Hello. is there a way to check if a view file ([view].ctp) exists? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

Various errors with virtualFields (1.3Beta)

2010-02-08 Thread Ernesto
Hello. i have 2 models. Items belongsTo Order Item has a virtualField defined as CONCAT(Order.code, '-', REPEAT('0', 3 - LENGTH(Item.id)), Item.id) this setup is giving me a lot of errors during finds from Item model. Some examples: $this-Item-hasAny(color = red) gives me unknown column

get model id by a set of conditions

2010-02-08 Thread Ernesto
Hello. i'm looking for a function that gets the id from a given set of conditions. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post

virtual fields are giving me errors (1.3Beta)

2010-02-02 Thread Ernesto
Hello. i have 2 models: Order hasMany Item. - the hasMany has the option dependent set to TRUE. - Item model has a virtual field defined like this: var $virtualFields = array(barcode = CONCAT(Order.code, REPEAT('0', 10 - LENGTH (Item.code)), Item.code)); when i delete an order cake will attempt

need some help with a select

2010-02-01 Thread Ernesto
Hello. i need a select box, wrapped in his div class='input select' div and with blank first entry $form-input() --- the select didn't have the empty field $form-select() --- the select wasn't wrapped in his DIV any suggestion? ps: i'm using Cake 1.3Beta Check out the new CakePHP Questions

Re: need some help with a select

2010-02-01 Thread Ernesto
wanted? Jeremy Burns jeremybu...@me.com (Skype) +44 208 123 3822 (jeremy_burns) (m) +44 7973 481949 (h) +44 208 530 7573 On 1 Feb 2010, at 09:42, Ernesto wrote: Hello. i need a select box, wrapped in his div class='input select' div and with blank first entry $form-input

Re: Non-database fields in view

2010-01-20 Thread Ernesto
try this in view $form-input(something_1); $form-input(something_2); in controller action if (!empty($this-data)) { $something_1 = $this-data[$this-modelClass][something_1]; // first field $something_2 = $this-data[$this-modelClass][something_2]; // second field } On 20 Gen, 00:49,

Re: fetch data from 2 tables through cake pattern

2010-01-20 Thread Ernesto
from wich controller are you fetching data? users or details? PS: i suggest you to follow cake's db conventions On 19 Gen, 06:33, John sign.gro...@gmail.com wrote: Hello I have two tables that is users and details. i want to fetch data from these 2 . i am getting details.id through which i

Problem with Paginator

2010-01-20 Thread Ernesto
Hello. i have 2 models linked together with a simple hasMany relationship. Customer hasMany Order // Order belongTo Customer Customers are stored in an external DB so the Customer model uses a different DB connection now... i coded 2 views: customers/index and orders/index - customers/index.

Re: CakePHP 1.3-beta has landed

2010-01-18 Thread Ernesto
Virtual Fields = /love @ Cake's dev team :P On 17 Gen, 05:25, mark_story mark.st...@gmail.com wrote: The CakePHP development team is happy to announce the release the CakePHP 1.3-beta. We've been hard at work implementing new features and fixing issues in existing features in the 1.3 branch.  

adding/updating additional fields in HABTM's join table

2010-01-18 Thread Ernesto
Hello. as the title says is there any way to add/update additional fields in HABTM's join table? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups

shared CSS and Imgs in CakePHP 1.3 Beta

2010-01-18 Thread Ernesto
Hello. every app on my server is using some shared css or images. those files are stored in localhost/shared_items/vendors/css or localhost/shared_items/vendors/images every app has the additional vendors path defined in bootstrap.php this morging i migrated from 1.3 Alpha to 1.3 Beta now...

Re: CakePHP 1.3-beta has landed

2010-01-18 Thread Ernesto
Where should i put my shared Css' and images? (i have a single-core, multi-app environment). before 1.3Beta i was using an additiona vendors path but now it isn't working :( PS: link [7] is broken On 18 Gen, 15:04, Celso cels...@gmail.com wrote: Is there a approximate date for the final cakephp

Re: CakePHP 1.3-beta has landed

2010-01-18 Thread Ernesto
plugin (in new plugin webroot folder)? On Jan 18, 3:12 pm, Ernesto e.fanz...@gmail.com wrote: Where should i put my shared Css' and images? (i have a single-core, multi-app environment). before 1.3Beta i was using an additiona vendors path but now it isn't working :( PS: link [7

Forms: HABTM with additional fields in join table

2010-01-13 Thread Ernesto
Hello. Person HABTM Training i'm coding the Person::add and Person::edit views there's plenty of examples/tutorials wich explains how to code an HABTM form... but unfortunately none of them explains how to add additional information in the join table (in my case who_added_this_relationship,

Re: weird problem with paginator (Cake 1.3)

2009-12-23 Thread Ernesto
the problem. Paginator doesn't load my table even if the relationship is correctly defined in contain subarray and containable is loaded. sry for my very bad eng. -Ernesto On 22 Dic, 15:11, mark_story mark.st...@gmail.com wrote: Well since you can't join across connections, that kind of makes sense

Re: weird problem with paginator (Cake 1.3)

2009-12-22 Thread Ernesto
it looks like Paginator in 1.3 has a bug - he's ignoring the models using different DB connection can anyone confirm this? On 21 Dic, 17:08, Ernesto e.fanz...@gmail.com wrote: hello. my webapp has 3 models: Order, Item and Customer Order belongsTo Item Order belongsTo Customer both

weird problem with paginator (Cake 1.3)

2009-12-21 Thread Ernesto
hello. my webapp has 3 models: Order, Item and Customer Order belongsTo Item Order belongsTo Customer both OrderModel and ItemModel are in app's models dir. CustomerModel is located in an external dir, defined in bootstrap.php's app build here's a piece of my OrdersController class

Re: global varijable

2009-12-14 Thread Ernesto
uhm... i place my bet: add the variable in bootstrap.php avoid any mod @ cake's core like pest. On 14 Dic, 08:58, mike karthauser mi...@brightstorm.co.uk wrote: You can either set a variable in app_controller or add a define to   core which will apply globally Mike Karthauser Brightstorm

global functions

2009-12-10 Thread Ernesto
Hello. i have some simple functions such as array_depth array_width array_integrate and so on that are used in both Controllers and Views. it's very uncomfortable to copy them in a helper and in a component @ every little mod. is there any clever way to manage these funcs? Check out the new

Re: global functions

2009-12-10 Thread Ernesto
i created a php file with all the functions needed and then i loaded it in my bootstrap.php using php's include() it's working ok now On 10 Dic, 15:38, Fran Iglesias cakephpi...@gmail.com wrote: Hi, El 10/12/2009, a las 14:32, Ernesto escribió: it's very uncomfortable to copy them

Re: Html entities

2009-12-02 Thread Ernesto
i solved the problem. the culprit was the Sanitize class On 2 Dic, 11:49, euromark dereurom...@googlemail.com wrote: if you used utf8 correctly, it would not do that... On 2 Dez., 08:55, Ernesto e.fanz...@gmail.com wrote: Hello. i have a controller, a model and the usual add/remove

Html entities

2009-12-01 Thread Ernesto
Hello. i have a controller, a model and the usual add/remove/edit views in the add view i have a simple form. here's the code echo $form-input(Items.0.code); echo $form-input(Items.0.description); echo $form-input(Items.1.code); echo $form-input(Items.1.description); echo

managing the missing argument errors

2009-11-30 Thread Ernesto
hello. is there any clever (simple?) way to manage the missing argument error? for example: if i call directly from the browser's address bar an url like this http://localhost/cake/myapp/myctrl/edit/; (please note the missing id) PHP will prompt me an error like this Warning (2): Missing

Re: managing the missing argument errors

2009-11-30 Thread Ernesto
similar to my approach. too many ifs in my controllers. On 30 Nov, 09:20, Fran Iglesias cakephpi...@gmail.com wrote: Hi, El 30/11/2009, a las 9:16, Ernesto escribió: but that's unconfortable... My approach: in controller... function edit($id = null) {         if (!$id

Apps_Controller and Apps_Model

2009-11-30 Thread Ernesto
hello. i have a multi-app environment wich is working ok. some apps are very similar each other. is it possible to create a class like Apps_Controller (or Apps_Model) and share it across many apps? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Re: need a little help with model::saveAll function

2009-11-25 Thread Ernesto
;                                 }                         }                 }         } ... } On Nov 24, 4:28 pm, Ernesto e.fanz...@gmail.com wrote: A - i already have a routine that *should* to that... but it isn't working properly. here's the code function beforeValidate

need a little help with model::saveAll function

2009-11-23 Thread Ernesto
hello i have a form like this: echo $form-create(Order); echo $form-input(code) for($i=0,$i10,$i++) { echo $form-input(Item.$i.code); echo $form-input(Item.$i.quantity); } echo $form-end(); i'm saving this form using saveAll with validate option set to first problems: A - user can

how do you show validation errors in multi-model form?

2009-11-23 Thread Ernesto
Hello. i have a form like this one: echo $form-create(Order); echo $form-input(code) for($i=0,$i10,$i++) { echo $form-input(Item.$i.code); echo $form-input(Item.$i.quantity); } how do you show errors if more than 1 row fails validation? div @ the end of the form? -- You received

Re: need a little help with model::saveAll function

2009-11-23 Thread Ernesto
is there any example? i can't figure out where and when loop through $this-data On 23 Nov, 20:52, Marcelo Andrade mfandr...@gmail.com wrote: On Mon, Nov 23, 2009 at 12:29 PM, Ernesto e.fanz...@gmail.com wrote: (..) A - user can insert just 2 or 3 rows, it's not necesasry to fill all

containable + model::order

2009-11-12 Thread Ernesto
Hello. i have 3 models - Item - Batch - Person Item belongsTo Batch Item belongsTo Person both Item and Batch models have var $order = code i'm retrieving data from ItemsController using containable $this-Item-find(all, array(contain = array(Batch, Person))); i'm getting a SQL Error 1052:

Strange FormHelper behavior

2009-09-29 Thread Ernesto
Hello. here's some code from my view ?php echo $this-here; echo $form-create(null, array(url = $this-here)); ? the first echo outputs this: /cakephp/development/apps/myapp/package/add and here's the output from form::create form method='post'

Re: Strange FormHelper behavior

2009-09-29 Thread Ernesto
after some test i found a working solution. echo $form-create(null, array(url = str_replace($this-base, , $this-here))); it isn't beautiful but... it works. On 29 Set, 14:49, Ernesto e.fanz...@gmail.com wrote: Hello. here's some code from my view ?php echo $this-here; echo $form

Need little help with cake image paths

2009-09-28 Thread Ernesto
Hello. i'm in a multi-app environment and my images could be in app/webroot/ img or shared_items/vendors/img when i use HtmlHelper i write only the img's name... and then cake searches for it in every img folder. is there any way to get the resultant path? i need it in TCPDF's image method

Looking for inspiration (multi-step data add)

2009-09-18 Thread Ernesto
Hello. Supplier hasMany Product 1st step: - user chooses the Supplier 2nd step: - only products supplied by Supplier selected in step 1 are loaded in a select - use chooses wich product has arrived. Also Quantity and Weight fields are needed. 3rd step: - in this step a PDF file is embedded in

Re: $model-find(list) and concatenated fields

2009-09-17 Thread Ernesto
($data){  return $data['MODELNAME']['code'].' '.$data['MODELNAME'] ['description']; } note: change MODELNAME rightly On Sep 16, 3:51 pm, Ernesto e.fanz...@gmail.com wrote: Hello. i have a model that's using a simple 3-columns table item_id code description i want

Re: $model-find(list) and concatenated fields

2009-09-17 Thread Ernesto
BTW this feature should be built-in in Cake On 17 Set, 13:46, Ernesto e.fanz...@gmail.com wrote: u mean this? http://teknoid.wordpress.com/2008/09/04/findlist-with-three-or-combin... very good article. thx On 17 Set, 13:10, Thiago Nuic Vidigal tvidi...@gmail.com wrote: teknoid has

$model-find(list) and concatenated fields

2009-09-16 Thread Ernesto
Hello. i have a model that's using a simple 3-columns table item_id code description i want to obtain a select box that shows the fields code and description concatenated. right now i'm using a foreach loop foreach ($items as $key = $item) $selectArray[$key] = $item[code] . - .

Re: Containable ignoring model::order?

2009-09-09 Thread Ernesto
find call works ok i was just wondering why Containable is ignoring my model::order. On 9 Set, 05:20, brian bally.z...@gmail.com wrote: On Tue, Sep 8, 2009 at 7:35 PM, Ernestoe.fanz...@gmail.com wrote: y sorry i forgot it i'm using the italian translation of Date as field name

Containable ignoring model::order?

2009-09-08 Thread Ernesto
hello. i have several models associated together. i'm getting data using Containable. 2 models have $order = array(Date) Containable is ignoring this. everything else is working ok. is there something i'm missing (other than a good english teacher :P) ?

Re: Containable ignoring model::order?

2009-09-08 Thread Ernesto
y sorry i forgot it i'm using the italian translation of Date as field name (Data). this fields isn't the record's creation date but a date in a nearly future. i checked cases and typos... noone found. On 8 Set, 18:10, brian bally.z...@gmail.com wrote: Is the column name Date (or date)? It

Re: Menus best practice

2009-09-07 Thread Ernesto
$this-renderLayout('div id=container'.$content_for_layout.'/ div','base_layout'); As you can see this is a strictly hierarchal russian doll thing. On Sep 4, 4:37 pm, Ernesto e.fanz...@gmail.com wrote: hello. i have an element that contains a simple menu i can't put this menu in the layout

Cake looking for css controller?

2009-09-04 Thread Ernesto
Hello. i'm having troubles with one of my cake apps basically the app won't load any css. if i copy/paste css link in browser's address bar cake returns an error page like this: Missing Controller Error: CssController could not be found. Error: Create the class CssController below in file:

Re: Cake looking for css controller?

2009-09-04 Thread Ernesto
in the webroot. Depending on your Apache version you might be able to do this: RewriteRule ^/?((img|js|css|swf)/.*)$ - [R=404] Which makes more sense, but some versions don't allow it. This greatly helps in debugging issues like this. hth grigri On Sep 4, 9:20 am, Ernesto e.fanz

Menus best practice

2009-09-04 Thread Ernesto
hello. i have an element that contains a simple menu i can't put this menu in the layout because the layout file is shared across many apps my goal is to show the menu in every view of my app. any idea? --~--~-~--~~~---~--~~ You received this message because

get current MySQL version

2009-07-23 Thread Ernesto
hello. how can i get current MySQL version? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

load a CSS file if DEBUG 0

2009-07-13 Thread Ernesto
Hello. i've coded a simple css file that helps me display the Cake's SQL log. this css needs to be loaded only when debug 0. how can i do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: load a CSS file if DEBUG 0

2009-07-13 Thread Ernesto
same way i'm using. what about load this css from App_Controller? On 13 Lug, 10:15, Andreas Derksen andreasderk...@arcor.de wrote: Hi, i do: if( Configure::read('debug')0) echo $html-css('debug'); else ''; in my layouts head. greets Andreas Ernesto schrieb: Hello. i've coded

Re: load a CSS file if DEBUG 0

2009-07-13 Thread Ernesto
y u're right. thx for help. On 13 Lug, 11:15, Andreas Derksen andreasderk...@arcor.de wrote: hi, what would be the point of doing so? besides, i think view things belong to the view part of mvc :) greets Andreas Ernesto schrieb: same way i'm using. what about load this css from

Disable an helper from a controller action

2009-07-13 Thread Ernesto
Hello. i have a controller with some actions: - index - add - delete - pdfreport i want to disable the TidyHelper in pdfreport action 'cause it will break my pdf. is there any way to do that? --~--~-~--~~~---~--~~ You received this message because you are

Re: some simple Helpers how-tos

2009-07-09 Thread Ernesto
); On Jul 8, 5:22 pm, Ernesto e.fanz...@gmail.com wrote: Hello. 2 simple questions about helpers: A - how can i retrieve the current layout name from inside an helper? B - myHelper class has a global variable called enabled. Is there any way to set myHelper::enabled = false from a controller

Re: Problem with cake and HTML encoding

2009-07-09 Thread Ernesto
i still haven't find a solution... i pr-ed $this-data in model::beforeSave. everything looks correct. this could be a MySQL-related issue :( On 8 Lug, 17:18, Ernesto e.fanz...@gmail.com wrote: this app is a very simple app. It is composed by a single controller, two layouts and 5 views

Re: Problem with cake and HTML encoding

2009-07-09 Thread Ernesto
towards the model. Check in the controller, then the Model. Hopefully you will find where thing do crazy. My guess is either in the initial output to the form, or in the post back to Cake. On Jul 9, 11:05 am, Ernesto e.fanz...@gmail.com wrote: i still haven't find a solution... i pr

Re: Problem with cake and HTML encoding

2009-07-09 Thread Ernesto
. (then again, the minus-sign should be generic enough to pass untouched). Sorry, just ramblings. I havent investigated the details. I just figured I'd better set everything to the same encoding to avoid further problems (and oh boy did I have problems at one point). On Jul 9, 3:02 pm, Ernesto

Re: Problem with cake and HTML encoding

2009-07-09 Thread Ernesto
no, i'm not using sanitize On 9 Lug, 17:01, mehodgson mehodg...@gmail.com wrote: Are you using the Sanitize component on your data?  If you are you and you use the clean() function you may need to set encode=false. On Jul 8, 6:15 am, Ernesto e.fanz...@gmail.com wrote: Hello. i'm

Re: Problem with cake and HTML encoding

2009-07-09 Thread Ernesto
Hurray everything's working!!! i changed the entire DB charset/collations to UTF-8 and added defaultCharSet = UTF-8 to my PHP.ini tonight i'll be veeery drunk :) On 9 Lug, 17:07, Ernesto e.fanz...@gmail.com wrote: Yes the data is being saved but with -00-00 00:00:00 value On 9 Lug

Re: Poll: What do you build with CakePHP?

2009-07-08 Thread Ernesto
Hosted Applications On 8 Lug, 11:04, Martin Westin martin.westin...@gmail.com wrote: I was wondering what type of apps you all build? Mainly, do you mostly build: 1. hosted applications (e.g. Bakery, TheChaw, Backpack...), hosted in a single place where every user has an account in the same

Problem with cake and HTML encoding

2009-07-08 Thread Ernesto
Hello. i'm having some troubles with cake. here's my this-data array Array( [id] = 30 [date] = 2009-11-23 ) here's a piece of my SQL dump UPDATE `table` SET `id` = 30, `date` = '2009#45;11#45;23' WHERE `table`.`id` = 30 why is cake de-coding the - in date???

Re: Problem with cake and HTML encoding

2009-07-08 Thread Ernesto
DateTime default = null null field On 8 Lug, 15:20, Alastair m...@alastairmoore.com wrote: On Jul 8, 2:15 pm, Ernesto e.fanz...@gmail.com wrote: Hello. i'm having some troubles with cake. here's my this-data array Array(         [id] = 30         [date] = 2009-11-23

Re: Problem with cake and HTML encoding

2009-07-08 Thread Ernesto
saves one DateTime. On 8 Lug, 16:48, Robert P shiftyrobs...@gmail.com wrote: There are a lot of resulting steps between you passing in your data and the resulting SQL being queried. Please provide some more information and code examples. On Jul 8, 9:33 pm, Ernesto e.fanz...@gmail.com wrote

some simple Helpers how-tos

2009-07-08 Thread Ernesto
Hello. 2 simple questions about helpers: A - how can i retrieve the current layout name from inside an helper? B - myHelper class has a global variable called enabled. Is there any way to set myHelper::enabled = false from a controller? --~--~-~--~~~---~--~~ You

Re: CakePHP and the new MS SQL 2005/2008 Driver for PHP

2009-07-07 Thread Ernesto
i have 2000.80.194.0 On 6 Lug, 16:58, Robert Edeker idxma...@gmail.com wrote: What dll version is that?  The one I have is 2000.2.8.0 .  Although I've read reports of the updated driver not being reliable. On Mon, Jul 6, 2009 at 10:51 AM, Ernesto e.fanz...@gmail.com wrote: Hello. i

Strange date behavior

2009-07-07 Thread Ernesto
hello. here's my function function addDate ($id) { $this-data[order_id] = $id; $this-data[myDate] = date(Y-m-d); pr ($this-data); $this-Order-save($this-data); } here's the pr output Array( [order_id] = 1839 [myDate] = 2009-07-07 ) and here's a

Re: Strange date behavior

2009-07-07 Thread Ernesto
a sanitation problem... Did you tell cake in any part of your application to escape into html entities? It seems to be screwing up with something and turning the - into the html entity #45; 2009/7/7 Ernesto e.fanz...@gmail.com hello. here's my function function addDate ($id

Re: CakePHP and the new MS SQL 2005/2008 Driver for PHP

2009-07-06 Thread Ernesto
Hello. i recently developed a CakePHP app using MSSQL 2005 as DB. i updated ntwdblib.dll in apache/bin (and in php/bin also) directory and now cake's mssql driver is working fine :) On 6 Lug, 16:09, idx idxma...@gmail.com wrote: Hello,

Containable grabbing empty data

2009-07-03 Thread Ernesto
Hello Item belongsTo Order belongsTo Customer. i'm grabbing data from Items Controller. i need all items having Weight 10 and Order.Date = $date i also need to know who ordered that item. here's my code $date = date(Y-m-d); $this-Item-find(all, array( conditions =

Read-Only app

2009-06-30 Thread Ernesto
Hello i'm baking a read-only app. This app shouldn't save any kind of data. here's my bet ?php class AppModel extends Model { function beforeSave ($options = array()) { return false } } ? is there any faster/cleaner/better/safer way?

css sharing not working.

2009-06-29 Thread Ernesto
Hello. i'm having some troubles with css sharing. my cake folder tree looks like this cake apps app_1 webroot //note: this folder is empty app_2 webroot //note: this folder is empty shared_items views vendors css test.css

load css from a subfolder by default

2009-06-29 Thread Ernesto
Hello. is there any way to load css files from a subfolder by default? --~--~-~--~~~---~--~~ 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

Re: load css from a subfolder by default

2009-06-29 Thread Ernesto
hi Vijay. Thx for the response. i'm looking for a method to change the default css folder. your code surely works but that's not exactly what i'm looking for :) On 29 Giu, 15:05, Vijay Kumbhar k.vidn...@gmail.com wrote: Hello Ernesto, You can use the following code,if your css file

Need help with my TidyHelper

2009-06-27 Thread Ernesto
Hello. i have this little helper that works ok with standard HTML pages but it screws up all my PDF reports class TidyHelper extends AppHelper { function __construct() { ob_start(); } function __destruct() { $output = ob_get_clean();

Cake function that does Model.Field to $array[Model][Field]

2009-06-26 Thread Ernesto
Hello i can't find the CakePHP's built-in function that does Model.Field to $array[Model][Field] i'll use that function in a Helper. is that correct? better ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Cake function that does Model.Field to $array[Model][Field]

2009-06-26 Thread Ernesto
Giu, 13:46, Eric Silva eric.kuru...@gmail.com wrote: $array[Model][*f*ield] ?? -- Eric Silva On Fri, Jun 26, 2009 at 8:37 AM, Ernesto e.fanz...@gmail.com wrote: Hello i can't find the CakePHP's built-in function that does Model.Field to $array[Model][Field] i'll use that function

<    1   2   3   >