cakephp 3.0 stable ==>> need help with save assosiated, but data have composite primarykey

2015-03-23 Thread Farid Aditya
help i cann't saving data with save that have assosiated
*nb*:  *all my table used Inflector::rules('uninflected', 
['dontinflectme']), so i don't have proble with naming convension*


*this is my model table*

class KaryawanTable extends Table {

/**
 * Initialize method
 *
 * @param array $config The configuration for the Table.
 * @return void
 */
public function initialize(array $config) {
$this->table('karyawan');
$this->displayField('id');
$this->primaryKey(['id', 'kantor_id']);
$this->belongsTo('Kantor', [
'className' => 'Kantor',
'foreignKey' => 'kantor_id'
]);
$this->belongsTo('Jabatan', [
'className' => 'Jabatan',
'foreignKey' => 'jabatan_id'
]);
$this->belongsTo('Jenisidentitas', [
'className' => 'Jenisidentitas',
'foreignKey' => 'jenisidentitas_id'
]);
$this->hasMany('Telpkaryawan', [
'className' => 'Telpkaryawan',
'foreignKey' => ['karyawan_id', 'karyawan_kantor_id']
]);
$this->hasOne('Rgnuser', [
'className' => 'Rgnuser',
'foreignKey' => ['karyawan_id', 'karyawan_kantor_id']
]);
}

public function validationDefault(Validator $validator) {
$validator
->add('id', 'valid', ['rule' => 'numeric'])
->allowEmpty('id', 'create')
->allowEmpty('kantor_id', 'create')
->allowEmpty('noPegawai')
->requirePresence('tempatKerja', 'create')
->notEmpty('tempatKerja')
->add('jabatan_id', 'valid', ['rule' => 'numeric'])
->requirePresence('jabatan_id', 'create')
->notEmpty('jabatan_id')
->allowEmpty('namaDepan')
->allowEmpty('namaBelakang')
->allowEmpty('gelar')
->allowEmpty('alamat')
->allowEmpty('tempatLahir')
->add('tanggalLahir', 'valid', ['rule' => 'date'])
->allowEmpty('tanggalLahir');

return $validator;
}

public function buildRules(RulesChecker $rules) {
$rules->add($rules->existsIn(['kantor_id'], 'Kantor'));
$rules->add($rules->existsIn(['jabatan_id'], 'Jabatan'));
return $rules;
}
}

*this's my controller method add*

public function add() {
$karyawan = $this->Karyawan->newEntity();
if ($this->request->is('post')) {
$this->request->data['kantor_id'] = $this->request->session()
->read('Auth.User.karyawan.tempatKerja');
$this->request->data['Rgnuser']['karyawan_kantor_id'] = 
$this->request->session()
->read('Auth.User.karyawan.tempatKerja');
$karyawan = $this->Karyawan->newEntity(
$karyawan,
$this->request->data,['associated' => ['Rgnuser']]);
if ($this->Karyawan->save($karyawan)) {
$this->Flash->success('The karyawan has been saved.');
return $this->redirect(['action' => 'add']);
} else {
$this->Flash->error('The karyawan could not be saved. 
Please, try again.');
}
}
$kantor = $this->Karyawan->Kantor->find('list', ['limit' => 200]);
$jabatan = $this->Karyawan->Jabatan->find('list', ['limit' => 200]);
$jenisidentitas = $this->Karyawan->Jenisidentitas->find('list', 
['limit' => 200]);
$this->loadModel('Userlevel');
$userLevel = $this->Userlevel->find('list', ['limit' => 200]);
$this->set(compact('karyawan', 'kantor', 'jabatan', 
'jenisidentitas', 'userLevel'));
$this->set('_serialize', ['karyawan']);
}

and this is error message

Cake\ORM\Marshaller::one() - CORE\src\ORM\Marshaller.php, line 101
Cake\ORM\Table::newEntity() - CORE\src\ORM\Table.php, line 1953
App\Controller\KaryawanController::add() - 
APP/Controller\KaryawanController.php, line 54
Cake\Controller\Controller::invokeAction() - 
CORE\src\Controller\Controller.php, line 405
Cake\Routing\Dispatcher::_invoke() - CORE\src\Routing\Dispatcher.php, line 114
Cake\Routing\Dispatcher::dispatch() - CORE\src\Routing\Dispatcher.php, line 87
[main] - ROOT\webroot\index.php, line 37


help how to fix this problem

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Need help on custom Authorization with ACL

2014-06-05 Thread Arun Singh
CakePHP custom ACL Authorization using acos, aros & aros_acos Acl tables 
with extension api_

I am developing an restful API using CakePHP, I am trying to implement a 
custom authorization which authorize user using ACL, code looks something 
like

_Collection->load('Acl'); 
list($plugin, $userModel) = 
pluginSplit($this->settings['userModel']);
$action = $this->action($request); 

$cacheName = 'permissions_' . strval($user['id']); 
if (($permissions = Cache::read($cacheName, 'permissions')) === 
false) {
$permissions = array(); 
Cache::write($cacheName, $permissions, 'permissions');
}
if (!isset($permissions[$action])) {
$User = ClassRegistry::init($this->settings['userModel']);
$User->id = $user['id'];
$allowed = $Acl->check($User, $action); 
$permissions[$action] = $allowed;
Cache::write($cacheName, $permissions, 'permissions');
$hit = false;
} else {
$allowed = $permissions[$action];
$hit = true;
}
return $allowed;
 }
}

I am using same database for website(developed using croogo) and API so my 
database already has `acos`, `aros` & `aros_acos` tables of website so for 
API I am created ACL tables with api_ extension like `api_acos`, `api_aros` 
& `api_aros_api_acos`

New schema of my ACL tables are

