Re: Help debugging pseudocoder.com Asset Packer CakePHP Plugin

2009-06-10 Thread RyOnLife
I'm tailing my logs and nothing suspicious is turning up. Re: the #3 instruction from above, I did realize I was getting a helper error when Cake was in debug mode, so now using: app/plugins/asset/views/helpers/asset.php So, I've got the helper plugin working correctly when Cake is in debug m

Help debugging pseudocoder.com Asset Packer CakePHP Plugin

2009-06-10 Thread RyOnLife
http://github.com/mcurry/asset/tree/master http://github.com/mcurry/asset/tree/master I am having problems with this plugin. No errors, but when viewing the source, at the point where the CSS/JS files should be linked, there is no more markup, resulting in a blank page. Per asset.php lines 16-

Re: Data from multiple Models

2009-04-03 Thread RyOnLife
'])); ?> > > > > Agents_controller : > > function profile($slug = null) > { > $this->Agent->recursive = 1; > $user = $this->User->findBySlug($slug); > $id = $user['Agent']['id']; >

filtering with the containable behavior

2009-04-02 Thread RyOnLife
I am trying to filter with the containable behavior: $favs = $this->VideoItemFavorite->find('all', array( 'conditions' => array( 'VideoItemFavorite.user_id' => Configure::read('user_id') ), //'limit' => 3, 'contain' => array( 'VideoItem.video_list_id = ' . $vl_id, 'VideoItem.

Re: Data from multiple Models

2009-04-02 Thread RyOnLife
Dave, having a little trouble following your post, but this is how you use the containable behavior: $this->User->contain = array('Post.title', 'Post.description', 'Post.Bookmark'); $user = $this->User->findBySlug($slug); If you're having trouble figuring out which models to contain, try: $th

Re: Adding/Deleting HABTM on existing records

2009-03-31 Thread RyOnLife
That's how I handle my deletes. If you don't want to read the existing relationships before your save (meaning you don't want Cake to delete existing relationships before inserting new ones), in the models where you define the HABTM associations, set the 'unique' array key to 'false' and you'll n

Re: OR queries on the same field

2009-03-25 Thread RyOnLife
Got it: 'conditions' => array('or' => array( array('Vote.user_id' => 1), array('Vote.user_id' => 2) ) ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to

OR queries on the same field

2009-03-25 Thread RyOnLife
This query only passes the user_id = 2 condition: 'conditions' => array('or' => array( 'Vote.user_id' => 1, 'Vote.user_id' => 2 ) ) This query passes both conditions as expected: 'conditions' => arra

Re: Strange behavior with belongsTo association

2009-03-23 Thread RyOnLife
Thanks for offering to help. Below I have pasted **ModelName** and included table structure and associations. **User** CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `fb_id` int(11) NOT NULL, `created` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET

Strange behavior with belongsTo association

2009-03-23 Thread RyOnLife
VideoItem model: var $belongsTo = array('User', 'VideoList', 'Video'); >From the controller: $vi = $this->VideoItem->findById(18); pr($vi); The array only contains data for Video, not User or VideoList. When I modify the association by removing Video: var $belongsTo = array('User', 'VideoList')

Re: routing — duplicate content and SEO concerns

2009-03-22 Thread RyOnLife
RyOnLife wrote: > > > jon, yeah, makes sense re: beforeFilter() > > If anyone has insights into how to work this code into the router, I'd > appreciate your commentary. If not, I'll start dropping it into my > controller methods. > > > > -- View thi

Re: Converting SQL query to Cake query

2009-03-07 Thread RyOnLife
7;s too > complicated to do it the cake way, I end up just using regular php and > sql > queries. Nothing wrong with that. > > > On Mar 7, 2:33 am, RyOnLife wrote: >> Here's the afterFind(). It works. Would just like some comments on >> whether >>

Re: Converting SQL query to Cake query

2009-03-06 Thread RyOnLife
;fields' => array( 'Page.*', 'COUNT(PageViewTotal.id) AS views', 'COUNT(PageVoteTotal.id) AS votes' ), 'group' => 'VideoList.id', 'order' => 'views DESC', 'limit' => 10,

Re: Converting SQL query to Cake query

2009-03-06 Thread RyOnLife
ying to learn, any comments as to the effectiveness of this solution and/or ways to improve would be much appreciated. RyOnLife wrote: > > Here's the afterFind(). It works. Would just like some comments on whether > this is a sound approach. > > function after

Re: Converting SQL query to Cake query

2009-03-06 Thread RyOnLife
model to do the bind. And now I'm wondering if it would be possible and make sense to create a total_view_count.php file in the models folder. RyOnLife wrote: > > @grigri: Thanks. Just what I was looking for. I hadn't used bindModel() > before, but now makes total sense o

Re: Converting SQL query to Cake query

2009-03-06 Thread RyOnLife
> array('Page.*', 'COUNT(PageViewTotal.id) AS > page_view_count'), > 'group' => 'Page.id', > 'order' => 'page_view_count DESC', > 'limit' => 10 > )); > > hth > grigri > > On Mar 6,

Re: Converting SQL query to Cake query

2009-03-06 Thread RyOnLife
This doesn't work because 'view_count' is not a field. All of the view data is contained in the 'View' model, keyed to the 'Page' model (Post in your example). Maybe it would help if I share the full details of my models, tables and the SQL query/result I would like to create in Cake: Page hasM

Re: Converting SQL query to Cake query

2009-03-06 Thread RyOnLife
Thanks, but that doesn't address the issue. Removing the condition does not make the Cake query match the SQL query (or a LEFT JOIN equivalent). The normalized database has a views table that contains a record of each individual visit to a page. I do have my Cake associations properly setup: Pag

Converting SQL query to Cake query

2009-03-05 Thread RyOnLife
Hello, I am having trouble converting this SQL query to a Cake query that uses find(): SELECT Page.*, COUNT(*) AS views FROM pages AS Page INNER JOIN page_views AS PageView ON Page.id = PageView.page_id GROUP BY Page.id ORDER BY COUNT(*) DESC LIMIT 10 OFFSET 0 This is what I've got, but it

Re: Cake core is throwing unlink warnings

2009-02-28 Thread RyOnLife
Lovely... I went to try this out and the warnings have vanished as mysteriously as they first appeared. I've got this thread bookmarked and will update again as they come back. jitka (poLK) wrote: > > > I've never seen this issue before, and it is hard to reproduce it in > test case if it mi

Re: Cake core is throwing unlink warnings

2009-02-27 Thread RyOnLife
in function delete() to return @unlink($this->path); > > That specifcally seems to suppress these errors. I dislike having to > modify the core, but there you go. PS, this is 1.2.1.8004 also. > > ianh > > On Feb 27, 4:56 pm, RyOnLife wrote: >> I am also see these warning

Re: Cake core is throwing unlink warnings

2009-02-27 Thread RyOnLife
> Seems to only see these on ajax pages with CakePHP 1.2 (latest as of > 2/27/2009). > > On Feb 23, 2:51 pm, RyOnLife wrote: >> I am getting this (and other similar) warnings: >> >> Warning (2): >> unlink(/web/php/app/tmp/cache/persistent/cake_core_core_paths) &g

Re: Cake core is throwing unlink warnings

2009-02-24 Thread RyOnLife
his should solve the > problem. > Let us know how you go. > > > Cheers, > > Graham Weldon > w. http://grahamweldon.com > e. > gra...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2374507&i=0> > p. +61 407 017 293 > > > > On Mon,

Cake core is throwing unlink warnings

2009-02-23 Thread RyOnLife
I am getting this (and other similar) warnings: Warning (2): unlink(/web/php/app/tmp/cache/persistent/cake_core_core_paths) [function.unlink]: No such file or directory [CORE/cake/libs/file.php, line 292] Code unlink - [internal], line ?? File::delete() - CORE/cake/libs/file.php, line 292 File

Saving HABTM records when not all join table columns are foreign keys

2009-02-18 Thread RyOnLife
I am trying to update tables with a HABTM relationship. When my join table looked like this: CREATE TABLE IF NOT EXISTS `items_labels` ( `item_id` int(11) NOT NULL, `label_id` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; ... I could update the tables with $this->Item->save($data)

Re: Access $data content in afterSave callback

2009-02-16 Thread RyOnLife
odel::save(). The $data that's passed in is assigned to the model > near the top. Then, $this->data isn't set to false until after > afterSave() is called. > > On Mon, Feb 16, 2009 at 8:55 PM, RyOnLife wrote: >> >> >> I have the same question. So I c

Re: getting another model inside afterSave() cake 1.1

2009-02-16 Thread RyOnLife
Seems to work: $this->Model->method() RyOnLife wrote: > > I have the same question (using Cake 1.2). Any thoughts? Thanks. > > > Mithu wrote: >> >> >> I want to wirte a afterSave() function in app_controller so that afery >> every save operat

Re: getting another model inside afterSave() cake 1.1

2009-02-16 Thread RyOnLife
I have the same question (using Cake 1.2). Any thoughts? Thanks. Mithu wrote: > > > I want to wirte a afterSave() function in app_controller so that afery > every save operation for all models of the application, i can insert > LAST_INSERTED id to another table, Is it possible with cake 1.1?

Re: Access $data content in afterSave callback

2009-02-16 Thread RyOnLife
I have the same question. So I can use $this->data in my model, I have this in my controller: $this->Model->data = $this->data Doesn't feel right. Seems like an unnecessary line of code. Better way to get at $this->data from the Model's afterSave()? ORCC wrote: > > > I have the following q

Re: Email component — problems sending to same domain

2008-12-31 Thread RyOnLife
#x27;ll need to adress the host on. > > Just curious what host are you using? > > > > On Dec 30, 11:08 am, RyOnLife wrote: >> Hello, I am using the Email component and have the 'to' address set like >> this: >> >> $this->Email->to = '

Email component — problems sending to same domain

2008-12-30 Thread RyOnLife
Hello, I am using the Email component and have the 'to' address set like this: $this->Email->to = 'm...@mydomain.com'; If mydomain.com is a domain hosted on my server, the email never arrives, but it works just fine when I change to: $this->Email->to = 'm...@gmail.com'; I assume this is a ser

Re: With debug 0 routes stop working and all pages not found

2008-12-19 Thread RyOnLife
Go figure. 3 hours of trying and the moment send my previous message: it hits me. Clear the models cache. I'd added a new table. That fixed it. Wish Cake had some better error handling in that case. Would opening a ticket for that "issue" be appropriate? On Dec 19, 5:41 pm, RyOnLi

With debug 0 routes stop working and all pages not found

2008-12-19 Thread RyOnLife
My app suddenly went haywire. When I set debug to 0, I get 404 not found errors (from Cake, not Apache) on all pages. With the debug setting at 1 or 2 there are no problems. I've been working on this app for months and have never had a problem when changing debug mode to 0. I haven't made any edit

Re: validation rule works locally, but not on server

2008-12-18 Thread RyOnLife
4 vs 5) > > I also think there is a submitted ticket for the issue but I have the > time to search. > > Google  alphanumeric issue in Cakephp and Im sure you'll find the > details. > > On Dec 17, 3:00 pm, RyOnLife wrote: > > > This one has me completely stumped!

Re: routing — duplicate content and SEO concerns

2008-12-17 Thread RyOnLife
jon, yeah, makes sense re: beforeFilter() If anyone has insights into how to work this code into the router, I'd appreciate your commentary. If not, I'll start dropping it into my controller methods. --~--~-~--~~~---~--~~ You received this message because you are s

validation rule works locally, but not on server

2008-12-17 Thread RyOnLife
This one has me completely stumped! The validation rule I've pasted below works fine on my local machine, but when I test a user registration on my server, it kicks the "Letters and numbers only" error message, even if the input is valid. Both local and server are running Cake 1.2.0.7692 RC3 an

Re: routing — duplicate content and SEO concerns

2008-12-17 Thread RyOnLife
@AD7six: Would you mind expanding on that? --~--~-~--~~~---~--~~ 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

Re: routing — duplicate content and SEO concerns

2008-12-17 Thread RyOnLife
Thanks, that's actually much along the lines of what I was thinking. Your idea of 301ing to the correct page is better than my thought of 404ing. I don't like the idea of having to paste the seoCheck() into all of my controller methods, so could we work this into beforeFiler ()? Something like...

Re: routing — duplicate content and SEO concerns

2008-12-17 Thread RyOnLife
This issue has remained at the back of my mind, and I think I have a really simple solution. I need one question answered first: examples_controller.php has a function: demo($arg1, $arg2) { ... } call up this URL: /examples/demo/val1/val2/val3 Inside the controller logic for demo(), how can I re

Re: How to use Core Helpers in a console/shell script

2008-12-05 Thread RyOnLife
Ah, tricky. But I've got it now. Many thanks! Adam Royle wrote: > > > Right, you'll need to add this line before that as well. > > App::import('Core', 'Helper'); > > On Dec 5, 2:03 pm, RyOnLife <[EMAIL PROTECTED]> wrote: >>

Re: How to use Core Helpers in a console/shell script

2008-12-04 Thread RyOnLife
have > to instantiate it: > > $xml = new XmlHelper(); > > On Dec 5, 1:45 pm, RyOnLife <[EMAIL PROTECTED]> wrote: >> Hello, I am trying to use the Xml Helper in a shell script that will be >> run >> from the console. >> >> Per thehttp://book.cakephp.org/vie

How to use Core Helpers in a console/shell script

2008-12-04 Thread RyOnLife
Hello, I am trying to use the Xml Helper in a shell script that will be run from the console. Per the http://book.cakephp.org/view/499/The-App-Class I tried App::import('Helper', 'Xml') without any luck. Without success I also gave the suggestions in http://n2.nabble.com/Load-Helper-in-Console

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
Thanks. Strange that your newlines were double backslashed. Your post put me on the right track. I am using pre tags in my markup and didn't want to have to go through all of my controllers looking for each instance of Sanitize::clean, so I now have this as line 236 in sanitize.php: $data = str_

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
My bad. You're right. I just realized that I while I thought commenting that line out in sanitize.php did the trick, it actually worked because I'd commented out the call to Sanitize::clean() in my controller. So it's not Sanitize::html() that's the problem. Looks like I am back to square one...

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
1.2 RC3 cake/libs/sanitize.php line 147 mathew-2 wrote: > > > What version of Cake are you using? > > > > -- View this message in context: http://n2.nabble.com/Sanitize%3A%3Ahtml-replacing-newlines-with-literal-%5Cn-tp1608411p1614961.html Sent from the CakePHP mailing list archive at Na

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
@Matthew: Yes it does. I commented it out and it fixed the problem. -- View this message in context: http://n2.nabble.com/Sanitize%3A%3Ahtml-replacing-newlines-with-literal-%5Cn-tp1608411p1614924.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~--

Re: Sanitize::html replacing newlines with literal \n

2008-12-03 Thread RyOnLife
Looking at http://api.cakephp.org/sanitize_8php-source.html#l00103 it appears that stripWhitespace() is the offending function. I'd rather not modify the Cake core, so is there another way to change this function to suit my needs? -- View this message in context: http://n2.nabble.com/Sanitize%

Sanitize::html replacing newlines with literal \n

2008-12-03 Thread RyOnLife
When Sanitize::html runs on data, it is changing newlines to \n. When I look at my data in MySQL, it's literally filled with \n characters. This renders both PRE and nl2br() because they're looking for newlines, not the characters \n. How can I get Sanitize::html to leave the newlines alone inste

Re: routing — duplicate content and SEO concerns

2008-12-02 Thread RyOnLife
Re: #1 Good point. Re: #2 I'll probably back burner it for now, but suppose I did want to 404/301, only way to do it is in the controllers right? No easy way to do it in routes.php? -- View this message in context: http://n2.nabble.com/routing-%E2%80%94-duplicate-content-and-SEO-concerns-tp160

Re: routing — duplicate content and SEO concerns

2008-12-02 Thread RyOnLife
Why would anyone do that? It's a known black hat SEO tactic, among others aimed at sabotaging competition as a means to improve one's own ranking. Not that I have particular reason to be concerned that anyone is specifically out to get me, but: a.) It's still bothersome that the exposure is ther

routing — duplicate content and SEO concerns

2008-12-02 Thread RyOnLife
With some simple routing: Router::connect('/items/*', array('controller' => 'items', 'action' => 'view')); URLs like this are possible: http://domain.com/items/slug-here The problem, is that these are also valid pages that exactly duplicate the above page: http://domain.com/items/slug-here/unli

Re: Creating HABTM associations with table names that do not follow Cake conventions

2008-11-23 Thread RyOnLife
Bump. This has been giving me fits for days. Any help would be GREATLY appreciated. Thank you. -- View this message in context: http://n2.nabble.com/Creating-HABTM-associations-with-table-names-that-do-not-follow-Cake-conventions-tp1558730p1570346.html Sent from the CakePHP mailing list archive

Re: Email layouts not working

2008-11-22 Thread RyOnLife
Ah! Thanks Adam. -- View this message in context: http://n2.nabble.com/Email-layouts-not-working-tp1564302p1566470.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Email layouts not working

2008-11-21 Thread RyOnLife
Hello, I am having two problems with email: 1.) The email (welcome.ctp) is sending, but the layout (default.ctp) is not being included. 2.) I'd rather not have the "This email was sent using the CakePHP Framework..." message at the bottom. I've included the email layout, email view, and contro

