Re: Tree Behaviors, Move Functions

2010-02-22 Thread ross.hagg...@googlemail.com
or down the tree. Using CakePHP 1.3 On Feb 22, 3:47 am, Ross Haggart ross.hagg...@googlemail.com wrote: It is weird, i have multiple records and id 2 is the second record.  The first record is 'All Products', then i have 5/6 records nested underneath and then a third level under these records

Re: Tree Behaviors, Move Functions

2010-02-21 Thread ross.hagg...@googlemail.com
I've tried commenting out the code and running prd($this-Category- movedown(2, abs(1))); only, but no joy. The primary id, 2 does exist. If i change the id to a random number that's not an id, i get the following: array_values() [function.array-values]: The argument should be an array

Tree Behaviors, Move Functions

2010-02-20 Thread ross.hagg...@googlemail.com
Hi I'm trying to use the moveup movedown functions from the cake book. I have the following and it doesn't return any errors, i've checked the values in the function, but it's not working. I get the success message but nothing has changed in the database, the record has not been modified? I've

Re: Tree Behaviors, Move Functions

2010-02-20 Thread ross.hagg...@googlemail.com
Thanks Just select queries being ran, no update? SELECT `Category`.`id`, `Category`.`parent_id`, `Category`.`lft`, `Category`.`rght`, `Category`.`name`, `Category`.`quantities`, `Category`.`delivery`, `Category`.`description`, `Category`.`image`, `Category`.`created`, `Category`.`modified` FROM

Exclude directory from routing

2009-09-20 Thread ross.hagg...@googlemail.com
Hi I'm having problems excluding a directory from routing. I want to add a directory that will only be available to admin, but is not part of the cakephp application. Ignoring the admin issues, i've tried the following:

Best method for routes

2009-06-26 Thread ross.hagg...@googlemail.com
Hi I have a category table using tree behaviour and a product table which has many categories. The categories looks like this All Products -parent a --child a --child a -parent b --child b --child b My products are then using the child categories. I want to use the url /site/parent-a/ and

Best method for routes

2009-06-26 Thread ross.hagg...@googlemail.com
Hi I have a category table using tree behaviour and a product table which has many categories. The categories looks like this All Products -parent a --child a --child a -parent b --child b --child b My products are then using the child categories. I want to use the url /site/parent-a/ and

Add id to validate array

2009-05-28 Thread ross.hagg...@googlemail.com
Hi Is it possible to add an id to the model $validate array? I want to add an id that's relative to the fieldname for ajax validation. Cheers R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Saving record HABTM

2009-05-28 Thread ross.hagg...@googlemail.com
I have a HABTM association, productsAssets. As admin add a product they can select if they want to some assets. If selected they are redirect to the asset library and can then select 1 or many assets for the product_id stored in a session. When i submit one of the assets, the post values being

Add id to error-message div element

2009-05-26 Thread ross.hagg...@googlemail.com
Hi Is it possible to add an id to the error-message div, tried adding it to the $validate array in the model. I want an id that's specific to the form field. Cheers R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

HABTM Filter list box

2009-04-20 Thread ross.hagg...@googlemail.com
Hi I'm building a db schema which will have a number of Jobs which belong to a Project. A Job can cover many Rooms in different Buildings. Each Project can have many Buildings. I have the following associations. With scaffolding it looks okay, but when i add a job, how can i filter the room

Set::extract

2009-04-13 Thread ross.hagg...@googlemail.com
Hi i have the following array array( [0] = Array( [title] = Centeral Line Bundle [no_tags] = 2 ) And i want to create the following. I'm trying to use the Tagcloud helper found in the Bakery. Someone mentioned i could use Set::extract, i've given it a try but no joy.

HABTM Count

2009-04-09 Thread ross.hagg...@googlemail.com
Hi i have the following associations: var $hasAndBelongsToMany = array('Improvements'); var $hasAndBelongsToMany = array('Tags'); With a join table improvements_tags I want to be able to count the number of time a tag has been used. The following sql query works, but i'm not sure how to do

Run query from model

2009-04-03 Thread ross.hagg...@googlemail.com
Hi, i have 3 tables Users, Improvements and Bookmarks a user can bookmark one or more improvements. The bookmark table holds the user_id and improvement_id. When i'm pulling the information (query below), i also need to show the author of the improvements username. Is it possible to call a

Undefined index

2009-04-02 Thread ross.hagg...@googlemail.com
Hi Using afterFind to format $results, but i'm getting an Undefined index notice which is annoying! How can i make sure the array has the appropriate index values? Should i be doing something in my model relationships? Improvement model class Improvement extends AppModel{

Add to result array in controller

2009-04-01 Thread ross.hagg...@googlemail.com
Hi I have a number of posts which can be one of 3 states, pending, approved, declined. I want to add some colour to my view when displaying all the posts and i'm not sure how to do it. I have an $improvement array and a getStatusColor function in the app_controller. How can i read each item

Add to result array in controller

2009-04-01 Thread ross.hagg...@googlemail.com
Hi I have a number of posts which can be one of 3 states, pending, approved, declined. I want to add some colour to my view when displaying all the posts and i'm not sure how to do it. I have an $improvement array and a getStatusColor function in the app_controller. How can i read each item

Layouts and Elements

2009-03-17 Thread ross.hagg...@googlemail.com
Hi Just thinking how i can organise my layouts and elements. If i have some specific functions e.g. a comments form which can only be completed by the post owner, how should i place this in the post view? Should i create a separate layout or create an element and have a conditional statement.

Check for empty fields and redirect

2009-02-27 Thread ross.hagg...@googlemail.com
Hi I have users and profiles tables and when a new member registers the profile table gets partially populated i.e. firstname, surname, email address. After account activation the member logs in for the first time. I want to redirect them to the profile home (edit action) to complete the form.

Re: Wordpress and cakephp

2009-01-30 Thread ross.hagg...@googlemail.com
:// code.google.com/p/wildflower/) to handle this. It has a blog and basic CMS as well as some other really nice features. Just an idea though. That way no one is reinventing the wheel. On Jan 23, 6:21 am, ross.hagg...@googlemail.com ross.hagg...@googlemail.com wrote: Hi I'm looking

Wordpress and cakephp

2009-01-23 Thread ross.hagg...@googlemail.com
Hi I'm looking to use wordpress and cakephp to develop a site. I would like to use wordpress for basic cms functionality i.e. administration, news events, uploading publications etc. with cakephp being used for functionality on the site, registration, members area etc. I could attempt all in

Re: Wordpress and cakephp

2009-01-23 Thread ross.hagg...@googlemail.com
(like creating wp user accounts when cake accounts are created, single sign on for such users) one could integrate wp code with cakephp. _k10_http://www.propertyjungle.in On Jan 23, 6:21 pm, ross.hagg...@googlemail.com ross.hagg...@googlemail.com wrote: Hi I'm looking to usewordpress