model validation and error messages in Cake 1.2

2007-06-10 Thread ne0d1n

In new $validate array there is 'message' key obviously for error
messages.
(see example in http://bin.cakephp.org/view/152660210)

Should I use tagErrorMsg to display it?
Could you give any working example to display error validation message
specified in $validate?


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Apache dies when redirecting using controller->redirect()

2007-06-10 Thread Eugene Bolshakov

I'm not sure if this is related to the problem, but I've finally found
out the reason for apache crashes for me.
The reason is a bug in zend optimizer and after upgrade it began to
work OK.
http://www.zend.com/forums/index.php?t=msg&goto=7323&S=f987dc025b5261de2b20e8201f949b80
My problem was that on some php errors (undefined variable in template
for example) apache died. The reason is debug_backtrace() which is
clled in cakephp error handler that caused apache crush because of
zend optimizer bug.


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Select option from lookup table

2007-06-10 Thread MercedesAMG

I made some Models/Controllers/Views for two simple tables
each with id fields and one data field

they all worked perfectly as baked and caked

then created a third(clients) table that has field that looksup the
original tables data
for example a clients table selecting a province

this also worked perfectly except

it has the province id as the select dropdown list
I want the other field to show in the dropdown and I want the
provincial id to store in the clients table

Is this possibly a feature of scaffolding versus tweaking the code a
bit or am I missing something.
Cake got the associations right I think.
Obviously newbie here 
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Router::parseExtensions();

2007-06-10 Thread [EMAIL PROTECTED]

This is a note of caution if you use "Router::parseExtensions();" More
specifically, if you think you might want to use parseExtensions at
some point in your project.

I was using requestAction method with a url like this:
$this->requestAction('/users/view/j.smith');
My view method blueprint looks like this: function view($alias){}

Everything worked fine until I added "Router::parseExtensions();" to
my routes.php file. With parseExtensions turned on, cake treats
".smith" as the extension, and therefore removes .smith from the get
variable. So $alias = "j" instead of "j.smith".

If you append a VALID extension, like this:
$this->requestAction('/users/view/j.smith.html');
it works fine; $alias = "j.smith"

When you think about it, this behavior is not surprising, but it just
might catch you off guard and surprise you!

cook


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session Problem for more than 1 variable

2007-06-10 Thread metasan

Hi,

I looked at your code.

1. When you store datas into session you use $this->data, this is good
but it don t contains the vars you are looking for.
$this->data['Login'] is ok because it contains the data provided by
the form.

2. The vars you are looking for are in the $results tab.
Try :

$this->Session->write('usertype',$results['Login']
['login_type_id']);
$this->Session->write('user_id',$results->data['Login']['user_id']);

Let me know your results :)

metasan
http://www.piegteam.com


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session Problem for more than 1 variable

2007-06-10 Thread Lemune

Thank you all
I got the answer from irc.
Metasan said that the data is empty on filed login_type_id and user_id
(because it came from  the form thtml), so I have to use the $resuls
variable not the data, this is my new code:

$this->Session->write('user',$this->data['Login']['username']);
$this->Session->write('usertype',$results['Login']['login_type_id']);
$this->Session->write('user_id',$results['Login']['login_type_id']);
$level=$this->Session->read('usertype');



--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session Problem for more than 1 variable

2007-06-10 Thread Lemune

Hi again.
Sorry cause i just 2 days away.

ErreUve I 'm also have try using your method.and this is my code:

$this->Session->write('user',$this->data['Login']);
$level=$this->Session->read('user.login_type_id');
if($level==1)
{
$this->redirect('/administrators/index');
exit();
}

elseif ($level==2)
{
$this->redirect('/sales_records/index');
exit();
}

else
{
$this->redirect('/company_records/index');
exit();
}
} else {

$this->set('error',true);

}

And it still didn't work.


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Which Cake function should I use to query my data

2007-06-10 Thread Pablo Viojo
And that's what you're getting, no more data than you need.


-- 
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net