Re: Model::find returns different results under different debug settings (possible bug?)

2008-11-21 Thread RyOnLife
> > On Nov 21, 11:39 am, RyOnLife <[EMAIL PROTECTED]> wrote: >> Hello, I have encountered a strange problem. With debug set to 1 or 2, >> the >> query shown below returns the expected results in an array. With debug >> set >> to 0, the ListItem.Item.Ite

Model::find returns different results under different debug settings (possible bug?)

2008-11-21 Thread RyOnLife
Hello, I have encountered a strange problem. With debug set to 1 or 2, the query shown below returns the expected results in an array. With debug set to 0, the ListItem.Item.ItemImage dimension of the array is empty. $list = $this->BalistikList->find('all', array( 'conditions'

Re: AssetHelper and CSS Tidy messing up stylesheets

2008-11-21 Thread RyOnLife
Well... The AssetHelper works fine. No bugs. When I originally switched out of debug mode, two things happened: 1.) CSS Tidy changed the order of some selectors, messing up the CSS. By changing options in the class. This was corrected. 2.) But also—for reasons I am still trying to understand—dat

Re: AssetHelper and CSS Tidy messing up stylesheets

2008-11-20 Thread RyOnLife
ild the whole thing. > > -Matthttp://www.pseudocoder.com > > On Nov 20, 10:34 pm, RyOnLife <[EMAIL PROTECTED]> wrote: > > > Thanks Matt... > > > 1.) No. > > > 2.) I set it to default (no compression) with the same results. > > > 3.) Cool. I didn&#x