CREATE TABLE IF NOT EXISTS `api_acos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int(10) DEFAULT NULL,
  `model` varchar(255) DEFAULT '',
  `foreign_key` int(10) unsigned DEFAULT NULL,
  `alias` varchar(255) DEFAULT '',
  `lft` int(10) DEFAULT NULL,
  `rght` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `api_acos_api_aros` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `api_aro_id` int(10) unsigned NOT NULL,
  `api_aco_id` int(10) unsigned NOT NULL,
  `_create` char(2) NOT NULL DEFAULT '0',
  `_read` char(2) NOT NULL DEFAULT '0',
  `_update` char(2) NOT NULL DEFAULT '0',
  `_delete` char(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `api_aros` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int(10) DEFAULT NULL,
  `model` varchar(255) DEFAULT '',
  `foreign_key` int(10) unsigned DEFAULT NULL,
  `alias` varchar(255) DEFAULT '',
  `lft` int(10) DEFAULT NULL,
  `rght` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


I am using custom ACL class from here 
https://github.com/FriendsOfCake/Authorize/blob/master/Controller/Component/Acl/HabtmDbAcl.php

My question is where and how can I use my new database tables (`api_acos`, 
`api_aros` & `api_aros_api_acos`) for ACL lookup? Please point me to code 
from where I can take reference for custom ACL Authorization implementation.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Need help to integrate smary 3.0 with cake PHP 2.0

2014-06-04 Thread Борислав Събев Borislav Sabev
I know this is somewhat of a troll answer, but:
This should be possible with some tweaks  to core variables, but why in the 
world would you want to do that? If your answer is that you know Smarty and 
not CakeViews I'd suggest you take 4 hours of reading and you will be 
pretty comfortable with Cake's Views.

Cake's view layer is much more powerful and made to work with Cake out of 
the box!
Also, doing this would mean that your project will be almost impossible to 
update in the future.
If you have something already done in Smarty and want to migrate it to 
Cake, you should seriously consider rewriting it entirely rather than 
"integrating" it.
You will not be integrating it - believe me you will end up with a lot of 
hard-coded and hacked-together stuff.
Especially if what you are migrating is big - the bigger the thing the 
bigger the issues you will have in the long run.

Borislav Sabev.

On Monday, 2 June 2014 08:48:45 UTC+3, Vivek Shah wrote:
>
> Hello,
>
> I am trying to integrate smarty template with cakePHP and for that I refer 
> http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyview
>  
> document
> and came to know it very old one still i modified some steps and reach 
> till include helpers in app_controller.
>
> class AppController extends Controller {
>
> public $view = 'Smarty';
> public $helpers = array(
> 'SmartyHtml', 
> 'SmartyForm',
> 'SmartySession',
> 'Html', 'Session'
> );
> }
>
> After adding this code in app controller my apache serve got crashed, and 
> i am unable to resolve this issue.
>
> Anyone please help or share document from where i can refer how can we 
> integrate smary with cakePHP.
>
> Thanks in Advance.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Need help to integrate smary 3.0 with cake PHP 2.0

2014-06-03 Thread Vivek Shah
Hello,

I am trying to integrate smarty template with cakePHP and for that I refer 
http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyview
 
document
and came to know it very old one still i modified some steps and reach till 
include helpers in app_controller.

class AppController extends Controller {

public $view = 'Smarty';
public $helpers = array(
'SmartyHtml', 
'SmartyForm',
'SmartySession',
'Html', 'Session'
);
}

After adding this code in app controller my apache serve got crashed, and i 
am unable to resolve this issue.

Anyone please help or share document from where i can refer how can we 
integrate smary with cakePHP.

Thanks in Advance.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


I need Help.. How to install Cake PHP 2.5.1 on Xampp running on a Windows 8.1 system

2014-06-03 Thread su_osi



Here is a copy of my database.php file in the 
I:xampp\htdocs\cakephp\app\Config folder ('I:\' being the drive I installed 
xampp into)


 /**
>  *
>  *
>  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
>  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
>  *
>  * Licensed under The MIT License
>  * For full copyright and license information, please see the LICENSE.txt
>  * Redistributions of files must retain the above copyright notice.
>  *
>  * @copyright Copyright (c) Cake Software Foundation, Inc. 
> (http://cakefoundation.org)
>  * @link  http://cakephp.org CakePHP(tm) Project
>  * @package   app.Config
>  * @since CakePHP(tm) v 0.2.9
>  * @license   http://www.opensource.org/licenses/mit-license.php MIT 
> License
>  */
>
> /**
>  * Database configuration class.
>  *
>  * You can specify multiple configurations for production, development and 
> testing.
>  *
>  * datasource => The name of a supported datasource; valid options are as 
> follows:
>  *  Database/Mysql - MySQL 4 & 5,
>  *  Database/Sqlite - SQLite (PHP5 only),
>  *  Database/Postgres - PostgreSQL 7 and higher,
>  *  Database/Sqlserver - Microsoft SQL Server 2005 and higher
>  *
>  * You can add custom database datasources (or override existing 
> datasources) by adding the
>  * appropriate file to app/Model/Datasource/Database. Datasources should 
> be named 'MyDatasource.php',
>  *
>  *
>  * persistent => true / false
>  * Determines whether or not the database should use a persistent 
> connection
>  *
>  * host =>
>  * the host you connect to the database. To add a socket or port number, 
> use 'port' => #
>  *
>  * prefix =>
>  * Uses the given prefix for all the tables in this database. This setting 
> can be overridden
>  * on a per-table basis with the Model::$tablePrefix property.
>  *
>  * schema =>
>  * For Postgres/Sqlserver specifies which schema you would like to use the 
> tables in.
>  * Postgres defaults to 'public'. For Sqlserver, it defaults to empty and 
> use
>  * the connected user's default schema (typically 'dbo').
>  *
>  * encoding =>
>  * For MySQL, Postgres specifies the character encoding to use when 
> connecting to the
>  * database. Uses database default not specified.
>  *
>  * unix_socket =>
>  * For MySQL to connect via socket specify the `unix_socket` parameter 
> instead of `host` and `port`
>  *
>  * settings =>
>  * Array of key/value pairs, on connection it executes SET statements for 
> each pair
>  * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
>  * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
>  * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
>  *
>  * flags =>
>  * A key/value array of driver specific connection options.
>  */
> class DATABASE_CONFIG {
>
> public $default = array(
> 'datasource' => 'Database/Mysql',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'user',
> 'password' => 'password',
> 'database' => 'cakephpd',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
>
> public $test = array(
> 'datasource' => 'Database/Mysql',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'user',
> 'password' => 'password',
> 'database' => 'test_database_name',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
> }
> ?>
>


Please help me out, I'm really new to web development as a whole  and I 
don't know what to do next.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: need help with check/uncheck all checkbox [cakephp]

2013-11-18 Thread Dave M.
I don't think the class option works for multiple checkboxes. 
What you can do is specify a div and work off of that (you can also reduce 
your js code):

 echo $this->Form->input("Country", array("options" => 
$viewData["countryList"], "multiple" => "checkbox", "onclick" => 
"resetSelectAll();" , "div" => "countries" , "name" => "selectedId")); 

 $('#selectall').click(function () {
var checked = $(this).is(':checked');
$('.countries input[type=checkbox]').each(function(){
$(this).prop('checked', checked); 
});   
});

On Friday, November 15, 2013 1:05:52 AM UTC-5, Sally wrote:
>
> I need help with this. I'm creating a checkbox to select or deselect the 
> country options. Please help to give some clues and explaination. I'll be 
> very grateful. Thanks in advance. 
> Below are the code:
>
> *Location: View/country/add.ctp file*
>
> 
> $(document).ready(function () {
> $('#selectall').click(function () {
>  var checked = $(this).is(':checked');
> 
> $('.selectedId').each(function () {
> var checkBox = $(this);
> console.debug(checkBox);
> if (checked) {
> checkBox.prop('checked', true);
> }
> else {
> checkBox.prop('checked', false);
> }
> });
> 
> });
> });
> 
> 
> Form->create('Showcase'); ?>
> 
> 
>  echo $this->Form->input('p_start', array('label' => 'Start Date'));
> echo $this->Form->input('p_end', array('label' => 'End Date'));
> echo $this->Form->input('priority', array('label' => 'Priority'));
> echo $this->Form->input('Select all Country', array("type" => 
> "checkbox", 'id'=>'selectall'));
> echo $this->Form->input("Country", array("options" => 
> $viewData["countryList"], "multiple" => "checkbox", "onclick" => 
> "resetSelectAll();" , "class" => "selectedId" , "name" => "selectedId")); 
> ?>
> 
> 
>   
>  echo $this->Form->end(__('Submit'));
> echo $this->Html->link('Back', array('action' => 'listShowcases'));
> ?>
> 
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


need help with check/uncheck all checkbox [cakephp]

2013-11-18 Thread Sally
I need help with this. I'm creating a checkbox to select or deselect the 
country options. Please help to give some clues and explaination. I'll be 
very grateful. Thanks in advance. 
Below are the code:

*Location: View/country/add.ctp file*


$(document).ready(function () {
$('#selectall').click(function () {
 var checked = $(this).is(':checked');

$('.selectedId').each(function () {
var checkBox = $(this);
console.debug(checkBox);
if (checked) {
checkBox.prop('checked', true);
}
else {
checkBox.prop('checked', false);
}
});

});
});


Form->create('Showcase'); ?>


Form->input('p_start', array('label' => 'Start Date'));
echo $this->Form->input('p_end', array('label' => 'End Date'));
echo $this->Form->input('priority', array('label' => 'Priority'));
echo $this->Form->input('Select all Country', array("type" => 
"checkbox", 'id'=>'selectall'));
echo $this->Form->input("Country", array("options" => 
$viewData["countryList"], "multiple" => "checkbox", "onclick" => 
"resetSelectAll();" , "class" => "selectedId" , "name" => "selectedId")); 
?>


  
Form->end(__('Submit'));
echo $this->Html->link('Back', array('action' => 'listShowcases'));
?>


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Need help with $this->paginate() in controller

2013-03-11 Thread sjbhowmick
I need some help on implementing the below query for $this->paginate() 


SELECT *
FROM `table1`
WHERE name like '%n3%' AND code NOT
IN (

SELECT code
FROM table2
)
UNION SELECT *
FROM table2
where name like '%n3%'


I want to get the paged resultset and count value also.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Need help with file uploads

2013-01-23 Thread Shahruk Khan
The files were not being accepted. Solved the problem thanks! Just in case 
anyone has the same problem.

You cannot serialize file upload forms via jQuery and pass them to the 
controller. 

On Wednesday, January 23, 2013 6:15:59 PM UTC-5, ibejohn818 wrote:
>
> Check your PHP configuration and ensure that your file upload settings are 
> appropriate for the use-case.
>
> Also, print out the _FILES array to also check to see if PHP is accepting 
>  your upload.
>
>
> On Jan 23, 2013, at 3:09 PM, Shahruk Khan > 
> wrote:
>
> Nope. debug($this->data) still has no other info.
>
> On Wednesday, January 23, 2013 1:53:27 PM UTC-5, cricket wrote:
>>
>> On Wed, Jan 23, 2013 at 11:10 AM, Shahruk Khan  
>> wrote: 
>> > I followed this tutorial: 
>> > 
>> http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper%3a%3afile
>>  
>> > 
>> > My View / Form 
>> > Form->create("User", array("enctype" => 
>> > "multipart/form-data")); ?> 
>>
>> echo $this->Form->create('User', array('type' => 'file')); 
>>
>
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> cake-php+u...@googlegroups.com .
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Need help with file uploads

2013-01-23 Thread John Hardy
Check your PHP configuration and ensure that your file upload settings are 
appropriate for the use-case.

Also, print out the _FILES array to also check to see if PHP is accepting  your 
upload.


On Jan 23, 2013, at 3:09 PM, Shahruk Khan  wrote:

> Nope. debug($this->data) still has no other info.
> 
> On Wednesday, January 23, 2013 1:53:27 PM UTC-5, cricket wrote:
> On Wed, Jan 23, 2013 at 11:10 AM, Shahruk Khan  wrote: 
> > I followed this tutorial: 
> > http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper%3a%3afile
> >  
> > 
> > My View / Form 
> > Form->create("User", array("enctype" => 
> > "multipart/form-data")); ?> 
> 
> echo $this->Form->create('User', array('type' => 'file')); 
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Need help with file uploads

2013-01-23 Thread Shahruk Khan
Nope. debug($this->data) still has no other info.

On Wednesday, January 23, 2013 1:53:27 PM UTC-5, cricket wrote:
>
> On Wed, Jan 23, 2013 at 11:10 AM, Shahruk Khan 
> > 
> wrote: 
> > I followed this tutorial: 
> > 
> http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper%3a%3afile
>  
> > 
> > My View / Form 
> > Form->create("User", array("enctype" => 
> > "multipart/form-data")); ?> 
>
> echo $this->Form->create('User', array('type' => 'file')); 
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Need help with file uploads

2013-01-23 Thread lowpass
On Wed, Jan 23, 2013 at 11:10 AM, Shahruk Khan  wrote:
> I followed this tutorial:
> http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper%3a%3afile
>
> My View / Form
> Form->create("User", array("enctype" =>
> "multipart/form-data")); ?>

echo $this->Form->create('User', array('type' => 'file'));

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Need help with file uploads

2013-01-23 Thread Shahruk Khan
I followed this 
tutorial: 
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper%3a%3afile

*My View / Form*
Form->create("User", array("enctype" => 
"multipart/form-data")); ?>
Form->hidden("User.id"); ?>
Form->input("User.picture_file", array("type" => 
"file")); ?>
Form->submit("Edit Member"); ?>

*My Controller*
if($this->request->is('put') || $this->request->is('post')){
if($this->User->save($this->request->data))
debug($this->data);
}

$this->User->save is working perfectly.
*
*
*My Debug of $this->data*

array(
'User' => array(
'id' => '12',
'email' => 't...@test.com',
'first_name' => 'Shahruk',
'last_name' => 'Khan',
'department' => 'TS',
'position' => 'dsaa',
'title' => '',
'city' => 'aa',
'state' => '0',
'zip' => '1',
'country' => '1'
)
)

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Need Help about Server Error 500 Blank Page

2013-01-22 Thread lowpass
On Mon, Jan 21, 2013 at 8:32 AM, mraheel83  wrote:
> I checked all files PHP, Apache and CakePHP Logs. Only access log is updating
> with the address and 500 Error.

That's strange. Try adding this to your bootstrap.php

error_reporting(-1);

This will tell PHP to output all errors to the browser.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Need Help about Server Error 500 Blank Page

2013-01-22 Thread mraheel83
I checked all files PHP, Apache and CakePHP Logs. Only access log is updating
with the address and 500 Error.




--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Need-Help-about-Server-Error-500-Blank-Page-tp5713337p5713341.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Need Help about Server Error 500 Blank Page

2013-01-21 Thread mraheel83
Dear All,

My website is working fine online but when I setup that website on local
then several pages are working except some pages.

On some pages when I am accessing them then I am getting Server Error 500.

I checked following things:

URL Rewriting = enabled
Set Debug as 2 in core.php now It gives blank page and with Debug as 0 it
gives Server Error 500
Error and debug log under /app/tmp/ not appending any error.

Please advice me how should I fix this problem.

Thanks



--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Need-Help-about-Server-Error-500-Blank-Page-tp5713337.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Hello Need Help...

2012-11-12 Thread Rup Gautam
 have to make a simple video embed page and want to know the coding for it.

i need the page url to be 
www.mysite.com/dm.php?v=VIDEO_ID
,www.mysite.com/putlocker.php?v=VIDEO_ID
,www.mysite.com/sockshare.php?v=VIDEO_ID
 so 
that i can embed videos freely without making new html page every time.

I will be so thankful ... 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Need help with a find on related HABTM relationship

2012-09-28 Thread lowpass
You don't really need to add a constraint if your code if you specify
the User.id as a condition and run your query on the User model.

In Project model:

public function fetchAll($user_id = null)
{
if (!empty($user_id))
{
return $this->User->find(
'all',
array(
'conditions' => array(
'User.id' => $user_id
),
'contain' => array(
'Project' => array(
'Site'
)
)
)
)
}
else
{
// get all projects
}
}

In ProjectsController, just pass $this->Auth->user('id'). The else
block above would be used for an admin action, or a view that listed
all project names for whatever reason.

On Fri, Sep 28, 2012 at 2:10 PM, Clark Ritchie  wrote:
> I'm looking for some guidance here.
>
> I have:
>
> User hasAndBelongsToMany Project
>
> Schema:
> Users.id
> Users.name
> ...
>
> Project hasAndBelongsToMany User
>
> Schema:
> Project.id
> Project.name
> ...
>
> My join table:
>
> projects_users.user_id
> projects_users.project_id
>
> Site belongsTo Project
>
> Site.id
> Site.project_id
> ...
>
>
> Users-Projects works OK, I can assign a user to one or many projects.
> Sites-Projects works OK, I can assign a Site to a Project.
>
> Now, I want to make sure the user can only find sites that match the
> projects to which they are assigned.  I assume I need to put a condition
> into the Site's beforeFind function, but I can't figure it out.
>
> Any guidance here?
>
> --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Need help with a find on related HABTM relationship

2012-09-28 Thread Clark Ritchie
I'm looking for some guidance here.  

I have:

User hasAndBelongsToMany Project

Schema:
Users.id
Users.name
...

Project hasAndBelongsToMany User

Schema:
Project.id
Project.name
...

My join table:

projects_users.user_id
projects_users.project_id

Site belongsTo Project

Site.id
Site.project_id
...


Users-Projects works OK, I can assign a user to one or many projects.
Sites-Projects works OK, I can assign a Site to a Project.

Now, I want to make sure the user can only find sites that match the 
projects to which they are assigned.  I assume I need to put a condition 
into the Site's beforeFind function, but I can't figure it out.

Any guidance here?

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Hello i need help in database schema ready

2012-09-27 Thread Paul Willis
I agree knowing what the dataset is for might help with the answer. I don't 
know but I would have thought Units of Measurement are set per Country rather 
than by City?

Paul

On 27 Sep 2012, at 16:44, Jonathan Sundquist  wrote:

> I guess I question what you would like this data set for.  Looking at this 
> from a large scale of the United States I know there are a number of city 
> names that are duplicated across multiple states.  Now I don't know if this 
> is the same across the rest of the world but you may need to rethink what you 
> are looking to implement. You may need to set up your relational table from 
> countries to states/province to cities.  
> 
> Also a quick search of Google reveals this page.  
> http://www.maxmind.com/app/worldcities which can be found on this thread  
> http://forums.overclockers.com.au/showthread.php?t=899135 .
> 
> On Thu, Sep 27, 2012 at 10:36 AM, Peter Nassef  wrote:
> i need three table .sql content 
> First: All Countries 
> Secound: All Cities Related to Countries 
> Third :Units Measurement 
> 
> On Thu, Sep 27, 2012 at 5:08 PM, Maliko V  wrote:
> Can you elaborate what do you need exactly? Us to show you how u create this 
> schema or model using bake ?
> 
> VM 
> 
> Sent from iPhone smartphone
> 
> On 2012-09-27, at 11:02 AM, Peter Nassef  wrote:
> 
>> Hello cakephp member
>> 
>> i need table content all country and all cities relate to this countries 
>> and other table content units measurement 
>> 
>> 
>> and Thanks :) 
>> 
>> -- 
>> Like Us on FacekBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>  
>> --- 
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>  
>>  
> 
> 
> -- 
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  
> 
> 
> 
> -- 
> 
> __
> Peter Nassef
> Mob.:+2 0122 561 6354
> E-mail: peter.nas...@gmail.com
> Web Designer, Developer: XHTML, CSS, jQuary, Ajax, JavaScript, PHP& MySql
> 
> 
> -- 
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  
> 
> 
> -- 
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Hello i need help in database schema ready

2012-09-27 Thread Jonathan Sundquist
I guess I question what you would like this data set for.  Looking at this
from a large scale of the United States I know there are a number of city
names that are duplicated across multiple states.  Now I don't know if this
is the same across the rest of the world but you may need to rethink what
you are looking to implement. You may need to set up your relational table
from countries to states/province to cities.

Also a quick search of Google reveals this page.
http://www.maxmind.com/app/worldcities which can be found on this thread
http://forums.overclockers.com.au/showthread.php?t=899135 .

On Thu, Sep 27, 2012 at 10:36 AM, Peter Nassef wrote:

> i need three table .sql content
> First: All Countries
> Secound: All Cities Related to Countries
> Third :Units Measurement
>
> On Thu, Sep 27, 2012 at 5:08 PM, Maliko V  wrote:
>
>> Can you elaborate what do you need exactly? Us to show you how u create
>> this schema or model using bake ?
>>
>> VM
>>
>> Sent from iPhone smartphone
>>
>> On 2012-09-27, at 11:02 AM, Peter Nassef  wrote:
>>
>> Hello cakephp member
>>
>> i need table content all country and all cities relate to this countries
>> and other table content units measurement
>>
>>
>> and Thanks :)
>>
>> --
>> Like Us on FacekBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>
>>
>>
>>  --
>> Like Us on FacekBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>
>>
>>
>
>
>
> --
>
> __
> Peter Nassef
> Mob.:+2 0122 561 6354
> E-mail: peter.nas...@gmail.com
> Web Designer, Developer: XHTML, CSS, jQuary, Ajax, JavaScript, PHP& MySql
>
>  --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Hello i need help in database schema ready

2012-09-27 Thread Peter Nassef
i need three table .sql content
First: All Countries
Secound: All Cities Related to Countries
Third :Units Measurement

On Thu, Sep 27, 2012 at 5:08 PM, Maliko V  wrote:

> Can you elaborate what do you need exactly? Us to show you how u create
> this schema or model using bake ?
>
> VM
>
> Sent from iPhone smartphone
>
> On 2012-09-27, at 11:02 AM, Peter Nassef  wrote:
>
> Hello cakephp member
>
> i need table content all country and all cities relate to this countries
> and other table content units measurement
>
>
> and Thanks :)
>
> --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>
>  --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>



-- 

__
Peter Nassef
Mob.:+2 0122 561 6354
E-mail: peter.nas...@gmail.com
Web Designer, Developer: XHTML, CSS, jQuary, Ajax, JavaScript, PHP& MySql

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Hello i need help in database schema ready

2012-09-27 Thread Jonathan Sundquist
I don't know how likely you will find a country and all cities within each
specific country.  You are more likely to find database schemas out there
that give you countries with all related states/provinces within.

On Thu, Sep 27, 2012 at 10:08 AM, Maliko V  wrote:

> Can you elaborate what do you need exactly? Us to show you how u create
> this schema or model using bake ?
>
> VM
>
> Sent from iPhone smartphone
>
> On 2012-09-27, at 11:02 AM, Peter Nassef  wrote:
>
> Hello cakephp member
>
> i need table content all country and all cities relate to this countries
> and other table content units measurement
>
>
> and Thanks :)
>
> --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>
>  --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Hello i need help in database schema ready

2012-09-27 Thread Maliko V
Can you elaborate what do you need exactly? Us to show you how u create this 
schema or model using bake ?

VM 

Sent from iPhone smartphone

On 2012-09-27, at 11:02 AM, Peter Nassef  wrote:

> Hello cakephp member
> 
> i need table content all country and all cities relate to this countries 
> and other table content units measurement 
> 
> 
> and Thanks :) 
> -- 
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Hello i need help in database schema ready

2012-09-27 Thread Peter Nassef
Hello cakephp member

i need table content all country and all cities relate to this countries
and other table content units measurement


and Thanks :)

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Need help with reverse routing

2012-08-10 Thread Mark Wratten
cricket - thanks for the reply, I will try it and see if it works.

Thanks

Mark

On Friday, August 10, 2012 4:18:32 PM UTC-4, cricket wrote:
>
> Here's a generic element I use for pagination: 
>
> http://pastebin.com/JvKbyWUi 
>
> Perhaps you can modify that to your own needs. With Cake 2.x I've had 
> to make some changes to what I had been using. I suppose that I must 
> be doing something wrong that it requires the AppController snippet. 
>
> I think your route could be improved a bit: 
>
> Router::connect( 
> '/:state/:city/:page/:slug', 
> array( 
> 'controller' => 'pages', 
> 'action' => 'display', 
> 'level' => 'town' 
> ), 
> array( 
> 'state' => '[a-z]{2}', 
> 'city' => '[-a-z]+', 
> 'page' => '[0-9]+', 
> 'slug' => '[-a-z]+', 
> 'pass' => array('page', 'slug') 
> ) 
> ); 
>
>
> I've added the slug to the URL, which allows you to pass it as an 
> action param. Otherwise, I'm not sure what good it would do you. 
>
> I've also made a better regex for state, and "sluggified" city -- a 
> name with a space or apostrophe would not match your regex. Because 
> you want the city name to appear in URLs, you'll need to store both 
> the display text and slug for each city. 
>
> As for what's being passing as params, personally, I would pass state, 
> city, and slug. I also think it's a bit odd that this is pointing to 
> PagesController. But then, I don't know the details so ... 
>
> On Fri, Aug 10, 2012 at 2:33 PM, Mark Wratten > 
> wrote: 
> > I'm looking for some help with reverse routing as the documentation is a 
> bit 
> > thin. Particularly for use with rendering objects such as 
> PaginatorHelper. 
> > 
> > I have a URL in the format - /state/city/page/slug which I route with - 
> > Router::connect('/:state/:city/:page/*', array( 
> > 'controller' => 'pages', 'action' => 'display', 'level' => 'town'), 
> array( 
> > 'state' => '[a-z][a-z]', 'city' => '[a-z]+', 'page' => '[^/]*', 'pass' 
> => 
> > array('page'))); 
> > 
> > That works fine in the forward direction, but how do I get the 
> > PaginatorHelper to assemble the URL with the state and city pieces? 
> > 
> > If I add another route for ajax requests, such as - 
> > Router::connect('/ajax/:controller/:action/*'); 
> > 
> > That also works in the forward direction, but the URL generated by 
> > PaginatorHelper in the previous case now generates the URL in the form - 
> > /ajax/pages/display/... 
> > So How do you tell the reverse routing which rule to use? 
> > 
> > If I need to resort to a custom router, how do you tell the the Cake 
> > rendering functions to use the custom router? 
> > 
> > Thanks in advance 
> > 
> > Mark 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "CakePHP" group. 
> > To post to this group, send email to cake...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > cake-php+u...@googlegroups.com . 
> > Visit this group at http://groups.google.com/group/cake-php?hl=en-US. 
> > 
> > 
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need help with reverse routing

2012-08-10 Thread lowpass
Here's a generic element I use for pagination:

http://pastebin.com/JvKbyWUi

Perhaps you can modify that to your own needs. With Cake 2.x I've had
to make some changes to what I had been using. I suppose that I must
be doing something wrong that it requires the AppController snippet.

I think your route could be improved a bit:

Router::connect(
'/:state/:city/:page/:slug',
array(
'controller' => 'pages',
'action' => 'display',
'level' => 'town'
),
array(
'state' => '[a-z]{2}',
'city' => '[-a-z]+',
'page' => '[0-9]+',
'slug' => '[-a-z]+',
'pass' => array('page', 'slug')
)
);


I've added the slug to the URL, which allows you to pass it as an
action param. Otherwise, I'm not sure what good it would do you.

I've also made a better regex for state, and "sluggified" city -- a
name with a space or apostrophe would not match your regex. Because
you want the city name to appear in URLs, you'll need to store both
the display text and slug for each city.

As for what's being passing as params, personally, I would pass state,
city, and slug. I also think it's a bit odd that this is pointing to
PagesController. But then, I don't know the details so ...

On Fri, Aug 10, 2012 at 2:33 PM, Mark Wratten  wrote:
> I'm looking for some help with reverse routing as the documentation is a bit
> thin. Particularly for use with rendering objects such as PaginatorHelper.
>
> I have a URL in the format - /state/city/page/slug which I route with -
> Router::connect('/:state/:city/:page/*', array(
> 'controller' => 'pages', 'action' => 'display', 'level' => 'town'), array(
> 'state' => '[a-z][a-z]', 'city' => '[a-z]+', 'page' => '[^/]*', 'pass' =>
> array('page')));
>
> That works fine in the forward direction, but how do I get the
> PaginatorHelper to assemble the URL with the state and city pieces?
>
> If I add another route for ajax requests, such as -
> Router::connect('/ajax/:controller/:action/*');
>
> That also works in the forward direction, but the URL generated by
> PaginatorHelper in the previous case now generates the URL in the form -
> /ajax/pages/display/...
> So How do you tell the reverse routing which rule to use?
>
> If I need to resort to a custom router, how do you tell the the Cake
> rendering functions to use the custom router?
>
> Thanks in advance
>
> Mark
>
> --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Need help with reverse routing

2012-08-10 Thread Mark Wratten
I'm looking for some help with reverse routing as the documentation is a 
bit thin. Particularly for use with rendering objects such as 
PaginatorHelper.

I have a URL in the format - /state/city/page/slug which I route with -
Router::connect('/:state/:city/:page/*', array(
'controller' => 'pages', 'action' => 'display', 'level' => 'town'), array(
'state' => '[a-z][a-z]', 'city' => '[a-z]+', 'page' => '[^/]*', 'pass' => 
array('page')));

That works fine in the forward direction, but how do I get the 
PaginatorHelper to assemble the URL with the state and city pieces?

If I add another route for ajax requests, such as -
Router::connect('/ajax/:controller/:action/*');

That also works in the forward direction, but the URL generated by 
PaginatorHelper in the previous case now generates the URL in the form - 
/ajax/pages/display/...
So How do you tell the reverse routing which rule to use?

If I need to resort to a custom router, how do you tell the the Cake 
rendering functions to use the custom router?

Thanks in advance 

Mark

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Mike Griffin
On Fri, Aug 10, 2012 at 10:24 AM, mohit kumar  wrote:
> thanks Mike.. Let me try that . But the problem is my controller that i
> generated by the bake is like
>
> user -
> shift -
> save so with 1 form 1 can save only one user, will it be possible for me to
> save multiple mappings with one go
>

Yes, it will. Once again, have you tried it? Please read the manual
and understand it, it's all in there.

Mike.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Salines
http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-saveall-array-data-null-array-options-array

Dana petak, 10. kolovoza 2012. 11:24:07 UTC+2, korisnik mohit napisao je:
>
> thanks Mike.. Let me try that . But the problem is my controller that i 
> generated by the bake is like
>
> user - 
> shift - 
> save so with 1 form 1 can save only one user, will it be possible for me 
> to save multiple mappings with one go
>
> *With Best Regards,
> Mohit Kumar *
> *+91-9582894570*
>
>
>
> On Fri, Aug 10, 2012 at 2:51 PM, Mike Griffin 
> > wrote:
>
>> On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar 
>> > 
>> wrote:
>> > How can i display the data in this format. [] are checkboxes
>> >
>> >
>> > Users   Shift1 shift2 shift3 shift4
>> > user1[]  [] [] []
>> > user2[]  [] [] []
>> > user3[]  [] [] []
>> > user4[]  [] [] []
>> > user5[]  [] [] []
>> >
>>
>> Is this something like what you are looking for?
>>
>>
>> > echo "";
>> foreach($users as $u) {
>>   // output the users name here, as the first cell of a table, for example
>>   echo "".$u['name']."";
>>   for($i=0; $i<5; $i++) {
>> // output the shifts here
>> echo "[CODE FOR CHECKBOX]";
>>   }
>>   // finish the row in the table
>>   echo "";
>> }
>> echo "";
>>
>> Mike.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> cake-php+u...@googlegroups.com .
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
thanks Mike.. Let me try that . But the problem is my controller that i
generated by the bake is like

user -
shift -
save so with 1 form 1 can save only one user, will it be possible for me to
save multiple mappings with one go

*With Best Regards,
Mohit Kumar *
*+91-9582894570*



On Fri, Aug 10, 2012 at 2:51 PM, Mike Griffin  wrote:

> On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar  wrote:
> > How can i display the data in this format. [] are checkboxes
> >
> >
> > Users   Shift1 shift2 shift3 shift4
> > user1[]  [] [] []
> > user2[]  [] [] []
> > user3[]  [] [] []
> > user4[]  [] [] []
> > user5[]  [] [] []
> >
>
> Is this something like what you are looking for?
>
>
>  echo "";
> foreach($users as $u) {
>   // output the users name here, as the first cell of a table, for example
>   echo "".$u['name']."";
>   for($i=0; $i<5; $i++) {
> // output the shifts here
> echo "[CODE FOR CHECKBOX]";
>   }
>   // finish the row in the table
>   echo "";
> }
> echo "";
>
> Mike.
>
> --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Mike Griffin
On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar  wrote:
> How can i display the data in this format. [] are checkboxes
>
>
> Users   Shift1 shift2 shift3 shift4
> user1[]  [] [] []
> user2[]  [] [] []
> user3[]  [] [] []
> user4[]  [] [] []
> user5[]  [] [] []
>

Is this something like what you are looking for?


";
foreach($users as $u) {
  // output the users name here, as the first cell of a table, for example
  echo "".$u['name']."";
  for($i=0; $i<5; $i++) {
// output the shifts here
echo "[CODE FOR CHECKBOX]";
  }
  // finish the row in the table
  echo "";
}
echo "";

Mike.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
How can i display the data in this format. [] are checkboxes

   1.
   2. Users   Shift1 shift2 shift3 shift4
   3. user1[]  [] [] []
   4. user2[]  [] [] []
   5. user3[]  [] [] []
   6. user4[]  [] [] []
   7. user5[]  [] [] []



*With Best Regards,
Mohit Kumar *
*+91-9582894570*



On Fri, Aug 10, 2012 at 2:30 PM, Tilen Majerle wrote:

> i'm not understanding you well, describe more about your problem..
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/8/10 mohit kumar 
>
>> Any idea guys?
>>
>> *With Best Regards,
>> Mohit Kumar *
>> *+91-9582894570*
>>
>>
>>
>> On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:
>>
>>> Hi Folks,
>>>
>>> Can anyone help me regarding this.
>>>
>>> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>>>
>>>
>>>
>>> *With Best Regards,
>>> Mohit Kumar *
>>> *+91-9582894570*
>>>
>>>
>>  --
>> 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.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread Tilen Majerle
i'm not understanding you well, describe more about your problem..
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/8/10 mohit kumar 

> Any idea guys?
>
> *With Best Regards,
> Mohit Kumar *
> *+91-9582894570*
>
>
>
> On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:
>
>> Hi Folks,
>>
>> Can anyone help me regarding this.
>>
>> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>>
>>
>>
>> *With Best Regards,
>> Mohit Kumar *
>> *+91-9582894570*
>>
>>
>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
Any idea guys?

*With Best Regards,
Mohit Kumar *
*+91-9582894570*



On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:

> Hi Folks,
>
> Can anyone help me regarding this.
>
> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>
>
>
> *With Best Regards,
> Mohit Kumar *
> *+91-9582894570*
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: NEED HELP

2012-07-17 Thread Lboogie
Thank you all very much...I spoke with Larry form Cake DC who helped me get 
it running. He did explain to me that i needed to provide more info 
concerning the problem. Thanks again to you all.

On Monday, July 16, 2012 9:40:06 AM UTC-4, Lboogie wrote:
>
> Hello, i am trying to install a project manager created with cake php but 
> can't seem to trigger the install option when there is no install folder or 
> files to do so...can anyone help me?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: NEED HELP

2012-07-16 Thread Daniel Baird
On Mon, Jul 16, 2012 at 11:40 PM, Lboogie wrote:

> Hello, i am trying to install a project manager created with cake php but
> can't seem to trigger the install option when there is no install folder or
> files to do so...can anyone help me?


Perhaps you just unzip it into a folder on your web host and it works
already.


-- 
Daniel Baird
I've tried going to the XHTML  a few times, but it's always closed.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: NEED HELP

2012-07-16 Thread Tilen Majerle
this is group for help, but you have to corrent describe your problem, give
us your details (cake version, php version, server type, problem)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/7/16 Lboogie 

> Are you able to help or not...isn't this what is group for? Excuse me if
> i'm wrong
>
>
> On Monday, July 16, 2012 10:20:12 AM UTC-4, euromark wrote:
>>
>> how i hate those non-sense for-crying-out-loud thread titles^^
>>
>> Am Montag, 16. Juli 2012 15:40:06 UTC+2 schrieb Lboogie:
>>>
>>> Hello, i am trying to install a project manager created with cake php
>>> but can't seem to trigger the install option when there is no install
>>> folder or files to do so...can anyone help me?
>>
>>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: NEED HELP

2012-07-16 Thread Justin Edwards
http://book.cakephp.org/2.0/en/installation.html

On Mon, Jul 16, 2012 at 11:15 AM, Lboogie wrote:

> Are you able to help or not...isn't this what is group for? Excuse me if
> i'm wrong
>
>
> On Monday, July 16, 2012 10:20:12 AM UTC-4, euromark wrote:
>>
>> how i hate those non-sense for-crying-out-loud thread titles^^
>>
>> Am Montag, 16. Juli 2012 15:40:06 UTC+2 schrieb Lboogie:
>>>
>>> Hello, i am trying to install a project manager created with cake php
>>> but can't seem to trigger the install option when there is no install
>>> folder or files to do so...can anyone help me?
>>
>>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: NEED HELP

2012-07-16 Thread Lboogie
Are you able to help or not...isn't this what is group for? Excuse me if 
i'm wrong

On Monday, July 16, 2012 10:20:12 AM UTC-4, euromark wrote:
>
> how i hate those non-sense for-crying-out-loud thread titles^^
>
> Am Montag, 16. Juli 2012 15:40:06 UTC+2 schrieb Lboogie:
>>
>> Hello, i am trying to install a project manager created with cake php but 
>> can't seem to trigger the install option when there is no install folder or 
>> files to do so...can anyone help me?
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: NEED HELP

2012-07-16 Thread euromark
how i hate those non-sense for-crying-out-loud thread titles^^

Am Montag, 16. Juli 2012 15:40:06 UTC+2 schrieb Lboogie:
>
> Hello, i am trying to install a project manager created with cake php but 
> can't seem to trigger the install option when there is no install folder or 
> files to do so...can anyone help me?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: "URGENT" - NEED HELP IN ASSOCIATION HABTM

2012-06-27 Thread Mark Wratten
Often it is easier to create a model for the linking table, i.e. 
OrderProduct and use belongsTo Order and Product rather than using HABTM 
associations. Then query using that model.

Mark

On Monday, June 25, 2012 11:10:11 AM UTC-4, Caio Vncius wrote:
>
> Hello,
>
> need a help in a ratio of two-mode HABTM tables.
>
> I have a table called orders and another called produts. Estaão related 
> orders_produts the table. Unless the relationship but usually when I need 
> to display per EXAMPLE products which have an order, I do not. How can I do 
> to get all the products of an order and pull the table daod sda produts 
> such as price and description ...
>
> sorry my english
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: "URGENT" - NEED HELP IN ASSOCIATION HABTM

2012-06-25 Thread rchavik
putting "URGENT" in your subject line is a sure fire way to get your 
questions ignored and get replied with mindless answers such as this one :p

On Monday, June 25, 2012 10:10:11 PM UTC+7, Caio Vncius wrote:
>
> Hello,
>
> need a help in a ratio of two-mode HABTM tables.
>
> I have a table called orders and another called produts. Estaão related 
> orders_produts the table. Unless the relationship but usually when I need 
> to display per EXAMPLE products which have an order, I do not. How can I do 
> to get all the products of an order and pull the table daod sda produts 
> such as price and description ...
>
> sorry my english
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help populating a select box

2012-05-23 Thread Mike Griffin
On Tue, May 22, 2012 at 3:25 PM, dpinion  wrote:
> Ok, I am somewhat new to cake, have spent the past two days on this
> and I am just not getting it. Hope someone can shed some light on it
> for me. I have two tables:

>
> icons_controller.php:
>
>  class IconsController extends AppController{
>  var $name = "Icons";
>  var $uses = array('Icon', 'Product');
>
>
>  function assignFields(){
>    $productId = $this->params['named']['product_id'];
>    $icons = $this->Icon->findAll(array('product_id' => 
> $this->params['named']['product_id']));
>    $this->set('icons', $icons);
>  }
> }
>
> ?>
>
>
> index.ctp:
>
> input('icon_num', array('type' => 'select',
> 'options' => $icons, 'label' => 'Choose Icon ID:'))?>
>
>
>
> The select is being populated with fields from both the icons tables
> as well as the products table. I really ONLY want to display the
> filename field from the IconCategory model along with storing the id
> into the product_icons' icon_id field.
>
> Hope this makes sense. Thanks for any help.

That's because you are passing the result of a findAll request to the input tag.
Have a look at find('list')
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-list

You'll have to add some conditions to get the exact data that you want
back but this is the format you want it in.

Mike.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Need help populating a select box

2012-05-22 Thread dpinion
Ok, I am somewhat new to cake, have spent the past two days on this
and I am just not getting it. Hope someone can shed some light on it
for me. I have two tables:

product_icons
id (int)
product_id (int, foreign key to a products table)
icon_id (int, foreign key to product_icon_types table)
sort_order (int)


product_icon_types
id (int)
filename (varchar 255)
description (text)

icon.php model:

 array('foreignKey' =>
'icon_id'));
}
?>

icon_category.php model:

 array('foreignKey' => 'icon_id'));
}
?>

icons_controller.php:

Session->read('logged')){
   $this->redirect(array('controller' => 'login', 'action' =>
'login'));
 }
   }


  function index(){
$this->assignFields();
  }


 function edit($id = null) {
  $this->Icon->id = $id;
$product_id = $this->data['Icon']['product_id'];
 if (empty($this->data)) {
 $this->data = $this->Icon->read();
 } else {
$this->Icon->save($this->data);
$this->redirect(array('controller' => 'icons', 'action' => 'index',
'product_id' => $product_id));
 }

}

function add(){
$product = $this->Product->find(array('Product.id' => $this-
>data['Icon']['icon']));
$data = array('Icon' => array('product_id' => $product['Product']
['id'],
  'product_id' => $product['Product']['id'],
  'sort_order' => $this->data['Icon']['sort_order'],
  'icon_id' => $this->data['Icon']['icon_num']));
$this->Icon->save($this->data);
$this->redirect(array('action' => 'index', 'product_id' => $this-
>data['Icon']['product_id']));
  }

  function delete($id){
$this->Icon->delete($id);
$this->redirect(array('action' => 'index', 'product_id' => $this-
>params['named']['product_id']));
  }

  function assignFields(){
$productId = $this->params['named']['product_id'];
$product = $this->Product->find(array('Product.id' =>
$productId));
$this->set('product', $product);
$products = $this->Product->findAll('Product.category_id IS NOT
NULL');
$icons = $this->Icon->findAll(array('product_id' => $this-
>params['named']['product_id']));
$pr = array();
foreach($products as $icon){
  $pr[$icon["Product"]['id']] = $icon['Product']['model_name'];
}
$this->set('products', $pr);
$this->set('icons', $icons);
  }
}

?>


index.ctp:

input('icon_num', array('type' => 'select',
'options' => $icons, 'label' => 'Choose Icon ID:'))?>



The select is being populated with fields from both the icons tables
as well as the products table. I really ONLY want to display the
filename field from the IconCategory model along with storing the id
into the product_icons' icon_id field.

Hope this makes sense. Thanks for any help.





-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help in Ajax

2012-05-01 Thread Ankit Patel
Any ajax is not working actually so please help me with I want to use this
example


http://www.cakephp.4uk.pl/ajax/link


I have included helper in Post controller and also in the app controller
should I work

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help in Ajax

2012-05-01 Thread Ankit Patel
I am using cakephp 2.1.1

and now it shows like this
Error

The requested address was not found on this server.


When I am using ajax

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help in Ajax

2012-05-01 Thread Tilen Majerle
which cake version ??

$ajax is helper, if you use Cake 2, than use $this->Ajax instead
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/5/1 Ankit Patel 

> 
> 
> 
>link(
> 'Response will be add at the top of selected element',
> array( 'controller' => 'ajax', 'action' => 'view', 3 ),
> array( 'update' => 'post3', 'position' => 'prepend')
> );
> ?>
> 
>
>
> Where to use this and it shows error like
>
> Undefined variable: ajax [APP\View\Posts\index.ctp, line 39]
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Need help in Ajax

2012-05-01 Thread Ankit Patel



link(
'Response will be add at the top of selected element',
array( 'controller' => 'ajax', 'action' => 'view', 3 ),
array( 'update' => 'post3', 'position' => 'prepend')
);
?>



Where to use this and it shows error like

Undefined variable: ajax [APP\View\Posts\index.ctp, line 39]

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need Help

2012-03-01 Thread jeremyharris
Your first resource should be the book[1]. You can also look at 
screencasts[2] and sign up for classes that will teach you the basics and 
get you going[3].

1: http://book.cakephp.org
2: http://tv.cakephp.org/ 
3: http://training.cakephp.org/ 

On Thursday, March 1, 2012 5:44:07 AM UTC-8, mohit wrote:
>
> Hi Experts,
>
> Greetings!!
>
> Just need some help on good documents and video tutorials on Cake PHP.
> I am working with WordPress, for last 2 years.I want to learn cake php.I 
> have searched internet and found many good tutorials.
> But it would be very helpful if you can send me some good links for Cake 
> PHP on topics such as,
>
>- Authentication
>- ACL
>- Routing
>
> -- 
> Best Regards,
> Mohit Kumar
>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Need Help

2012-03-01 Thread mohit kumar
Hi Experts,

Greetings!!

Just need some help on good documents and video tutorials on Cake PHP.
I am working with WordPress, for last 2 years.I want to learn cake php.I
have searched internet and found many good tutorials.
But it would be very helpful if you can send me some good links for Cake
PHP on topics such as,

   - Authentication
   - ACL
   - Routing

-- 
Best Regards,
Mohit Kumar

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need Help: A variable is losing value

2012-02-11 Thread chris varick
Ok so I figured out what the issue was.
When posting changes the form was not going to "/network/add_network/<
$nId>" it was only going to "/network/add_network/" so this is why it
would lose the $nId parameter.

A couple of factors for this issue (main one below):
1) when I set the variable from controller to view it was losing the
value. (I figured it out to be a Variable conflict, so I renamed
$networkId to $netId)

Edited Code that is working with View:
[code]

public function add_network($nId = 0)
{

if($nId){
$net_info = $this->Network->find('first', array('conditions'
=> array('id' => $nId)));

//Should changed to $this->set();
self::set('netId', $nId);   //This variable is used on view
to set the form to post to correct "action with ID"
self::set('network', $net_info);
self::set('page_title', "View | Edit Network".
$net_info['Network']['network_name']." ID: ".$nId);
} else {
self::set('netId', null);
self::set('network', null);
self::set('page_title', "Add Network");
}


//Clear "Flash"
$alert = null;


if ($this->data['network']) {

if ($this->data['network']['network_name']) {
$data['network_name'] = addslashes($this-
>data['network']['network_name']);
$data['sub_id'] = addslashes($this->data['network']
['sub_id']);
$data['active'] = 1;

//Save form data to Networks database.
//If we are editing a network, then make sure to save
data to record ID ($nId)
$mySaveId = ($nId)?$nId:0;

//Start Save to current record
$this->Network->id = $mySaveId;
$this->Network->save($data);

//Get current Record (double check)
$finalId = $this->Network->id;


//Compare to determine correct message to send 
to user.
if ($finalId == $mySaveId) {
$alert = "Changes to network: ".
$data['network_name']." were saved.";
} else {
$alert = "New network: ".$data['network_name']."
was added.";
}
}
}

//Handles UI controls (navigation)
switch($this->data['window']['flag']){
case "networks":
self::redirect("/admin/manage_network");
break;

} // switch

//Sets View configurations for UI
self::set('logo', $this->Session->read('logo'));
self::set('wbtitle', $this->Session->read('wbtitle'));
self::set('alert', $alert);
//This is where the bug was, not sure if it needs to be
removed. But to fix bug
//renamed $networkId on view to $netId for now.
self::set('networkId', isset($networkId)?$networkId:null);
}

[/code]


On Feb 11, 11:01 am, chris varick  wrote:
> Stephen,
>
> STILL NOT WORKING... :(
>
> Thanks for the reply and suggestion. However the method you suggested
> gives me different results.
> This is what I ended up using:
> [code]
>
> $mySaveId =  $this->Network->id = $nId;
> $networkId = $this->Network->save($this->data);
>
> [/code]
>
> Nothing is "saved" (editing record) or even "inserted" (if it is a new
> record) I am really not sure what is happening. LIke I was saying it
> feels like I am losing the Variable value $nId.  $nId is being passed
> by assessing the method "/networks/add_network/"
> So I am really confused! :P Thank you for the corrected method though
> of saving record via primary key with Model->id=$val I didn't realize
> that was the documented way of doing things.
>
> On Feb 11, 2:46 am, Stephen Speakman 
> wrote:
>
>
>
>
>
>
>
> > It's possible your $_SESSION['nId'] is actually overwriting the
> > parameter being passed to the controller with 0?
> > Assuming you're accessing the method like such: /networks/add_network/
>
> > If you want to avoid creating a new record try:
>
> > $this->Network->id = $nId;
> > $this->Network->save($this->data);
>
> > Kind Regards
> >   Stephen
>
> > On 11/02/2012 08:44, chris varick wrote:
>
> > > I am hoping someone can help me out here. I am pulling my hair out.
> > > For some reason when I go to save "edited" information, form a form,
> > > it is creating an entire new record in the database instead of just
> > > updating the current record at hand.
>
> > > I am using variable $nId to reference the record id on _save(); For
> > > some reason it is setting the $nId to 0. I do not know what is
> > > happening. Any suggestions?
>
> > > Take a look at the line that has: $mySaveId = ($nId)?$nId:0; you will
> > > see where I attempt to save to the current record.
>
> > > [code]
>
> > > public function add_network($nId = 0)
> > >     {
>
> > >     // Capture for Debuging
> > >     $_SESSION['nId'] = $

Re: Need Help: A variable is losing value

2012-02-11 Thread chris varick
Stephen,

STILL NOT WORKING... :(

Thanks for the reply and suggestion. However the method you suggested
gives me different results.
This is what I ended up using:
[code]

$mySaveId =  $this->Network->id = $nId;
$networkId = $this->Network->save($this->data);

[/code]

Nothing is "saved" (editing record) or even "inserted" (if it is a new
record) I am really not sure what is happening. LIke I was saying it
feels like I am losing the Variable value $nId.  $nId is being passed
by assessing the method "/networks/add_network/"
So I am really confused! :P Thank you for the corrected method though
of saving record via primary key with Model->id=$val I didn't realize
that was the documented way of doing things.



On Feb 11, 2:46 am, Stephen Speakman 
wrote:
> It's possible your $_SESSION['nId'] is actually overwriting the
> parameter being passed to the controller with 0?
> Assuming you're accessing the method like such: /networks/add_network/
>
> If you want to avoid creating a new record try:
>
> $this->Network->id = $nId;
> $this->Network->save($this->data);
>
> Kind Regards
>   Stephen
>
> On 11/02/2012 08:44, chris varick wrote:
>
>
>
>
>
>
>
> > I am hoping someone can help me out here. I am pulling my hair out.
> > For some reason when I go to save "edited" information, form a form,
> > it is creating an entire new record in the database instead of just
> > updating the current record at hand.
>
> > I am using variable $nId to reference the record id on _save(); For
> > some reason it is setting the $nId to 0. I do not know what is
> > happening. Any suggestions?
>
> > Take a look at the line that has: $mySaveId = ($nId)?$nId:0; you will
> > see where I attempt to save to the current record.
>
> > [code]
>
> > public function add_network($nId = 0)
> >     {
>
> >     // Capture for Debuging
> >     $_SESSION['nId'] = $nId;
>
> >         if($nId){
> >             $net_info = $this->Network->find('first',
> > array('conditions' =>  array('id' =>  $nId)));
> >             self::set('network', $net_info);
> >             self::set('page_title', "View | Edit Network".
> > $net_info['Network']['network_name']." ID: ".$_SESSION['nId']);
> >         } else {
> >             self::set('network', null);
> >             self::set('page_title', "Add Network");
> >         }
>
> >         $alert = null;
>
> >         if ($this->data['network']) {
> >             if ($this->data['network']['network_name']) {
> >                 $data['network_name'] = addslashes($this-
> >> data['network']['network_name']);
> >                 $data['sub_id'] = addslashes($this->data['network']
> > ['sub_id']);
> >                 $data['active'] = 1;
>
> >                 //Save form data to Networks database.
> >                 //If we are editing a network, then make sure to save
> > data to record ID ($nId)
> >                  $mySaveId = ($nId)?$nId:0;
> >                 $networkId = $this->Network->_save($mySaveId, $data);
>
> >                 if ($networkId == $mySaveId) {
> >                     $alert = "Changes to network: ".
> > $data['network_name']." were saved.";
> >                 } else {
> >                     $alert = "New network: ".$data['network_name']."
> > was added.". " ".$networkId;
> >                 }
> >             }
> >         }
>
> >         switch($this->data['window']['flag']){
> >             case "networks":
> >                 self::redirect("/admin/manage_network");
> >                 break;
>
> >         } // switch
>
> >         self::set('logo', $this->Session->read('logo'));
> >         self::set('wbtitle', $this->Session->read('wbtitle'));
> >         self::set('alert', $alert);
> >         self::set('networkId', isset($networkId)?$networkId:null);
> >     }
>
> > [/code]

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need Help: A variable is losing value

2012-02-11 Thread Stephen Speakman
It's possible your $_SESSION['nId'] is actually overwriting the 
parameter being passed to the controller with 0?

Assuming you're accessing the method like such: /networks/add_network/

If you want to avoid creating a new record try:

$this->Network->id = $nId;
$this->Network->save($this->data);

Kind Regards
 Stephen

On 11/02/2012 08:44, chris varick wrote:

I am hoping someone can help me out here. I am pulling my hair out.
For some reason when I go to save "edited" information, form a form,
it is creating an entire new record in the database instead of just
updating the current record at hand.

I am using variable $nId to reference the record id on _save(); For
some reason it is setting the $nId to 0. I do not know what is
happening. Any suggestions?

Take a look at the line that has: $mySaveId = ($nId)?$nId:0; you will
see where I attempt to save to the current record.


[code]

public function add_network($nId = 0)
{

// Capture for Debuging
$_SESSION['nId'] = $nId;


if($nId){
$net_info = $this->Network->find('first',
array('conditions' =>  array('id' =>  $nId)));
self::set('network', $net_info);
self::set('page_title', "View | Edit Network".
$net_info['Network']['network_name']." ID: ".$_SESSION['nId']);
} else {
self::set('network', null);
self::set('page_title', "Add Network");
}



$alert = null;


if ($this->data['network']) {
if ($this->data['network']['network_name']) {
$data['network_name'] = addslashes($this-

data['network']['network_name']);

$data['sub_id'] = addslashes($this->data['network']
['sub_id']);
$data['active'] = 1;

//Save form data to Networks database.
//If we are editing a network, then make sure to save
data to record ID ($nId)
 $mySaveId = ($nId)?$nId:0;
$networkId = $this->Network->_save($mySaveId, $data);



if ($networkId == $mySaveId) {
$alert = "Changes to network: ".
$data['network_name']." were saved.";
} else {
$alert = "New network: ".$data['network_name']."
was added.". " ".$networkId;
}
}
}

switch($this->data['window']['flag']){
case "networks":
self::redirect("/admin/manage_network");
break;

} // switch

self::set('logo', $this->Session->read('logo'));
self::set('wbtitle', $this->Session->read('wbtitle'));
self::set('alert', $alert);
self::set('networkId', isset($networkId)?$networkId:null);
}

[/code]



--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.



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


Need Help: A variable is losing value

2012-02-11 Thread chris varick
I am hoping someone can help me out here. I am pulling my hair out.
For some reason when I go to save "edited" information, form a form,
it is creating an entire new record in the database instead of just
updating the current record at hand.

I am using variable $nId to reference the record id on _save(); For
some reason it is setting the $nId to 0. I do not know what is
happening. Any suggestions?

Take a look at the line that has: $mySaveId = ($nId)?$nId:0; you will
see where I attempt to save to the current record.


[code]

public function add_network($nId = 0)
   {

   // Capture for Debuging
   $_SESSION['nId'] = $nId;


   if($nId){
   $net_info = $this->Network->find('first',
array('conditions' => array('id' => $nId)));
   self::set('network', $net_info);
   self::set('page_title', "View | Edit Network".
$net_info['Network']['network_name']." ID: ".$_SESSION['nId']);
   } else {
   self::set('network', null);
   self::set('page_title', "Add Network");
   }



   $alert = null;


   if ($this->data['network']) {
   if ($this->data['network']['network_name']) {
   $data['network_name'] = addslashes($this-
>data['network']['network_name']);
   $data['sub_id'] = addslashes($this->data['network']
['sub_id']);
   $data['active'] = 1;

   //Save form data to Networks database.
   //If we are editing a network, then make sure to save
data to record ID ($nId)
$mySaveId = ($nId)?$nId:0;
   $networkId = $this->Network->_save($mySaveId, $data);



   if ($networkId == $mySaveId) {
   $alert = "Changes to network: ".
$data['network_name']." were saved.";
   } else {
   $alert = "New network: ".$data['network_name']."
was added.". " ".$networkId;
   }
   }
   }

   switch($this->data['window']['flag']){
   case "networks":
   self::redirect("/admin/manage_network");
   break;

   } // switch

   self::set('logo', $this->Session->read('logo'));
   self::set('wbtitle', $this->Session->read('wbtitle'));
   self::set('alert', $alert);
   self::set('networkId', isset($networkId)?$networkId:null);
   }

[/code]

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help with model design

2011-12-19 Thread Geoff Douglas
http://book.cakephp.org/view/1323/Containable#Containing-deeper-associations-1325
 

Have you followed the steps in the above documentation?

In model add the behavior, using the actsAs property.

Then before you do your find, list the Relationships you want to contain...
$this->Event->contain('Comment.User');
$this->Event->find('all');

That's it... easy my friend.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help with model design

2011-12-18 Thread Ersin Demirtas
Thank you very much, I got it!

On Wed, Dec 14, 2011 at 4:45 AM, Andras Kende  wrote:
> Ersin,
>
> You could do 2 queries:
>
> $event = $this->Event->find('first', array('conditions' => array('Event.id'
> => $id)));
>
> $comments = $this->Event->Comment->find('all', array('conditions' =>
> array('Comment.event_id' => $id)));
>
> Also take a look
> : http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html
>
> Andras Kende
> http://www.kende.com
>
>
> On Dec 13, 2011, at 8:26 PM, Ersin Demirtas wrote:
>
> Hi, I am trying to create an events website with cakephp 1.3, I have
> already created event, comment and user model. The users can add
> comments for events and add events.
>
> in my event view page I want to show the event with its comments and
> show who added the event and comments for the event.
>
>
> I have the following models:
>
> class Comment extends AppModel {
> var $name = 'Comment';
> var $displayField = 'id';
> //The Associations below have been created with all possible keys,
> those that are not needed can be removed
>
> var $belongsTo = array(
> 'Event' => array(
> 'className' => 'Event',
> 'foreignKey' => 'event_id'
>
> ),
> 'User' => array(
> 'className' => 'User',
> 'foreignKey' => 'id'
> )
> );
> }
>
>
> -
>
>
> class Event extends AppModel {
> var $name = 'Event';
> var $displayField = 'title';
> //The Associations below have been created with all possible keys,
> those that are not needed can be removed
>
> var $belongsTo = array(
> 'User' => array(
> 'className' => 'User',
> 'foreignKey' => 'user_id',
> 'conditions' => '',
> 'fields'   => array('id', 'username'),
> 'order' => ''
> )
> );
>
> var $hasMany = array(
> 'Comment' => array(
> 'className' => 'Comment',
> 'foreignKey' => 'event_id',
> 'dependent' => false,
> 'conditions' => '',
> 'fields'   => array('user_id', 'comment','created'),
> 'order' => '',
> 'limit' => '',
> 'offset' => '',
> 'exclusive' => '',
> 'finderQuery' => '',
> 'counterQuery' => ''
> )
> );
>
> }
>
>
> ---
>
>
> class User extends AppModel {
> var $name = 'User';
> var $displayField = 'username';
> //The Associations below have been created with all possible keys,
> those that are not needed can be removed
>
> var $hasMany = array(
> 'Comment' => array(
> 'className' => 'Comment',
> 'foreignKey' => 'user_id',
> 'dependent' => false,
> 'conditions' => '',
> 'fields' => '',
> 'order' => '',
> 'limit' => '',
> 'offset' => '',
> 'exclusive' => '',
> 'finderQuery' => '',
> 'counterQuery' => ''
> ),
> 'Event' => array(
> 'className' => 'Event',
> 'foreignKey' => 'user_id',
> 'dependent' => false,
> 'conditions' => '',
> 'fields' => '',
> 'order' => '',
> 'limit' => '',
> 'offset' => '',
> 'exclusive' => '',
> 'finderQuery' => '',
> 'counterQuery' => ''
> )
> );
>
> }
>
>
>
>
>
>
>
>
>
>
>
> with this model I get the following result:
>
>
>
>
>
> Array
> (
>    [Event] => Array
>    (
>    [id] => 1
>    [category_id] => 0
>    [title] => Tinei Mashaya - Zimbabwe Sculpture
>    [body] => Tinei Mashaya is a talented young sculptor from
> Zimbabwe. Using the knowledge and skill of his ancestors, he carves
> vivid and inspired sculptures from the many fine stones found in his
> native country. Tinei's art lingers between sensualism and
> spirituality. Each piece silently speaks of the yearning of the soul
> to break free from the stifling needs of the physical body.
> He says his inspiration comes from his uncontrollable desire to
> solidify ideas and feelings. Tinei owes much of his training an
> encouragement to his brother, Passmore Mashaya, and to Euwitt
> Nyanhongo, who are renowned artists in their own rights. He has had
> his works exhibited in the USA, Austria, Canada, Australia and South
> Africa.
>    [created] => 2011-12-11 23:00:47
>    [modified] => 2011-12-12 01:19:39
>    [user_id] => 1
>    [address] => Riverside Studios
> Riverside Studios Crisp Road Hammersmith London,W6 9RL
>    [tel] => 2032097013
>    [www] => http://www.cakephp.org
>    [startdate] => 2011-07-04
>    [enddate] => 2011-12-30
>    [thumbnail] =>
> http://www.cakephp.org/87dc36fd-6eec-4b33-a314-b97d020c8272.Jpeg
>    [status] => 0
>    )
>
>    [User] => Array
>    (
>    [id] => 1
>    [username] => ersindemirtas
>    )
>
>    [Comment] => Array
>    (
>    [0] => Array
>    (
>    [user_id] => 1
>    [comment] => Test comment
>    [created] => 2011-12-12 22:38:29
>    [event_id] => 1
>    )
>
>    [1] => Array
>    (
>    [user_id] => 1
>    [comment] => I ike this event
>    [created] => 2011-12-13 21:38:00
>    [event_id] => 1
>    )
>
>    [2] => Array
>    (
>    

Re: Need help with model design

2011-12-18 Thread Ersin Demirtas
Thanks guys but i couldn't manage to do can some one give me a hand.




On Wed, Dec 14, 2011 at 7:07 PM, Geoff Douglas  wrote:
> Like Andras said..
>
> Containable is what you need, it is simple and awesome!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help with model design

2011-12-14 Thread Geoff Douglas
Like Andras said..

Containable is what you need, it is simple and awesome! 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help with model design

2011-12-13 Thread Andras Kende
Ersin,

You could do 2 queries:

$event = $this->Event->find('first', array('conditions' => array('Event.id' => 
$id)));

$comments = $this->Event->Comment->find('all', array('conditions' => 
array('Comment.event_id' => $id)));

Also take a look : 
http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html

Andras Kende
http://www.kende.com


On Dec 13, 2011, at 8:26 PM, Ersin Demirtas wrote:

> Hi, I am trying to create an events website with cakephp 1.3, I have
> already created event, comment and user model. The users can add
> comments for events and add events.
> 
> in my event view page I want to show the event with its comments and
> show who added the event and comments for the event.
> 
> 
> I have the following models:
> 
> class Comment extends AppModel {
>   var $name = 'Comment';
>   var $displayField = 'id';
>   //The Associations below have been created with all possible keys,
> those that are not needed can be removed
> 
>   var $belongsTo = array(
>   'Event' => array(
>   'className' => 'Event',
>   'foreignKey' => 'event_id'
> 
>   ),
>   'User' => array(
>   'className' => 'User',
>   'foreignKey' => 'id'
>   )
>   );
> }
> 
> 
> -
> 
> 
> class Event extends AppModel {
>   var $name = 'Event';
>   var $displayField = 'title';
>   //The Associations below have been created with all possible keys,
> those that are not needed can be removed
> 
>   var $belongsTo = array(
>   'User' => array(
>   'className' => 'User',
>   'foreignKey' => 'user_id',
>   'conditions' => '',
>   'fields'   => array('id', 'username'),
>   'order' => ''
>   )
>   );
> 
>   var $hasMany = array(
>   'Comment' => array(
>   'className' => 'Comment',
>   'foreignKey' => 'event_id',
>   'dependent' => false,
>   'conditions' => '',
>   'fields'   => array('user_id', 'comment','created'),
>   'order' => '',
>   'limit' => '',
>   'offset' => '',
>   'exclusive' => '',
>   'finderQuery' => '',
>   'counterQuery' => ''
>   )
>   );
> 
> }
> 
> 
> ---
> 
> 
> class User extends AppModel {
>   var $name = 'User';
>   var $displayField = 'username';
>   //The Associations below have been created with all possible keys,
> those that are not needed can be removed
> 
>   var $hasMany = array(
>   'Comment' => array(
>   'className' => 'Comment',
>   'foreignKey' => 'user_id',
>   'dependent' => false,
>   'conditions' => '',
>   'fields' => '',
>   'order' => '',
>   'limit' => '',
>   'offset' => '',
>   'exclusive' => '',
>   'finderQuery' => '',
>   'counterQuery' => ''
>   ),
>   'Event' => array(
>   'className' => 'Event',
>   'foreignKey' => 'user_id',
>   'dependent' => false,
>   'conditions' => '',
>   'fields' => '',
>   'order' => '',
>   'limit' => '',
>   'offset' => '',
>   'exclusive' => '',
>   'finderQuery' => '',
>   'counterQuery' => ''
>   )
>   );
> 
> }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> with this model I get the following result:
> 
> 
> 
> 
> 
> Array
> (
>[Event] => Array
>(
>[id] => 1
>[category_id] => 0
>[title] => Tinei Mashaya - Zimbabwe Sculpture
>[body] => Tinei Mashaya is a talented young sculptor from
> Zimbabwe. Using the knowledge and skill of his ancestors, he carves
> vivid and inspired sculptures from the many fine stones found in his
> native country. Tinei's art lingers between sensualism and
> spirituality. Each piece silently speaks of the yearning of the soul
> to break free from the stifling needs of the physical body.
> He says his inspiration comes from his uncontrollable desire to
> solidify ideas and feelings. Tinei owes much of his training an
> encouragement to his brother, Passmore Mashaya, and to Euwitt
> Nyanhongo, who are renowned artists in their own rights. He has had
> his works exhibited in the USA, Austria, Canada, Australia and South
> Africa.
>[created] => 2011-12-11 23:00:47
>[modified] => 2011-12-

Need help with model design

2011-12-13 Thread Ersin Demirtas
Hi, I am trying to create an events website with cakephp 1.3, I have
already created event, comment and user model. The users can add
comments for events and add events.

in my event view page I want to show the event with its comments and
show who added the event and comments for the event.


I have the following models:

class Comment extends AppModel {
var $name = 'Comment';
var $displayField = 'id';
//The Associations below have been created with all possible keys,
those that are not needed can be removed

var $belongsTo = array(
'Event' => array(
'className' => 'Event',
'foreignKey' => 'event_id'

),
'User' => array(
'className' => 'User',
'foreignKey' => 'id'
)
);
}


-


class Event extends AppModel {
var $name = 'Event';
var $displayField = 'title';
//The Associations below have been created with all possible keys,
those that are not needed can be removed

var $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields'   => array('id', 'username'),
'order' => ''
)
);

var $hasMany = array(
'Comment' => array(
'className' => 'Comment',
'foreignKey' => 'event_id',
'dependent' => false,
'conditions' => '',
'fields'   => array('user_id', 'comment','created'),
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);

}


---


class User extends AppModel {
var $name = 'User';
var $displayField = 'username';
//The Associations below have been created with all possible keys,
those that are not needed can be removed

var $hasMany = array(
'Comment' => array(
'className' => 'Comment',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Event' => array(
'className' => 'Event',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);

}











with this model I get the following result:





Array
(
[Event] => Array
(
[id] => 1
[category_id] => 0
[title] => Tinei Mashaya - Zimbabwe Sculpture
[body] => Tinei Mashaya is a talented young sculptor from
Zimbabwe. Using the knowledge and skill of his ancestors, he carves
vivid and inspired sculptures from the many fine stones found in his
native country. Tinei's art lingers between sensualism and
spirituality. Each piece silently speaks of the yearning of the soul
to break free from the stifling needs of the physical body.
He says his inspiration comes from his uncontrollable desire to
solidify ideas and feelings. Tinei owes much of his training an
encouragement to his brother, Passmore Mashaya, and to Euwitt
Nyanhongo, who are renowned artists in their own rights. He has had
his works exhibited in the USA, Austria, Canada, Australia and South
Africa.
[created] => 2011-12-11 23:00:47
[modified] => 2011-12-12 01:19:39
[user_id] => 1
[address] => Riverside Studios
Riverside Studios Crisp Road Hammersmith London,W6 9RL
[tel] => 2032097013
[www] => http://www.cakephp.org
[startdate] => 2011-07-04
[enddate] => 2011-12-30
[thumbnail] => 
http://www.cakephp.org/87dc36fd-6eec-4b33-a314-b97d020c8272.Jpeg
[status] => 0
)

[User] => Array
(
[id] => 1
[username] => ersindemirtas
)

[Comment] => Array

Looking for consultant for cake 2.0 (xampp) with solid database design - we need help yesterday!

2011-10-18 Thread MrKrad
1. Be able to transform databases (can provide poor database models
and tons of data) into proper normalized data - accounting knowledge
is crucial - ability to identify commonality of many data tables and
create common models that can be extended (core document)
2. build simple crud to handle documents with basic validation
3. ability to authenticate/session with rest-like (json/xml) and html
4. ability to make simple crud than is dependent on fields (if
fieldA=1,and field B=2, then pulldown is based on those selections) -
ajax is nice but not necessary - simple workflow is a must however.

We can provide large dataset dumps for each document type and
specifications - again we are not looking for blog/cms coders

We use sql server but that should be irrelevant - experience with SSMS/
SSIS a plus - postgres is very similar to sql server.

Must be able to work immediately and produce results quickly.

We can setup a VM to telecommute.

If you can start yesterday for this job - please email me @
hr.mana...@scw.com - we would need some example code (again no blog/
cms junk) or website that proves you understand documents (sales
order, purchase order, invoice) - and you understand database
normalization.

Please do not submit companies or spam me. If are you in the atlanta
metro that would be a super++ leading to fulltime but we are not
seeking permanent - just a consultant.

Submit email with topic CAKEPHP and example website. We are using cake
2.0 since it has the best sql pdo support.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: need help in updateAll

2011-09-08 Thread Elisio Leonardo
You don't need to use updateAll. save will do all the job to create or 
update a record in db.

You also need to put the line:

$this->$table->create(); before save a new record to db

 $this->loadModel($table);
$row =
$this->$table->find('count',array('conditions'=>array('user_id'=>$id)));
if($row == 0){
   $this->$table->create();
   $this->$table->set(array('column' => 1, 'position'
=>1,'user_id'=>$id));
$this->$table->save();
}
   

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


need help in updateAll

2011-09-08 Thread taqman filler
I amake function to update position and column of widget to db
$this->loadModel($table);
$row =
$this->$table->find('count',array('conditions'=>array('user_id'=>$id)));
if($row == 0){
$this->$table->set(array('column' => 1, 'position'
=>1,'user_id'=>$id));
$this->$table->save();
}
$this->$table->updateAll(');

I need help


thank

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: need help with my $hasMany, $belongTo etc

2011-07-07 Thread elogic
I discovered my error here:

NOTE ABOVE:

'conditions' => 'Staff.id = Property.staff_id',
'conditions' => '',

I removed the second conditions and it now works.






On Jul 8, 4:04 pm, elogic  wrote:
> Hi All,
>
> I am having some issues trying to get the data I need in my view
> pages.
>
> My basic structure is as follows (simplified):
>
> ACCOUNTS
> id
> name
> etc
>
> PROPERTIES
> id
> estate_id (This is linked to a record in ACCOUNTS)
> staff_id (This is linked to a record in ACCOUNTS)
> etc
>
> in my property model I have the following which seems close, it will
> call the right estate person but then it tries the staff and I am
> getting many property records coming though and the SQL in the log is
> below (note the issue I think is the (LEFT JOIN `accounts` AS `Staff`
> ON (1 = 1)):
>
> PROPERTY MODEL
> var $belongsTo = array(
>         'Estate' => array(
>                 'className' => 'Account',
>                 'foreignKey' => false,
>                 'conditions' => 'Estate.id = Property.estate_id',
>                 'fields' => '',
>                 'order' => ''
>         ),
>         'Staff' => array(
>                 'className' => 'Account',
>                 'foreignKey' => false,
>                 'conditions' => 'Staff.id = Property.staff_id',
>                 'conditions' => '',
>                 'fields' => '',
>                 'order' => ''
>         )
> );
>
> SQL FOR ABOVE
>         SELECT `Property`.`id`, `Property`.`lease_name`,
> `Property`.`salutation`, `Property`.`mobile`, `Property`.`email`,
> `Property`.`street1`, `Property`.`street2`, `Property`.`suburb`,
> `Property`.`state`, `Property`.`postcode`, `Property`.`owner_name`,
> `Property`.`lease_date`, `Property`.`rent_amount`,
> `Property`.`estate_id`, `Property`.`staff_id`,
> `Property`.`entry_date`, `Property`.`entry_time`,
> `Property`.`timestamp`, `Estate`.`id`, `Estate`.`first_name`,
> `Estate`.`last_name`, `Estate`.`company`, `Estate`.`email`,
> `Estate`.`mobile`, `Estate`.`phone`, `Estate`.`timestamp`,
> `Staff`.`id`, `Staff`.`first_name`, `Staff`.`last_name`,
> `Staff`.`company`, `Staff`.`email`, `Staff`.`mobile`, `Staff`.`phone`,
> `Staff`.`timestamp` FROM `properties` AS `Property` LEFT JOIN
> `accounts` AS `Estate` ON (`Estate`.`id` = `Property`.`estate_id`)
> LEFT JOIN `accounts` AS `Staff` ON (1 = 1) WHERE 1 = 1 LIMIT 20
>
> Can anyone see where I am going wrong? Once I get this going I then
> have a few other issues but this is the main one so I want to focus on
> it.
>
> Thankyou

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


need help with my $hasMany, $belongTo etc

2011-07-07 Thread elogic
Hi All,

I am having some issues trying to get the data I need in my view
pages.

My basic structure is as follows (simplified):


ACCOUNTS
id
name
etc

PROPERTIES
id
estate_id (This is linked to a record in ACCOUNTS)
staff_id (This is linked to a record in ACCOUNTS)
etc


in my property model I have the following which seems close, it will
call the right estate person but then it tries the staff and I am
getting many property records coming though and the SQL in the log is
below (note the issue I think is the (LEFT JOIN `accounts` AS `Staff`
ON (1 = 1)):

PROPERTY MODEL
var $belongsTo = array(
'Estate' => array(
'className' => 'Account',
'foreignKey' => false,
'conditions' => 'Estate.id = Property.estate_id',
'fields' => '',
'order' => ''
),
'Staff' => array(
'className' => 'Account',
'foreignKey' => false,
'conditions' => 'Staff.id = Property.staff_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);

SQL FOR ABOVE
SELECT `Property`.`id`, `Property`.`lease_name`,
`Property`.`salutation`, `Property`.`mobile`, `Property`.`email`,
`Property`.`street1`, `Property`.`street2`, `Property`.`suburb`,
`Property`.`state`, `Property`.`postcode`, `Property`.`owner_name`,
`Property`.`lease_date`, `Property`.`rent_amount`,
`Property`.`estate_id`, `Property`.`staff_id`,
`Property`.`entry_date`, `Property`.`entry_time`,
`Property`.`timestamp`, `Estate`.`id`, `Estate`.`first_name`,
`Estate`.`last_name`, `Estate`.`company`, `Estate`.`email`,
`Estate`.`mobile`, `Estate`.`phone`, `Estate`.`timestamp`,
`Staff`.`id`, `Staff`.`first_name`, `Staff`.`last_name`,
`Staff`.`company`, `Staff`.`email`, `Staff`.`mobile`, `Staff`.`phone`,
`Staff`.`timestamp` FROM `properties` AS `Property` LEFT JOIN
`accounts` AS `Estate` ON (`Estate`.`id` = `Property`.`estate_id`)
LEFT JOIN `accounts` AS `Staff` ON (1 = 1) WHERE 1 = 1 LIMIT 20


Can anyone see where I am going wrong? Once I get this going I then
have a few other issues but this is the main one so I want to focus on
it.

Thankyou

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: I need help to modified code

2011-07-04 Thread Sathia S
On Sat, Jul 2, 2011 at 1:07 AM, taqman filler  wrote:

> I need to send data from ajax to controller
> some body help me to modified code
> this ajax code
> ajax.js
> function loadtooltip(obj, $user_id) {
>  //AJAX
>  var req = Inint_AJAX();
>  req.onreadystatechange = function () {
>   if (req.readyState==4) {
>if (req.status==200) {
> displaytooltip(obj, req.responseText);
>}
>   }
>  };
>  //���ҧ connection
>  req.open("POST", "
> http://127.0.0.1/cakeplate/tooltips/tooltip/$user_id";, true);
>  req.setRequestHeader("Content-Type",
> "application/x-www-form-urlencoded");
>  req.send($user_id); //�觤��
> };
>
>
try $.ajax in jqyery

$.ajax{(
   type: "POST",
 url: 
"http://127.0.0.1/cakeplate/tooltips/tooltip/"+user_id,
// get user_id and pass it here
 success: function(msg){
   $('.class').html(' '+msg);  // this is will get result
 }
});

Link : http://api.jquery.com/jQuery.ajax/


Regards

sathia
http://www.sathia27.wordpress.com

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


I need help to modified code

2011-07-01 Thread taqman filler
I need to send data from ajax to controller
some body help me to modified code
this ajax code
ajax.js
function loadtooltip(obj, $user_id) {
 //AJAX
 var req = Inint_AJAX();
 req.onreadystatechange = function () {
  if (req.readyState==4) {
   if (req.status==200) {
displaytooltip(obj, req.responseText);
   }
  }
 };
 //���ҧ connection
 req.open("POST", "http://127.0.0.1/cakeplate/tooltips/tooltip/$user_id";,
true);
 req.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
 req.send($user_id); //�觤��
};

this controller
Reply->User->findById($user_id);
$this->set('tooltip',$tooltip);
}

}
}
?>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


I need help to use scriptblock

2011-07-01 Thread taqman filler
 Html->scriptStart(array('inline' => false));
$this->Js->get('#a.button');
$this->Js->event('onmouseover','loadtooltip(this,$user_id )');
$this->Html->scriptEnd();
 ?>

I'm doing wrong?
please suggest me

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Need help with routing

2011-06-27 Thread John McLaughlin
Hi - I've taken over a project from another developer and am fairly
new to cake. Hopefully, I'm framing my question and approach in an
appropriate manner.

I have a page that I want to display specific search results and I
wish to name it with a specific URL. This URL returns the correct
results:

http://www.advancelegaljobs.com/jobs/search/radius:Massachusetts-Boston

This is the URL I wish to use:

http://www.advancelegaljobs.com/boston-legal-jobs

I've attempted numerous variations in routes.php, but none seem to
work. For example:

Router::connect('/boston-legal-jobs', array('controller' => 'jobs',
'action' => 'search', 'radius:Massachusetts-Boston'));

or

Router::connect('/boston-legal-jobs', array('controller' => 'jobs',
'action' => 'search'),
array('passedArgs'=>array('radius','Massachusetts-Boston')));

Any help would be appreciated.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


multiple image uploading module using YUI uploader.swf need help

2011-05-23 Thread madusanka hettiarachchi
Guys,

I wanna develop multiple image uploading module for the on going projects,
here i think to use YUI uploader for that.(
http://developer.yahoo.com/yui/yuiloader/). but I couldnt find relevant
uploader.swf download link as this page says. (
http://bakery.cakephp.org/articles/crux/2009/02/15/ability-to-select-and-upload-multiple-files-at-once-under-5-mins)(downloadlink:
http://developer.yahoo.com/yui/examples/uploader/assets/uploader.swf)so I'm
greateful if any body know the link to download this or any better
suggestion! here I used following versions of cakephp and others

cake php 1.3.8
MySQL 5.1.37 (Community Server)
PHP 5.3.0



-- 
Ganganath

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Please. I need help with ACL. I no understand one thing about restriction in ACL. Can somebody help me?

2011-03-22 Thread John Maxim
Then there must be something you were not doing right. Basically,
first, you deny access to all controllers from anybody/any group. Then
usually, you make/give permission to the admin so they have access to
all controllers. It then follows by the other groups which you assign
them permissions.

This is the draft, correct sequence. Did any of the steps above sound
familiar to you, did you follow that part?



On Mar 22, 9:02 pm, mineiro-df  wrote:
> I'm new cake student and i have problem with ACL on this moment.
>
> I managed to make the simple system of limited access of the book of
> the cake put that I realized an interesting thing. The user who has
> less is accessed by me to the system in fact it manages to do
> everything if I to work with the urls. I did all step by step from the
> tutorial and apparently everything works that it ties the moment that
> the most weak user manages to do everything when I call the actions
> through the url. I need that he has access only the actions released
> to him.
>
> Can anybody help me?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Please. I need help with ACL. I no understand one thing about restriction in ACL. Can somebody help me?

2011-03-22 Thread mineiro-df
I'm new cake student and i have problem with ACL on this moment.

I managed to make the simple system of limited access of the book of
the cake put that I realized an interesting thing. The user who has
less is accessed by me to the system in fact it manages to do
everything if I to work with the urls. I did all step by step from the
tutorial and apparently everything works that it ties the moment that
the most weak user manages to do everything when I call the actions
through the url. I need that he has access only the actions released
to him.

Can anybody help me?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help with paginate conditions

2011-03-09 Thread netusco
Hi,

I see something...

I use $this->paginate = $options;

then
this: $options['fields'] = array('Member.id'); looks fine to me
this: $options['or'] = ...  looks out of it's array conditions I would use 
$options['conditions']['or'] = ...
maybe like this the fields would be recognized...
then
$registers = $this->paginate();

you could also use 
$options['contain'] = 
  $option['recursive'] = -1;
  $options['limit'] = 250;
  $options['order'] = 'Register.id DESC';
  $options['group'] = 'Register.id';

good luck!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help with paginate conditions

2011-03-08 Thread Tilen Majerle
$this->paginate['Member']['conditions'], here are conditions list to
search...
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/3/8 heohni 

> Hi,
>
> $options['Member.agent_id'] = $this->Session->read('AgentId');
> $options['or'] = array(
>'mem_nummer LIKE' => '%'.$q.'%',
>'mitg_vorname LIKE' => '%'.$q.'%',
>'mitg_nachname LIKE' => '%'.$q.'%',
>'mitg_strasse LIKE' => '%'.$q.'%',
>'mitg_plz LIKE' => '%'.$q.'%',
>'mitg_ort LIKE' => '%'.$q.'%',
>'mitg_email LIKE' => '%'.$q.'%'
>);
>
> $results = $this->paginate('Member', $options);
>
> How can I add a fields limitation to the options array?
>
> Example:
> $options['fields'] = array('Member.id');
> performs an error: SQL Error: 1054: Unknown column 'fields' in 'where
> clause'
> as it add the fields to the WHERE sections:
> WHERE fields = ('Member.id')
>
> What do I do wrong here?
> Please advice!
>
> Thanks!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Need help with paginate conditions

2011-03-08 Thread heohni
Hi,

$options['Member.agent_id'] = $this->Session->read('AgentId');
$options['or'] = array(
'mem_nummer LIKE' => '%'.$q.'%',
'mitg_vorname LIKE' => '%'.$q.'%',
'mitg_nachname LIKE' => '%'.$q.'%',
'mitg_strasse LIKE' => '%'.$q.'%',
'mitg_plz LIKE' => '%'.$q.'%',
'mitg_ort LIKE' => '%'.$q.'%',
'mitg_email LIKE' => '%'.$q.'%'
);

$results = $this->paginate('Member', $options);

How can I add a fields limitation to the options array?

Example:
$options['fields'] = array('Member.id');
performs an error: SQL Error: 1054: Unknown column 'fields' in 'where
clause'
as it add the fields to the WHERE sections:
WHERE fields = ('Member.id')

What do I do wrong here?
Please advice!

Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Need help with bindModel

2011-03-06 Thread heohni
Hi,

An Agent has many Agentprovisions
A Agentprovision hasOne Payment
A Payment belongsTo a Member

I am now in my Agent Model / Controller.
I would like now to get a results set, where I get
- all Agentprovisions
-- with its Payment
-- its Member

the first 2 I get already with
$this->Agent->Agentprovision->recursive = 1;
$this->Agent->Agentprovision->unBindModel(array('belongsTo' =>
array('Agent')), false); (this is only cosmetic to keep the statement
smaller)
$this->paginate($this->Agent->Agentprovision,
array('Agentprovision.agent_id'=>$id));

This give me that result:
Array
(
[0] => Array
(
[Agentprovision] => Array
(
[id] => 162
[agent_id] => 1
[payment_id] => 1216
)

[Payment] => Array
(
[id] => 1216
[member_id] => 5
)

)

My questions now, how can I bind the Member Model?
I tried
$this->Agent->Agentprovision->Payment->bindModel(array('belongsTo' =>
array('Member' => array('foreignKey' => 'member_id'))), false);
But this is not changing anything.

Any ideas what's wrong?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Need help with find paginate syntax

2011-03-05 Thread jeet bajaj
I think you have to use pagination on Payment model, inside the member
controller

If it is, then i will suggest the following code, if it can help.



class MembersController extends AppController {

var $uses = array('Payment’);



function xyz(){

$this->paginate = array(

 'conditions' => array('Payment.member_id' => $id),

 'order' => array('Payment.created ' => 'ASC'),

 'limit' => 15);

$this->Payment->recursive = 0;

$payments = $this->paginate('Payment');

}

}



Enjoy,
Jitnendra

On Sat, Mar 5, 2011 at 3:32 PM, heohni  wrote:

> Hi,
>
> $payments = $this->Member->Payment->find('all', array(
>'conditions' => array(
>'Payment.member_id' => $id
>),
>'order' =>  array('Payment.created DESC')
>));
>
> I would like to paginate this result, how can I do this?
>
> I find it difficult to find a solution because I query $this->Member-
> >Payment Model?
> Please advise!
>
> Thanks and have all a happy weekend!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Need help with find paginate syntax

2011-03-05 Thread heohni
Hi,

$payments = $this->Member->Payment->find('all', array(
'conditions' => array(
'Payment.member_id' => $id
),
'order' =>  array('Payment.created DESC')
));

I would like to paginate this result, how can I do this?

I find it difficult to find a solution because I query $this->Member-
>Payment Model?
Please advise!

Thanks and have all a happy weekend!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-15 Thread designv...@gmail.com
Its because they dont have more info - it's like a knee jerk reaction,
it doesn't work - ask someone to fix it.

You can see the same questions repeatedly asked on verious sites by
the same person.

My guess is they give up and just hack it together, no interest in
learning, just getting paid.

I genuinely love coding and fixing problems, learning and enjoy the
challenge, but maybe I'm just wierd... ;)



On Feb 14, 10:57 pm, Meroe Meroe  wrote:
> Well phpnut did say they will have brain powered code generation in the next
> version so perhaps people are hoping to get in now? :)
>
> In all seriousness, I understand it is hard sometimes to want to help folks
> that fit the above list.  I typically ask for more input and 9 times out of
> 10 you never hear from them again.
>
> On Mon, Feb 14, 2011 at 9:51 AM, designv...@gmail.com
> wrote:
>
> > Damn well said.
>
> > I find myself checking this place less and less because of all the
> > posts matching that list.
>
> > It drives me nuts seeing so called programmers asking for people to
> > basically do their work for them or asking questions that prove they
> > havent bothered to read the book at all...
>
> > It's like cake has been adopted by a horde of lazy half assed coders
> > that think its a silver bullet for making applications quickly and
> > cheaply but they haven't bothered to actually learn it properly so
> > they just jump on here and ask trivial questions hoping someone will
> > do the work for them...
>
> > AARRGGHH.
>
> > 
>
> > On Feb 12, 5:08 am, Jeremy Burns | Class Outfit
> >  wrote:
> > > A couple of things get to me:
> > > - Really really long posts - get to the frikking point
> > > - Swathes of badly formatted code that no one is going to read
> > > - Constantly being 'new'
> > > - Asking for massive amounts of help before doing any research at all
> > > - Asking if something will work before even trying it - if you tried it
> > you'd know
> > > - Asking for a complete off the shelf solution to a problem ("build me an
> > app, please")
> > > - Multiple posts from the same person on the same subject
> > > - "Cake (or PHP) has a bug because my code doesn't work"
> > > - Not trying (or following correctly) a suggested solution
> > > - "No worries - I fixed it" without explaining how or why
>
> > > Delete. Or stroppy reply.
>
> > > Jeremy Burns
> > > Class Outfit
>
> > > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> > > On 12 Feb 2011, at 01:53, Ryan Snowden wrote:
>
> > > > Or Noobhag
>
> > > > Neat
>
> > > > On 12 February 2011 09:04, Larry E. Masters  wrote:
> > > >> Old hag might get some of us old timers attention.
> > > >> --
> > > >> Larry E. Masters
>
> > > >> On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters <
> > naked.cake.ba...@gmail.com>
> > > >> wrote:
>
> > > >>> I do not think it matters if your new and need help or old cakepro
> > and
> > > >>> need
> > > >>> help. Why the need to emphasize?
>
> > > >>> New you say! Are you? Well then let me just drop everything, BREAKING
> > > >>> NEWS!
> > > >>> A NEW USER TO CAKE! Holy shit say it's not so!
>
> > > >>> People on the board for more than a month can tell by the name
> > basically
> > > >>> if
> > > >>> your new or not and the depth of the question gives it away too in
> > most
> > > >>> cases.
>
> > > >>> I maybe I should put Girl Needs Help, maybe damsel in distress will
> > get
> > > >>> more
> > > >>> replies?
>
> > > >>> People will help, you so saying your new over and over is just
> > irritating.
> > > >>> Once these NEW people are on the board a while they too will see just
> > how
> > > >>> dumb it is to see post after post saying just how new people are.
>
> > > >>> Krissy => 4 months, 3 days using cake so do I still qualify as new or
> > do I
> > > >>> have to phrase my questions with old hag needs help :P
>
> > > >>> --
> > > >>> Our newest site for the community: CakePHP Video Tutorials
> > > >>>http://tv.cakephp.org
> > > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.org

Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-14 Thread Meroe Meroe
Well phpnut did say they will have brain powered code generation in the next
version so perhaps people are hoping to get in now? :)

In all seriousness, I understand it is hard sometimes to want to help folks
that fit the above list.  I typically ask for more input and 9 times out of
10 you never hear from them again.

On Mon, Feb 14, 2011 at 9:51 AM, designv...@gmail.com
wrote:

> Damn well said.
>
> I find myself checking this place less and less because of all the
> posts matching that list.
>
> It drives me nuts seeing so called programmers asking for people to
> basically do their work for them or asking questions that prove they
> havent bothered to read the book at all...
>
> It's like cake has been adopted by a horde of lazy half assed coders
> that think its a silver bullet for making applications quickly and
> cheaply but they haven't bothered to actually learn it properly so
> they just jump on here and ask trivial questions hoping someone will
> do the work for them...
>
> AARRGGHH.
>
> 
>
> On Feb 12, 5:08 am, Jeremy Burns | Class Outfit
>  wrote:
> > A couple of things get to me:
> > - Really really long posts - get to the frikking point
> > - Swathes of badly formatted code that no one is going to read
> > - Constantly being 'new'
> > - Asking for massive amounts of help before doing any research at all
> > - Asking if something will work before even trying it - if you tried it
> you'd know
> > - Asking for a complete off the shelf solution to a problem ("build me an
> app, please")
> > - Multiple posts from the same person on the same subject
> > - "Cake (or PHP) has a bug because my code doesn't work"
> > - Not trying (or following correctly) a suggested solution
> > - "No worries - I fixed it" without explaining how or why
> >
> > Delete. Or stroppy reply.
> >
> > Jeremy Burns
> > Class Outfit
> >
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
> >
> > On 12 Feb 2011, at 01:53, Ryan Snowden wrote:
> >
> > > Or Noobhag
> >
> > > Neat
> >
> > > On 12 February 2011 09:04, Larry E. Masters  wrote:
> > >> Old hag might get some of us old timers attention.
> > >> --
> > >> Larry E. Masters
> >
> > >> On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters <
> naked.cake.ba...@gmail.com>
> > >> wrote:
> >
> > >>> I do not think it matters if your new and need help or old cakepro
> and
> > >>> need
> > >>> help. Why the need to emphasize?
> >
> > >>> New you say! Are you? Well then let me just drop everything, BREAKING
> > >>> NEWS!
> > >>> A NEW USER TO CAKE! Holy shit say it's not so!
> >
> > >>> People on the board for more than a month can tell by the name
> basically
> > >>> if
> > >>> your new or not and the depth of the question gives it away too in
> most
> > >>> cases.
> >
> > >>> I maybe I should put Girl Needs Help, maybe damsel in distress will
> get
> > >>> more
> > >>> replies?
> >
> > >>> People will help, you so saying your new over and over is just
> irritating.
> > >>> Once these NEW people are on the board a while they too will see just
> how
> > >>> dumb it is to see post after post saying just how new people are.
> >
> > >>> Krissy => 4 months, 3 days using cake so do I still qualify as new or
> do I
> > >>> have to phrase my questions with old hag needs help :P
> >
> > >>> --
> > >>> Our newest site for the community: CakePHP Video Tutorials
> > >>>http://tv.cakephp.org
> > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd
> help
> > >>> others with their CakePHP related questions.
> >
> > >>> 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
> >
> > >> --
> > >> Our newest site for the community: CakePHP Video Tutorials
> > >>http://tv.cakephp.org
> > >> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > >> others with their CakePHP related questions.
> >
> > >> To unsubscribe from this group, send email to
> > >> cake-php+unsubscr...@googlegroups.com For more options, visit thi

Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-14 Thread designv...@gmail.com
Damn well said.

I find myself checking this place less and less because of all the
posts matching that list.

It drives me nuts seeing so called programmers asking for people to
basically do their work for them or asking questions that prove they
havent bothered to read the book at all...

It's like cake has been adopted by a horde of lazy half assed coders
that think its a silver bullet for making applications quickly and
cheaply but they haven't bothered to actually learn it properly so
they just jump on here and ask trivial questions hoping someone will
do the work for them...

AARRGGHH.



On Feb 12, 5:08 am, Jeremy Burns | Class Outfit
 wrote:
> A couple of things get to me:
> - Really really long posts - get to the frikking point
> - Swathes of badly formatted code that no one is going to read
> - Constantly being 'new'
> - Asking for massive amounts of help before doing any research at all
> - Asking if something will work before even trying it - if you tried it you'd 
> know
> - Asking for a complete off the shelf solution to a problem ("build me an 
> app, please")
> - Multiple posts from the same person on the same subject
> - "Cake (or PHP) has a bug because my code doesn't work"
> - Not trying (or following correctly) a suggested solution
> - "No worries - I fixed it" without explaining how or why
>
> Delete. Or stroppy reply.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 12 Feb 2011, at 01:53, Ryan Snowden wrote:
>
> > Or Noobhag
>
> > Neat
>
> > On 12 February 2011 09:04, Larry E. Masters  wrote:
> >> Old hag might get some of us old timers attention.
> >> --
> >> Larry E. Masters
>
> >> On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters 
> >> 
> >> wrote:
>
> >>> I do not think it matters if your new and need help or old cakepro and
> >>> need
> >>> help. Why the need to emphasize?
>
> >>> New you say! Are you? Well then let me just drop everything, BREAKING
> >>> NEWS!
> >>> A NEW USER TO CAKE! Holy shit say it's not so!
>
> >>> People on the board for more than a month can tell by the name basically
> >>> if
> >>> your new or not and the depth of the question gives it away too in most
> >>> cases.
>
> >>> I maybe I should put Girl Needs Help, maybe damsel in distress will get
> >>> more
> >>> replies?
>
> >>> People will help, you so saying your new over and over is just irritating.
> >>> Once these NEW people are on the board a while they too will see just how
> >>> dumb it is to see post after post saying just how new people are.
>
> >>> Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
> >>> have to phrase my questions with old hag needs help :P
>
> >>> --
> >>> Our newest site for the community: CakePHP Video Tutorials
> >>>http://tv.cakephp.org
> >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> >>> others with their CakePHP related questions.
>
> >>> 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
>
> >> --
> >> Our newest site for the community: CakePHP Video Tutorials
> >>http://tv.cakephp.org
> >> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> >> others with their CakePHP related questions.
>
> >> 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
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-12 Thread Jeremy Burns | Class Outfit
I guess it all depends if you want an answer or not.

Sent from my iPhone

On 13 Feb 2011, at 05:54, ibejohn818  wrote:

> I say just ask your questions.
> 
> There are three possible events that can occur.
> 
> 1) Somebody attempts to answer
> 2) Nobody attempts to answer
> 3) Somebody unloads a holier-than-thou rant that you are not following
> the 10 commandments of the internet set in place when Al Gore parted
> the seas and invented the Dubya-Dubya-Dubya
> 
> 
> Good luck
> 
> On Feb 11, 4:52 pm, "Krissy Masters" 
> wrote:
>> I do not think it matters if your new and need help or old cakepro and need
>> help. Why the need to emphasize?
>> 
>> New you say! Are you? Well then let me just drop everything, BREAKING NEWS!
>> A NEW USER TO CAKE! Holy shit say it's not so!
>> 
>> People on the board for more than a month can tell by the name basically if
>> your new or not and the depth of the question gives it away too in most
>> cases.
>> 
>> I maybe I should put Girl Needs Help, maybe damsel in distress will get more
>> replies?
>> 
>> People will help, you so saying your new over and over is just irritating.
>> Once these NEW people are on the board a while they too will see just how
>> dumb it is to see post after post saying just how new people are.
>> 
>> Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
>> have to phrase my questions with old hag needs help :P
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-12 Thread ibejohn818
I say just ask your questions.

There are three possible events that can occur.

1) Somebody attempts to answer
2) Nobody attempts to answer
3) Somebody unloads a holier-than-thou rant that you are not following
the 10 commandments of the internet set in place when Al Gore parted
the seas and invented the Dubya-Dubya-Dubya


Good luck

On Feb 11, 4:52 pm, "Krissy Masters" 
wrote:
> I do not think it matters if your new and need help or old cakepro and need
> help. Why the need to emphasize?
>
> New you say! Are you? Well then let me just drop everything, BREAKING NEWS!
> A NEW USER TO CAKE! Holy shit say it's not so!
>
> People on the board for more than a month can tell by the name basically if
> your new or not and the depth of the question gives it away too in most
> cases.
>
> I maybe I should put Girl Needs Help, maybe damsel in distress will get more
> replies?
>
> People will help, you so saying your new over and over is just irritating.
> Once these NEW people are on the board a while they too will see just how
> dumb it is to see post after post saying just how new people are.
>
> Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
> have to phrase my questions with old hag needs help :P

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-12 Thread websurfshop
It's an insecurity complex for freshman programmers.  Kind of like
going out on our first date and realizing your out with a mature naked
cake baker.  It's enough to make anyone stutter and repeat
themselves . ;-/


> People will help, you so saying your new over and over is just irritating.
> Once these NEW people are on the board a while they too will see just how
> dumb it is to see post after post saying just how new people are.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Jeremy Burns | Class Outfit
A couple of things get to me:
- Really really long posts - get to the frikking point
- Swathes of badly formatted code that no one is going to read
- Constantly being 'new'
- Asking for massive amounts of help before doing any research at all
- Asking if something will work before even trying it - if you tried it you'd 
know
- Asking for a complete off the shelf solution to a problem ("build me an app, 
please")
- Multiple posts from the same person on the same subject
- "Cake (or PHP) has a bug because my code doesn't work"
- Not trying (or following correctly) a suggested solution
- "No worries - I fixed it" without explaining how or why

Delete. Or stroppy reply.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 12 Feb 2011, at 01:53, Ryan Snowden wrote:

> Or Noobhag
> 
> Neat
> 
> On 12 February 2011 09:04, Larry E. Masters  wrote:
>> Old hag might get some of us old timers attention.
>> --
>> Larry E. Masters
>> 
>> On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters 
>> wrote:
>>> 
>>> I do not think it matters if your new and need help or old cakepro and
>>> need
>>> help. Why the need to emphasize?
>>> 
>>> New you say! Are you? Well then let me just drop everything, BREAKING
>>> NEWS!
>>> A NEW USER TO CAKE! Holy shit say it's not so!
>>> 
>>> People on the board for more than a month can tell by the name basically
>>> if
>>> your new or not and the depth of the question gives it away too in most
>>> cases.
>>> 
>>> I maybe I should put Girl Needs Help, maybe damsel in distress will get
>>> more
>>> replies?
>>> 
>>> People will help, you so saying your new over and over is just irritating.
>>> Once these NEW people are on the board a while they too will see just how
>>> dumb it is to see post after post saying just how new people are.
>>> 
>>> Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
>>> have to phrase my questions with old hag needs help :P
>>> 
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>> 
>>> 
>>> 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
>> 
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>> 
>> 
>> 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
>> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Ryan Snowden
Or Noobhag

Neat

On 12 February 2011 09:04, Larry E. Masters  wrote:
> Old hag might get some of us old timers attention.
> --
> Larry E. Masters
>
> On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters 
> wrote:
>>
>> I do not think it matters if your new and need help or old cakepro and
>> need
>> help. Why the need to emphasize?
>>
>> New you say! Are you? Well then let me just drop everything, BREAKING
>> NEWS!
>> A NEW USER TO CAKE! Holy shit say it's not so!
>>
>> People on the board for more than a month can tell by the name basically
>> if
>> your new or not and the depth of the question gives it away too in most
>> cases.
>>
>> I maybe I should put Girl Needs Help, maybe damsel in distress will get
>> more
>> replies?
>>
>> People will help, you so saying your new over and over is just irritating.
>> Once these NEW people are on the board a while they too will see just how
>> dumb it is to see post after post saying just how new people are.
>>
>> Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
>> have to phrase my questions with old hag needs help :P
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> 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
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread thatsgreat2345
I think the ability to say whether you're new/old doesn't depend on
how long you've been using cake but you knowledge of the ins and outs
of cake and how it all works.

On Feb 11, 4:52 pm, "Krissy Masters" 
wrote:
> I do not think it matters if your new and need help or old cakepro and need
> help. Why the need to emphasize?
>
> New you say! Are you? Well then let me just drop everything, BREAKING NEWS!
> A NEW USER TO CAKE! Holy shit say it's not so!
>
> People on the board for more than a month can tell by the name basically if
> your new or not and the depth of the question gives it away too in most
> cases.
>
> I maybe I should put Girl Needs Help, maybe damsel in distress will get more
> replies?
>
> People will help, you so saying your new over and over is just irritating.
> Once these NEW people are on the board a while they too will see just how
> dumb it is to see post after post saying just how new people are.
>
> Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
> have to phrase my questions with old hag needs help :P

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Larry E. Masters
Old hag might get some of us old timers attention.

-- 
Larry E. Masters


On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters
wrote:

> I do not think it matters if your new and need help or old cakepro and need
> help. Why the need to emphasize?
>
> New you say! Are you? Well then let me just drop everything, BREAKING NEWS!
> A NEW USER TO CAKE! Holy shit say it's not so!
>
> People on the board for more than a month can tell by the name basically if
> your new or not and the depth of the question gives it away too in most
> cases.
>
> I maybe I should put Girl Needs Help, maybe damsel in distress will get
> more
> replies?
>
> People will help, you so saying your new over and over is just irritating.
> Once these NEW people are on the board a while they too will see just how
> dumb it is to see post after post saying just how new people are.
>
> Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
> have to phrase my questions with old hag needs help :P
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Krissy Masters
I do not think it matters if your new and need help or old cakepro and need
help. Why the need to emphasize?

New you say! Are you? Well then let me just drop everything, BREAKING NEWS!
A NEW USER TO CAKE! Holy shit say it's not so!

People on the board for more than a month can tell by the name basically if
your new or not and the depth of the question gives it away too in most
cases.

I maybe I should put Girl Needs Help, maybe damsel in distress will get more
replies? 

People will help, you so saying your new over and over is just irritating. 
Once these NEW people are on the board a while they too will see just how
dumb it is to see post after post saying just how new people are.

Krissy => 4 months, 3 days using cake so do I still qualify as new or do I
have to phrase my questions with old hag needs help :P

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: need help

2011-01-31 Thread cricket
On Mon, Jan 31, 2011 at 7:37 AM, Amit Badkas  wrote:
> Hi,
> By setting 'empty' to false won't display the empty option but you need to
> set an extra option having label as 'select state', right? For this, set
> 'empty' => 'select state' instead of false in the 4th argument of select().

Speaking of confusing documentation! Yeah, I got sidetracked somewhere
and gave the wrong advice. Sorry, andy!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: need help

2011-01-31 Thread Amit Badkas
Hi,

By setting 'empty' to false won't display the empty option but you need to
set an extra option having label as 'select state', right? For this, set
'empty' => 'select state' instead of false in the 4th argument of select().

Hope that helps.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Mon, Jan 31, 2011 at 10:06 AM, andy_the ultimate baker <
anandghaywankar...@gmail.com> wrote:

> thanks
>
> On Jan 29, 7:54 pm, cricket  wrote:
> > On Sat, Jan 29, 2011 at 3:45 AM, andy_the ultimate baker
> >
> >
> >
> >  wrote:
> > > hi, bakers
> > > i m working on one drop down list, i m getting all the values but the
> > > first option is coming blank. i want set this as "select state" with
> > > some value, like we used to in core php.
> > >  my view code is as fallows
> >
> > > > >echo $form-
> >
> >>select('state_code',array($newStates),null,array('id'=>'select_states'),false);
> > >?> > > //  echo $form-
> > >>select('id',array(),null,array('id'=>'select_cities'),false);
> >
> > >?>
> > >
> > >
> > > 
> >
> > > with this code when i see source view i get first option blank like
> > > bellow
> >
> > > option value="">
> >
> > > Libya (general)
> > > Baladiyat al `Aziziyah > > option>
> > > Baladiyat al Jufrah
> > >  can any one suggest me, how to make first option as "select
> > > something" in cake
> >
> > The API documentation is still VERY confusing on this. The answer is
> > to include 'empty' => false in the array that is the 4th param.
> >
> > echo select('name', $options, null, array('id'=>'select_states',
> > 'empty' => false));
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: need help

