Friday, January 30, 2009

Re: my html can't be show very good.

Most of the IDE's and editors will let you do a global search and
replace like that.

I use NetBeans, and would just do a shift-command-H to bring up the
"Replace in projects" dialog (another argument for using a modern
IDE).

On Jan 24, 2:03 am, Rimoe <meiyo...@gmail.com> wrote:
> Thanks,it's the reason.
>
> but the truth is I must  change my params for every link and the
> $form->input(select).
>
> Do you  have a good way to let it automated changed?
>
> Thanks.
>
> 2009/1/24 brian <bally.z...@gmail.com>
>
>
>
> > Are you using HtmlHelper? You probably need to tell it not to escape your
> > text:
>
> > echo $html->link(
> >  'shiftjis code',
> >  array('controller' => '...', 'action' => '...'),
> >  array('title' => '...'),
> >  false,
> >  false    // <-- this param
> > );
>
> > See "escapeTitle" param:
>
> >http://api.cakephp.org/class_html_helper.html#71ff7f331b08318bc867a4d...
>
> > On Sat, Jan 24, 2009 at 2:50 AM, Rimoe <meiyo...@gmail.com> wrote:
> > > hi,
> > > everyone.
> > > Do you have this question?
> > > my html can't be show very good.
> > > for example.
> > > <a href='link'>shiftjis code</a>
> > > when in my mobile browser, It has been shown like this:  shiftjis
> > > code/a>,this kind of link.
> > > If you know why is it, please tell me, thank you.
> > > rimoe
>
>
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Cache not configured properly on Mac OS X

Instead of setting permissions on all tmp files/directories you can
just chown the ownership of the tmp directory to "www" (the user that
apache runs under).

sudo chown -R www <tmp directory>
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Any one looking for a freelance work

Post your req at http://withcake.com/

On Jan 25, 12:55 am, Novice Programmer <novice.prog...@gmail.com>
wrote:
> Hello,
>
> Please get in touch with me if you are looking for a freelance work. I have
> a site based on cakephp and want to add a few features to it.
>
> --
> Thanks & Regards,
> Novice.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: utf-8 encoding problem

On Thu, Jan 29, 2009 at 7:18 PM, medo <alani.mohammad@gmail.com> wrote:
> (..)

This is a very common issue. Just follow this checklist:

1. Using a smart editor (for Windows: Notepad++, Textpad, ...; for
Gnu/Linux: Gedit,
Kedit, Geany, Kate, Vim...), be sure that all of your .php and .ctp
files are saved
with the UTF-8 (without BOM) encoding;

2. Be sure that your webserver is configured to serve the pages in
UTF-8 encoding
(in Apache, the line 'AddDefaultCharset UTF-8' in your httpd.conf);

3. Be sure that your database tables are configured with the UTF-8 encoding (in
MySql, create your tables with the proper collation option);

4. In the very last case, if the problem still persists and your are a
really paranoid,
change the PHP interpreter encoding in your php.ini.

Best regards.

--
MARCELO DE F. ANDRADE (aka "eleKtron")
Belem, PA, Amazonia, Brazil
Linux User #221105

[gus@pará ~]# links http://pa.slackwarebrasil.org/

For Libby's backstory be told on Lost
http://www.petitiononline.com/libby423/petition.html

--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: utf-8 encoding problem

How did you save your files? Are you working on Windows (using
character set windows-1256) ?

Windoze by default saves files on the file system with the default
ANSI character set. In order to get it to save as UTF-8, you have to
explicitly tell it to (e.g. in Notepad change the dropdown for
encoding from ANSI to UTF-8).

