oleonav | 1 Jun 01:23 2007

Re: i18n translation in db tables - how to do this like Symfony?


Thanks athies <at> ..,

Your response handles the translation of static 'interface' elements
of the application. For example translations of static menu items in
multiple languages based on the language setting made the user. I mean
something different.

What I mean is for example a database with news articles. For every
article there is a version in each language supported by the website.
Based on the language settings made by the user a localised copy of
the article is shown. If a localised version of the article is  not
available than the version in the default site language is shown, for
example English.

Symfony uses a table structure like this:

Table: news
Fields: id, ...

Table news_i18n
Fields: id, news_id, language, title, content, ...

News is the main table. News_i18n is the table where the different
translated version of each article is saved. For each article there is
one records in the i18n table.

For example:
Record 1 in table news:
id: 1
(Continue reading)

franciscodg | 1 Jun 01:51 2007
Picon

Re: two foreign key in a table


thank you very much...
the problem is solved  :)

On 31 mayo, 14:36, "Samuel DeVore" <sdev...@...> wrote:
> I think you need to name the two Lanca models differently like
>
> http://bin.cakephp.org/view/501804416
>
> see if that helps
>
> On 5/31/07, franciscodg <francisc...@...> wrote:
>
>
>
>
>
> > hi, my problem is:
>
> > I have in sql:
> > --
> > -- Estructura de tabla para la tabla `historialcuotas`
> > --
>
> > CREATE TABLE `historialcuotas` (
> >   `id` int(11) NOT NULL auto_increment,
> >   `lancha_id_resta` int(11) NOT NULL,  (foreign key table lanchas)
> >   `lancha_id_suma` int(11) NOT NULL,  (foreign key table lanchas)
> >   PRIMARY KEY  (`id`)
> > ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=89 ;
(Continue reading)

J Wynia | 1 Jun 01:45 2007
Picon

Re: 404 while working on IBM tutorial...


There is an assumption in the IBM tutorial that I don't see
explicitly stated anywhere in the document, but is made
nonetheless. The tutorial assumes that the application you're
building with the tutorial sits at the root of your site. That's
unfortunate, because, as it's a demo app, it's unlikely that it
would be the primary thing powering a site.

That results in nearly everyone (including me) doing exactly what you
did
by placing it in a subdirectory, specifically created to mess with the
demo app.  That works fine for much of the functionality, but breaks
when
the forms in the views use specific paths like this. For those cases,
like
the form you're talking about, I just changed the action so for your
example: from "/users" to "/cake/ibm/users/" and it should work fine.
There might be a better or more "right" solution (where you wouldn't
hard-code the action in the form in the first place), but to get
through the tutorial, that works.

On May 27, 8:58 pm, "bencarl...@..." <bencarl...@...>
wrote:
> I just posted elsewhere on an identical post, but don't see it showing
> anywhere... apologies in advance if this shows up as a duplicate!
>
> I got about 1/2 way through theIBMtutorial last week before
> switching hosting providers. I am now starting on it again. I get the
> cake page, and DB acknowledgment just fine. However, when attempting
> the first step, the .../users/register I get a 404 error. However, if
(Continue reading)

pete | 1 Jun 04:32 2007
Picon

selectTag


hi,
im trying to add the selectTag. the select field shows up but i get
the following warning:

Notice: Undefined offset: 1 in C:\Apache\xampp\htdocs\cake\cake\libs
\view\helpers\html.php on line 950

 <?php echo $html->selectTag('status_id', $status, null, array(),
null, false, false); ?>

<select name="data[status_id][]"  id="status_id">
<option value="3" >Declined</option>
<option value="6" >Deleted</option>
<option value="4" >Delivered</option>
<option value="1" >Inquiring</option>
<option value="5" >Invoiced</option>
<option value="7" >Open</option>
<option value="2" >Qualifying</option>
</select>

1. has anyone an idea why i get the notice?
2. how can i set Delivered as SELECTED ?

thank you

pete

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
(Continue reading)

metasan | 1 Jun 05:01 2007
Picon

Re: selectTag


hi,

for this line :

<?php echo $html->selectTag('status_id', $status, null, array(),
null, false, false); ?>

try to use 'Modelname/fieldname' the notice should be removed.

^^

metasan

On Jun 1, 10:32 am, pete <lumot...@...> wrote:
> hi,
> im trying to add the selectTag. the select field shows up but i get
> the following warning:
>
> Notice: Undefined offset: 1 in C:\Apache\xampp\htdocs\cake\cake\libs
> \view\helpers\html.php on line 950
>
>  <?php echo $html->selectTag('status_id', $status, null, array(),
> null, false, false); ?>
>
> <select name="data[status_id][]"  id="status_id">
> <option value="3" >Declined</option>
> <option value="6" >Deleted</option>
> <option value="4" >Delivered</option>
> <option value="1" >Inquiring</option>
(Continue reading)

metasan | 1 Jun 04:52 2007
Picon

Re: selectTag


hi,

1. i think this error is due to this line :

<?php echo $html->selectTag('status_id', $status, null, array(),
null, false, false); ?>

try to replace  fieldname with "Modelname/fieldname".

2. do you want to select delivered as a default value ?

On Jun 1, 10:32 am, pete <lumot...@...> wrote:
> hi,
> im trying to add the selectTag. the select field shows up but i get
> the following warning:
>
> Notice: Undefined offset: 1 in C:\Apache\xampp\htdocs\cake\cake\libs
> \view\helpers\html.php on line 950
>
>  <?php echo $html->selectTag('status_id', $status, null, array(),
> null, false, false); ?>
>
> <select name="data[status_id][]"  id="status_id">
> <option value="3" >Declined</option>
> <option value="6" >Deleted</option>
> <option value="4" >Delivered</option>
> <option value="1" >Inquiring</option>
> <option value="5" >Invoiced</option>
> <option value="7" >Open</option>
(Continue reading)

rtanz | 1 Jun 05:13 2007
Picon

Re: redirection problem - ibm tutorial


yeah i have that cant understand why this is happenning, i have the
following :

<?php
class UsersController extends AppController
{
	function register()
	{
		if(!empty($this->data))
		{
			if ($this->User->validates($this->data))
			{
				$this->User->save($this-data);
				$this->flash('Your registration information was accepted.','/users/
register');
			}
			else
			{
				$this->validateErrors($this->User);
			}
		}
	}

	function knownusers()
	{
		$this->set('knownusers',$this->User->findAll(null, array('id',
'username', 'first_name','last_name'), 'id DESC'));
	}
}
(Continue reading)

rtanz | 1 Jun 05:22 2007
Picon

ajax tutorial problems


Hi i am trying to complete the ajax todo list tutorial at
http://grahambird.co.uk/cake/tutorials/ajax.php

However i am getting this error after editing the default.thtml file
in layouts folder:

Notice: Undefined variable: javascript in W:\www\cake\cake\libs\view
\templates\layouts\default.thtml on line 35

Fatal error: Call to a member function link() on a non-object in W:\www
\cake\cake\libs\view\templates\layouts\default.thtml on line 35

I inserted the following code into the head section as required:

<?php print $html->charsetTag('UTF-8') ?>
<?php print $javascript->link('prototype') ?> //line35
<?php print $javascript->link('scriptaculous.js?load=effects') ?>

any idea why i have this problem? thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

C. Ashcraft | 1 Jun 06:14 2007
Picon

Re: Strange DB problem - savefield fails when field name changes


Thanks! Fixed it.

On May 31, 2:57 am, Grant Cox <grant....@...> wrote:
> Are you running with DEBUG 0 in your app/config/core.php?  If so, then
> once a table structure is cached it is not re-read for a long time.
> So, either delete the files in app/tmp/cache, or just set your DEBUG
> to 1 or higher for at least one page request - in either case this
> will rebuild all the table definitions.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

sean | 1 Jun 06:56 2007
Picon

Re: Table comumn widths


No way, I am afraid.

On 5月26日, 下午11时17分, merlin <merlin... <at> hotmail.com> wrote:
> Hi all
>
> If I build a table using HtmlHelper::tableHeadersand
> HtmlHelper::tableCells - how do I control the width of each column?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane