Re: Bakery...arrogance or plain lack of attention

2010-05-05 Thread Jayesh Wadhwani
There was no discussion. I did talk to someone about the status and
all I got was that it was not a nice article.

I am not not selling this stuff. It is just a contribution. If it
helps even one programmer it is ok. Like I said it is only a
contribution.

If you are a core member and cannot professionally answer my question
as to why my article is languishing then I suggest you quit the core.

Get real. It is an open source framework for God's sake.

Being a core member, a moderator or a reviewer, you are here to help
the community. You seem to be considering your position as some sort
of an authoritative position.

This is voluntary work. I spent time writing it with the only intent
that it may help some one. This is what I get in return.

I stand what I have said. It breeds arrogance.

This will be my last reply. I have no plans to continue in this
community. I am sure there are other communities where all and any
help is respectfully welcome.

On May 1, 6:36 am, AD7six andydawso...@gmail.com wrote:
 On Apr 29, 11:22 pm, jacmoe jac...@mail.dk wrote:

  I was maybe a bit too harsh, but Mr. Wadhwani failed to notice that we
  are indeed trying to fix the issues, and that this is not borne out of
  arrogance.
  I understand that he's pissed off, of course.
  And that he's letting out some steam.

 while thebakery- and the review process - is far from perfect it's
 worth noting the following (for the unknowing bystanders):

 The article was titled Simple Jquery Treeview Helper
 It didn't do anything that existing code doesn't already let you do
 [1]
 Jayesh did discuss his article with a core member in the irc channel
 weeks before this post [2]

 While the article shouldn't have been deleted without a comment to the
 author (I don't remember, is the deletion of stale articles
 automatic?) it wasn't destined to be published and Jayesh didn't do
 anything about the articles shortcoming (which would be difficult
 since the main problem was surely the tiny nature of the code and that
 it repeats core - and other - existing functionality)

 hth

 AD
 [1]http://api.cakephp.org/class/html-helper#method-HtmlHelpernestedList
 (amongst other code solutions)
 [2]http://irc.cakephp.org/search/cakephp/Wadhwani_J

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


Re: using id how to get the details

2010-05-05 Thread Ramkumar Ramkumar
hey bro use the queries with joins

On Wed, May 5, 2010 at 11:42 AM, Master Ram ramganga...@gmail.com wrote:

 hi.. all i am new to cakephp.

 i have table called campaign: this table containing user_id form
 users table. i want to get user details form user table. and i want to
 display the result of both table campaign and users table.

 how to do. this

 please help me

 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Thanks  Regards,
M.Ramkumar

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


Cakephp database migration error

2010-05-05 Thread Vijay
Hello All,

I am using the database migration plug-in provided by CakeDC.

I followed all the instructions given by them, but when i use the
command 'cake migration help' it gives me error,

Hello user,

Welcome to CakePHP v1.2 Console
---
Current Paths:
 -working: /path/to/cake/
 -root: /path/to/cake/
 -app: /path/to/cake/app/
 -core: /path/to/cake/

Changing Paths:
your working path should be the same as your application path
to change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp

Available Shells:

 app/vendors/shells/:
 - none

 vendors/shells/:
 - none

 cake/console/libs/:
 acl
 api
 bake
 console
 extract

To run a command, type 'cake shell_name [args]'
To get help on a specific command, type 'cake shell_name help'


I am inside my application app/ folder  using the command. I am
working with ubuntu environment.

I followed the given instructions on, 
http://book.cakephp.org/view/108/The-CakePHP-Console
but it doesnt work.

Can anybody help me out of this problem.

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


Re: Form Tag!!!!

2010-05-05 Thread Andrei Mita
Read here how to correctly define $form-create

http://book.cakephp.org/view/183/Creating-Forms


2010/5/4 sherzo shahrzad.azimi...@gmail.com


 Anyone can help me 




 sherzo wrote:
 
  Hi all!!!
 
  I have the following code in my View:
 
 
  ?php //echo
 
 $form-create('UsersCoupon',array('id'='update','url'=array('action'='changeStatustoUsed')));?
 
div class=kuponTop
div class=kuponBottom
div class=kuponCenter
  ul
li class=kuponFirstp
  class=ilkKUPONLARIM/ppADET/ppDEGER/pp class=sonBITIS
  TARIHI/p/li
  ?php $usersCoupons =
  $this-requestAction('users_coupons/listNotUsedCoupons'); ?
 
 ?php
 
  foreach($usersCoupons as $usersCoupon):
  ?
  li ?php //echo
  $form-checkbox('cop.id.'.$usersCoupon['UsersCoupon']['id'],
 array('value'
  = $usersCoupon['UsersCoupon']['id'])); ?
  ?php //echo $form-input($usersCoupon['UsersCoupon']['id'],array(
  'type'='checkbox',   'label'=false,
  'name'='cop['.$usersCoupon['UsersCoupon']['id'].']',
  'id'='cop_'.$usersCoupon['UsersCoupon']['id']));
 ?
p
 class=ilk?php   echo $usersCoupon['Coupon']['title']?/p
  p?php
$m
 = $usersCoupon['UsersCoupon']['transaction_code'];
 
 $count =
  $this-requestAction('users_coupons/countUserCouponPurchasePerTime/'.$m);
 
  echo $count;?/pp?php echo
  $count*$usersCoupon['Coupon']['sale_price'];?TL/pp class=son?php
  echo $usersCoupon['Coupon']['expiration_date'];?/p/li
  ?php endforeach;
 
  ?
 
  /ul
  /div
 
  /div
  /div
?php //echo
 $form-submit('kullandiklarimi-arsive-at-button.gif',
  array('class'='submit'));?
 
div class=pageNum
 
  !-- Shows the page numbers --
  ?php
  echo $paginator-prev('«  ', null, null, array('class' = 'disabled'));
  echo $paginator-numbers(); ?
  !-- Shows the next and previous links --
  ?php
 
echo $paginator-next('  »', null, null, array('class' =
 'disabled'));
  ?
   br class=cb /
  p style=font-family:Verdana;
  font-size:11px;color:#c4; padding-top:15px;Lütfen önce
 kullandığınız
  kuponları işaretleyin./p
  /div
 
  and as soon as I uncomment the form tag I will receive the following
 error
  message!!!
 
  Fatal error: Cannot use object of type Xml as array in cakephp form
 
  any idea?!?!
 

 --
 View this message in context:
 http://old.nabble.com/Form-Tag%21%21%21%21-tp28425388p28452273.html
 Sent from the CakePHP mailing list archive at Nabble.com.

 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


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


Re: using id how to get the details

2010-05-05 Thread Master Ram
Ok sir i got it

