Use CakeResponse in Helper.

2014-06-10 Thread gloop
Hello i try to write an helper to create and download a CSV. Now i have the problem to set the type in the helper. I try: function renderHeaders() { $response = new CakeResponse(array( 'type' => 'csv' )); $response->download($this->filename); $response->send(); } Now i ca

Re: udpate data

2013-07-28 Thread gloop
Hello, Model::query() is used correctly and should work correctly. But use http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-updateall-array-fields-array-conditions instead of query(). Or you use save() and use the id field to update the entry. Steffen On Friday, July 26, 20

saveAll and Validation Problem

2013-06-06 Thread gloop
Hello Cake-Fans, i try to save more than 1 entry in the database. Example: *index.ctp* echo $this->Form->create('Item'); echo $this->Form->input('0.Item.name'); echo $this->Form->input('1.Item.name'); echo $this->Form->end('save'); *Item.php* class Item extends AppModel { var $validate = arra

Re: Problem on view from custom sql

2012-11-10 Thread gloop
Hi, whats the output of On Saturday, November 10, 2012 7:54:16 AM UTC+1, suttipong Pratum wrote: > > > Dear All > > i have problem for show on viewbecause custom sql > > this custome sql > > $querys = "select * from registers where id is not null and (phone > like '%$q%' "

Re: saving to same id

2012-11-10 Thread gloop
Hi Chris, its only a edit of an entry. http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-save-array-data-null-boolean-validate-true-array-fieldlist-array If you want to update a value, rather than create a new one, make sure your are passing the primary key field into the data a

cakephp in subfolder

2012-11-10 Thread gloop
Hello cakephp fans, i have a webspace by 1&1. For test cases i created a subfolder "new". Now i changed the .htaccess like the documentation to: /new/.htaccess RewriteEngine on RewriteBase /new << seems correct, cause only "/" i get an 404 error. RewriteRule^$ app/webroot/[L]

Re: HABTM save Question

2012-09-10 Thread gloop
dont know how i can validate the joinTable, cause i must call 2 save functions. Well ... maybe u know a better way, On Friday, September 7, 2012 5:25:17 AM UTC+2, Mohammad Naghavi wrote: > > Hi Steffen, > what is wrong with > $this->Translation->LanguagesTranslation->save() > >

HABTM save Question

2012-09-06 Thread gloop
Hello, is there a way to save directly to the joining table? Like the find data? Model Translation HABTM Translation: $data = array( 'Translation' => array( 'key' => '213152374' ), 'Language' => array( array( 'id' => '1',

Re: Cakephp + TCPDF

2012-07-26 Thread gloop
I try header(); in the view, controller and try $this->header() in the controller. On Thursday, July 26, 2012 9:42:36 PM UTC+2, lavin wrote: > > Maybe adding the header data in the pdf layout's ctp? > > 2012/7/26 gloop : > > Its not the pdf application. The question

Re: Cakephp + TCPDF

2012-07-26 Thread gloop
Its not the pdf application. The question is why cake output a text/html header. On Thursday, July 26, 2012 7:07:54 AM UTC+2, gua syed wrote: > > try to use dompdf > > On Thu, Jul 26, 2012 at 6:04 AM, gloop wrote: > >> Hello, >> >> i would like to create a pdf

Re: Archive old data from model's table

2012-07-26 Thread gloop
Dud you try 1. $this->CakePHPModelName->setSource('table_name'); gloop On Thursday, July 26, 2012 5:57:52 AM UTC+2, baur79 wrote: > > i have high load on table "reports" > > so my idea to have (to divide) 2 tables > 1 - actual data > 2 -

Re: Multiple fields Model relation

2012-07-26 Thread gloop
=> 'User', 'fields' => array('id', 'full_name') ) ); You can read this on http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html gloop On Thursday, July 26, 2012 12:06:10 AM UTC+2, Teguh Mualim wrote: > > Hi, &g

Cakephp + TCPDF

2012-07-25 Thread gloop
ry: In the controller $this->header('Content-type: application/pdf'); andheader( 'Content-type: application/pdf'); But i get always the wrong content-type. How i can change the content type? Thanks for help. gloop -- Our newest site for the community: CakePHP Video Tutoria

Re: home.ctp

2012-07-11 Thread gloop
Hello, the easiest way to awnser your question is open your website. Cakephp tell you wihch Controller/Action/View is missing. gloop On Wednesday, July 11, 2012 6:15:45 PM UTC+2, Marsson wrote: > > Hi there! > > > I´m a beginner so I´ve looking the folder structure a

Re: htacces and other page

2012-07-10 Thread gloop
I get it: RewriteEngine on RewriteRule^shop/(.*) shop/$1[L] RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] Thanks :) On Tuesday, July 10, 2012 10:59:12 PM UTC+2, gloop wrote: > > Hello, > > i need to access a other page on the mai