Re: AssetHelper and CSS Tidy messing up stylesheets

2008-11-20 Thread RyOnLife
t sure if this will make a difference since > you've already tried a bunch of other settings. > 3) You can take out lines 168-174.  That will get rid of the code that > calls the CSS tidy. > > -Matthttp://www.pseudocoder.com > > On Nov 20, 10:00 pm, RyOnLife <[EMAIL PROT

AssetHelper and CSS Tidy messing up stylesheets

2008-11-20 Thread RyOnLife
I am using the AssetHelper from Matt/pseudocoder.com. Great helper for CSS and JS compression, but CSS Tidy is causing me fits... Due to all of its compression measures, in some cases it's messing up my pages by combining or re-arranging selectors, etc. Even with the options shown below (I just e

Re: Model::save() not executing

2008-11-20 Thread RyOnLife
ROTECTED]> wrote: > But if your save isn't even attempted, chance are on of the models is > failing validation > > On Nov 20, 2:53 pm, RyOnLife <[EMAIL PROTECTED]> wrote: > > > Array is fine. I think it might be a model problem. > > > On Nov 20, 4:30 am, ra

Creating HABTM associations with table names that do not follow Cake conventions

2008-11-20 Thread RyOnLife
I am working with two HABTM association. One is between models 'Item' and 'Label' and the other is between 'BalistikList' and 'Label'. I am having no trouble working with the association between 'Item' and 'Label' because all naming in models and tables follows Cake conventions. Controller logi