On May 5, 11:18 am, Ramkumar Ramkumar ramkumar.r...@gmail.com wrote:
 hey bro use the queries with joins



 On Wed, May 5, 2010 at 11:42 AM, Master Ram ramganga...@gmail.com wrote:
  hi.. all i am new to cakephp.

  i have table called campaign: this table containing user_id form
  users table. i want to get user details form user table. and i want to
  display the result of both table campaign and users table.

  how to do. this

  please help me

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comcake-php%2bunsubscr...@googlegroups.comFor
   more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en

 --
 Thanks  Regards,
 M.Ramkumar

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


Re: Cakephp Ajax is not including the javascripts in the view

2010-05-05 Thread Vijay Kumbhar
Thanks andy,

But i have included the js files in the response page. but it is not
rendering that js files.

Also how can i embed directely in the response, because i am using the
cakephp AJAX helper for all the ajax calls

On Fri, Apr 30, 2010 at 8:40 PM, Andy Dirnberger
andy.dirnber...@gmail.comwrote:

 I believe the src attribute of any script tag loaded through an Ajax
 call is ignored; all JavaScript needs to be included in the original
 page load or embedded directly in the response.

 On Apr 30, 3:23 am, Vijay k.vidn...@gmail.com wrote:
  Thanks for reply andrei.
 
  I am calling the normal javascript functions or any javascript file.
  I have some jquery effects for the text boxes  drop downs. That are
  not including when the ctp get called.
 
  my code is,
 
  ?php
  echo $html-css('mycss);
 
  echo $html-script(array('jquery', 'another script'));?
 
  rest my html code
 
  It is including the css but no js is included.
  here i am using jquery with prototype.
 
  On Apr 30, 12:10 pm, Andrei Mita andrei.m...@gmail.com wrote:
 
 
 
 
 
   What type of js do you have in the loaded ctp?
 
   Maybe you forgot to include something in the layout.
 
   It's a blind guess without seeing the actual code. At least for me.
 
   On Fri, Apr 30, 2010 at 9:23 AM, Vijay k.vidn...@gmail.com wrote:
Hello All,
 
I am using the ajax for the internal links in my site.
 
When i click on the link  the new ctp loads, it is not including the
javascripts that are included in that ctp.
So the effects are not working.
 
It includes the css but not including the javascript.
 
Any idea.
 
Thanks,
 
Vijay Kumbhar,
CTO, Weboniselab.
9766251100
 
Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
 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.comcake-php%2bunsubscr...@googlegroups.com
 cake-php%2bunsubscr...@googlegroups.c omFor more options, visit this
 group at
   http://groups.google.com/group/cake-php?hl=en
 
   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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.comcake-php%2bunsubscr...@googlegroups.comFor
more options, visit this group athttp://
 groups.google.com/group/cake-php?hl=en
 
  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comcake-php%2bunsubscr...@googlegroups.comFor
   more options, visit this group athttp://
 groups.google.com/group/cake-php?hl=en

 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Thanks  Regards,
Vijayk.

You Bring the Dreams, We'll Bring the Means

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


Re: Structure of data returned by $this-Model-find

2010-05-05 Thread gabriel
Hi,

In order to make a node system with a standard way, check this
ressource :
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
The exemple is specifique to mysql but you can make change to fit your
needs.


Cheers!

Gabriel

On 4 mai, 10:26, Roland B feedback2...@eudoxos.de wrote:
 Hi,

 is there a way to change the structure of data returned by a model's
 find call? Or should I use a different call? IMHO, the default seems
 to be inconsistent in the way it handles associations:

 Given this model:
 //---
 class Querycategory extends AppModel
 {
    var $recursive = 10;
    var $hasMany = array(
           'Querycategory' = array('order' = 'name ASC'),
           'Querygroup'    = array('order' = 'name ASC'));}

 //---

 A call to $this-Querycategory-find('all') yields something like
 this:

 Array
 (
     [0] = Array
         (
             [Querycategory] = Array
                 (
                     [id] = 70
                     [querycategory_id] = 34
                     [0] = Array
                         (
                             [id] = 71
                             [querycategory_id] = 70
                             [Querygroup] = Array
                                 (
                                     [0] = Array
                                         (
                                             [id] = 43
                                             [querycategory_id] = 71
                                         )
                                 )
                         )
                 )
             [Querygroup] = Array
                 (
                 )
         )
 )

 A Querygroup belonging to the Root-Querycategory is at the same level
 as the root node and it is called Querygroup.
 A Querygroup belonging to a child category is inside that child node
 and it is called Querygroup.
 A Querycategory belonging to any other category is inside its parent
 and unnamed, unless there is also a Querygroup at the same level: then
 it is called 'Querycategory'

 I would prefer:
 Querygroup is always contained in it's parent, always being called
 'Querygroup'.
 Querycategory is always contained in its parent, always being called
 'Querycategory'.

 Is there a standard way to achieve this?

 Using cake-1.2.

 Thank you very much in advance,

 Roland

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


Re: using id how to get the details

2010-05-05 Thread Jeremy Burns
Sorry - but that's the wrong answer and defeats one of the main purposes of 
using a framework like Cake. Queries are the avenue of last resort.

First, I'd look at the conventions: 
http://book.cakephp.org/view/901/CakePHP-Conventions  I recommend this because 
your campaign table should really be called campaigns.

Create a model for each table. 
http://book.cakephp.org/view/1001/Understanding-Models

Then, set up your model associations: 
http://book.cakephp.org/view/1039/Associations-Linking-Models-Together This 
effectively joins your tables together in a consistent, repeatable and 
re-useable manner.

Then you can build structured finds really easily: 
http://book.cakephp.org/view/1018/find

I'd really recommend you incorporate the Containable behaviour too: 
http://book.cakephp.org/view/1323/Containable

So an example might be:

$this-Campaign-find(
'all',
array(
'contain' = array(
'User'
)
)
);

This does a find all on the Campaign model (on the campaigns table) and 
includes related User records (from the users table). You can add conditions, 
restrict fields and do so much more from this simple set up.

I know that sometimes all you want is a quick, one line answer, but if you are 
new to Cake I'd really recommend getting to grips with the basics. A little 
time invested now will reap rewards in the long term.

Jeremy Burns
jeremybu...@me.com
On 5 May 2010, at 07:31, Master Ram wrote:

 Ok sir i got it
 
 On May 5, 11:18 am, Ramkumar Ramkumar ramkumar.r...@gmail.com wrote:
 hey bro use the queries with joins
 
 
 
 On Wed, May 5, 2010 at 11:42 AM, Master Ram ramganga...@gmail.com wrote:
 hi.. all i am new to cakephp.
 
 i have table called campaign: this table containing user_id form
 users table. i want to get user details form user table. and i want to
 display the result of both table campaign and users table.
 
 how to do. this
 
 please help me
 
 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en
 
 --
 Thanks  Regards,
 M.Ramkumar
 
 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en
 
 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

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


Re: Structure of data returned by $this-Model-find

2010-05-05 Thread Roland Bock
Hi,

thanks for the link, but I fail to see how this will help me with cake
models? I would like to use cake's mechanisms like validate, save, find,
but with a consistent node structure.

Thanks and regards,

Roland

gabriel wrote:
 Hi,
 
 In order to make a node system with a standard way, check this
 ressource :
 http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
 The exemple is specifique to mysql but you can make change to fit your
 needs.
 
 
 Cheers!
 
 Gabriel
 
 On 4 mai, 10:26, Roland B feedback2...@eudoxos.de wrote:
 Hi,

 is there a way to change the structure of data returned by a model's
 find call? Or should I use a different call? IMHO, the default seems
 to be inconsistent in the way it handles associations:

 Given this model:
 //---
 class Querycategory extends AppModel
 {
var $recursive = 10;
var $hasMany = array(
   'Querycategory' = array('order' = 'name ASC'),
   'Querygroup'= array('order' = 'name ASC'));}

 //---

 A call to $this-Querycategory-find('all') yields something like
 this:

 Array
 (
 [0] = Array
 (
 [Querycategory] = Array
 (
 [id] = 70
 [querycategory_id] = 34
 [0] = Array
 (
 [id] = 71
 [querycategory_id] = 70
 [Querygroup] = Array
 (
 [0] = Array
 (
 [id] = 43
 [querycategory_id] = 71
 )
 )
 )
 )
 [Querygroup] = Array
 (
 )
 )
 )

 A Querygroup belonging to the Root-Querycategory is at the same level
 as the root node and it is called Querygroup.
 A Querygroup belonging to a child category is inside that child node
 and it is called Querygroup.
 A Querycategory belonging to any other category is inside its parent
 and unnamed, unless there is also a Querygroup at the same level: then
 it is called 'Querycategory'

 I would prefer:
 Querygroup is always contained in it's parent, always being called
 'Querygroup'.
 Querycategory is always contained in its parent, always being called
 'Querycategory'.

 Is there a standard way to achieve this?

 Using cake-1.2.

 Thank you very much in advance,

 Roland

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en
 
 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

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


Re: The docs for Containable does not work for complex search. Complex search is 2 models away. For cake 1.3

2010-05-05 Thread AD7six


On May 5, 3:40 am, Kei Simone kimc...@gmail.com wrote:
 Hi Andy,

 so in conclusion, i should get into the habit of installing these cake
 files as plugins.

 Thank you.

 I didn't try your one_query cause i tried reading it but i dont quite
 understand how to use it.

There's not much to figure out if you know how to use containable. You
use it exactly like containable and as I said either:

 $this-attach('Mi.OneQuery', array('paramName' = 'contain'));
 $this-find('all', array('contain' = $same ..
OR
 $this-attach('Mi.OneQuery');
 $this-find('all', array('oneQuery' = $same ..


 Hope you dont mind.

Of course not ;)

AD

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


Re: Bakery...arrogance or plain lack of attention

2010-05-05 Thread AD7six


On May 4, 11:13 pm, Jayesh Wadhwani jwadhw...@gmail.com wrote:
 There was no discussion. I did talk to someone about the status and
 all I got was that it was not a nice article.

 I am not not selling this stuff. It is just a contribution. If it
 helps even one programmer it is ok. Like I said it is only a
 contribution.

 If you are a core member and cannot professionally answer my question
 as to why my article is languishing then I suggest you quit the core.

 Get real. It is an open source framework for God's sake.

 Being a core member, a moderator or a reviewer, you are here to help
 the community. You seem to be considering your position as some sort
 of an authoritative position.

 This is voluntary work. I spent time writing it with the only intent
 that it may help some one. This is what I get in return.

I think what you fail to realize is that if the bakery published every
submission (some good, some not so good) it makes it HARDER to find
information/help. The pool of information grows and the info gets
harder to find. There are already a lot of dubious/duplicate
submissions - There are iirc 2 or 3 tree/ul related helpers/articles.

I also think you're taking this all way too personally - you're
completely right the publication/moderation process isn't perfect I'd
go as far as to say it's flat out wrong - that's partly because it's
been outgrown, partly because of application errors and partly because
the team who review articles is made up of people exactly like you.
And when I say exactly like you I mean you could have used this as an
opportunity to really help out instead of an attack on the people who
spend their time moderating the bakery.

Anyway, I hope you either reconsider (and calm down) or find peace in
your new home,

AD

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


Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-05 Thread AD7six


On May 4, 8:59 pm, Matthew ghostofagoodth...@gmail.com wrote:
 Wow a lot of conflict in here. I am pretty new with Cake, I had a test
 site up with 1.2 and have recently moved to 1.3 for PHP 5.3 support.
 The biggest roadblock for me is permissions management. I am trying to
 write a permissions editor that lists all controllers and their
 methods so I can simply bind a group to a method.

 Placing controllers in subfolders has always worked fine aside from
 this. I guess I will just move them into the controllers root.

So you're not that new ;)

If you've no 'good' reason for putting controllers in subfolders -
being conventional is always a good idea. It should, however, have
worked without you doing anything (as it did for you previously).

I'd plug for marks plugin unless it has a shortcoming for you.

hth,

AD

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


Re: Structure of data returned by $this-Model-find

2010-05-05 Thread AD7six


On May 4, 10:26 am, Roland B feedback2...@eudoxos.de wrote:
 Hi,

 is there a way to change the structure of data returned by a model's
 find call? Or should I use a different call? IMHO, the default seems
 to be inconsistent in the way it handles associations:

 Given this model:
 //---
 class Querycategory extends AppModel
 {
    var $recursive = 10;
    var $hasMany = array(
           'Querycategory' = array('order' = 'name ASC'), --


you can't use the same alias twice - the conventional way to do it -
if you aren't using the tree behavior of course - would be to use
Parent and/or child

var $hasMany = array('Parent' = ('className' = 'Querycategory'

I'd recommend using bake and then looking at what it gives you -
whilst bearing in mind if your db schema is unconventional it's going
to get confused just like you have. There's more general info in the
book around here: 
http://book.cakephp.org/view/78/Associations-Linking-Models-Together

hth,

AD

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


Re: Structure of data returned by $this-Model-find

2010-05-05 Thread AD7six


On May 5, 10:05 am, AD7six andydawso...@gmail.com wrote:
 On May 4, 10:26 am, Roland B feedback2...@eudoxos.de wrote:

  Hi,

  is there a way to change the structure of data returned by a model's
  find call? Or should I use a different call? IMHO, the default seems
  to be inconsistent in the way it handles associations:

  Given this model:
  //---
  class Querycategory extends AppModel
  {
     var $recursive = 10;
     var $hasMany = array(
            'Querycategory' = array('order' = 'name ASC'), --

 you can't use the same alias twice - the conventional way to do it -
 if you aren't using the tree behavior of course - would be to use
 Parent and/or child

 var $hasMany = array('Parent' = ('className' = 'Querycategory'

oops
var $belongsTo = array('Parent' = ('className' =
'Querycategory', ...
var $hasMany = array('Child' = ('className' = 'Querycategory', ...

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


table joining problem

2010-05-05 Thread Master Ram
hi.. all

i am joining 2 tables table: table name is fixed table 1. adb_campaign
and 2. adb_users.

these two tables i ma joining.

adb_campaign table containing user_id(adb_user table) form that i want
to get the user details.

this is my campaign.php module code:
?php
class Campaign extends AppModel
{
var $useTable ='adb_campaign'; //the actual name of the table in
the database
var $belongsTo = 'User';

}
?

this is my users.php module code:

?php
class User extends AppModel {

var $tablePrefix = 'adb_';
var $hasMany = 'Campaign';
}
?

my controller are. users_controller.php code:

?php
class UsersController extends AppController {

var $tablePrefix = 'adb_';
   // var $scaffold;

var $uses=array('Client','User');

var $helpers = array('Html', 'Form');

function mycampaigns_results() {

$this-Client-recursive = 1;

$clients = $this-Client-find('all');

$this-set('clients',$clients);

}
}
?
my controller are. campaigns_controller.php code:

?php
class CampaignsController extends AppController {

var $name = 'Campaigns';
//var $scaffold;

var $uses = array('Client','User','Campaign');

var $helpers = array('Html', 'Form');

function mycampaigns_results() {

   /*$clients = $this-Client-find('all',
 array(
 'fields' =
 'client_name'));
$this-set('clients',$clients);
$this-Campaign-recursive = 1;*/
$campaigns = $this-Campaign-find('all');

$this-set('campaigns',$campaigns);
}
}
?


and my view page is: mycampaigns_results.ctp code:

table widtd=100% cellpadding=3 cellspacing=1
   border=0class='general_content_font' style='width:100%;
align=center
tr style=background: url('?php echo $this-webroot; ?img/
images/title2.gif') repeat-x; height=20
td bgcolor=c0c0c0#/tdtd bgcolor=c0c0c0Job No./td
td bgcolor=c0c0c0Campaign Name/td
td bgcolor=c0c0c0Campaign Date/td
td bgcolor=c0c0c0Status/td

/tr
?php foreach($campaigns as $campaign): ?
?php
if ( ( $campaign['Campaign']['campaign_id'] % 2) == 0 )
$bg_color = #F2F2F2;
else
$bg_color = #FFF;?
tr style=background: ?php echo $bg_color;? 
td?php echo $campaign['Campaign']['campaign_id'] ?/td
td?php echo $campaign['Campaign']['jobno'] ?/td
td?php echo($html-link($campaign['Campaign']
['campaign_name'],
   user_assign,
   array('class' ='url4_font')));?
/td
td?php echo $campaign['Campaign']['start_date'] ?/td
td?php echo $campaign['Client']['campaign_name'] ?/td
/tr
?php endforeach; ?
/table


where i did the mistake...

please help me

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


Re: Structure of data returned by $this-Model-find

2010-05-05 Thread Roland Bock
Hi,

ok, tried that, but the inconsistency in the data structure stays:

Model:
==
class Querycategory extends AppModel
{
   var $recursive = '10';
   var $hasMany = array(
  'Node' = array('className' = 'Querycategory'),
  'Leaf'= array('className' = 'Querygroup'));
}

Result:
===
Array
(
[0] = Array
(
[Querycategory] = Array
(
[id] = 70
[querycategory_id] = 34
)

[Node] = Array
(
[0] = Array
(
[id] = 71
[querycategory_id] = 70
[Leaf] = Array
(
[0] = Array
(
[id] = 43
[querycategory_id] = 71
)
)

[Node] = Array
(
[0] = Array
(
[id] = 30
[querycategory_id] = 35
[name] = Bau
[Leaf] = Array
(
)
)
)
)
)

[Leaf] = Array
(
)
)
)

As you can see, Leaf is sometimes on the same level as its parent,
sometimes it is included. Same happens with Node.

This is an inconsistent structure...

Apart from that, now my root querycategory is 'Querycategory' while all
other querycategories are 'Node'.


Thanks and regards,

Roland

AD7six wrote:
 
 On May 5, 10:05 am, AD7six andydawso...@gmail.com wrote:
 On May 4, 10:26 am, Roland B feedback2...@eudoxos.de wrote:

 Hi,
 is there a way to change the structure of data returned by a model's
 find call? Or should I use a different call? IMHO, the default seems
 to be inconsistent in the way it handles associations:
 Given this model:
 //---
 class Querycategory extends AppModel
 {
var $recursive = 10;
var $hasMany = array(
   'Querycategory' = array('order' = 'name ASC'), --
 you can't use the same alias twice - the conventional way to do it -
 if you aren't using the tree behavior of course - would be to use
 Parent and/or child

 var $hasMany = array('Parent' = ('className' = 'Querycategory'
 
 oops
 var $belongsTo = array('Parent' = ('className' =
 'Querycategory', ...
 var $hasMany = array('Child' = ('className' = 'Querycategory', ...
 
 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

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


Re: Form Tag!!!!

2010-05-05 Thread WebbedIT
OK, if this problem is only down to a single form tag there is no need
to paste the rest of your view, some ppl are likely to see all of that
and move onto another post.

I would remove all options from the form tag and build it back up till
you find the problem

echo $form-create('UsersCoupon');

echo $form-create('UsersCoupon', array('id'='update'));

echo $form-create('UsersCoupon',
array('action'='changeStatustoUsed'));

echo $form-create('UsersCoupon', array('id'='update',
'action'='changeStatustoUsed'));

But the one I spotted in doing the above (couldn;t see it in amongst
all your other code) is that your url array only contained an action
and form accepts action as an option parameter so my 3rd/4th examples
may work for you.

HTH

Paul

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


Re: table joining problem

2010-05-05 Thread Jeremy Burns
This seems to be a recurring post from you on the same subject - are you taking 
any notice at all of replies you get or are we all wasting our time?

What errors are you getting?

Jeremy Burns
jeremybu...@me.com
On 5 May 2010, at 09:09, Master Ram wrote:

 hi.. all
 
 i am joining 2 tables table: table name is fixed table 1. adb_campaign
 and 2. adb_users.
 
 these two tables i ma joining.
 
 adb_campaign table containing user_id(adb_user table) form that i want
 to get the user details.
 
 this is my campaign.php module code:
 ?php
 class Campaign extends AppModel
 {
var $useTable ='adb_campaign'; //the actual name of the table in
 the database
var $belongsTo = 'User';
 
 }
 ?
 
 this is my users.php module code:
 
 ?php
 class User extends AppModel {
 
var $tablePrefix = 'adb_';
var $hasMany = 'Campaign';
 }
 ?
 
 my controller are. users_controller.php code:
 
 ?php
 class UsersController extends AppController {
 
var $tablePrefix = 'adb_';
   // var $scaffold;
 
var $uses=array('Client','User');
 
var $helpers = array('Html', 'Form');
 
function mycampaigns_results() {
 
$this-Client-recursive = 1;
 
$clients = $this-Client-find('all');
 
$this-set('clients',$clients);
 
}
 }
 ?
 my controller are. campaigns_controller.php code:
 
 ?php
 class CampaignsController extends AppController {
 
var $name = 'Campaigns';
//var $scaffold;
 
var $uses = array('Client','User','Campaign');
 
var $helpers = array('Html', 'Form');
 
function mycampaigns_results() {
 
   /*$clients = $this-Client-find('all',
 array(
 'fields' =
 'client_name'));
$this-set('clients',$clients);
$this-Campaign-recursive = 1;*/
$campaigns = $this-Campaign-find('all');
 
$this-set('campaigns',$campaigns);
}
 }
 ?
 
 
 and my view page is: mycampaigns_results.ctp code:
 
 table widtd=100% cellpadding=3 cellspacing=1
   border=0class='general_content_font' style='width:100%;
 align=center
tr style=background: url('?php echo $this-webroot; ?img/
 images/title2.gif') repeat-x; height=20
td bgcolor=c0c0c0#/tdtd bgcolor=c0c0c0Job No./td
td bgcolor=c0c0c0Campaign Name/td
td bgcolor=c0c0c0Campaign Date/td
td bgcolor=c0c0c0Status/td
 
/tr
?php foreach($campaigns as $campaign): ?
?php
if ( ( $campaign['Campaign']['campaign_id'] % 2) == 0 )
$bg_color = #F2F2F2;
else
$bg_color = #FFF;?
tr style=background: ?php echo $bg_color;? 
td?php echo $campaign['Campaign']['campaign_id'] ?/td
td?php echo $campaign['Campaign']['jobno'] ?/td
td?php echo($html-link($campaign['Campaign']
 ['campaign_name'],
   user_assign,
   array('class' ='url4_font')));?
/td
td?php echo $campaign['Campaign']['start_date'] ?/td
td?php echo $campaign['Client']['campaign_name'] ?/td
/tr
?php endforeach; ?
/table
 
 
 where i did the mistake...
 
 please help me
 
 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

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


Re: table joining problem

2010-05-05 Thread Master Ram...!
sir i am not get any solutions.

for that only i am given detail

information.. sir

thank u sir

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


Re: Structure of data returned by $this-Model-find

2010-05-05 Thread AD7six


On May 5, 10:29 am, Roland Bock feedback2...@eudoxos.de wrote:
 Hi,

 ok, tried that, but the inconsistency in the data structure stays:

 Model:
 ==
 class Querycategory extends AppModel
 {
    var $recursive = '10';
    var $hasMany = array(
           'Node' = array('className' = 'Querycategory'),
           'Leaf'    = array('className' = 'Querygroup'));

 }

 Result:
 ===
 Array
 (
     [0] = Array
         (
             [Querycategory] = Array
                 (
                     [id] = 70
                     [querycategory_id] = 34
                 )

             [Node] = Array
                 (
                     [0] = Array
                         (
                             [id] = 71
                             [querycategory_id] = 70
                             [Leaf] = Array
                                 (
                                     [0] = Array
                                         (
                                             [id] = 43
                                             [querycategory_id] = 71
                                         )
                                 )

                             [Node] = Array
                                 (
                                     [0] = Array
                                         (
                                             [id] = 30
                                             [querycategory_id] = 35
                                             [name] = Bau
                                             [Leaf] = Array
                                                 (
                                                 )
                                         )
                                 )
                         )
                 )

             [Leaf] = Array
                 (
                 )
         )
 )

 As you can see, Leaf is sometimes on the same level as its parent,
 sometimes it is included. Same happens with Node.

 This is an inconsistent structure...

You realize that's an incredibly inefficient way to query your data I
hope - and it looks fine to me ...

 Apart from that, now my root querycategory is 'Querycategory' while all
 other querycategories are 'Node'.

of course they are - the array key is the model alias.

Have a look at the tree behavior or use find('threaded') (after
changing your foreignkey to be parent_id in the db).

hth,

AD

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


Re: table joining problem

2010-05-05 Thread AD7six


On May 5, 10:38 am, Master Ram...! ramganga...@gmail.com wrote:
 sir i am not get any solutions.

How about you stop creating duplicate threads and just reply to the
original then.

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


Re: Structure of data returned by $this-Model-find

2010-05-05 Thread Roland Bock
 As you can see, Leaf is sometimes on the same level as its parent,
 sometimes it is included. Same happens with Node.

 This is an inconsistent structure...
 
 You realize that's an incredibly inefficient way to query your data I
 hope - and it looks fine to me ...

Associated data is
*) at the same level as the element, in case of the root element
*) included in the element, otherwise

That is inconsistent as far as I can see (or am I missing something?)

I was just using this as an example to demonstrate the inconsistency
with as little code as possible. It also applies to other nested
(non-tree) structures. For instance

class Parent extends AppModel
{
   var $hasMany = array('Node');
}
class Node extends AppModel
{
   var $hasMany = array('Child');
}

Array
(
[0] = Array
(
[Parent] = Array
(
[id] = 7
)

[Node] = Array
(
[0] = Array
(
[id] = 159
[parent_id] = 7
[Child] = Array
(
[...]

Parent and Node are at the same level.
Child is contained in Node.

But since the relationship between Parent and Node is the same as
between Node and Child I would expect the same for the data structure.


Thanks and regards,

Roland

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


passing more parameters leads to duplicate content

2010-05-05 Thread massl
Hi,

I currently have a SEO problem with CakePHP.

For example you have an users-controller with an action register
that is called by example.com/users/register. You can now add more
arguments to the URL e.g. example.com/users/register/my/duplicate/
content.

That's very bad for SEO because you can have unlimited duplicate
content. One solution (that isn't very good) is that you check the
parameter count in every function with func_num_args() and then 301
redirect to the correct URL. But that are at least two more lines in
every function and you manually have to enter the parameter count.

Does someone maybe have a better idea to solve this issue?

massl

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


Re: passing more parameters leads to duplicate content

2010-05-05 Thread John Andersen
I just wonder, when the search engine goes through your site, then
your site does not make the duplicate URLs (I assume), so the issue
should not arise!

If I am wrong, please clarify :)
Enjoy,
   John

On May 5, 2:33 pm, massl vermas...@gmail.com wrote:
 Hi,

 I currently have a SEO problem with CakePHP.

 For example you have an users-controller with an action register
 that is called by example.com/users/register. You can now add more
 arguments to the URL e.g. example.com/users/register/my/duplicate/
 content.

 That's very bad for SEO because you can have unlimited duplicate
 content. One solution (that isn't very good) is that you check the
 parameter count in every function with func_num_args() and then 301
 redirect to the correct URL. But that are at least two more lines in
 every function and you manually have to enter the parameter count.

 Does someone maybe have a better idea to solve this issue?

 massl

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


how to get values at .ctp file

2010-05-05 Thread MANOJ DHAMAL
hi ,
I am using combobox in view.ctp like

?php echo $form-select('perpage_id',
$per_page,null,array('id'='perpage'),false); ?

In the same ctp(view.ctp) i want fetch selected value of combobox in
variable

$perpage= //HERE IS CODE TO GET VALUE OF COMBOBOX;

Idont know how to fetch values of fields before submit the form in
cakephp.
Please give solution...
   Thanks.

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


Re: Sessions working in one controller and not the other

2010-05-05 Thread LunarDraco
How do you have sessions configured. Are you using php, cake or
database sessions?


On May 4, 2:17 pm, LordZardeck s...@blackfireweb.com wrote:
 Adding still doesn't help. I REALLY need to figure this out. its so
 wierd because the sessions work when you add var $uses = array(), even
 when I don't have the Session componet added! its not even in the
 app_controller!

 On May 4, 10:42 am, thatsgreat2345 thatsgreat2...@gmail.com wrote:



  Not a clue, would have to look into the core for that. But either way
  just add var $components = array('Session'); to both of them.

  On May 3, 7:21 pm, LordZardeck s...@blackfireweb.com wrote:

   Ok, I found out that the problem arises when I use a model. When I set
   the $uses varibale to an empty array, it works. What would cause this?

   On May 3, 6:21 pm, thatsgreat2345 thatsgreat2...@gmail.com wrote:

Include the session component

On May 3, 3:59 pm, LordZardeck s...@blackfireweb.com wrote:

 For some reason, the session handling works in one controller and not
 the other. I can't figure out why. I am using CakePHP 1.2.5.

 //
 //Does work
 //

 sessions_controller.php:

 class SessionsController extends AppController {
     var $name = Sessions;
     var $layout = ajax;
     var $uses = array();

     function create(){
         if($this-Session-read('Data') == null){
             $this-Session-write('Data', rand());
         }
         $this-set('data', $this-Session-read('Data'));
         $this-set('SessionID', $this-Session-id());
     }

 }

 create.ctp:
 $msgJson[SessionID] = $SessionID;
 $msgJson[data] = $data;
 echo json_encode($msgJson);
 //results in ({SessionID:sd8s8o32edmjnjt94ouse99fd2,data:19409})
 every time (parenthesis not in result)

 //
 //Doesn't Work
 //

 messages_controller.php:

 class MessagesController extends AppController {

     var $name = 'Messages';
     var $layout = ajax;

     function listMessages() {
         if($this-Session-read('Data') == null){
             $this-Session-write('Data', rand());
         }
         $this-set('data', $this-Session-read('Data'));
         $this-set('SessionID', $this-Session-id());
         $this-set('messages', $this-Message-find(all,
 array(order=priority ASC)));
     }

 }

 list_messages.ctp:

 $msgJson[count] = count($messages);
 $msgJson[SessionID] = $SessionID;
 $msgJson[SessionData] = $data;
 foreach($messages as $message){
     $msg[] = $message[Message];}

 $msgJson[items] = $msg;
 echo json_encode($msgJson);
 /*
 results in ({count:3,SessionID:,SessionData:27384,items:
 [{id:4,priority:3,subject:Another
 message,message:adsfasdf},
 {id:2,priority:3,subject:testing again,message:just
 seeing ow },
 {id:7,priority:3,subject:asdgasdg,message:asdfasdfasd}]})
 except the SessionData changes everytime and the SessionID never shows
 up.
 */

 Any ideas what might be wrong?

 Check out the new CakePHP Questions 
 sitehttp://cakeqs.organdhelpotherswiththeir 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 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions 
sitehttp://cakeqs.organdhelpotherswith 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 athttp://groups.google.com/group/cake-php?hl=en-Hidequotedtext -

- Show quoted text -

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
   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 
   athttp://groups.google.com/group/cake-php?hl=en

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
  athttp://groups.google.com/group/cake-php?hl=en-Hide quoted 

how to get values at .ctp file

2010-05-05 Thread MANOJ DHAMAL
hi ,
I am using combobox in view.ctp like

?php echo $form-select('perpage_id',
$per_page,null,array('id'='perpage'),false); ?

In the same ctp(view.ctp) i want fetch selected value of combobox in
variable

$perpage= //HERE IS CODE TO GET VALUE OF COMBOBOX;

Idont know how to fetch values of fields before submit the form in
cakephp.
Please give solution...
   Thanks.

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


how to get values at .ctp file

2010-05-05 Thread MANOJ DHAMAL
hi ,
I am using combobox in view.ctp like

?php echo
$form-select('perpage_id',$per_page,null,array('id'='perpage'),false); ?

In the same ctp(view.ctp) i want fetch selected value of combobox in
variable

$perpage= //HERE IS CODE TO GET VALUE OF COMBOBOX;

Idont know how to fetch values of fields before submit the form in cakephp.
Please give solution...
   Thanks.

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


Re: passing more parameters leads to duplicate content

2010-05-05 Thread massl
On 5 Mai, 14:01, John Andersen j.andersen...@gmail.com wrote:
 I just wonder, when the search engine goes through your site, then
 your site does not make the duplicate URLs (I assume), so the issue
 should not arise!

 If I am wrong, please clarify :)

Yes sure, it's not a ultimative huge problem. But it could be that you
develop the website and change the parameter count. Or someone falsely
posts a link somewhere with more parameters then needed...and so on.
I also don't want to discuss about whether it's an issue or not. It
would just be great if someone knows a solution for this (no code
needed, just theoretical).

massl

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


Re: how to get values at .ctp file

2010-05-05 Thread John Andersen
You have two options as far as I know:

One is the gather the select values in the controller action and pass
them on to the view using the controllers set method
See http://book.cakephp.org/view/57/Controller-Methods#set-427

Two is to gather the select values from within the view using the
requestAction to invoke a controller action which gathers and returns
the select values.
See http://book.cakephp.org/view/57/Controller-Methods#requestAction-434

Enjoy,
   John


On May 5, 3:16 pm, MANOJ DHAMAL manoj.dham...@gmail.com wrote:
 hi ,
 I am using combobox in view.ctp like

 ?php echo
 $form-select('perpage_id',$per_page,null,array('id'='perpage'),false); ?

 In the same ctp(view.ctp) i want fetch selected value of combobox in
 variable

 $perpage= //HERE IS CODE TO GET VALUE OF COMBOBOX;

 Idont know how to fetch values of fields before submit the form in cakephp.
 Please give solution...
                                Thanks.

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


Re: Sessions working in one controller and not the other

2010-05-05 Thread LordZardeck
I use php

On May 5, 7:15 am, LunarDraco mdc...@gmail.com wrote:
 How do you have sessions configured. Are you using php, cake or
 database sessions?

 On May 4, 2:17 pm, LordZardeck s...@blackfireweb.com wrote:





  Adding still doesn't help. I REALLY need to figure this out. its so
  wierd because the sessions work when you add var $uses = array(), even
  when I don't have the Session componet added! its not even in the
  app_controller!

  On May 4, 10:42 am, thatsgreat2345 thatsgreat2...@gmail.com wrote:

   Not a clue, would have to look into the core for that. But either way
   just add var $components = array('Session'); to both of them.

   On May 3, 7:21 pm, LordZardeck s...@blackfireweb.com wrote:

Ok, I found out that the problem arises when I use a model. When I set
the $uses varibale to an empty array, it works. What would cause this?

On May 3, 6:21 pm, thatsgreat2345 thatsgreat2...@gmail.com wrote:

 Include the session component

 On May 3, 3:59 pm, LordZardeck s...@blackfireweb.com wrote:

  For some reason, the session handling works in one controller and 
  not
  the other. I can't figure out why. I am using CakePHP 1.2.5.

  //
  //Does work
  //

  sessions_controller.php:

  class SessionsController extends AppController {
      var $name = Sessions;
      var $layout = ajax;
      var $uses = array();

      function create(){
          if($this-Session-read('Data') == null){
              $this-Session-write('Data', rand());
          }
          $this-set('data', $this-Session-read('Data'));
          $this-set('SessionID', $this-Session-id());
      }

  }

  create.ctp:
  $msgJson[SessionID] = $SessionID;
  $msgJson[data] = $data;
  echo json_encode($msgJson);
  //results in 
  ({SessionID:sd8s8o32edmjnjt94ouse99fd2,data:19409})
  every time (parenthesis not in result)

  //
  //Doesn't Work
  //

  messages_controller.php:

  class MessagesController extends AppController {

      var $name = 'Messages';
      var $layout = ajax;

      function listMessages() {
          if($this-Session-read('Data') == null){
              $this-Session-write('Data', rand());
          }
          $this-set('data', $this-Session-read('Data'));
          $this-set('SessionID', $this-Session-id());
          $this-set('messages', $this-Message-find(all,
  array(order=priority ASC)));
      }

  }

  list_messages.ctp:

  $msgJson[count] = count($messages);
  $msgJson[SessionID] = $SessionID;
  $msgJson[SessionData] = $data;
  foreach($messages as $message){
      $msg[] = $message[Message];}

  $msgJson[items] = $msg;
  echo json_encode($msgJson);
  /*
  results in ({count:3,SessionID:,SessionData:27384,items:
  [{id:4,priority:3,subject:Another
  message,message:adsfasdf},
  {id:2,priority:3,subject:testing again,message:just
  seeing ow },
  {id:7,priority:3,subject:asdgasdg,message:asdfasdfasd}]})
  except the SessionData changes everytime and the SessionID never 
  shows
  up.
  */

  Any ideas what might be wrong?

  Check out the new CakePHP Questions 
  sitehttp://cakeqs.organdhelpotherswiththeirCakePHP 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 athttp://groups.google.com/group/cake-php?hl=en

 Check out the new CakePHP Questions 
 sitehttp://cakeqs.organdhelpotherswiththeir 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 athttp://groups.google.com/group/cake-php?hl=en-Hidequotedtext-

 - Show quoted text -

Check out the new CakePHP Questions 
sitehttp://cakeqs.organdhelpotherswith 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 athttp://groups.google.com/group/cake-php?hl=en

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
   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 

Find condition on nested models

2010-05-05 Thread Greg Skerman
Hey guys,

Struggling to figure out why this wont work (cake 1.2).

$this-set('Characters',
$this-User-Account-Character-find('list', array(
'conditions' = array(
'User.id' = $this-Auth-User('id')
)
)
)
);


What am I doing wrong here? the generated query statement is obviously wrong
- its not building the joins.

*Query:* SELECT `Character`.`id`, `Character`.`name` FROM `characters`
AS `Character`   WHERE `User`.`id` = 1


belongsTo and hasMany is right throughout and generated via bake. Doing a
search on Account conditioning by user works. And doing a search on
character conditioning by Account works, but as soon as i step more than one
level down it stops generating the joins.

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


Re: passing more parameters leads to duplicate content

2010-05-05 Thread Lucca Mordente
What about insert a canonical meta tag inside pages that are prone to
have duplicated urls?

The canonical meta tells the search engine that the right url for a
page is that url you put as canonical
This way, even if each duplicated page has the same url, you will not
have indexing problems

Cheers!

On May 5, 9:19 am, massl vermas...@gmail.com wrote:
 On 5 Mai, 14:01, John Andersen j.andersen...@gmail.com wrote:

  I just wonder, when the search engine goes through your site, then
  your site does not make the duplicate URLs (I assume), so the issue
  should not arise!

  If I am wrong, please clarify :)

 Yes sure, it's not a ultimative huge problem. But it could be that you
 develop the website and change the parameter count. Or someone falsely
 posts a link somewhere with more parameters then needed...and so on.
 I also don't want to discuss about whether it's an issue or not. It
 would just be great if someone knows a solution for this (no code
 needed, just theoretical).

 massl

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


Re: Regarding search Task,,

2010-05-05 Thread mike karthauser
You appear to be missing a view function for starters. Turn on debug  
and set it to 2 to give you some idea why things are failing


Mike Karthauser
Brightstorm limited
Tel: 07939252144

On 5 May 2010, at 07:17, karteek vemula.kart...@gmail.com wrote:


Hi,
I have the code of Search, but its not work correctly. So, please try
to find the problem of the below code..

View Template(search.ctp)
?php echo $form-create('State',array('action'='view',$state 
['State']

['id']));?
   fieldset
   legend?php __('Search State');?/legend
   ?php

   #echo $form-input('id');
   echo $form-input('Name');
   echo $form-error('name', 'Please Enter State Name',
array('wrap'=true,'class' = 'error-message'));

   echo $form-select('country Name');
   echo $form-error('country Name');
   #echo $form-input('active');
   echo $form-submit('Find');

   ?
   ul
   li?php echo $html-

link(__('Search',true),array('action'='view',$state['State']

['id']));? /li
   /ul

/fieldset
?php echo $form-end();?




Controller Template::

function search($id) {
   print('hai');


   //$this-redirect(array('action'='view',$State['State'] 
['id']));

   if(!empty($this-data)) {
   $data =  $this-State-Country-
find($id);//'all',array('conditions'=array('id'=$this-data 
['State']

['id'])));
   $this-set('res',$data);

   $this-redirect(array 
('controller'='State','action'='State'));

   }

}



Thank you,
Karteek

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




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


Re: Multiple Undo/Redo!!

2010-05-05 Thread paws_galuten
yes, that makes sense too. it wastes more space, but it certainly
seems safer.

On May 3, 7:50 pm, Mike mfrie...@gmail.com wrote:
 Hey Jason, you have an interesting idea and done some nice work.  I
 had to do something similar in the past as well.  How I approached it
 was to add a version to my model and then everytime the model was
 saved, re-save the entire model and increment the version number .

 Mike

 On May 2, 8:53 pm,paws_galutenjason.galu...@gmail.com wrote:





  Hey everyone. I've written some code that I'd love to get some
  feedback on. I have posted an article here:

 http://www.galuten.com/jason/Undo.rtf

  It's a bit involved but I think it could be very useful if developed
  further!

  Thanks for your attention...
  Jason

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
  athttp://groups.google.com/group/cake-php?hl=en

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


cake memcache with multiple sources

2010-05-05 Thread tiberium911
I was wondering if anyone knows how to set memcache keys for cake from
outside of cake, we have several systems that interact with memcache,
one side that can not be converted to cake yet has to be able to set
keys that our cake website displays

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


Re: Version 1.3 Routing Vanity URLs

2010-05-05 Thread mark_story
Perhaps

Router::connect('/:username/*', array('controller'='users',
'action'=view'), array('username' = (?!admin|users|posts)'));
Router::connect('/:username/:controller/:action/*',
array('controller'='users', 'action'='view'), array('username' = (?!
admin|users|posts)'));

Could do the trick?

-Mark

On May 4, 3:58 pm, Brian Watson dev.web.l...@gmail.com wrote:
 Did anyone find a solution to this as I have the exact same problem.

 Thanks





 - Original Message -
 From: CharlesTMunger ryan.dy...@gmail.com
 To: CakePHP cake-php@googlegroups.com
 Sent: Monday, May 03, 2010 2:01 AM
 Subject: Version 1.3 Routing  Vanity URLs

  In my 1.2x app I have vanity URLs from the base.  I.e., a user named
  munger can have his page located at:

 www.mysite.com/munger

  Accomplishing this was pretty straightforward -- in my routes.php I
  had this line at the end:

  Router::connect('(?!admin|users|posts)(.*)', array('controller'='users',
  'action'='view'));

  Then, in the view method of my users_controller, I simply did a find
  based on user name. I tried upgrading to 1.3 and this doesn't work
  anymore  -- I assume it has something to do with not supporting regex
  anymore.

  So -- any ideas on how to go about accomplishing this in 1.3?

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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
  athttp://groups.google.com/group/cake-php?hl=en

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


Re: Newbie problem with 15 minute blog in Cake 1.3

2010-05-05 Thread WebbedIT
Well I stand corrected, sort of :)

Thanks to an email reply sent direct to me, by mistake, by JasonFX I
decided to look at the blog tutorial a little closer and whilst what I
say above is right on the page I supplied a link for, I was unaware
that further on in the tutorial when dealing with editing and deleting
the tutorial examples include the following links

?php echo $html-link($post['Post']['title'],array('action'='view',
'id'=$post['Post']['id']));?

?php echo $html-link('Edit', array('action'='edit', 'id'=
$post['Post']['id']));?

?php echo $html-link('Delete', array('action' = 'delete', 'id' =
$post['Post']['id']), null, 'Are you sure?' )?

I assume this is an error as the previous page about views definitely
covers passing the id as an unnamed parameter to the controller action
and in the 1.3 tutorial (pointed out by JasonFX) the above links don't
use named parameters.

Have added comments to the pages of the 1.2 tutorial where I spotted
this:
http://book.cakephp.org/view/339/Deleting-Posts
http://book.cakephp.org/view/340/Editing-Posts

Paul

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


Re: passing more parameters leads to duplicate content

2010-05-05 Thread Miles J
But how are they duplicates?

/users/profile/1/
/users/profile/2/
/blog/read/some-slug/123/
/blog/read/slug/12356/
/image/view/15

None of those are duplicates.

Why would you pass arguments that ultimately don't decide how the
action renders?

On May 5, 8:17 am, Lucca Mordente luccamorde...@gmail.com wrote:
 What about insert a canonical meta tag inside pages that are prone to
 have duplicated urls?

 The canonical meta tells the search engine that the right url for a
 page is that url you put as canonical
 This way, even if each duplicated page has the same url, you will not
 have indexing problems

 Cheers!

 On May 5, 9:19 am, massl vermas...@gmail.com wrote:



  On 5 Mai, 14:01, John Andersen j.andersen...@gmail.com wrote:

   I just wonder, when the search engine goes through your site, then
   your site does not make the duplicate URLs (I assume), so the issue
   should not arise!

   If I am wrong, please clarify :)

  Yes sure, it's not a ultimative huge problem. But it could be that you
  develop the website and change the parameter count. Or someone falsely
  posts a link somewhere with more parameters then needed...and so on.
  I also don't want to discuss about whether it's an issue or not. It
  would just be great if someone knows a solution for this (no code
  needed, just theoretical).

  massl

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
  athttp://groups.google.com/group/cake-php?hl=en

 Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
 athttp://groups.google.com/group/cake-php?hl=en

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


Re: cake memcache with multiple sources

2010-05-05 Thread Christian Leskowsky
You can push data to memcached using any of its client libraries and pick it
up in cake. (We're doing that here.)

One gotcha that bit me: if you don't explicitly set a prefix in your
memcache config in cakephp it adds one of its own - it'll then prefix all
keys you try to read/write to with it. Very assertive indeed!

On Wed, May 5, 2010 at 12:16 PM, tiberium911 tiberium...@gmail.com wrote:

 I was wondering if anyone knows how to set memcache keys for cake from
 outside of cake, we have several systems that interact with memcache,
 one side that can not be converted to cake yet has to be able to set
 keys that our cake website displays

 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
-

You can't reason people out of a position they didn't use reason to get
into.

Christian Leskowsky

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


Routes in 1.3

2010-05-05 Thread Jon Bennett
Hi cakers,

Have switched my current project to 1.3, and have a theoretical Q re
routes. Is it possible to have routes composed of a varying number of
parts, which sometimes have things on the end, sometimes don't ? an
example might be handy:

http://www.domain.com/shop/ - shop home
http://www.domain.com/shop/category - level 1 category
http://www.domain.com/shop/category/category - level 2 category
http://www.domain.com/shop/category/category/id-product - product in
level 2 category
http://www.domain.com/shop/category/category/category/category/id-product
- product in level 4 category

is this feasible? Can I check for 'number-slug' at the end, or should
I have a static part to the url so I can isolate the product handle
more easily, such as '/product/handle' ? I can feasibly assume that my
client won't go deeper than 5, so I could hard-code 10 routes rather
than attempt to match a varying number of categories in a url.

thanks for any insight.

Cheers,

J

-- 
jon bennett - www.jben.net - blog.jben.net

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


Re: Bakery...arrogance or plain lack of attention

2010-05-05 Thread ZAky
From the log:
It's not much of an article... more of a code snippet.  
from what i see your helper outputs a nested list which can be
achieved with HtmlHelper::nestedList or AD7six's TreeHelper behavior
which has lot more features..

This looks like more then just not a nice article.

Did you read the AD7six's TreeHelper?

It may took some time but you got a fair response.
Please learn to handle constructive criticism and learn from it.

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