Re: htacces and other page

2012-07-10 Thread gloop
the file is: /shop /app /.htaccess When i try to access the shop via. www.domain.de/shop i get an error that the controller doesnt exist. Kind Regards gloop On Wednesday, July 11, 2012 1:53:32 AM UTC+2, cricket wrote: > > If the file is under webroot then Cake should ignore it and let

htacces and other page

2012-07-10 Thread gloop
Hello, i need to access a other page on the main root /page but the htaccess root all request to cakephp how can i add e.g. /shop to the htaccess? Kind Regards gloop -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Linking Models together and virtualFields

2012-06-04 Thread gloop
I link models together: Fileserver hasMany Share Share belongsTo Fileserver Share hasMany Permissionmanagement Permissionmanagement belongsTo Share Now i have a virtualField 'unc' => 'CONCAT("Fileserver.servername, Share.share)' When i try to execute $this->Permissionmanagement->find('all') i ge

Re: Create own Helper and problem with create Link

2012-01-16 Thread gloop
Hi there, i do this, but i overwrite the __construct function. And get this error. Now i write: function __construct(View $view, $settings=array()){ parent::__construct($view, $settings); //other stuff } and all works!!! Yeah many thanks :) On 17 Jan., 01:30, jeremyharris wrote: > P

Create own Helper and problem with create Link

2012-01-16 Thread gloop
Hello Cakephp Friends, i try to realize my own Helper, but i have a bit Problems to use the other Helper. Example 1: I must access to the AuthComponent. FIrst i try this with $this->Auth- >user(); it didnt work and i found the solution to do this with: AuthComponent::user(); Seems the correct w

Correct way with ACL

2012-01-09 Thread gloop
Hello, today i only read manuals with ACL. Well works good with the controller. Now is the Question with the Views. I read there is no included way to check the permissions in the views. When i have a Navigation with user/moderate/admin links its bad when everybody can see this. I'm really sorr

getPath - error

2012-01-09 Thread gloop
Hello everybody, When i use debug($this->User->getpath('10')); i get an error: Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getpath' at line 1

Re: Paging with paginator - is that the right way?

2011-12-24 Thread gloop
tain > Behavior to limit for find method > > and than configure Paginator for NewsComment (use conditions for > "NewsComment.news_id" = $yournewsid) > and $comments = $this->paginate('NewsComment'); > -- > Lep pozdrav, Tilen Majerlehttp://maj

Paging with paginator - is that the right way?

2011-12-24 Thread gloop
Hello everbody. I have 3 Tables: - users [id; username; password] - news [id; user_id; title; comment; created; modified; news_comment_count] - news_comment [id; news_id; username; title; comment; created; modified; active] news hasMany news_comment news belongsTo user news_comment belongsTo n

$this->Auth->Allow('*') and scaffold problem

2011-12-21 Thread gloop
Hello everybody, i cant believe it. I solved my last problem with Scaffold and now ive a new one. I add in my AppController an Auth and allow it to all my functions: class AppController extends Controller { var $components = array('Acl', 'Auth' => array(

Re: Cakephp 2.0.4 Stable - Scaffold Problem

2011-12-19 Thread gloop
Now i delete the file and add it new with the same code and now i get the correct redirect to the user login form ... On 19 Dez., 16:44, gloop wrote: > Hello, > > i try the last hour with a new generated project. And it works ... so > now i found the Problem: > > in my AppContr

Re: Cakephp 2.0.4 Stable - Scaffold Problem

2011-12-19 Thread gloop
llowed to see that?' ), 'Session'); public function beforeFilter(){ $this->Auth->allow('*'); } } ?> and i get a blank page. On 19 Dez., 16:28, AD7six wrote: > On Dec 19, 11:46 am, gloop wrote: > > > Same issue with Cakeph

Re: Cakephp 2.0.4 Stable - Scaffold Problem

2011-12-19 Thread gloop
Same issue with Cakephp 2.0.3. On 19 Dez., 08:35, gloop wrote: > Sorry i tested something, but the problem is still excisting with > public $scraffold; > > Blank page. > > Kind Regards > > On 19 Dez., 01:45, Thiago Belem wrote: > > > > > &

Re: Cakephp 2.0.4 Stable - Scaffold Problem

2011-12-18 Thread gloop
ago Belem* > Desenvolvedor > Rio de Janeiro - RJ - Brasil > > +55 (21) 8865.9250 > thiagobelem.net > cont...@thiagobelem.net > > *Skype / gTalk **»* thiago.belem.web > *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt* > Assando Sites*, curso de CakePHP *»* assando-sites.c

Cakephp 2.0.4 Stable - Scaffold Problem

2011-12-18 Thread gloop
Hello, i try to use Scaffold, but i get a blank page: try to open: http://localhost/domain/comments Something 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

Re: CakePHP 2.0.2 Auth

2011-11-24 Thread gloop
Looks good. Are the fields are the same in your database? (usrname/password) Any exceptions? On 23 Nov., 19:27, Lucas Amiune wrote: > Hi, everyone. > > I'm new on cake and i decided to start from de 2.0.2. > And I'm kind of stuck in how users can login in my app. > > This are my "Auth files": >

LdapAuthorize

2011-11-24 Thread gloop
i create a LdapAuthorize.php like http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#creating-custom-authorize-objects But when i try to login with if ($this->Auth->login()) { return $this->redirect($this->Auth->redirect()); } else { $this-&g

Re: Question about login function (cakephp 2.0)

2011-10-31 Thread gloop
>http://book.cakephp.org/2.0/en/core-libraries/components/authenticati... > > > On 30 Okt., 22:01, gloop wrote: > > > > Hello everybody, > > > > i try cakephp 2.0 and the login sequence is very diffrent to cakephp > > > 1.3. > > > > In 1.3 its "

Question about login function (cakephp 2.0)

2011-10-30 Thread gloop
his->Auth->redirect()); } else { $this->Session->setFlash(__('Invalid username or password, try again')); } } Now i have the problem when i open /users/login i have always the flash message. What is the correct way to set the message only when i submit? Thank you! glo

Need Data from DATABASE_CONFIG in Template

2011-09-14 Thread gloop
e_dn' => 'dc=xx,dc=xx,dc=xx', 'domain' => array('Domain1', 'Domain2', 'Domain3') ); Is it possible to get the array 'domain' in my login template? Big thanks. gloop -- Our newest site for the community: CakePHP Vide

Re: multi-language site

2011-07-28 Thread gloop
rking. > > Yes I have "default.po"  at app/local/jpn/LC_MESSAGES/default.po > > > > > > > > On Wed, Jul 27, 2011 at 5:28 PM, gloop wrote: > > Correct is: > > > Configure::write('Config.language', 'ja'); > > > You

Re: multi-language site

2011-07-27 Thread gloop
en I put this line (Configure::write('Config.language', 'jpn');) directly > to controller file (I thought it will show Japanese ) then still local is in > EN > > I can't set default language which I want to! What is missing??? > > > > > > > &g

Re: multi-language site

2011-07-27 Thread gloop
s pages than dealt page. > ex)  site map page is not work for just translation. I have to show only > available page link to the page. > > #2) > Some image is different  at EN and JP page. > ex) submit button > > > > > > > > On Wed, Jul 27, 2011 at 2:23 PM