Re: saving HABTM (RC3)

2008-11-20 Thread RyOnLife
Lukas, I had a similar problem. The disconnect for me was not understanding what the array needed to look like. This might help you: http://groups.google.com/group/cake-php/browse_thread/thread/c7d30740dccc0d70 On Nov 20, 2:47 pm, Lukas <[EMAIL PROTECTED]> wrote: > Any ideas? > > On Nov 18, 1:

Re: Model::save() not executing

2008-11-20 Thread RyOnLife
vindranath > > On Nov 20, 8:57 am, RyOnLife <[EMAIL PROTECTED]> wrote: > > > I am trying to save some data to a HABTM association. I'm running in > > debug mode and Model::save() is not even attempting an INSERT. Looking > > at the query log at the bottom of the

Re: How to set DB config settings automatically based on $_SERVER['HTTP_HOST']?

2008-11-19 Thread RyOnLife
Here's what I do: class DATABASE_CONFIG { var $localhost = array( 'driver' => 'mysql', 'persistent' => false, 'host' => '127.0.0.1', 'login' => '', 'password' => '', 'database' => '',

Re: cakePHP auth help (for a cake newbir)

2008-11-19 Thread RyOnLife
Zen, I really struggled with the Auth as well on my first project. Here's the tutorial that got me over the hump: http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/ -Ryan On Nov 19, 8:03 pm, Zen <[EMAIL PROTECTED]> wrote: > Hello folks, > > I've been using codeigniter for some t

