My application using cakePHP

2007-02-14 Thread Riky Kurniawan
Hi there, I've worked application on my thesis. We build virtual office application using Cake. It has features such as Timeline, create project wizardly, sms gateway, project timeline (gantt chart), project history (PDF report), staff management, client management, skill and position management

Re: Yet another 'hasMany/belongTo' question...

2007-02-14 Thread Riky Kurniawan
Try using echo ''; print_r($this->Network); echo ''; above the code can simply using debug: debug($this->Network); -- http://riky.kurniawan.us --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: Yet another 'hasMany/belongTo' question...

2007-02-14 Thread [EMAIL PROTECTED]
Also, if you are just trying to see if all the data is being pulled in from your Network and User classes, Try using echo ''; print_r($this->Network); echo ''; in your controller method from which you are trying to view the data. Again this is strictly for viewing the data your class is getting.

Re: Change debug level for certain actions

2007-02-14 Thread Samuel DeVore
http://bakery.cakephp.org/articles/view/174 "The other nice addition in 1.1.11.4064 is updated functionality of the Configure class. All core configuration is now handle by this class, so inside your methods you can access Configure::read('debug'); for the current setting. Also, Configure::write(

Re: Yet another 'hasMany/belongTo' question...

2007-02-14 Thread shoesole
Humm, let me give it a shot. If I understand you correctly you want to see the users that belong to a specific network when you are viewing the network information generated from the scaffold? From what I know (and I'm still cutting my teeth on cake so I may be wrong) the scaffold won't show all t

Re: Change debug level for certain actions

2007-02-14 Thread Mandy
You might also want to try the css route (no code changes) Just return #cakeSqlLog { display: none } Hope this helps! Thanks, Mandy. On Feb 14, 4:06 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > works like a charm, thanks > - S > > On 14/02/07, Ryan <[EMAIL PROTECTED]> wrote: > > > > > If y

Display various error messages for a single TextBox

2007-02-14 Thread [EMAIL PROTECTED]
If I include codings like this class Phonebook extends AppModel { var $name = 'Phonebook'; var $validate = array( 'name' =>array (VALID_NOT_EMPTY => 'user name is required', VALID_NAME => 'Name should contan Only Letters'), 'mobileno' => VALID_NOT_EMPTY );

Re: Cake debugging: Firecake!

2007-02-14 Thread Dr. Tarique Sani
On 2/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Some more information on firecake. > Additionally I found that firecake is overwriting the $this->Session at some point before the beforeFilter so I cannot use Session in my before filter... I intend to ty and fix this today if I have

Re: Cake debugging: Firecake!

2007-02-14 Thread [EMAIL PROTECTED]
Some more information on firecake. I was trying to display an image stored in a MySQL database as a BLOB but getting garbage. e.g. Turns out that firecake was adding headers that were screwing up the image. Removing it resolved the problem. --~--~-~--~~~---~--~---

Re: Displaying an image stored as a MySQL BLOB

2007-02-14 Thread [EMAIL PROTECTED]
The helper was firecake, which adds headers to help debugging with the Firebug firefox addin. ;-) I've removed it for this controller and it works well. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" gr

Re: Displaying an image stored as a MySQL BLOB

2007-02-14 Thread Dr. Tarique Sani
On 2/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks that helped greatly. > There was some headers in there and removing a helper solved the > problem. Good to know it worked out for you - please give more details on what headers were there and which helper you removed, might help

Re: CakePHP+JpGraph

2007-02-14 Thread YoLoL
Hi, I have been trying as you suggested but I got into this issue: when I put the data into a session variable and try to access this from the script that generates the graphic; it gets there without anydata. I checked if the session has been started already and it is. The code works well as a s

Re: CakePHP CMS

2007-02-14 Thread [EMAIL PROTECTED]
I'm currently working on a CMS with cakebut probably not a very large scale one. At least initially. It will simply be for smaller sites. One feature will be integration with Flash actually and that's already setupin other words you can manage the content of a site both the HTML content a

Re: Navigation Component / Helper

2007-02-14 Thread the_woodsman
Hi, If you're new to PHP, the simplest way to repeat blocks of code on different pages is to use the requestAction method, generally in your controller, but available throughout. This way you can have a controller just for your menus, with an action and view like renderMenu, and then you can get

Re: Navigation Component / Helper

2007-02-14 Thread nateklaiber
Definitely us an Element. I recently did a project and had the same thing. Several shared navigation elements that I needed in all of my layouts. I created a default layout - and then used renderElement to render them in the layouts/views. I think this is exactly what you are looking for. Email

Re: Displaying an image stored as a MySQL BLOB

2007-02-14 Thread [EMAIL PROTECTED]
Thanks that helped greatly. There was some headers in there and removing a helper solved the problem. On Feb 14, 10:35 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > The result if I browse to /provider/logo/6 is a page of text (t

Re: Cake debugging: Firecake!

2007-02-14 Thread [EMAIL PROTECTED]
On Feb 13, 10:32 pm, "Pepepaco" <[EMAIL PROTECTED]> wrote: > I am planning a little tutorial for the Bakery, to share this. Maybe > this weekend, if I can find some time... I'll try, I promise. I'll be waiting eagerly for that one! :-) --~--~-~--~~~---~--~~ You

Re: Change debug level for certain actions

2007-02-14 Thread Sam Sherlock
works like a charm, thanks - S On 14/02/07, Ryan <[EMAIL PROTECTED]> wrote: > > > If you put these lines in your beforeFilter then it should work: > > $db =& ConnectionManager::getDataSource('default'); > $db->fullDebug = false; > > Regards, > Ryan Rose > http://www.digiwize.com > > On Feb 14, 5:4

Re: Model best practices question

2007-02-14 Thread jinhr
You can use $this->Profile->unbindModel(array('hasOne' =>array('main_image'))) before $this->Profile->findAll() On 2月14日, 下午5时21分, "mallyone" <[EMAIL PROTECTED]> wrote: > I'm trying to figure out how to return a list of users with only one > user_image, the one with 'main'=1 in the user_image

Re: scaffold view and edit actions not workign when var $uses is used

2007-02-14 Thread lynda
Hi, I finally got around of this by using find() instead of read(). function view($id){ $condition = "question_id = ".$id.""; $question = $this->Question->find($condition); $this->set('question', $question); } Therefore, the result will sho

Re: Change debug level for certain actions

2007-02-14 Thread Ryan
If you put these lines in your beforeFilter then it should work: $db =& ConnectionManager::getDataSource('default'); $db->fullDebug = false; Regards, Ryan Rose http://www.digiwize.com On Feb 14, 5:41 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > I want to disable debug but only when I am retu

I used templates to quickly create Model and Controller files in Eclipse+PDT.

2007-02-14 Thread jinhr
I am tired of creating a new Model or Controller file by typing long long codes as following to fit CakePHP convention: var $name = xxx; var $belongsTo = array(blah blah blah); var $hasMany = array(blah blah blah); var $use = ... var $scaffold... So, I define a Model templates in Eclip

Bake generated view/related models

2007-02-14 Thread Norman
In a View, bake.php generates scaffolded methods with foreach $data/ etc generated html table, to show related models. Is there a way I can (re)use/render another view in that context, instead of the foreach and the html table? For instance, use an index controller and view in that place? Hmm.

Re: Change debug level for certain actions

2007-02-14 Thread Sam Sherlock
I want to disable debug but only when I am returning JSON data eg prevent the sql table being appended to end of that document, with debugging still active at 1, 2 or 3 On 14/02/07, mindcharger <[EMAIL PROTECTED]> wrote: > > > Not sure if I understood what you want to say, but to disable debug

Re: Navigation Component / Helper

2007-02-14 Thread mindcharger
Hey! I think you need an Element... Check this from CAKE manual: "Elements Many applications have small blocks of presentational code that needs to be repeated from page to page, sometimes in different places in the layout. Cake can help you repeat parts of your website that need to be reused.

Re: Change debug level for certain actions

2007-02-14 Thread mindcharger
Not sure if I understood what you want to say, but to disable debug just go to cor.php in (app/config) and set: define('DEBUG', 0); Cheers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post

Model best practices question

2007-02-14 Thread mallyone
I'm trying to figure out how to return a list of users with only one user_image, the one with 'main'=1 in the user_images table. I also need to be able to return user.*, and it's associated images for another action. How should I handle this? Should I make another model called profile_single_im

Re: scaffold view and edit actions not workign when var $uses is used

2007-02-14 Thread lynda
Hi, I have the exactly same problem when I use $uses = array('Book', 'Question'); Index.thtml display the resulst, but not edit.thtml and view.thtml. For example function view($id){ $this->Question->question_id = $id; $question = $this->Question->read();

Yet another 'hasMany/belongTo' question...

2007-02-14 Thread mindcharger
Hello, Here's another 'hasMany/belongTo' question... :-) I have read the user manual but either I didn't understood it or I am goin' nuts... :-P I have this DB structure: Table 'users': ++--+--+-+- ++ | Field | Type |

Re: HTML-considering Truncate()-Function

2007-02-14 Thread dima
Alex, Under what conditions would you need to truncate content with tags included? Here is my function to truncate (called 'cut'). Note that it strips the tags. function cut ($string, $length, $padd = '...') { $string = strip_tags($string); $returnString = '';

Re: Creating links a la Html helper in a component

2007-02-14 Thread dima
Rosie, You've started quite a debate here :). I am currently building a CMS using Cake and tinyMCE as well. I believe you should have all URL mapping done using Components and not the view. The solution I am aiming towards is to have the images referenced like so: // Images is a controller and

Re: Easy way to "offline" a cake site

2007-02-14 Thread Langdon Stevenson
I built a system that does exactly this for an on-line magazine. As Daniel suggested, I used AppController::beforeFilter() to check for the online/offline setting (stored in a "config" table/record in the database. To allow an administrator access I also checked if the admin route was being u

Re: Is there any way to version a field?

2007-02-14 Thread [EMAIL PROTECTED]
Good reading, thanks! --P On Feb 14, 10:52 am, "AD7six" <[EMAIL PROTECTED]> wrote: > On Feb 14, 6:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > It seems like you need a separate table to store your comments. You > > could have a datetime field called "created" in your comments

Re: Ajax Form submit by onchange.

2007-02-14 Thread mutabor
Sorry for mistakes in the text :) Here is the right one: I have a form and some fields within it. I need to submit this form by onchange event of select element (see the code). But the way I did it submits form using regular way - not through Ajax call. If I use $ajax->submit(..) to submit t

Re: Associations trouble

2007-02-14 Thread Christopher E. Franklin, Sr.
I'm sorry that I am not able to test this at work at the moment, I am swamped. Did you make any headway? On Feb 11, 6:25 pm, "Erich C. Beyrent" <[EMAIL PROTECTED]> wrote: > Your suggestions are great, but sadly, I've already tried combinations > of a blank foreign key as well as a foreign key of

Re: Help! Invalid argument supplied for foreach() dbo_mysql.php

2007-02-14 Thread Seb
Hi Dom. This is quite interesting indeed. Of course we all know Linux *IS* case sensitive and Windows *isn't*... but I've always experienced Cake using the correct case. I wonder if that has anything to do with the table prefix...?! Also.. can you see if the DESC statement is checking for T_User o

Change debug level for certain actions

2007-02-14 Thread Sam Sherlock
Since some of my actions are returning json data I would like to prevent debugging in them I have tried $db->fullDebug = false; as mentioned in another post. - S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

HTML-considering Truncate()-Function

2007-02-14 Thread Alex
Hi, I'm always wondering if there is a truncate function for a Text (a post f.e.) which considers opened HTML tags. Everytime i'd truncated a text with the normal truncate function available in TextHelper, some html tags werent closed and so my whole page looks damaged. So i programmed a function

Re: Creating a custom AppView

2007-02-14 Thread AD7six
On Feb 14, 6:33 pm, Gonçalo Marrafa <[EMAIL PROTECTED]> wrote: > Hi. > > Is it possible to create a custom base view for an App Yes. Put var $view = 'Whatever'; in your (app)controller and create /app/views/whatever.php containing a class "whateverView extends View" HTH, AD --~--~

Re: Is there any way to version a field?

2007-02-14 Thread AD7six
On Feb 14, 6:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > It seems like you need a separate table to store your comments. You > could have a datetime field called "created" in your comments table. > > On Feb 14, 7:24 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hi group!

Re: Creating links a la Html helper in a component

2007-02-14 Thread Chris Hartjes
On 2/14/07, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote: > > > @Chris: > > "If you want to contribute some code that creates this functionality, > many MANY developers would be grateful (me included). > > I could argue endlessly about MVC and why manipulating HTML in the > [controlle

Creating a custom AppView

2007-02-14 Thread Gonçalo Marrafa
Hi. Is it possible to create a custom base view for an App, just like with AppController and AppModel, where i can put some custom common view code? Thanks in advance. Best regards. -- Gonçalo Marrafa <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ You received this

Re: Associations stored in a table?!

2007-02-14 Thread Hawk|
Hi, i know i have to parse the xml-file before passing it to cake. The point of my question was, if it would be possible to store associations in tables. And after this discussion i think it would be possible. But i reconsidered the idea a bit. Because, if i define everything in an xml-file, i th

Re: Regular Expression to find content inside a tag pair

2007-02-14 Thread Dat Chu
This is absolutely great. I will keep in mind these modifiers. Great answer thank you. On 2/14/07, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: > > Off the cuff I'd say: /(.*)/iUs. > > Most important are the modifiers: > >- i: Makes sure upper/lower- case are ignored (some people might use >

Re: Screencast of my talk at the Vancouver PHP Conference 2007

2007-02-14 Thread keymaster
Watched it, all 50 minutes or so. Really enjoyable. Felt like I was there. Really appreciated the emphasis on advantages of using unit testing and deployment tools, and on the philosophical underpinnings of the Rails/Cake phenomenon. Thanks for taking the time to post it. --~--~-~--~--

hasOne "on" param...

2007-02-14 Thread [EMAIL PROTECTED]
I have setup where a user "picks" a "game" ... User hasMany Picks Picks belongsTo Game (and user) I want to return ALL 'Games' with 'MyPick' (doesn't matter if I picked the game or not). It would be nice to see the hasOne relationship carry an "on" param that does the following ... $this->Game

Re: Is there any way to version a field?

2007-02-14 Thread [EMAIL PROTECTED]
It seems like you need a separate table to store your comments. You could have a datetime field called "created" in your comments table. On Feb 14, 7:24 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi group! > > I have a requirement to automatically version one field on a > form(record)

Re: Creating links a la Html helper in a component

2007-02-14 Thread John David Anderson (_psychic_)
On Feb 14, 2007, at 8:58 AM, Rosie F. wrote: > > psychic, I don't think you're really understanding my problem/ > question. > >> If the data was corrected by the controller (via a component or >> whatever) before it hit the view, you'd have to do nothing to the >> HtmlHelper. > > That's what I'm

Re: Creating links a la Html helper in a component

2007-02-14 Thread Chris Hartjes
On 2/14/07, Rosie F. <[EMAIL PROTECTED]> wrote: > > > Well, the responses here have been irksome and not helpful. Through > my own research I found this, in case anyone else needs it: http:// > rossoft.wordpress.com/2006/02/11/cool-flash-effect-3/ > > Rosie Hi Rosie, Sorry that the responses ha

Re: Cake debugging: Firecake!

2007-02-14 Thread CraZyLeGs
http://groups.google.com/group/cake-php/browse_thread/thread/5e041ccdc9d60131/ef311e99579b7227?lnk=gst&q=firecake&rnum=2&hl=en On Feb 13, 12:02 pm, Ámon Tamás <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I just found this helper and it's excellent > > >http://bakery.cakephp.org/artic

Navigation Component / Helper

2007-02-14 Thread Peter
Hi there, I'm totally new to CakePHP and I am struggling to get my head around how to do shared navigation across a site. Basically, every page will use the same unordered list navigation on the left-hand side. Regardless of the page controller, I need to have this navigation on all pages. The fu

Re: How to have multiple sessions open?

2007-02-14 Thread rtgwork
Unfortunately, I can not combine the sessions because many parts of the application depend on the current user info. It won't be as simple a change as storing the user privileges. Also, if I manually open another browser, then I can have the 2 different sessions open with no problems whatsoever.

Is there any way to version a field?

2007-02-14 Thread [EMAIL PROTECTED]
Hi group! I have a requirement to automatically version one field on a form(record) whenever someone edits the record. i.e. I have a service request and I need to keep every comment that is entered into the comment field as a separate version. Has anyone done something like this before? Have any

Re: kcaptcha session problem

2007-02-14 Thread c1sc0
Ok, turned out I was running into session race conditions. I temporarily solved the problem by switching the session handler to php. But, I still have a couple of questions, anyone care to explain? I'm writing directly into $_SESSION now. Q: Does this mean I can mix & match sessions? E.g. have 2

Re: Creating links a la Html helper in a component

2007-02-14 Thread Rosie F.
psychic, I don't think you're really understanding my problem/ question. > If the data was corrected by the controller (via a component or > whatever) before it hit the view, you'd have to do nothing to the > HtmlHelper. That's what I'm doing. I'm correcting the data at the controller. I don't

Re: Screencast of my talk at the Vancouver PHP Conference 2007

2007-02-14 Thread Chris Hartjes
As a follow-up... It appears to only be working if you go to the front page of my site, but I'm working on fixing that as I type this... On 2/14/07, Chris Hartjes <[EMAIL PROTECTED]> wrote: > Hey guys, > > I've posted a screencast consisting of my talk (includes slides and > the talk itself) on

Re: Regular Expression to find content inside a tag pair

2007-02-14 Thread Felix Geisendörfer
> How does SimpleXML or DOMDocument->loadHTML performance in term of > simply finding certain form elements? Is there a requirement in > installation of PHP? There is almost no chance for it to be faster then a specific regex, afaik. -- Felix Geisendörfer aka the_undefined --

Re: Easy way to "offline" a cake site

2007-02-14 Thread D.Pape
sounds good and easy. i don't know , but i think i would check the OFFLINE variable in AppController::beforeFilter() (on the same way i check for authorization). and there should be a login form for administrators, if you have to test the system on the live-server. and where do you set the offl

Ajax Form submit by onchange.

2007-02-14 Thread mutabor
Hello, I have a form and some fields within it. I need to submit this form by onchange event of select element (see the code). But they was I did it submits form using regular way - not throught Ajax call. If I use $ajax->submit(..) to submit this form everything works perfect. But I do not need

Easy way to "offline" a cake site

2007-02-14 Thread keymaster
I would like to redirect every url to an "Undergoing Temporary Maintenance - Back Soon" page. Thought the easiest way might be to 1. create a config var OFFLINE 2. in /app/config/routes check the OFFLINE var, and if true, reroute everything to /pages/offline 3. create an action in pages controll

Re: Regular Expression to find content inside a tag pair

2007-02-14 Thread Dat Chu
How does SimpleXML or DOMDocument->loadHTML performance in term of simply finding certain form elements? Is there a requirement in installation of PHP? On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Why not use SimpleXML or DOMDocument->loadHTML() ? From there you'll > have access

Screencast of my talk at the Vancouver PHP Conference 2007

2007-02-14 Thread Chris Hartjes
Hey guys, I've posted a screencast consisting of my talk (includes slides and the talk itself) on my blog at this post: http://www.littlehart.net/atthekeyboard/2007/02/14/back-from-vancouver-php-conference-2007/ I give some shoutouts to Cake during the talk. If you have any questions about the

Re: How to use smarty cache in cakephp?

2007-02-14 Thread lloydhome
As this is using Cake's cache the SAME limitations are applied. How is it that 'time' will be set in the view if the controllers are not run? When it is cached NO CONTROLLERS are run. NO SMARTY is run. Only the session variables are available. I see in my template it is difficult to get a cle

Re: automatically building documentation

2007-02-14 Thread Samuel DeVore
I use doxygen [1] for my documentation in projects (mainly because we use it for our other codebases as well. At one point the cakephp api was generated from it as well. Sam D [1] http://www.stack.nl/~dimitri/doxygen/ On 2/14/07, c1sc0 <[EMAIL PROTECTED]> wrote: > > Thanks, that's the way I als

Re: CakePHP CMS

2007-02-14 Thread Samuel DeVore
Also it seems that everyone and their brother seems to think that it is a good idea to open a new project in CakeForge that is a CMS. It would be great to have a CMS but I think so much of what a CMS needs to be is either way to general for a simple example or it is so targeted that it is hard to

Re: problem with date format

2007-02-14 Thread djiize
maybe try the dateTimeOptionTag in Html helper, it prints 3 select box or if you use the new Form helper, $form->input will print date select box if your DB field is DATETIME or like On 14 fév, 14:12, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 2/14/07, vidya <[EMAIL PROTECTED]> wrote: > > >

Re: search

2007-02-14 Thread djiize
Cake way will be more like that (not 100% your need, just explanation): $criteria = array(); if ($gender == "male") { $criteria['TableOne.gender']= 'Male'; } elseif ($gender == "female") { $criteria['TableOne.gender']= 'Female'; } else { $criteria['TableOne.

Re: problem with date format

2007-02-14 Thread Chris Hartjes
On 2/14/07, vidya <[EMAIL PROTECTED]> wrote: > > Hai, > > I have echo $html->input('Project/start_date') statement to enter the > date. I can't save the date unless it is entered in the format "- > mm-dd". Please help me to solve this problem. > > Thanks, > Vidya. Why can't you alter the dat

Re: Textbox validation

2007-02-14 Thread Chris Hartjes
On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > How to display different Error messages for a single textbox for If > user name is empty then it should User name is required if user name > contains number it should show Invalid user name. > http://manual.cakephp.org/chapter/validatio

problem with date format

2007-02-14 Thread vidya
Hai, I have echo $html->input('Project/start_date') statement to enter the date. I can't save the date unless it is entered in the format "- mm-dd". Please help me to solve this problem. Thanks, Vidya. --~--~-~--~~~---~--~~ You received this message because

Re: Textbox validation

2007-02-14 Thread anandrv
On Feb 14, 4:41 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How to display different Error messages for a single textbox for If > user name is empty then it should User name is required if user name > contains number it should show Invalid user name. sorry i don't know --~--~

Re: How to use smarty cache in cakephp?

2007-02-14 Thread rollenc
I am puzzle. I put the Tag to layout/index.php And it no use too. And now, the code {#$time#} in /view/index.tpl is parsed as follow in cache file: _tpl_vars['time']; ?> The value $this->_tpl_vars['time'] is not exist since the smarty complie not run(cache runed). Can I get a demo? Tan

Re: params['pass'] not functioning as listed in manual

2007-02-14 Thread Grant Cox
Additionally, if you had localhost/users/add/var1:453/var2:test then var1 and var2 will appear in $this->params['pass']. This is in CakePHP 1.2, I'm not sure if it's in 1.1.13. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

textbox

2007-02-14 Thread anandrv
how to print different error messages in single text box. for example username is blank means Error message "Please enter the user name" username is less then 3 char means Error message "please enter the 6 to 15 char" if the user name is numaric means Error message "Please give the chars" --~-

Textbox validation

2007-02-14 Thread [EMAIL PROTECTED]
How to display different Error messages for a single textbox for If user name is empty then it should User name is required if user name contains number it should show Invalid user name. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

R: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-14 Thread GMail
Hello Mariano even I use exclusively both joomla and Cake for development of my web projects. Can I participate to this thing? Maybe I can give my contribution. TIA > -Messaggio originale- > Da: cake-php@googlegroups.com > [mailto:[EMAIL PROTECTED] Per conto di Mariano Iglesias > Inviat

search

2007-02-14 Thread anandrv
How to search the query written in cake php.the query is too difficult $select_sql = "SELECT * FROM `events_register` AS `table_one` , `event_profileinform` AS `table_two` WHERE `table_one`.`id` = `table_two`.`userid` "; if(

RE: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread Mariano Iglesias
Hahaha... Ok then, like Felix said, call it like: @getvar($somevariablethatdoesntexist) What a day I'm having... -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and

Re: Displaying an image stored as a MySQL BLOB

2007-02-14 Thread Dr. Tarique Sani
On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The result if I browse to /provider/logo/6 is a page of text (the raw > image data) > > ‰PNG IHDR etc... Try using HTTP LiveHeaders extension of Firefox to see what headers are being sent. Looks like somewhere the header for image is g

Re: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread AD7six
On Feb 14, 12:16 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Ops haven't noticed it was you Andy, I thought it was the original poster. > I'm wearing my Camoflage. "No way it will complain. The isset() will prevent that. " how about the undefined varaible somevariablethatdoesntexist err

Displaying an image stored as a MySQL BLOB

2007-02-14 Thread [EMAIL PROTECTED]
Hello, I have the need to display images stored as BLOB's in a MySQL table. phpMyAdmin shows them nicely with its inline feature. Some basic PHP code (test.php) displays the image nicely as below $sql = "SELECT logo FROM providers WHERE id=6"; $result = mysql_query("$sql") or di

RE: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread Mariano Iglesias
Try: $result = getvar($somevariablethatdoesntexist); var_dump($result); No way it will complain. The isset() will prevent that. PS: Still having doubts why you need it. What happens if the variable that you pass to the function EXISTS and it is set to FALSE. Like so: $variable = false; $resu

RE: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread Mariano Iglesias
Ops haven't noticed it was you Andy, I thought it was the original poster. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog:

Re: Regular Expression to find content inside a tag pair

2007-02-14 Thread [EMAIL PROTECTED]
Why not use SimpleXML or DOMDocument->loadHTML() ? From there you'll have access to the complete DOM of the HTML. On Feb 14, 12:02 am, "Dat Chu" <[EMAIL PROTECTED]> wrote: > I want to find the content inside of a tag pair. > > Say form tag. What would be the way to achieve this? > > My solution s

Re: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread AD7six
On Feb 14, 10:54 am, "mariano.iglesias" <[EMAIL PROTECTED]> wrote: > function getvar($var) > { > return (isset($var) ? $var : false); > > } Will that ever return false, or prevent the error message when you try to pass a none-existant variable to it ;)? AD --~--~-~--~~-

RE: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-14 Thread Mariano Iglesias
Check your email, it should be there. I'm already modifying the code a bit but that'll give you an idea. Jeez we need a SVN. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be

Re: Associations stored in a table?!

2007-02-14 Thread mindcharger
My system is not your traditional Cake App...My dynamic tables are populated by a backoffice application, and not by user input on a web GUI...the user just accesses the data for consultation on the web GUI (this consultation produces either graphical plots or fixed field tables). I don't know wh

RE: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread Mariano Iglesias
The infamous @. It has safe my life S many times ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoI

Re: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread Felix Geisendörfer
Or the quick and dirty: echo @$var; Not that I recommend it as a good practice, but sometimes it's just handy ... ; ). -- Felix Geisendörfer aka the_undefined -- http://www.thinkingphp.org http://www.fg-webdesign.de mariano.iglesias wrote: > function getvar($var) > { >

kcaptcha session problem

2007-02-14 Thread c1sc0
Hi all, I'm having a strange problem related to kcaptcha and sessions. Basically I want to use multiple captchas per page, one for each form. Obviously as each captcha loads separately, I'll overwrite my 'captcha' session value. No problem there, I create different session vars for each form, e.g

Re: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread mariano.iglesias
function getvar($var) { return (isset($var) ? $var : false); } On Feb 14, 6:35 am, "DaddyCool78" <[EMAIL PROTECTED]> wrote: > I misexplain myself I think.. > > What I'm looking for is : a function that will : > 1- check if the $variable exist (isset) > 2- return the $variable if isset > 3-

Re: automatically building documentation

2007-02-14 Thread c1sc0
Thanks, that's the way I also imagined it, jsut like we do for our perl stuff. On Feb 9, 3:03 pm, "the_woodsman" <[EMAIL PROTECTED]> wrote: > Our setup: > > We use PHPDoc for generating our documentation, which is automated and > refreshes the output nightly, and we link to these in the project's

Re: validation

2007-02-14 Thread Dr. Tarique Sani
On 2/14/07, anandrv <[EMAIL PROTECTED]> wrote: > the numaric values other wise it will be blank how to validate like > that Use a regex something like ^[ ]*$|^[0-9]*$ - you may need to refine it a bit but it is a simple 2 part regex the first part test for a blank the | is an OR and the next

Re: is there a function exist($var) somewhere that I didn't find?

2007-02-14 Thread DaddyCool78
I misexplain myself I think.. What I'm looking for is : a function that will : 1- check if the $variable exist (isset) 2- return the $variable if isset 3- return something (false) if is not set that way, you don't get undefined variable call. Those that function already exist in cakePHP, I've se

validation

2007-02-14 Thread anandrv
Hi all in cake php i have validate the text box . for example.the registration process only two fields are mendaraty but other fields not importent but there phone number means you must enter the numaric values other wise it will be blank how to validate like that --~--~-~--~~---

problem with timezones / saving to model

2007-02-14 Thread basic612
my 'modified' and 'created' fields in the database are being saved as at GMT... and displayed as GMT. It seems to be a cake issue as manual test shows - the time when the php test below was run was indeed "14/02/2007 18:25:37" but if I had modified data in my model it would update modified to be "

RE: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-14 Thread Mariano Iglesias
I think the Cakeforge approval is going to take some time. In the meantime let me add some documentation to the code, test a few things and send it to your private email account. -MI --- Remember, smart coders answer ten q

Re: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-14 Thread Max
Also, I am looking forward to see your contribution so that we can work together on the project. On Feb 14, 12:27 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > It's getting even awesomer: > > Jake can now be installed/uninstalled by using the Joomla's component > installation facility. > >

Re: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-14 Thread Max
Thanks Mariano for extending the project. I can work more on inter- communication of Joomla components and Jake. On Feb 14, 12:27 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > It's getting even awesomer: > > Jake can now be installed/uninstalled by using the Joomla's component > installatio

RE: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-14 Thread Mariano Iglesias
It's getting even awesomer: Jake can now be installed/uninstalled by using the Joomla's component installation facility. I'm now working on: - Documentation translation (Jake's documentation is accessed via the menu Components -> Jake at Joomla's administrator panel) - Thinking (any thoughts?)

  1   2   >