Re: Wap Applications

2009-04-10 Thread Alfredo Quiroga-Villamil
Alejandro: This might come in handy: http://api.cakephp.org/class/request-handler-component#method-RequestHandlerComponentisMobile Regards, Alfredo On Fri, Apr 10, 2009 at 1:44 PM, alejan...@pixelestudios.com wrote: Anyone with experience on WAP aplications based on Cakephp framework?

Re: Auth with legacy database

2009-04-06 Thread Alfredo Quiroga-Villamil
Perhaps one way to do it. Take a look at: http://api.cakephp.org/class/auth-component#method-AuthComponentisAuthorized Property: authorize Method: isAuthorized Regards, Alfredo On Mon, Apr 6, 2009 at 3:36 PM, Mauricio Tellez mauricio.tel...@gmail.com wrote: Hi, I'm building a cake app

Re: AuthComponent and AJAX Requests to another Controller

2009-04-03 Thread Alfredo Quiroga-Villamil
How are you defining you layout for the methods? Do you have ? $this-layout = 'ajax'; Regards, Alfredo On Fri, Apr 3, 2009 at 8:30 PM, Aurelius aurel...@temporaryinbox.com wrote: I already tried making the Blogs/edit/ Output static (in the edit.ctp- file is only I'm working), the

Re: Exporting large Objects to static objects

2009-04-01 Thread Alfredo Quiroga-Villamil
Marcus: How do the users consume/utilize the categories? Are they presented with a drop down menu from which they can select categories? How does the user sees the category? Assuming the user is presented with for example a combo box or something along those lines from which they can select,

Re: HTMLHELPER

2009-04-01 Thread Alfredo Quiroga-Villamil
En el API yo solo veo charset. http://api.cakephp.org/class/html-helper#method-HtmlHelpercharset Aparentemente estas llamando el metodo equivocado. Saludos, Alfredo On Wed, Apr 1, 2009 at 3:44 PM, jotaBKM jorgegodoyvene...@gmail.com wrote: amigos me sale el siguiente error Warning (512):

Re: Useing different database for the different actions

2009-03-30 Thread Alfredo Quiroga-Villamil
Pippo: I've never done this or even thought about how to do it; so there might be a better way to accomplish what you want. Perhaps what I am about to tell you might not be a valid solution; but one thing that comes to mind is the following: Assuming that what you want is to read from one DB

Re: Useing different database for the different actions

2009-03-30 Thread Alfredo Quiroga-Villamil
Yep, even better. Tx Martin. On Mon, Mar 30, 2009 at 2:54 PM, Martin Westin martin.westin...@gmail.com wrote: I think this is what you are looking for http://bakery.cakephp.org/articles/view/load-balancing-and-mysql-master-and-slaves-2 On Mar 30, 6:28 pm, Alfredo Quiroga-Villamil laww

Re: Ajax gone after redirect

2009-03-26 Thread Alfredo Quiroga-Villamil
Stu: There is one thing that I forgot to ask you. Can you describe exactly what you want to happen when you click on one of the links for example. I am thinking you have this, keep me honest here: Menu Link-1 Link-2 Link-3 Clicking Link-X will send an AJAX request to the backend. Is that

Re: Ajax gone after redirect

2009-03-26 Thread Alfredo Quiroga-Villamil
are likely handling that in the php side of things now. Hope that helps. Regards, Alfredo On Thu, Mar 26, 2009 at 10:02 AM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: Stu: There is one thing that I forgot to ask you. Can you describe exactly what you want to happen when you click on one

Re: Ajax gone after redirect

2009-03-26 Thread Alfredo Quiroga-Villamil
Stu: If you can, just set your links to be standard links that send get requests, then the re-direction should work fine using php(cakephp). If it's imperative for you to have the request sent to the backend as an ajax request, then you'll have to setup a callback for each of the ajax requests

Re: Ajax gone after redirect

2009-03-25 Thread Alfredo Quiroga-Villamil
Typically ajax related issues of that nature tend to be related to your security level. Check your cake config file and make sure your security level is not set to high. Regards, Alfredo On Wed, Mar 25, 2009 at 11:42 AM, Stu greenmushroo...@gmail.com wrote: Hi, Ive recently moved my

Re: Message users in Cake

2009-03-25 Thread Alfredo Quiroga-Villamil
This usually goes hand-in-hand with some privacy. In most cases you will only want users who are buddies to be able to send messages to each other. In other words, you would need a buddy system, which will complicate things a bit more but would make your application a little bit more robust. If

Re: Ajax gone after redirect

2009-03-25 Thread Alfredo Quiroga-Villamil
Def. please post your findings once you figure it out. I'm really puzzled now. Regards, Alfredo On Wed, Mar 25, 2009 at 2:54 PM, Stu greenmushroo...@gmail.com wrote: Oh do I wish it was only that, hehehe. Yeah, I'm starting to think that some routing code is overriding the ajaxHelper

Re: Ajax gone after redirect

2009-03-25 Thread Alfredo Quiroga-Villamil
Ummm, This seems like a trivial question but have you checked and made sure that the ajax helper is added to the controller or all your controllers by adding it to AppController? On Wed, Mar 25, 2009 at 1:24 PM, Stu greenmushroo...@gmail.com wrote: Thx for the reply Alfredo I checked it

Re: Javascripthelper + Cake in a subfolder

2009-03-24 Thread Alfredo Quiroga-Villamil
Under the js directory place extjs-xx. I think that's how you have it now. In your layout: !-- Start ExtJs -- ?php echo $javascript-link('ext-2.2/adapter/ext/ext-base'); ? ?php echo $javascript-link('ext-2.2/ext-all-debug'); ? ?php echo

Re: Loading time of my cakephp website

2009-03-20 Thread Alfredo Quiroga-Villamil
Same here, I also used Firebug = Inspect Element = Net and all the images seem to be small with small loading times, all in the range of milliseconds. You can also try catching the images to speed things up assuming you are not doing it already; but for the most part things looked good like Miles

Re: Sharing CAKEPHP Session with external app on a different virtual host

2009-03-19 Thread Alfredo Quiroga-Villamil
One way that might help you accomplish this is by storing them in a DB. See: http://book.cakephp.org/view/173/Sessions Regards, Alfredo On Thu, Mar 19, 2009 at 8:07 AM, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: My question is this? How can I sharing CAKEPHP Session with

Re: Sharing CAKEPHP Session with external app on a different virtual host

2009-03-19 Thread Alfredo Quiroga-Villamil
/CakePHP-tutorial-no-4-from-IBM Regards, Alfredo On Thu, Mar 19, 2009 at 10:31 AM, byqsri marco.rizze...@gmail.com wrote: Ok thanks. I save on DB my session but then how can I do decide which is the right session in the external app? On Mar 19, 3:27 pm, Alfredo Quiroga-Villamil laww

Re: Recursive Association joins n-levels deep

2009-03-18 Thread Alfredo Quiroga-Villamil
Really good stuff. I really like the approach. It seems clean and concise. Alfredo On Wed, Mar 18, 2009 at 11:10 AM, lloydhome david.lloydh...@gmail.com wrote: Considering all of the new features in CakePHP 1.2, I have rewritten my Recursive Query support code to be completely encapsulated

Re: Keeping session alive when loading images from database

2009-03-17 Thread Alfredo Quiroga-Villamil
From core.php CakePHP session IDs are also regenerated between requests if 'Security.level' is set to 'high'. That's expected behavior. Setting it to medium is what I've done in my app since I make heavy use of concurrent ajax calls. Regards, Alfredo On Tue, Mar 17, 2009 at 2:03 PM, Daffy

Re: Keeping session alive when loading images from database

2009-03-17 Thread Alfredo Quiroga-Villamil
Ummm, not that I know of. Regards, Alfredo On Tue, Mar 17, 2009 at 2:38 PM, Daffy jon.bennet...@gmail.com wrote: Thanks for your swift response. I'm still relatively new to Cake so this might be a stupid question, but, is it possible to tell CakePHP to use a medium security for one section

Re: Overloading AppModel constructor

2009-03-16 Thread Alfredo Quiroga-Villamil
I haven't tried this; but try it and see what happens. 1- Create app/models/app_model.php 2- In there you can have class AppModel extends Model { protected $sYourPropery = 'property'; } // End of AppModel{} All models that extend AppModel should now have access to

Re: Overloading AppModel constructor

2009-03-16 Thread Alfredo Quiroga-Villamil
interested to see if there's an alternative solution. On Mar 16, 1:50 pm, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I haven't tried this; but try it and see what happens. 1- Create app/models/app_model.php 2- In there you can have  classAppModelextends Model {         protected

Re: Dynamic Model to universalize/generalize an Ajax-Handler-Action

2009-03-13 Thread Alfredo Quiroga-Villamil
The first thing needed I think is to re-adjust the function a bit. Although not mandatory, it should be something like the function depicted below for a public method that will process only ajax requests: function your_function() { $this-layout = 'ajax'; if (

Re: need help with views

2009-03-10 Thread Alfredo Quiroga-Villamil
I believe one way to achieve this is by using: $this-render() http://api.cakephp.org/class/app-controller#method-AppControllerrender from your controller and render the view you want. This would likely be based on certain conditions based on your previous email. So you would end up with a case

Re: Line feed at the befining of my pages source ?!? Where does it come from? Is beaks my XML :(

2009-03-06 Thread Alfredo Quiroga-Villamil
Ummm, try setting your layout to be of ajax type and see how it goes. function toto() { $this-layout = 'ajax'; $this-render( null, '/xml/default', null ); } Regards, Alfredo On Fri, Mar 6, 2009 at 11:24 AM, Aktarus vidaubann...@caramail.com wrote: Hello, I have an Ajax that

Re: routes regex

2009-03-05 Thread Alfredo Quiroga-Villamil
The code below is using perl; but take a look at the regex to match the given string. I didn't test this a whole lot; so double check it and run a few tests to see if it does what you want. use strict; use warnings; my $string = 'asus-eee-pc-900-+-2-gb-ram'; if ( $string =~

Re: routes regex

2009-03-05 Thread Alfredo Quiroga-Villamil
Btw, I think I might have missed a digit in that regex: /\w+-\w+-\w+-\d+-\+-\d+-\w+-\w+/ Regards, Alfredo On Thu, Mar 5, 2009 at 4:18 PM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: The code below is using perl; but take a look at the regex to match the given string. I didn't test

Re: Returned mail: see transcript for details

2009-03-05 Thread Alfredo Quiroga-Villamil
Action: failed Status: 553 5.7.1 from=grbounce-j2ddrguaaaboxexadd8yj4w11_qw7men=iraj23=lycos@googlegroups.com: To=iraj23: Mail is denied, message has been blocked by user's personal blacklist -- Forwarded message -- From: Alfredo Quiroga-Villamil laww...@gmail.com

Re: Hi All :-)

2009-03-04 Thread Alfredo Quiroga-Villamil
:11 PM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: Brian: I am hoping you are simply joking here or having a bad day or something. If you are not, that's not a cool way to reply to a valid question in my opinion. Alfredo, did you follow the link in his sig? Anyone who drags

Re: Hi All :-)

2009-03-03 Thread Alfredo Quiroga-Villamil
Brian: I am hoping you are simply joking here or having a bad day or something. If you are not, that's not a cool way to reply to a valid question in my opinion. Davide, I am posting here the email I had previously sent you. == PHP (cakephp)

Re: How to Redirect After Session Has Expired

2009-02-22 Thread Alfredo Quiroga-Villamil
that you're logged out. Then maybe you can have an AJAX callback analyze the response and redirect if necessary. That seems a little hackish so I'm wondering if there's a better way. Thanks, Jon On Feb 20, 6:26 pm, Alfredo Quiroga-Villamil laww...@gmail.com wrote: Thanks Miles. I finally had

Re: extending models

2009-02-22 Thread Alfredo Quiroga-Villamil
I believe you can just do: var $uses = array( 'Model1' ,'Model2' ); or use App::Import, then instantiate the model you want. You might also have to make sure that in the Model you specify var $useTable = null if it's not associated with with a table. Regards, Alfredo On Sun, Feb 22,

Re: How to Redirect After Session Has Expired

2009-02-20 Thread Alfredo Quiroga-Villamil
to the login page in my case. The question is why not when the session expires. I am assuming I am missing something. Thanks in advance, Alfredo On Feb 18, 1:38 pm, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I am sure there is a way to get this done, just not sure if I am missing

Re: How to Redirect After Session Has Expired

2009-02-20 Thread Alfredo Quiroga-Villamil
Thanks Miles. I finally had a little bit of time to devote to this and brainstorm for a few minutes. The issue is a bit more involved than what I had originally thought. I didn't throughly think about my environment and current implementation. All my requests are being sent via ajax. This

How to Redirect After Session Has Expired

2009-02-18 Thread Alfredo Quiroga-Villamil
I am sure there is a way to get this done, just not sure if I am missing something. Further details below: Issue: = Need to re-direct after session has expired or cleared. Description: = I am currently only using the Auth component to handle my authentication. No ACL for now.

Re: How to track # of file downloads (DB or File)

2009-02-16 Thread Alfredo Quiroga-Villamil
An approach to this could also be setting up a trigger in your database. This way you wouldn't need any code. You would let mysql for example do the work for you. Then you can use a neat little trick in mysql and call a group by with rollup and get the grouping plus the count. I hope that helps.

Re: cake:nocache and uncached views

2009-02-15 Thread Alfredo Quiroga-Villamil
I wonder what will happen if you wrap the cake:nocache tags with a comment !-- -- Have you tried that? Regards, Alfredo On Sun, Feb 15, 2009 at 8:35 PM, brian bally.z...@gmail.com wrote: I have the following in my main layout: div id=content cake:nocache?php if

Re: cake:nocache and uncached views

2009-02-15 Thread Alfredo Quiroga-Villamil
bally.z...@gmail.com wrote: Then I would never see what's inside. On Sun, Feb 15, 2009 at 8:40 PM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I wonder what will happen if you wrap the cake:nocache tags with a comment !-- -- Have you tried that? Regards, Alfredo On Sun, Feb 15

Re: cake:nocache and uncached views

2009-02-15 Thread Alfredo Quiroga-Villamil
({top: 10}) So, your idea is definitely something that people should know about to keep those tags from interfering with a page's DOM scripting. On Sun, Feb 15, 2009 at 9:04 PM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I meant something like this. div id=content !-- cake:nocache

Render XML

2009-02-10 Thread Alfredo Quiroga-Villamil
This should be simple, yet for some reason can't find how to do it. I need to render XML. What is the correct way to accomplish this? Thanks in advance, Alfredo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Render XML

2009-02-10 Thread Alfredo Quiroga-Villamil
it in the future and if this is even the most recommended approach for this kind of situations. Thanks in advance, Alfredo On Tue, Feb 10, 2009 at 11:38 PM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: This should be simple, yet for some reason can't find how to do it. I need to render XML. What

Re: iphone version of my site

2009-02-09 Thread Alfredo Quiroga-Villamil
I am not sure if cakephp supports this; but you usually would have to find a way to recognize mobile headers. There might already be a library out there for this. Last time I worked on this was using modperl and we had all the headers in the DB allowing us to recognize the device. See this below

Re: Extract Data From An Array - Question

2009-02-09 Thread Alfredo Quiroga-Villamil
' ...) method rather than find('all', ...) like you did, since you limit the result to one in your query anyway. Not much different, they both achieve the same thing, but it may be more readable in the code itself. On Feb 8, 5:06 pm, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I really

Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
I have the following query: === $aParams = array( 'fields' = array( ifnull(CcCall.destination, 'Total')as destination ,'sec_to_time(sum(CcCall.sessiontime)) as duration'

Re: Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
at 10:47 AM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I have the following query: === $aParams = array( 'fields' = array( ifnull(CcCall.destination, 'Total')as destination

Re: An complex DB SQL Statement Condition

2009-02-08 Thread Alfredo Quiroga-Villamil
Marcus: If I understood the question correctly what you are looking for is the following: If a user goes to make an entry into the table you've created, and the column1-column2 combination already exists for that particular user then you want to stop them from being able to re-enter it. If

Re: Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
Niiice, appreciate the response to the bonus question. Just trying to find out the answers now for Questions 1 and 2. Appreciate it. Alfredo On Sun, Feb 8, 2009 at 12:39 PM, mscdex msc...@gmail.com wrote: On Feb 8, 10:47 am, Alfredo Quiroga-Villamil laww...@gmail.com wrote: Rails has

Re: Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
, 2009 at 2:32 PM, brian bally.z...@gmail.com wrote: On Sun, Feb 8, 2009 at 10:47 AM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: I have the following query: === $aParams = array( 'fields' = array

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 beeniecop...@gmail.com wrote: This is not showing as a link in my browser: td?php echo $html-link($post['Post']['title'], /posts/view/.$post

Re: Open Flash Chart Problem

2009-02-05 Thread Alfredo Quiroga-Villamil
I've ran into similar issues with IE in the past, check your json and make sure there are no trailing commas. Regards, Alfredo On Thu, Feb 5, 2009 at 5:10 AM, yasa83...@gmail.com hisatheeshku...@gmail.com wrote: Hi BrendonKoz, I am getting the chart in firefox. But when I am trying the

Re: Query using LEFT()

2009-02-05 Thread Alfredo Quiroga-Villamil
gkc: If I understood your question correctly what you want is something like this??? $aResult = $this-Model-find('all', array('limit' = 200)); or something along those lines, specifying the field that you want, or the ones that you would like excluded. Regards, Alfredo On Wed, Feb 4, 2009

Re: Debugging Auth component

2009-02-04 Thread Alfredo Quiroga-Villamil
Glad you figured it out Andrea, way to go. Regards, Alfredo On Wed, Feb 4, 2009 at 2:30 PM, Andrea Cardinale mirt...@gmail.com wrote: Today I was on the subway thinking to everything but Cake when I understood what I was doing wrong and I can't believe it-.- After completing the ACL

Re: Debugging Auth component

2009-02-03 Thread Alfredo Quiroga-Villamil
Re-sending this. On Tue, Feb 3, 2009 at 8:30 PM, Alfredo Quiroga-Villamil emit...@emitrom.com wrote: Andrea: Have you tried to remove the acl ? Remove the aros/acos tables for now and just take it one step at a time again. Auth should not be the problem, you likely have something wrong

Re: Auth Issues - Session Comes And Goes

2009-01-26 Thread Alfredo Quiroga-Villamil
I think I've figured out what was happening. If Security.Level is set to high, then cakephp will re-generate the session id for every request. This seems to cause issues when you have an application sending multiple ajax requests; for example during heavy ajax gui initialization. By setting it

Re: Problem with routing using Javascript's location.href

2009-01-26 Thread Alfredo Quiroga-Villamil
in a more civilized fashion for cellphone/WAP-style applications. Anyway, let me know if you ever come up with some sort of way to do single-key accesskeys. Thanks again. --Bill On Mon, Jan 26, 2009 at 9:50 PM, Alfredo Quiroga-Villamil laww...@gmail.com wrote: Hello Bill