On Jan 29, 11:48 pm, mohammad al-ani <alani.moham...@gmail.com> wrote:
> and when i choose the windows-1256 i see the real world which is مقال
>
> On Fri, Jan 30, 2009 at 10:23 AM, mohammad al-ani
> <alani.moham...@gmail.com>wrote:
>
> > params show me the value of the key 'keyword' is yes like this symbols
>
> > On Fri, Jan 30, 2009 at 2:48 AM, brian <bally.z...@gmail.com> wrote:
>
> >> What does $this->params show you?
>
> >> On Thu, Jan 29, 2009 at 5:18 PM, medo <alani.moham...@gmail.com> wrote:
>
> >> > hi group,
>
> >> > i have problem with my search feature in my site the problem is when i
> >> > use the search page to search for an Arabic word with the form get
> >> > method. and i faced that problem in the prototype below
>
> >> >>>>>>>>>> search_controller.php  <<<<<<<<<<
>
> >> > <?php
>
> >> > class SearchController extends AppController {
> >> >  var $name='Search';
> >> >  var $uses=array('Article');
>
> >> >  function index(){
> >> >    $this->layout='page';
> >> >    if (isset($_GET['keyword'])) {
> >> >      $this->set('articles',$this->Article->find('all',array
> >> > ('conditions'=>array('Article.body like'=>'%'.base64_decode($_GET
> >> > ['keyword']).'%'))));
> >> >      $this->set('keyword',$_GET['keyword']);
> >> >      $this->data['Search']['keyword']=urlencode(base64_decode($_GET
> >> > ['keyword']));
> >> >    }
> >> >  }
> >> > }
>
> >> > ?>
>
> >> >>>>>>>>>> index.ctp  <<<<<<<<<<
>
> >> > <?php e($form->create(null,array('type'=>'get','url'=>'/search'))); ?>
> >> > <?php e($form->input('Search.keyword',array('label'=>'الكلمة المراد
> >> > البحث عنها'))); ?>
> >> > <?php e($form->end('ابحث'));?>
> >> > <hr />
> >> > نتائج البحث عن <?php e($keyword); ?>
>
> >> > <?php var_dump($articles); ?>
>
> >> > and i use utf-8 for the layout.
>
> >> > the problem is that the result of echoing $keyword is '' why that and
> >> > how to solve that
>
>
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Display Checkbox Array and read values

Hi,

I am very new to CakePHP (and Google Groups) and now struggle badly
with a Form.

I have got a Site with Main- and Subcategories. In the Form you can
post an entry and choose 1 or more Main and Subcategories.

To keep it easy, I have now started just with the Maincategories. For
this I use checkboxes, which are read out from the database.

foreach($options as $option)
{
echo $form->input('Recipe.maincategory_id.'.$counter.'.',
array(
'label'=>
array(
'text'=>$option
['Maincategory']['maincategory']),
'type' => 'checkbox',
'multiple'=>'checkbox',
'value'=>$option['Maincategory']['id']));
$counter++;

}

This displays my checkboxes nicley. I am now trying to read out the
choosen maincategories and this is where I am badly stuck.

if (!empty($this->data)) {
if ($this->Maincategories_subcategories->saveAll($this->data)) {
$this->Session->setFlash(Entry saved');
}
}

Maincategories_subcategories is my DB Tables to connect
Maincategories, Subcategories and Recipes together.

Can someone tell me if I have set up the checkboxes correctly and tell
me how I than save it aswell? I would think I need a foreach aswell to
go through the Array of the Maincategories, but how would this look? I
am struggling on this issue already a week and just can not get on. I
look forward for any tip which will get me forward on this issue.
Thanks a lot in advance.

Luke

--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: good example of cake php..

On Fri, Jan 30, 2009 at 5:10 AM, sagu <sarvaiya.sagar1@gmail.com> wrote:
>
> if any example then reply me.....

It's in portuguese and with Cake 1.1, but maybe it helps:

http://www.tuliofaria.net/codigo-fonte-de-site-feito-em-cakephp-estritamente-para-estudo/

I'm just starting to rewrite an application with Cake 1.2
by myself just for learn.

http://code.google.com/p/jaca4l/

Best regards.

--
MARCELO DE F. ANDRADE (aka "eleKtron")
Belem, PA, Amazonia, Brazil
Linux User #221105

[gus@pará ~]# links http://pa.slackwarebrasil.org/

For Libby's backstory be told on Lost
http://www.petitiononline.com/libby423/petition.html

--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---