Model::save() not executing

2008-11-19 Thread RyOnLife
I am trying to save some data to a HABTM association. I'm running in debug mode and Model::save() is not even attempting an INSERT. Looking at the query log at the bottom of the page, there is nothing both DESCRIBE and SELECT statements. Here is the attempted save: $this->Item->save($label_data)

form helper appending unwanted parameteres to action

2008-11-07 Thread RyOnLife
I have a form: echo $form->create('User', array('action' => $user['User']['slug'])); When I submit, it's posted to: /users/user-slug But if I submit it a second time (following a successful submit or a validation error), it's posted to: /users/user-slug/3 Where '3' is probably coming from one

Re: Assmbla.com vs Github.com

2008-11-07 Thread RyOnLife
I use GitHub and am very happy with it. Can't offer any remarks on Assmbla though... cakeFreak wrote: > > > No one... has any advice ;o) > > > > > -- View this message in context: http://n2.nabble.com/Assmbla.com-vs-Github.com-tp1468809p1471882.html Sent from the CakePHP mailing list a

Re: Set::extract is shuffling elements in the return array

2008-11-05 Thread RyOnLife
On a hunch, I searched my code for "shuffle" and spotted a line where the array was indeed shuffled before Set::extract was called. Set::extract does in fact return elements in the same order. :-) RyOnLife wrote: > > Marcelo, I don't know any Java, however, just