On 6/10/07, Alexandre Gonçalves Jacaranda <[EMAIL PROTECTED]> wrote:
>
> Thanks for your reply, but my problem is more complex:
>  $this->set('signs', $this->Sign->findAll("Sign.movie_presentation_id = '
> $id'",'File.fspath',"Sign.time ASC",null,null,1));
>
> my return is:
>
> Array ( [0] => Array ( [File] => Array ( [fspath] => img/jogo_43.jpeg ) )
> [1] => Array ( [File] => Array ( [fspath] => img/jogo_49(1).jpeg ) ) [2] =>
> Array ( [File] => Array ( [fspath] => img/Slide22.GIF ) ) )
>
> I need to get only my fspath value.
>
> How can I do this ?
>
>
> Em 10/06/2007, às 12:06, alan escreveu:
>
>
>  /**
> * how to find your stuff...
> */
> $stuff = $this->Model->findAll($conditions,$fields,'Model.field DESC',
> $limit,$page,$recursive);
>
> echo '';
> print_r($stuff);
> echo '';
> exit;
>
> ?>
>
> if you don't see all you want to see... get friendly with the cake
> associations and update your models.
>
> thanks,
> -alan-
>
> On Jun 9, 11:02 am, Alexandre Gonçalves Jacaranda <[EMAIL PROTECTED]>
> wrote:
>
> Sorry, I forgot to tell my associate model:
>
> User: hasmany Presentation;
> Presentation: belongsto User, belongsto Type, hasone Movie;
> File : hasmany Movie , hasmany Sign;
> Type: hasmany Presentation;
> Movie: belongsto File, belongsto Presentation, hasmany Sign, hasmany
> Text;
> Sign: belongsto File, belongsto Movie;
> Text: belongsto Movie
>
> My associations is like
>
> File
> / \
> / \
> User -> Presentation -> Movie -> Sign
> / \
> Type <-- --> Text
>
> Thanks for answer. I'm asking because I only can get what I need
> doing an direct select on my database. I want to display a mini-
> slideshow when user load an movie, changing
> sign( gif or jpeg file) while seeing the movie.
>
> Em 09/06/2007, às 05:33, Dr. Tarique Sani escreveu:
>
>
>
> On 6/9/07, Alexandre Gonçalves Jacaranda <[EMAIL PROTECTED]> wrote:
>
>
> Hello, everybody!!
>
>
> I've a database model like this :
>
>
> files ( id, path, name);
> signs ( id, file_id, time)
>
>
> Read uphttp://manual.cakephp.org/chapter/models- pay attention to
> the associations section
>
>
> Tarique
>
>
> --
> =
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =
>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Panels (ie like in ASP.net)?

2007-06-10 Thread bingo

hi gary,

i think you are wondering how to display persistent data using panel
idea. If so, check out this tutorial in bakery
http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction

it shows how you can call certain actions from elements. These
elements can be placed within the panels. I hope I correctly
understood your problem

Regards,
bingo
On Jun 9, 7:42 pm, gary <[EMAIL PROTECTED]> wrote:
> Hi,
> I was wondering if there is a way to make use of a panel type of idea
> using cake php? is there anything predefined that accomodates for such
> a technique? otherwise is there something else that could assist me in
> this?
>
> btw my main use for such a concept would be to span forms over a few
> steps'
>
> 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: othauth permissions

2007-06-10 Thread bingo

hi,

why can you can do it in the same as you do with other tables in
CakePHP. Create model, controller and view for it and set admin
permission in the groups_permission table. Hopefully, you won't delete
admin group..

Regards,
bingo

On Jun 10, 3:35 am, Oneill <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I was wondering if somebody know how you can add/edit/delete groups
> permissions online with othauth Hope somebody does...
>
> Ciao


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Which Cake function should I use to query my data

2007-06-10 Thread Alexandre Gonçalves Jacaranda
Thanks for your reply, but my problem is more complex:

$this->set('signs', $this->Sign->findAll 
("Sign.movie_presentation_id = '$id'",'File.fspath',"Sign.time  
ASC",null,null,1));

my return is:

Array ( [0] => Array ( [File] => Array ( [fspath] => img/ 
jogo_43.jpeg ) ) [1] => Array ( [File] => Array ( [fspath] => img/ 
jogo_49(1).jpeg ) ) [2] => Array ( [File] => Array ( [fspath] => img/ 
Slide22.GIF ) ) )

I need to get only my fspath value.

How can I do this ?


Em 10/06/2007, às 12:06, alan escreveu:

>
>  /**
> * how to find your stuff...
> */
> $stuff = $this->Model->findAll($conditions,$fields,'Model.field DESC',
> $limit,$page,$recursive);
>
> echo '';
> print_r($stuff);
> echo '';
> exit;
>
> ?>
>
> if you don't see all you want to see... get friendly with the cake
> associations and update your models.
>
> thanks,
> -alan-
>
> On Jun 9, 11:02 am, Alexandre Gonçalves Jacaranda <[EMAIL PROTECTED]>
> wrote:
>> Sorry, I forgot to tell my associate model:
>>
>> User: hasmany Presentation;
>> Presentation: belongsto User, belongsto Type, hasone Movie;
>> File : hasmany Movie , hasmany Sign;
>> Type: hasmany Presentation;
>> Movie: belongsto File, belongsto Presentation, hasmany Sign, hasmany
>> Text;
>> Sign: belongsto File, belongsto Movie;
>> Text: belongsto Movie
>>
>> My associations is like
>>
>>  File
>>/ \
>>  / \
>> User -> Presentation -> Movie -> Sign
>> /\
>> Type  <-- --> Text
>>
>> Thanks for answer. I'm asking because I only can get what I need
>> doing an direct select on my database. I want to display a mini-
>> slideshow when user load an movie, changing
>> sign( gif or jpeg file) while seeing the movie.
>>
>> Em 09/06/2007, às 05:33, Dr. Tarique Sani escreveu:
>>
>>
>>
>>> On 6/9/07, Alexandre Gonçalves Jacaranda <[EMAIL PROTECTED]> wrote:
>>
 Hello, everybody!!
>>
 I've a database model like this :
>>
 files ( id, path, name);
 signs ( id, file_id, time)
>>
>>> Read uphttp://manual.cakephp.org/chapter/models- pay attention to
>>> the associations section
>>
>>> Tarique
>>
>>> --
>>> =
>>> Cheesecake-Photoblog:http://cheesecake-photoblog.org
>>> PHP for E-Biz:http://sanisoft.com
>>> =
>
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Need a helpful tutorial

2007-06-10 Thread Reine

Hi Lifo,

There's a handful of good tutorials at the IBM Developers' website.
You will need to register (registration is free) to access them and
others have a PDF download link.

http://www.ibm.com/developerworks/search/searchResults.jsp?searchType=1&searchSite=dW&searchScope=dW&query=cakephp&Search.x=0&Search.y=0&Search=Search

Regards,
Reine


On Jun 7, 11:39 am, Lifo <[EMAIL PROTECTED]> wrote:
> Dear group member
>  I am new in CakePHP. So i need a free Cake PHP
> tutorial. Please give me any tutorial or link. Thanks for yours help.
>
> Best regard,
> Lifo


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Notice: Undefined index: in app_model.php

2007-06-10 Thread varunkrish

Hi Friends,

I m getting this error in add action in a controller

Notice: Undefined index: Data cake\app_model.php on line 43

Notice: Undefined index: Media in cake\app_model.php on line 43

I have this function inside app_model.php

function _implode($model, $field)
{
if($this->data[$model][$field]!="") 
return(substr(implode(",",$this-
>data[$model][$field]),1));
else return false;
}

it triggers to Inserts with the primary key value missing

90  INSERT INTO `data` () VALUES ()
92  INSERT INTO `media` () VALUES ()


Any idea wahts wrong ?


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP Manual rev 154 for CakePHP 1.1

2007-06-10 Thread Gustavo Carreno

On 6/8/07, DJ Spark <[EMAIL PROTECTED]> wrote:
>
>  It happens to me when the .chm file is on a network drive.
>  Don't ask me why MS decided for this 'security feature' :)

Hummm, if that's the case I think I'm powerless to do anything on my side.
Looks like another of those stupid MS decisions about trust and
security, go figure, they are always so good at it aren't they ?
PFFLOL NOT !!

-- 
Gustavo Carreno
---
< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Multiple validation rules in 1.2

2007-06-10 Thread Mickiii

Thanks, you were spot on, I just updated to the latest SVN checkout,
and now it seems to work. Although the new blank rule, instead of the,
soon deprecated, VALID_NOT_EMPTY, still doesnt work.

On 10 Jun., 07:44, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 6/9/07, Mickiii <[EMAIL PROTECTED]> wrote:
>
> > I have looked 
> > athttp://bakery.cakephp.org/articles/view/multiple-rules-of-validation-...
> > and it seems as if the above should work, but does'nt
>
> Ensure that you have the latest checkout from the SVN - it did not
> work for me using the day before's nightly
>
> HTH
> Tatique
>
> --
> =
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Pagination PRG Problem

2007-06-10 Thread Joel

Hi all!

I try to do a search over a pagination component I found here
at http://www.noswad.me.uk/Pagination/PRG (Andy Dawson's site).

Source: http://cakeforge.org/frs/?group_id=152

I try to use '1 step' search, a very simple form which will submit to
itself, and if form data is present redirects to the appropriate url.

This PRG(Post Redirect Get) search function works all fine but
it doesn't search and fetch data from database
when you input multibyte characters (such as Japanese and Chinese).

Does it got to do with 'urlencode'?
I tried 'urlencode' but all I get is an unreadable query string to an
URL and search input field.

I can't see how to handle this.
Any help would be appreciated!


Here is the code:

/app/plugins/pagination/controllers/p_r_g_controller.php:

class PRGController extends SearchAppController{

var $name = 'PRG';


function in_one($match = null) {
uses('Sanitize');
if (isset($this->data['Form']['search'])) {
if (!$this->data['Form']['search']) {
$this->_addFlash('You need to search for something');
}
return $this->redirect 
(array(Sanitize::paranoid($this->data['Form']
['search'])));
}
if ($match) {
//$match = Sanitize::paranoid($match);
$this->_addFlash('Showing results for Titles matching "'.
$match.'"');
$criteria = array('Title.title'=>"LIKE %$match%");
list($order,$limit,$page) = $this->Pagination-
>init($criteria,null,array('ajaxAutoDetect'=>false));
$this->data = $this->{$this->modelClass}->findAll($criteria, 
null,
$order, $limit, $page);
$this->data['Form']['search'] = $match;
} else {
$this->data = null;
}
$this->render('in_one');
}
}


/app/plugins/pagination/views/p_r_g/in_one.thtml:

Paginated Titles Index (name.", ".$this->action?
>)
formTag();
echo $form->generateInputDiv("Form/search","Title match:");
echo $html->submit("Submit");
?>

element('results_table');
echo $this->element('pagination');
} else {
echo "No Results";
}


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: drag how to use a handle options

2007-06-10 Thread Michael Augustyniak

[EMAIL PROTECTED] wrote:
> Hey.
> Try this:
>
>
> 
> handle
> 
> Body
> 
> 
>
> drag('dragme',array('handle'=>'handle'); ?>
>
> Here is a drag 'n drop tutorial (although handles aren't used in the
> tutorial)
> http://dieter.plaetinck.be/drag_n_drop_tutorial_with_cakephp_ajax_prototype_scriptaculous
>
> On Jun 8, 9:44 pm, Michael Augustyniak <[EMAIL PROTECTED]>
> wrote:
>   

Nice, thank You

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Yet another question on Routing

2007-06-10 Thread Kaspar

As I understand the problem, you want to have your route when you say /
some_community/something/ and default routing when you say /posts/
something where you have PostsController

I think that file config/routes.php appends routing to the top of the
processing queue nad that is why you catch everything with your
communities route /:community/ ..., try to change file router.php and
in func __connectDefaultRoutes() add your route to the end (after
ajax, bare routes). maybe that will help, I am catching my routes that
way. Maybe I do something wrong but it helps me.

It could be great to have processing order managed by the user someway
to give priority to some routes over others.



On May 24, 8:05 pm, Greg <[EMAIL PROTECTED]> wrote:
> Hey Felix,
>
> I missed this post earlier.  Thats a pretty cool hack.  If the
> modified url schema I am trying out doesn't work for our needs, I'll
> try out this snippet.  Thanks a lot for the input!
>
> -Greg
>
> On May 24, 9:43 am, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
>
> > Here is a rather hackish snippet that might help you. Put this in your
> > bootstrap.php:
>
> > 
> > function listControllers($underscored = false) {
> > uses('Folder');
> > $Folder = new Folder();
>
> > if ($underscored == false) {
> > $toCtrlName = create_function('$controllerFile', 'return
> > Inflector::camelize(r("_controller.php", "", $controllerFile));');
> > } else {
> > $toCtrlName = create_function('$controllerFile', 'return
> > r("_controller.php", "", $controllerFile);');
> > }
>
> > $Configure = Configure::getInstance();
> > foreach($Configure->controllerPaths as $path) {
> > $Folder->cd($path);
> > $controllerFiles = $Folder->find('.+_controller\.php$');
> > $controllers = array_map($toCtrlName, $controllerFiles);
> > }
>
> > return $controllers;}
>
> > 
>
> > Then you can use it in your routes.php to get a nice regex strings
> > matching all your controllers like this:
>
> > 
> > $controllerRegex = '('.join('|', array_map('preg_quote',
> > listControllers(true))).')';
> > 
>
> > This should be very useful if you decide to manually map all controllers
> > by yourself.
>
> > HTH, Felix
> > --http://www.thinkingphp.orghttp://www.fg-webdesign.de
>
> > John David Anderson (_psychic_) wrote:
>
> > > On May 24, 2007, at 10:19 AM, Greg wrote:
>
> > >>> Can you take a step back and explain why you need the route, and
> > >>> maybe provide some examples? Maybe we can find a good way to do what
> > >>> you want.
>
> > >> We need to have a url schema likehttp://domain.com/community/
> > >> category/post,
> > >> so I have defined routes accordingly.  These routes work great, except
> > >> that they completely override cake's default routes.  Now, simple
> > >> commands like requestAction(/controller/action/...) are confused with
> > >> these routes, rather than using cake's defaults.
>
> > > Would you be amenable to changing the URL format a bit? You just need
> > > a way to distinguish a community name from a controller name.
>
> > > Something like these might be matchable using regex to avoid
> > > controller name collisions:
>
> > >http://example.com/c:los_angeles/computers/mac_rulez
> > >http://example.com/los_angeles:computers/mac_rulez
> > >http://example.com/c_los_angeles/computers/mac_rulez
>
> > > Just add some little marker in there that regex can pick up and
> > > recognize as a community name.
>
> > > Its a little hacky, but you could also iterate through your
> > > controllers directory and grab out the names and add those as
> > > conditions in the regex. The CONTROLLERS constant is your friend
> > > there. I think that this approach is less user-friendly, as some sort
> > > of marker in the URL to denote community names is more user-friendly.
>
> > > -- John


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CSS not working

2007-06-10 Thread Pablo Viojo
Also, you can take a look at the API[1]

Pablo

[1] http://api.cakephp.org/

On 6/10/07, Gonzalo Servat <[EMAIL PROTECTED]> wrote:
>
> On 6/10/07, pbland <[EMAIL PROTECTED]> wrote:
> >
> >
> > Pablo,
> >
> > Great, that worked! Thanks for the help. Can you tell me where $html-
> > >css() is described in the Manual? I looked on the Helper page and I
> > see mention of $html functions, but it mentions 4 parms for the css
> > function, so I don't know if this is the correct one.
>
>
> That's the one.  The only "required" parameter is the first one which is,
> as Pablo said, css_file_without_css_extension. If you like, you can supply
> the second parameter (rel type) and html attributes as an array (3rd
> parameter). If the 4th parameter is true, it will return the output.
>
> Hope this helps.
>
> - Gonzalo
>
> >
>


-- 
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Which Cake function should I use to query my data

2007-06-10 Thread alan

Model->findAll($conditions,$fields,'Model.field DESC',
$limit,$page,$recursive);

echo '';
print_r($stuff);
echo '';
exit;

?>

if you don't see all you want to see... get friendly with the cake
associations and update your models.

thanks,
-alan-

On Jun 9, 11:02 am, Alexandre Gonçalves Jacaranda <[EMAIL PROTECTED]>
wrote:
> Sorry, I forgot to tell my associate model:
>
> User: hasmany Presentation;
> Presentation: belongsto User, belongsto Type, hasone Movie;
> File : hasmany Movie , hasmany Sign;
> Type: hasmany Presentation;
> Movie: belongsto File, belongsto Presentation, hasmany Sign, hasmany
> Text;
> Sign: belongsto File, belongsto Movie;
> Text: belongsto Movie
>
> My associations is like
>
>  File
>/ \
>  / \
> User -> Presentation -> Movie -> Sign
> /\
> Type  <-- --> Text
>
> Thanks for answer. I'm asking because I only can get what I need
> doing an direct select on my database. I want to display a mini-
> slideshow when user load an movie, changing
> sign( gif or jpeg file) while seeing the movie.
>
> Em 09/06/2007, às 05:33, Dr. Tarique Sani escreveu:
>
>
>
> > On 6/9/07, Alexandre Gonçalves Jacaranda <[EMAIL PROTECTED]> wrote:
>
> >> Hello, everybody!!
>
> >> I've a database model like this :
>
> >> files ( id, path, name);
> >> signs ( id, file_id, time)
>
> > Read uphttp://manual.cakephp.org/chapter/models- pay attention to
> > the associations section
>
> > Tarique
>
> > --
> > =
> > Cheesecake-Photoblog:http://cheesecake-photoblog.org
> > PHP for E-Biz:http://sanisoft.com
> > =


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CSS not working

2007-06-10 Thread Gonzalo Servat
On 6/10/07, pbland <[EMAIL PROTECTED]> wrote:
>
>
> Pablo,
>
> Great, that worked! Thanks for the help. Can you tell me where $html-
> >css() is described in the Manual? I looked on the Helper page and I
> see mention of $html functions, but it mentions 4 parms for the css
> function, so I don't know if this is the correct one.


That's the one.  The only "required" parameter is the first one which is, as
Pablo said, css_file_without_css_extension. If you like, you can supply the
second parameter (rel type) and html attributes as an array (3rd parameter).
If the 4th parameter is true, it will return the output.

Hope this helps.

- Gonzalo

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



othauth permissions

2007-06-10 Thread Oneill

Hello all,

I was wondering if somebody know how you can add/edit/delete groups
permissions online with othauth Hope somebody does...

Ciao


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Trouble in mutil-apps in cake

2007-06-10 Thread grayblur

btw:
my app structure:
  htdocs/
 app/
 appe/
 cake/
 index.php
 english.php

and the rewrite mod has been disabled.

Helpers can't work too, I set $html->webroot = '/appe/webroot' to
tackle the problem,
$html->image('logo/index.jpg'); => 
so does the javascript helper.

It makes me really upset...

I prefer Symfony..:(`


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: first baked cake using 1.2

2007-06-10 Thread zespolony

That was bug in core. It was fixed one day ago so it should work now.


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: first baked cake using 1.2

2007-06-10 Thread zespolony

It has been recently fixed.

On Jun 10, 5:36 am, MercedesAMG <[EMAIL PROTECTED]> wrote:
> Finally got console to work like it should
>
> Also was able to bake a controller and a model for a very simple 2
> field table ( a test)
>
> got the following error when baking the View
>
> --
> Notice: Undefined property:  ViewTask::$Controller in /var/www/cake12/
> cake/console/libs/tasks/view.php on line 144
>
> Fatal error: Call to a member function getName() on a non-object in /
> var/www/cake12/cake/console/libs/tasks/view.php on line 144
>
> cant find solution or problem
>
> anybody know what I did wrong
> 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: first baked cake using 1.2

2007-06-10 Thread MercedesAMG



turns out i had a nightly build that was dated June 5th or something
like that but the fix was done in version 1.2.0.5156

and the code was changed from a reported bug in the actual bake.php
file

Sorry to bother u but maybe somebody will have same problem


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Trouble in mutil-apps in cake

2007-06-10 Thread grayblur

Hi,Here is my trouble:
 I create two apps( app, appe)
there can visit through index.php and english.php
 the url : http://mydomain/index.php can work, so do the /index.php/
news

but this breaks ,
  url: /english.php will show the default routing.
but,/english.php/new won't work it just show default routing page.
here is my dump info:

defaultcontroller Object
(
[_log] =>
[name] => Default
[here] => /english.php/
[webroot] => /english.php/service/view/1appe/webroot/
[action] => index
   .
}

[params] => Array
(
[pass] => Array
(
)

[controller] => default
[action] => index
[url] => Array
(
[url] => /
)

[bare] => 0
[webservices] =>
[plugin] =>
)

I have set the APP_DIR in english.php,
did I miss something more configuration, or have I done something
wrong?..

thx .

regards, grayblur


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---