2011-01-30 Thread andy_the ultimate baker
thanks

On Jan 29, 7:54 pm, cricket  wrote:
> On Sat, Jan 29, 2011 at 3:45 AM, andy_the ultimate baker
>
>
>
>  wrote:
> > hi, bakers
> > i m working on one drop down list, i m getting all the values but the
> > first option is coming blank. i want set this as "select state" with
> > some value, like we used to in core php.
> >  my view code is as fallows
>
> >         >                echo $form-
> >>select('state_code',array($newStates),null,array('id'=>'select_states'),false);
> >                ?> > //              echo $form-
> >>select('id',array(),null,array('id'=>'select_cities'),false);
>
> >        ?>
> >        
> >        
> > 
>
> > with this code when i see source view i get first option blank like
> > bellow
>
> > option value="">
>
> > Libya (general)
> > Baladiyat al `Aziziyah > option>
> > Baladiyat al Jufrah
> >  can any one suggest me, how to make first option as "select
> > something" in cake
>
> The API documentation is still VERY confusing on this. The answer is
> to include 'empty' => false in the array that is the 4th param.
>
> echo select('name', $options, null, array('id'=>'select_states',
> 'empty' => false));

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: need help

2011-01-29 Thread cricket
On Sat, Jan 29, 2011 at 3:45 AM, andy_the ultimate baker
 wrote:
> hi, bakers
> i m working on one drop down list, i m getting all the values but the
> first option is coming blank. i want set this as "select state" with
> some value, like we used to in core php.
>  my view code is as fallows
>
>                        echo $form-
>>select('state_code',array($newStates),null,array('id'=>'select_states'),false);
>                ?> //              echo $form-
>>select('id',array(),null,array('id'=>'select_cities'),false);
>
>        ?>
>        
>        
> 
>
> with this code when i see source view i get first option blank like
> bellow
>
> option value="">
>
> Libya (general)
> Baladiyat al `Aziziyah option>
> Baladiyat al Jufrah
>  can any one suggest me, how to make first option as "select
> something" in cake