Re: Set::extract is shuffling elements in the return array

2008-11-05 Thread RyOnLife
Marcelo, I don't know any Java, however, just seems strange that it shuffles the data. Even if it's "not ordered" and "not sorted", why wouldn't it just return in the existing order? Marcelo Andrade wrote: > > On Wed, Nov 5, 2008 at 11:46 PM, RyOnLif

Set::extract is shuffling elements in the return array

2008-11-05 Thread RyOnLife
I am using Set::extract to pull some IDs out of a large multi-dimensional array. Works great, except in the array that is returned, the IDs are shuffled. For example, the ID from the 0th dimension of the multi-dimensional array is the 3rd element in the return array. IDs are not returned in the

Re: Parameter passing in URL

2008-11-05 Thread RyOnLife
re trying to do, myself or others could help you think through the logic. Some for the issue with IDs/tabs would be helpful. -Ryan Feanor's Curse wrote: > > > Well, thanks for the tool RyOnLife, that's very nice indeed. Yet, I do > not see how this will solve the general pr

Re: Parameter passing in URL

2008-11-04 Thread RyOnLife
If the user opens a new tab and changes the ID there (in the > session), it will affect all other tabs, won't it? > > Best Regards, > Daniel Süpke > > > > RyOnLife wrote: >> >> Multiple tabs won't inhibit the use of sessions. >> >> >

Re: Parameter passing in URL

