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
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
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
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%' "
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
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]
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()
>
>
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',
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
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
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 -
=> '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
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
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
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
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
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
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
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
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
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
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
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
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
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(
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
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
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:
>
>
>
>
>
&
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
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
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":
>
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
>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 "
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
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
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
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
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
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
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}
ms['lang']
!= $this->Session->read('Config.language'))) {
$this->Session->write('Config.language', $this-
>params['lang']);
$this->Cookie->write('lang', $this->params['lang']
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:/
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
; 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
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
>
>
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
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
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"
48 matches
Mail list logo