Re: multi-language site

2011-07-27 Thread gloop
I use .po files kind regards On 27 Jul., 23:10, leafchild wrote: > Thanks gloop for the response. > > Did you use .pot file or DB?? > > lc > > On Jul 27, 1:32 pm, gloop wrote: > > > > > > > > > Hello leafchild, > > > same problem

Re: multi-language site

2011-07-27 Thread gloop
Hello leafchild, same problem for 1 day :-D routes.php Router::connect( '/:lang/:controller/:action/*', array(), array('lang' => '[a-z]{2}') ); Router::connect( '/:lang/:controller', array('action' => 'index'), array('lang' => '[a-z]{2}

Re: Multilanguage in CakePHP 1.3

2011-07-26 Thread gloop
ms['lang'] != $this->Session->read('Config.language'))) { $this->Session->write('Config.language', $this- >params['lang']); $this->Cookie->write('lang', $this->params['lang']

Re: Multilanguage in CakePHP 1.3

2011-07-25 Thread gloop
gt; rausnehmen weil dieses model kommt aus meinem controller sry hab gedacht ich > > hätte sachen gelöscht die du nicht benötigst bzw nicht hast > > > Am 25. Juli 2011 21:07 schrieb gloop : > > > > CORE -- Our newest site for the community: CakePHP Video Tutorials http:/

Re: Multilanguage in CakePHP 1.3

2011-07-25 Thread gloop
deswegen nur in dem controller > > Am 25. Juli 2011 20:46 schrieb gloop : > > > > > > > > > Danke ich werde das morgen mal ausprobieren. > > > LG Steffen > > > On 25 Jul., 20:25, Davor Ilic wrote: > > > du brauchst nur die $pageLang vari

Re: Multilanguage in CakePHP 1.3

2011-07-25 Thread gloop
;        Configure::write('Config.language', $translate); > > >        $this->Session->write('Config.language', $translate);// hier lege > > ich fest dann welche sprache gewählt wurde und speichere sie in einer > > session das er auch vortlaufend di

Re: Multilanguage in CakePHP 1.3

2011-07-25 Thread gloop
27;, true); > > be sure to write it corectly or your translate won´t work > > or did you mean some other stuff > > where you from? i´m from austria... if it´s easier for you to write in > german then do this please it´s also for me  easier :D > > 2011/7/25 gloop > >

Re: Multilanguage in CakePHP 1.3

2011-07-25 Thread gloop
from en to other lang > you? > > 2011/7/25 gloop > > > > > > > > > Hello, > > > i search a whole time in the web for multilanguage in CakePHP. I found > > that must create a folder in /app/locale/deu/LC_MESSAGE with a file > > default.po. Th

Re: Multilanguage in CakePHP 1.3

2011-07-25 Thread gloop
switch did from en to other lang > you? > > 2011/7/25 gloop > > > > > > > > > Hello, > > > i search a whole time in the web for multilanguage in CakePHP. I found > > that must create a folder in /app/locale/deu/LC_MESSAGE with a file > > default.po

Multilanguage in CakePHP 1.3

2011-07-25 Thread gloop
y not found it would write "test". Default is in CakePHP "en". Now i've write in /app/locale/eng/LC_MESSAGE/default.po for testing the same text like in the german version, but it writes always the "msgid". I've never managed to write the "msgstr"