Re: Habtm maddness
this is the sql: SELECT DISTINCT tags.title FROM tags INNER JOIN pages_tags ON pages_tags.tags_id = tags.id WHERE pages_tags.pages_id IN ( SELECT pages.id FROM pages INNER JOIN pages_tags ON pages_tags.pages_id = pages.id INNER JOIN tags ON tags.id = pages_tags.tags_id 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, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Habtm maddness
Hey! Ok i have pages which have and belong to many tags. I do not want to use categories so i'm using tags instead. For example, i'm tagging a page with help, development, design or article, development, peace When i load the page /views/article, i would like to load all the tags that belong to pages that belong to articles tag. I'm totally stuck on how to do this. Can anyone help? 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, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Blank screen with errors set to 2
Hey all, I am having issues with blank screens even with debug set to 2. localhost/admin works but / does not. Before I post any code, has anyone come across this problem before? Many thanks Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sending config options to fckconfig.js in fckeditor
Can anyone help pleeease?? Thanks, alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sending config options to fckconfig.js in fckeditor
Anyone got any ideas? Cheers Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Sending config options to fckconfig.js in fckeditor
Hey all, I've set up FCKeditor using the following code in my helper: webroot . 'js' . $jsDS . 'fckeditor' . $jsDS; $skinDir = $js . 'editor' . $jsDS . 'skins' . $jsDS; $templateDir = $skinDir . (is_dir( $skinDir . $template ) ? $template : 'default') . $jsDS; $code = "fckLoader = function ( ID ) {"; $code .= " var bFCKeditor = new FCKeditor( ID );"; $code .= " bFCKeditor.BasePath = '" . $js . "';"; $code .= " bFCKeditor.ToolbarSet = '" . $toolbar . "';"; $code .= " bFCKeditor.SkinPath = '" . $templateDir . "';"; $code .= " bFCKeditor.Height = " . $height . ";"; $code .= " bFCKeditor.Width = " . $width . ";"; $code .= " bFCKeditor.ReplaceTextarea();"; $code .= " }"; return $this->Javascript->link('fckeditor/fckeditor.js') . $this->Javascript->codeBlock($code); } function editor( $fieldName ) { $seperator = (strstr($fieldName, '.') ? '.' : '/'); $id = Inflector::camelize( str_replace($seperator, '_', $fieldName) ); $code = "fckLoader('" . $id . "');"; return $this->Javascript->codeBlock($code); } } ?> I'm using it with many different users and I'm looking for a way to upload images and store them as webroot/img/userid. Sessions didn't worked so i have hacked into the various files to create a FCKConfig.ImageUploadURL have an extra get variable on the end. It all works fine except i cannot pass the userid to the fckconfig.js. I've tried $code .= " bFCKeditor.Config['Testing'] = " . $test . ";"; and then added to the end of the FCKConfig.ImageUploadURL but it is coming through as undefined. Am i missing something or is there a better way of doing this. I would really appreciate some guidance as I am on the point of throwing out my computer. Many thanks Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: javascipt onclick in $html->image
Panic over answer is: 'onclick'=>'open_win('. $id .')' cheers a --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
javascipt onclick in $html->image
hey all, This is really bugging me and i'm sure it's something that i'm not doing. my code is: $id = $module['Module']['id']; echo $form->input($module['Module']['refer_name'], array( 'label'=>$module['Module']['title'].$html->image('1/ question.gif', array( 'class'=>'question', 'onclick'=>'open_win($id)' )), 'type'=>'checkbox', 'value'=>$module['Module']['price'], 'onclick'=>'addValue(this)' )); This issue is with the onclick => open_win($id). it is not being passed correctly. I have tried various combinations and they are as follows: (the code works fine if i pass a number through: open_win(1)) In this example, $id is equal to 2. $id = blank, i.e it is defined but as blank '$id' = error (unexpected T_VARIABLE) "$id" = $id (not the value) = blank, i.e. it is defined but as blank '' = error (unexpected '?') "" = not the value Has anyone come across this before or has anyone got some pointers? Cheers alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Saving to multiple tables from one form
tbudzins, Have a look at this section here: http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo If for example, if the address belongs to username and password then save the parent first. good luck a --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Image resizing --> point in right direction please :)
hey guys, we are coming across the problem of users insisting on uploading 2000 x 2000px images onto our system and regardless of how amuzing it is to see your computer screen being eaten by a oversized product image, it is very annoying. We need to create a way of automatically resize (both dimensions and file size) the files on upload before saving them. Could anyone point us in the right direction to do this within cake? Thanks in advance. Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Mail server
Hey all, Anyone know anything about integrating email onto a server, as in send AND receive mail using smtp and POP3? cheers alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Hello, I'm having issues with mail() in cake. I'm working on a localhost so i wasn't actually expecting the emails to work (not using simplemail) but they did! But now they are not working again. I haven't touched anything and occasionally one email will go through. For a period, i was sending large quantities through my gmail account to test them. The only thing that i can think of is that gmail has blocked any emails coming from localhost etc. I have tried sending them to another address but nothing is happening. Has anyone come across this before? Is there anyway of seeing what the response is from the gmail server? Many thanks Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: File upload
Bob, Dan, Thanks very much that's great!! I'll work through them both now. Really appreciate it. Alex On 20 Aug, 08:06, Dan Soendergaard <[EMAIL PROTECTED]> wrote: > I've written this behavior which I typically use for file uploads. > It's short and pretty easy to use, maybe you'll find it useful. You > can set the directory in which the file should be saved by setting the > option "destination". > > If you attact the behavior like this, > $this->YourController->Behaviors->attach('File', array('destination' > => 'yourpath')); > > you can construct the path from variables available to your > controller. > > On 19 Aug., 22:18, bartez <[EMAIL PROTECTED]> wrote: > > > Hey all, > > > I've scouted both here and the bakery etc and have had no success in > > finding the answer to my problem. > > > I would like to upload an image and save it in a file system (not a > > database). > > > I would like the structure to be as follows > > > img > > / items > > / groups > > /id > > /each individual image here > > > I've done this before in normal php but I'm sure there must be a cake > > way!! > > > Thanks for your help in advance. > > > Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
File upload
Hey all, I've scouted both here and the bakery etc and have had no success in finding the answer to my problem. I would like to upload an image and save it in a file system (not a database). I would like the structure to be as follows img / items / groups /id /each individual image here I've done this before in normal php but I'm sure there must be a cake way!! Thanks for your help in advance. Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Question on scaffolding and MS SQL Server
Well, I just ignored that little issue and I created a new controller and model to point it at the point of this whole exercise: a series of "legacy" tables. Again connecting to the tables was a snap, and pulling some data from it was pretty straightforward, but I'm stuck again. Maybe this will be easier to answer than the datetime issue. These tables (3) have some very non-standard column names such as: pharmacy__bname, customer__bid, customer__bloc, street__baddress. When findAll() returns values back from querying these tables, the column names are being truncated. Is there a way to alias column names in the Model or some other solution? --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Question on scaffolding and MS SQL Server
I've managed to installed CakePHP (1.1.7.3363) on Windows 2000, SQL Server 2000, and IIS (w/ISAPI_Rewrite). I've followed the tutorial located here grahambird.co.uk/cake/tutorials/scaffolding.php. I can list and insert and edit entries into the bookmarks with one exception. The created/modified date fields never insert or update. The fields also display as editable fields when editing or inserting an entry. If I manually enter values into those fields through the scaffold insert/edit form, it updates the table properly. I'm confused on this behavior and a little lost. I've searched through trac.cakephp.org and wiki.cakephp.org and couldn't find anything that addressed this issue. Here's the table: CREATE TABLE [bookmarks] { [id] [int] IDENTITY (1,1) NOT NULL, [name] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [created] [datetime] NULL, [modified] [datetime] NULL, CONSTRAINT [PK_bookmarks_6E565CE8] PRIMARY KEY CLUSTERED { [id] } ON [PRIMARY] } ON [PRIMARY] Here is the Controller: Here's the Model: Any insight would be really appreciated. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---