2008-11-03 Thread RyOnLife
Multiple tabs won't inhibit the use of sessions. Feanor's Curse wrote: > > > Thanks for the suggestion, but session variable won't work since the > user could have open multiple tabs with different IDs. > > Best Regards, > Daniel Süpke > > On O

Re: validation conflicts: two forms, one model, one page

2008-10-27 Thread RyOnLife
It's a workaround, but did the trick: $('#FormName .error-message').hide() -- View this message in context: http://n2.nabble.com/validation-conflicts%3A-two-forms%2C-one-model%2C-one-page-tp1370230p1382883.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~

Re: Parameter passing in URL

2008-10-27 Thread RyOnLife
Any reason setting a session variable wouldn't work? Feanor's Curse wrote: > > > Hi, > > we are using CakePHP 1.2 and I was wondering how it could be achieved > to pass a parameter along every URL. We have a parameter set to an ID > and it needs to be included in every URL in the application

Re: not understanding simple HABTM save/delete

2008-10-26 Thread RyOnLife
After hours and hours of frustration, I've figured it out. It wasn't fun, but maybe not having my questions answered makes me a better programmer. For future reference, it's actually pretty simple. I started with a new app with my existing models and by baking new controllers/views I was able to

not understanding simple HABTM save/delete

2008-10-25 Thread RyOnLife
After spinning my wheels for a few hours on this one, any help would be very appreciated... I have an 'Item' model: class Item extends AppModel { var $name = 'Item'; var $hasAndBelongsToMany = 'Label'; } A 'Label' model: class Label extends AppModel { var $name = 'Label'; var

Re: Load Data from other table

2008-10-25 Thread RyOnLife
If it's something as simple as a site name, http://n2.nabble.com/How-to-use-Components-in-Views--tp1377006p1377198.html this might help. Just use 'site_name' instead of 'site_id' and that will do the trick. thatsgreat2345 wrote: > > > I am making a site and for the index, and contact, and T

Re: Tags implementation

2008-10-25 Thread RyOnLife
I'm having some trouble with save/delete HABTM myself, but I can at least help you on your table design. Following Cake conventions (plural, lowercase, abc order) and assuming you want everything taggable, your join tables would be: tags_users (tag_id, user_id) brands_tags (brand_id, tag_id) pro

Re: How to use Components in Views?

2008-10-25 Thread RyOnLife
I've set a few configurations in my core.php: Configure::write('site_id', 1); Which you can get at from your views: -- View this message in context: http://n2.nabble.com/How-to-use-Components-in-Views--tp1377006p1377198.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~

Re: How should I implement two login Section 1: User Login 2: Business Login

2008-10-25 Thread RyOnLife
I've got a similar need in the app I am working on and elected to go with the single users table. Working with two instances of Auth sounds messy. $this->Auth->userScope = array('Model.field' => 'value'); You can set 'field' to something like 'group_id' and have a 'groups' table. If the degrees

Re: checkbox state

2008-10-24 Thread RyOnLife
Thanks... thought I tried that before. Clearly I didn't: Works fine. -- View this message in context: http://www.nabble.com/checkbox-state-tp20137221p20158824.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received thi

Re: how can I get online user count on each page?

2008-10-24 Thread RyOnLife
Hey, this is more of a PHP question than a CakePHP question. I just Google'd php count online users and came up with a lot of good http://www.devarticles.com/c/a/PHP/The-Quickest-Way-To-Count-Users-Online-With-PHP/ results . HTH, Ryan phpdev-2 wrote: > > > Hello, > > I am building an appli

validation conflicts: two forms, one model, one page

2008-10-23 Thread RyOnLife
I have a single page which contains both a login and a registration form, both post to the 'User' model. When the 'username' field in the registration form has a validation error, Cake shows the message on the 'username' field in the registration form and the 'login' form. How can I contain the e

Re: checkbox state

2008-10-23 Thread RyOnLife
add or omit 'checked' from the input tag. I can't figure out how to do the same in Cake. Bernardo Vieira-2 wrote: > > > echo $form->input('MyModel.my_tinyint_field',array('value' => 1); > > That should do the trick. > > RyOnLife

checkbox state

2008-10-23 Thread RyOnLife
Pardon me for asking I simple question, that I really feel I should have been able to find an answer to, but... Using the form helper, how can I create a checkbox which always defaults to a checked state? -- View this message in context: http://www.nabble.com/checkbox-state-tp20137221p20137221

Re: Working 1.2 Auth with "remember me" feature

2008-10-22 Thread RyOnLife
Tim and Co., just wanted say thanks for the great code. I was really struggling to understand the Auth component and this got me up and running. You mentioned in your initial post that your code was cobbled from all over and you'd give the original authors credit if you were able. I recognized

Re: request for debugging advice

2008-10-19 Thread RyOnLife
For the record, here is my attempted import: App::import('Vendor', 'krumo', array('file' => 'krumo/class.krumo.php')); -- View this message in context: http://www.nabble.com/request-for-debugging-advice-tp20033875p20063162.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-

Re: request for debugging advice

2008-10-19 Thread RyOnLife
Is anyone able to get Krumo to work by following the Bakery article? http://bakery.cakephp.org/articles/view/nicer-print_r-with-krumo http://bakery.cakephp.org/articles/view/nicer-print_r-with-krumo RyOnLife wrote: > > Took less than 5 minutes for me to give it a crack, but the

Re: request for debugging advice

2008-10-17 Thread RyOnLife
at, but it was a long > time ago - cake has got better since. > > Let us know how you get on, if it works well I might start using it > again! > > On Oct 17, 4:02 pm, RyOnLife <[EMAIL PROTECTED]> wrote: >> Having trouble getting it to work. I just dropped the class

Re: request for debugging advice

2008-10-17 Thread RyOnLife
elper? RyOnLife wrote: > > Sweet! Just what I was looking for. Thanks. > > > grigri wrote: >> >> >> You could check out Krumo : http://krumo.sourceforge.net/ >> >> It's a php debugging solution; makes expandable variables and stuff. >> I&#

Re: request for debugging advice

2008-10-17 Thread RyOnLife
h > grigri > > On Oct 17, 3:05 pm, RyOnLife <[EMAIL PROTECTED]> wrote: >> Just to clarify... What I really like about firecake.php and the FireBug >> output is that the arrays are expandable/collapsible. That's the >> functionality I'd like to find in anothe

Re: request for debugging advice

2008-10-17 Thread RyOnLife
Just to clarify... What I really like about firecake.php and the FireBug output is that the arrays are expandable/collapsible. That's the functionality I'd like to find in another debugging solution. RyOnLife wrote: > > I've been using the firecake.php helper to a

request for debugging advice

2008-10-17 Thread RyOnLife
I've been using the firecake.php helper to aid in my debugging. I primarily use it to drill into the values held in those big nested arrays that result from running recursive find() on models. Was working great, but now I'm getting unterminated string literal errors on the fbout['Variables'] that

Re: SQL errors with the searchable behavior

2008-10-13 Thread RyOnLife
' statements at > various places in the behaviour to see what parts of the behaviour are > being run (if...else), that might help you track down if something is > failing. > > Let me know if you find any bugs too! > > AO > > > > On Oct 13, 8:56 pm, RyOnLife &

Re: SQL errors with the searchable behavior

2008-10-13 Thread RyOnLife
rs at the top of searchable.php to true. Hopefully this will work if I can get the index built! acoustic_overdrive wrote: > > > Hi RyOnLife, > > I've been playing with that searchable behaviour recently too and I > think I've found a few bugs in it. >

Re: FirePHP debugging on live server?

2008-10-13 Thread RyOnLife
Sorry to state the obvious, but did you enable the Console, Net, and Script consoles? They're on a domain by domain basis. And FYI, I find the Firecake helper (http://bakery.cakephp.org/articles/view/firecake-helper) far more useful than FirePHP. Donkeybob wrote: > > > I installed the Firep

Re: Yet another site powered by Cakephp

2008-10-13 Thread RyOnLife
Just wanted to say I like the interface!! Plain and easy to navigate, but something cool about the simplicity. Sayhello-2 wrote: > > > Hello all, > > Just wanted to introduce yet another site built with CakePHP 1.2 RC3 - > www.sayhello.me. Sayhello is a new classified ads site to help you bu

  1   2   >