The API documentation is still VERY confusing on this. The answer is
to include 'empty' => false in the array that is the 4th param.

echo select('name', $options, null, array('id'=>'select_states',
'empty' => false));

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


need help

2011-01-29 Thread andy_the ultimate baker
hi, bakers
i m working on one drop down list, i m getting all the values but the
first option is coming blank. i want set this as "select state" with
some value, like we used to in core php.
 my view code is as fallows

select('state_code',array($newStates),null,array('id'=>'select_states'),false);
?>select('id',array(),null,array('id'=>'select_cities'),false);

?>




with this code when i see source view i get first option blank like
bellow

option value="">

Libya (general)
Baladiyat al `Aziziyah
Baladiyat al Jufrah
  can any one suggest me, how to make first option as "select
something" in cake

please

best regards

andy

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: need help in javascript dropdown,

2011-01-27 Thread sanjib dhar
use $this->Form->input('citilist',array('options'=>$state_code_list)); in
cakephp.Save all cities in database and set variale
as 
state_code_list=$this->Cities->find('list',array('fields'=>array('Cities.cityID','Cities.city')));

On Thu, Jan 27, 2011 at 11:23 AM, andy_the ultimate baker <
anandghaywankar...@gmail.com> wrote:

> hi, good morning,
> i m working on project where i want create two drop down,
> in first i will choose "state" so that the next drop down should how
> the cities with respect to the state selected in first. all that i
> want to create in javascript,
>
> for that i have collected all state_code and its cities in variable.
> the variable name is given in following way
>
> var (state_code)_list = (citilist)
>
> i ave collected the sate and cities in one variable,
>
> please some suggest me the steps to be fallowed so that i can work on
> it.
>
> i m fresher in javascript.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


need help in javascript dropdown,

2011-01-26 Thread andy_the ultimate baker
hi, good morning,
i m working on project where i want create two drop down,
in first i will choose "state" so that the next drop down should how
the cities with respect to the state selected in first. all that i
want to create in javascript,

for that i have collected all state_code and its cities in variable.
the variable name is given in following way

var (state_code)_list = (citilist)

i ave collected the sate and cities in one variable,

please some suggest me the steps to be fallowed so that i can work on
it.

i m fresher in javascript.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Hi need Help: How to log-out from Acl ?

2011-01-01 Thread John Maxim
I think I found a solution:

$this->Auth->allow('logout');

Is there a better way to logout other than allowing this in users
controller?

Regards,
Maxim

On Jan 1, 10:21 pm, John Maxim  wrote:
> Hi Thanks Jeremy,
>
> but let's say we deny group manager and user to have access to users
> model, and the logout function is located in users controller; would
> it be a good suggestion to place the logout function in posts
> controller instead because it is a public page (controller)..
>
> Is it less secure?
>
> I couldn't find a way to access users controller since it denies group
> manager and user, and therefore can't call the logout function in
> there..
>
> Regards,
> Maxim
>
> On Jan 1, 2:20 pm, Jeremy Burns | Class Outfit
>
>  wrote:
> > Here's some sample code that you can place in an element and drop it in to 
> > views as and when needed:
>
> >  >         if ($this->Session->check('Auth.User')):
> >                 echo $this->Html->link(
> >                         'Log Out',
> >                         array(
> >                                 'controller' => 'users',
> >                                 'action' => 'logout'
> >                         )
> >                 );
> >         else:
> >                 echo $this->Html->link(
> >                         'Log In',
> >                         array(
> >                                 'controller' => 'users',
> >                                 'action' => 'login'
> >                         )
> >                 );
> >         endif;
> > ?>
>
> > I usually include this as part of my site navigation so that it is always 
> > available. You can also add links such as 'Your Details' to the logged in 
> > piece, and 'Register' to the logged out piece.
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> > On 1 Jan 2011, at 03:17, John Maxim wrote:
>
> > > Hi, thanks for the reply..
>
> > > function logout() {
> > >            $this->Session->setFlash('Good-Bye');
> > >            $this->redirect($this->Auth->logout());
> > >    }
>
> > > I created it in usersController alright. I access it by creating a
> > > link to it am I correct?
>
> > > I'm looking for a uniform way to put it in one single place so it can
> > > be viewed 'only' after logging into users, groups, posts, and
> > > widgets.
>
> > > Can it be accomplished?
>
> > > (1)
> > > I could do this:
>
> > > link('logout', array('action' => 'logout')); ?>
>
> > > and place it on the indexes of groups, users, posts, widgets.. But I
> > > would need to create addition of 3 more function logout() for each of
> > > the 3 controllers.
>
> > > (2)
> > > But the link logout is displayed even we're not logged in. Is it we
> > > need to use Access method from the views? as attempted but failed in
> > > this post:
> > >http://groups.google.com/group/cake-php/browse_thread/thread/478daa30...
> > > I posted a solution but the Access for some reason wasn't called and
> > > the links for edit and delete were never displayed regardless of
> > > loggin status.
> > >http://groups.google.com/group/cake-php/browse_thread/thread/8a4aa816...
>
> > > Furthermore, the tutorial says it was like a 'hack' to get access
> > > component working in views I wonder if there's a proper way to do this
> > > without breaking MVC Cake convention.
> > > The tutorial for Access to work in Views:
> > >http://net.tutsplus.com/tutorials/php/how-to-use-cakephps-access-cont...
>
> > > Regards,
> > > Maxim
>
> > > On Jan 1, 3:18 am, AD7six  wrote:
> > >> On Dec 31, 3:01 pm, John Maxim  wrote:
>
> > >>> Hi,
>
> > >>> I'm right here:http://book.cakephp.org/view/1552/Logout
>
> > >>> May I ask if anyone could help to point out how exactly am I to log-
> > >>> out now ??
>
> > >> You access the function logout which after following the tutorial you
> > >> will have created in your users controller.
>
> > >>> I went through some comments on that page suggested to
>
> > >>> $this->Auth->allowedActions = array('logout');
>
> > >> for what reason?
>
> > >>> What's your suggestion?
>
> > >> You could start with explaining in what way the tutorial you're
> > >> following isn't working with exactly what you're doing and what you're
> > >> expecting to happen
>
> > >> AD
>
> > > 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 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-

Re: Hi need Help: How to log-out from Acl ?

2011-01-01 Thread John Maxim
Hi Thanks Jeremy,

but let's say we deny group manager and user to have access to users
model, and the logout function is located in users controller; would
it be a good suggestion to place the logout function in posts
controller instead because it is a public page (controller)..

Is it less secure?

I couldn't find a way to access users controller since it denies group
manager and user, and therefore can't call the logout function in
there..

Regards,
Maxim

On Jan 1, 2:20 pm, Jeremy Burns | Class Outfit
 wrote:
> Here's some sample code that you can place in an element and drop it in to 
> views as and when needed:
>
>          if ($this->Session->check('Auth.User')):
>                 echo $this->Html->link(
>                         'Log Out',
>                         array(
>                                 'controller' => 'users',
>                                 'action' => 'logout'
>                         )
>                 );
>         else:
>                 echo $this->Html->link(
>                         'Log In',
>                         array(
>                                 'controller' => 'users',
>                                 'action' => 'login'
>                         )
>                 );
>         endif;
> ?>
>
> I usually include this as part of my site navigation so that it is always 
> available. You can also add links such as 'Your Details' to the logged in 
> piece, and 'Register' to the logged out piece.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 1 Jan 2011, at 03:17, John Maxim wrote:
>
> > Hi, thanks for the reply..
>
> > function logout() {
> >            $this->Session->setFlash('Good-Bye');
> >            $this->redirect($this->Auth->logout());
> >    }
>
> > I created it in usersController alright. I access it by creating a
> > link to it am I correct?
>
> > I'm looking for a uniform way to put it in one single place so it can
> > be viewed 'only' after logging into users, groups, posts, and
> > widgets.
>
> > Can it be accomplished?
>
> > (1)
> > I could do this:
>
> > link('logout', array('action' => 'logout')); ?>
>
> > and place it on the indexes of groups, users, posts, widgets.. But I
> > would need to create addition of 3 more function logout() for each of
> > the 3 controllers.
>
> > (2)
> > But the link logout is displayed even we're not logged in. Is it we
> > need to use Access method from the views? as attempted but failed in
> > this post:
> >http://groups.google.com/group/cake-php/browse_thread/thread/478daa30...
> > I posted a solution but the Access for some reason wasn't called and
> > the links for edit and delete were never displayed regardless of
> > loggin status.
> >http://groups.google.com/group/cake-php/browse_thread/thread/8a4aa816...
>
> > Furthermore, the tutorial says it was like a 'hack' to get access
> > component working in views I wonder if there's a proper way to do this
> > without breaking MVC Cake convention.
> > The tutorial for Access to work in Views:
> >http://net.tutsplus.com/tutorials/php/how-to-use-cakephps-access-cont...
>
> > Regards,
> > Maxim
>
> > On Jan 1, 3:18 am, AD7six  wrote:
> >> On Dec 31, 3:01 pm, John Maxim  wrote:
>
> >>> Hi,
>
> >>> I'm right here:http://book.cakephp.org/view/1552/Logout
>
> >>> May I ask if anyone could help to point out how exactly am I to log-
> >>> out now ??
>
> >> You access the function logout which after following the tutorial you
> >> will have created in your users controller.
>
> >>> I went through some comments on that page suggested to
>
> >>> $this->Auth->allowedActions = array('logout');
>
> >> for what reason?
>
> >>> What's your suggestion?
>
> >> You could start with explaining in what way the tutorial you're
> >> following isn't working with exactly what you're doing and what you're
> >> expecting to happen
>
> >> AD
>
> > 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: Hi need Help: How to log-out from Acl ?

2010-12-31 Thread Jeremy Burns | Class Outfit
Here's some sample code that you can place in an element and drop it in to 
views as and when needed:

Session->check('Auth.User')):
echo $this->Html->link(
'Log Out',
array(
'controller' => 'users',
'action' => 'logout'
)
);
else:
echo $this->Html->link(
'Log In',
array(
'controller' => 'users',
'action' => 'login'
)
);
endif;
?>

I usually include this as part of my site navigation so that it is always 
available. You can also add links such as 'Your Details' to the logged in 
piece, and 'Register' to the logged out piece.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 1 Jan 2011, at 03:17, John Maxim wrote:

> Hi, thanks for the reply..
> 
> function logout() {
>   $this->Session->setFlash('Good-Bye');
>   $this->redirect($this->Auth->logout());
>   }
> 
> I created it in usersController alright. I access it by creating a
> link to it am I correct?
> 
> I'm looking for a uniform way to put it in one single place so it can
> be viewed 'only' after logging into users, groups, posts, and
> widgets.
> 
> Can it be accomplished?
> 
> (1)
> I could do this:
> 
> link('logout', array('action' => 'logout')); ?>
> 
> and place it on the indexes of groups, users, posts, widgets.. But I
> would need to create addition of 3 more function logout() for each of
> the 3 controllers.
> 
> (2)
> But the link logout is displayed even we're not logged in. Is it we
> need to use Access method from the views? as attempted but failed in
> this post:
> http://groups.google.com/group/cake-php/browse_thread/thread/478daa30a5c26e18
> I posted a solution but the Access for some reason wasn't called and
> the links for edit and delete were never displayed regardless of
> loggin status.
> http://groups.google.com/group/cake-php/browse_thread/thread/8a4aa81664b5a96d
> 
> Furthermore, the tutorial says it was like a 'hack' to get access
> component working in views I wonder if there's a proper way to do this
> without breaking MVC Cake convention.
> The tutorial for Access to work in Views:
> http://net.tutsplus.com/tutorials/php/how-to-use-cakephps-access-control-lists/
> 
> 
> 
> Regards,
> Maxim
> 
> 
> On Jan 1, 3:18 am, AD7six  wrote:
>> On Dec 31, 3:01 pm, John Maxim  wrote:
>> 
>>> Hi,
>> 
>>> I'm right here:http://book.cakephp.org/view/1552/Logout
>> 
>>> May I ask if anyone could help to point out how exactly am I to log-
>>> out now ??
>> 
>> You access the function logout which after following the tutorial you
>> will have created in your users controller.
>> 
>> 
>> 
>>> I went through some comments on that page suggested to
>> 
>>> $this->Auth->allowedActions = array('logout');
>> 
>> for what reason?
>> 
>> 
>> 
>>> What's your suggestion?
>> 
>> You could start with explaining in what way the tutorial you're
>> following isn't working with exactly what you're doing and what you're
>> expecting to happen
>> 
>> 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

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


  1   2   3   4   5   >