Re: Regarding http://cakephp.org page layout

2007-02-09 Thread Dr. Tarique Sani

On 2/9/07, nate <[EMAIL PROTECTED]> wrote:
> But as for your client, I propose an alternative solution: tell them
> you have chosen a different framework, but then use Cake anyway.

I wouldn't recommend lying to a client.

> they are dense enough to believe that a server-side framework has any
> bearing whatsoever on client-side design, they won't know the
> difference.

OTOH I would just dump such a client

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: updating without using url.

2007-02-09 Thread Grant Cox

PHP is server side, Javascript is client side.  Your Javascript is
executing on your local machine, on the result of the PHP output.

In your example when the PHP script in the  is
executed, the $pass variable is 2.  So, the HTML output (where the
Javascript executes) will only ever have "Loading...2".

Your options are to either update the content of your div with
Javascript, or to generate two divs each with their own content (the
latter is simpler).


--~--~-~--~~~---~--~~
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: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-09 Thread Dr. Tarique Sani

On 2/9/07, Max <[EMAIL PROTECTED]> wrote:
>
> I have successfully done this. Will post soon on my blog...

Hurray!! Do post a link when you post to your blog

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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: How to use smarty cache in cakephp?

2007-02-09 Thread rollenc

Thx, But I am puzzle in  part cache.
I type this code:
controler:
var $view = 'Smarty';
var $helpers = array('Cache');
var $cacheAction = array('index' => 86400, 'view/' => 3600);
function index()
{
$this->set('posts', $this->Test->findAll());
$this->set('time', date('H:i:s', time()));
}
In View
{#foreach from=$posts item=post#}
{#$post.Test.title#}
{#$post.Test.body#}

{#foreachelse#}
There is nothing
{#/foreach#}


{#$time#}


Website: {#$smarty.server.SERVER_NAME#}

Full page is cached. but nocache tag is ommited.
And the cache file as this:
  
  03:46:08
  

These is no parse.And the cache is no useful.

What is correct?



On 2月10日, 上午3时12分, "lloydhome" <[EMAIL PROTECTED]> wrote:
> I have a SmartyView that handles caching by utilizing cake's page
> caching.  It handles full-page caching great.  If you use
>  it should work as long as the tag is in the layout
> file.  I have need for a cachable, non-static ajax call with no layout
> and this solution nor cake's default works for me.  So I have an idea
> for that too but you'll need to be patient.
>
> The file is athttp://www.lloydhome.com/files/smarty.ph_.txtand needs
> to be renamed and placed in your /app/views directory.
>
> To use in your controller:
>
> var $view = 'Smarty';
> var $cacheAction = 300;  // 5 minutes
> var $helpers = array('Cache');
>
> HTH,
>
> David Lloyd
> --
> lloydhome consultinghttp://lloydhome.com
>
> On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > I also use Smarty but since it is a View and not recognized by the
> > core it is not advantageous to use its caching.  I would argue that
> > this it actually better to not try without good reason.  The problem
> > with this approach is the logic still occurs in the controller ad the
> > only time savings is in rendering the view.
>
> > The SmartyView doesn't cache the output the way cake wants it but I
> > have some ideas on that I am going to try...  It will be easy to setup
> > whole page caching but using  will be harder.  I'll post
> > back with what I find.
>
> > David Lloyd
> > --
> > lloydhome consultinghttp://www.lloydhome.com
>
> > On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > I combine smarty & cackephp followng this article: http://
> > > projects.simpleteq.com/CakePHP/smarty.html
> > > but I don't know how to use smarty cache .
> > > Call for help. 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
-~--~~~~--~~--~--~---



Experienced NYC area Baker Needed

2007-02-09 Thread Steven

I need an *experienced* CakePHP baker to consult on a startup. Must be
willing to work with and advise a second consultant who is experienced
at php, but new to CakePHP.

Email resume and hourly pay requirements to
[EMAIL PROTECTED] Please also send a few sentences
describing your cakephp experience.

Tri-state area ONLY. We will on occasion meet as a team. Time
commitment ~10-15 hours monthly.

Steven


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



updating without using url.

2007-02-09 Thread skyblueink

 'loading',
'complete' => "Element.show('loading')"
);
echo $javascript->event('window','load',$ajax-
>remoteFunction($options),false);
?>

 'loading',
'complete' => "Element.show('loading')"
);
echo $javascript->event('window','load',$ajax-
>remoteFunction($options),false);
?>
Loading...

The preceding code consists of two PHP part and one div.
What I expected was "Loading...1" shows and next "Loading...2" shows,
but actually  "Loading...2" showsed and "Loading...2" showed again.

1. Why the first PHP part in not executed?
2. Why is the value of $pass not changed? It keeps to be 2.


--~--~-~--~~~---~--~~
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: UTF8 and CakePHP - Best Practices

2007-02-09 Thread magnetism

I use utf with mysql4.1 and greek characters with no problem. However
some `hacking` is required. Check this:
http://phpmysqlapache.com/wordpress/2006/09/08/cakephp-mysql-41-and-utf8-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
-~--~~~~--~~--~--~---



Re: UTF8 and CakePHP - Best Practices

2007-02-09 Thread Grant Cox

I use the following.  I believe I copied most of it from Felix or
Daniel, but it was a while ago and I can't really remember :)


function title_slug( $title )
{
$slug = $title;

$bad =
array(  
'Š','Ž','š','ž','Ÿ','À','Á','Â','Ã','Ä','Å','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ñ',

'Ò','Ó','Ô','Õ','Ö','Ø','Ù','Ú','Û','Ü','Ý','à','á','â','ã','ä','å','ç','è','é','ê',

'ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ø','ù','ú','û','ü','ý','ÿ',

'Þ','þ','Ð','ð','ß','Œ','œ','Æ','æ','µ');

$good =
array(  
'S','Z','s','z','Y','A','A','A','A','A','A','C','E','E','E','E','I','I','I','I','N',

'O','O','O','O','O','O','U','U','U','U','Y','a','a','a','a','a','a','c','e','e','e',

'e','i','i','i','i','n','o','o','o','o','o','o','u','u','u','u','y','y',

'TH','th','DH','dh','ss','OE','oe','AE','ae','u');

// replace strange characters with alphanumeric equivalents
$slug = str_replace( $bad, $good, $slug );

return $slug;
}

On Feb 10, 8:13 am, "Alex" <[EMAIL PROTECTED]> wrote:
> Hi Sergei,
>
> Thanks four your answers. It sounds logically.
>
> > As for filenames, I use only basic latin letters.
>
> Do you make a transformation for utf8 letters to their similar latin
> letter like A for Ä and O for Ö?
> Does a function for this task exist?
>
> Greetings,
> Alex


--~--~-~--~~~---~--~~
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: UTF8 and CakePHP - Best Practices

2007-02-09 Thread bernardo



On Feb 9, 8:38 am, "Alex" <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>

> Why does Cakes helpers sometimes use htmlspecialchars and sometimes
> htmlentites? For some german (and other) chars is this very important.
>
> Greetings,
> Alex

Both htmlspecialchars and htmlentities take a third parameter that is
the charset. In cake this parameter is ignored and defaults to
ISO-8859-1. In the case of htmlspecialchars this shouldn't make any
difference, since the characters that are converted (<>&") fall in the
ascii range.
htmlentities as far as I can tell is only used once in the html helper
but is not normally called (and it looks like it has a bug 1.2).
So I doubt this functions are the cause of any encoding problem.
Why do you think they are important for german chars?


--~--~-~--~~~---~--~~
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: Accesing AJAX Form Post data

2007-02-09 Thread Wey

I think I fixed the problem.  I had put the  tags WITHIN a
table, when i moved them outside, everything worked.

On 9 Feb, 10:59, "the_woodsman" <[EMAIL PROTECTED]> wrote:
> "It's making the call, but the form data doesn't seem to be getting to
> the controller. "
>
> Have you tried using FF/FireBug to examine the Ajax call being made,
> and the response you're getting back?
>
> Wood
>
> On Feb 9, 6:45 am, "Wey" <[EMAIL PROTECTED]> wrote:
>
> > Here's the relevant code:
>
> >  > echo $html->formTag('/ShoppingCarts/show','post');
>
> > /* ... form fields ... */
>
> > echo $ajax->submit('Update Quantity', array('url' => '/ShoppingCarts/
> > update_quantity', 'complete' => 'contents'));
> > ?>
> > 


--~--~-~--~~~---~--~~
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: UTF8 and CakePHP - Best Practices

2007-02-09 Thread Alex



Hi Sergei,

Thanks four your answers. It sounds logically.

> As for filenames, I use only basic latin letters.

Do you make a transformation for utf8 letters to their similar latin
letter like A for Ä and O for Ö?
Does a function for this task exist?

Greetings,
Alex



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How do I set up this relationship?

2007-02-09 Thread Christoph

I need to get it so that a table joins on itself but in such a way
that it's not using the PK <=> FK fields for the join.  Here is what
the query would look like if I ran it manually in MySQL:

SELECT
  game_pieces_view.piece_name,
  CrosstradeCollection.user_id,
  CrosstradeCollection.owned,
  CrosstradeCollection.wanted
FROM
  collections CrosstradeCollection
INNER JOIN
  collections collections
  ON
collections.game_piece_id = CrosstradeCollection.game_piece_id
INNER JOIN
  game_pieces_view
  ON
game_pieces_view.id = CrosstradeCollection.game_piece_id
WHERE
  collections.user_id = 'current_user'
AND
  CrosstradeCollection.user_id != 'current_user'

This works fine and returns the rows I expect.  So now on to the
model...

Here is how I have my model set up:

var $belongsTo = array(
  'GamePiecesView' =>
array('className' => 'GamePiecesView',
'foreignKey' => 'game_piece_id',
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'dependent' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),

  'CrosstradeCollection' =>
array('className' => 'Collection',
'foreignKey' => 'game_piece_id',
'conditions' => 'CrosstradeCollection.user_id !=
Collection.user_id',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'dependent' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
  );

I tried to set up 'CrosstradeCollection' under $hasMany but that
didn't seem to work.  Setting it up under $belongsTo makes it a LEFT
JOIN and not an INNER JOIN, which is what I'm trying to get.  In any
case, below is the query that CakePHP generates using the defined
relationship when I use this ->findAll():

$collections = $this->Collection-
>findAll( 'CrosstradeCollection.user_id = \'current_user\' AND
collections.user_id != \'current_user\'', NULL, NULL, 10 );

SELECT `Collection`.`id`, `Collection`.`user_id`,
`Collection`.`game_piece_id`, `Collection`.`owned`,
`Collection`.`wanted`, `Collection`.`created`,
`Collection`.`modified`, `CrosstradeCollection`.`id`,
`CrosstradeCollection`.`user_id`,
`CrosstradeCollection`.`game_piece_id`,
`CrosstradeCollection`.`owned`, `CrosstradeCollection`.`wanted`,
`CrosstradeCollection`.`created`, `CrosstradeCollection`.`modified` ,
`GamePiecesView`.`id`, `GamePiecesView`.`game_name`,
`GamePiecesView`.`set_name`, `GamePiecesView`.`piece_name`,
`GamePiecesView`.`set_piece_name`, `GamePiecesView`.`piece_type`,
`GamePiecesView`.`piece_sub_type`,
`GamePiecesView`.`piece_description`,
`GamePiecesView`.`piece_flavor_text`, `GamePiecesView`.`piece_artist`,
`GamePiecesView`.`piece_rarity` FROM `collections` AS `Collection`
LEFT JOIN `collections` AS `CrosstradeCollection` ON
`Collection`.`game_piece_id` = `CrosstradeCollection`.`id` LEFT JOIN
`game_pieces_view` AS `GamePiecesView` ON `Collection`.`game_piece_id`
= `GamePiecesView`.`id` WHERE `CrosstradeCollection`.`user_id` =
'current_user' AND `collections`.`user_id` != 'current_user' LIMIT 10

The error I get here is

1054: Unknown column 'collections.user_id' in 'where clause'

Also, it's trying to join the tables doing

`Collection`.`game_piece_id` = `CrosstradeCollection`.`id`

but I need it to be

`Collection`.`game_piece_id` = `CrosstradeCollection`.`game_piece_id`

Is what I am trying to do even possible?  If so, how can it be done?

thnx,
Christoph


--~--~-~--~~~---~--~~
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: Associations trouble

2007-02-09 Thread djiize

in registered_states table, try state_id (not plural)

On 9 fév, 19:10, "Erich C. Beyrent" <[EMAIL PROTECTED]> wrote:
> I am trying to link two tables, states and registered_states.
>
> The states table has id, name, and code as fields, and registered_states
> has states_id.
>
> I defined as hasMany association in the registered_states model, and now
> want to produce a list of all the registered states and their associated
> state.
>
> I'm getting the list of registered states, but no state data:
>
> Array
> (
>  [0] => Array
>  (
>  [RegisteredState] => Array
>  (
>  [states_id] => 10
>  )
>
>  [State] => Array
>  (
>  )
>
>  )
> )
>
> What I'm particularly interested in retrieving is the state code for
> each registered state.
>
> How can I accomplish this?
>
> -Erich-


--~--~-~--~~~---~--~~
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: Change content on frontpage ?

2007-02-09 Thread Mr.Blue

Hi David,

Thank you so much for your valuable advice. You were right, I just
need to config routes.php to achieve my needs.

Regards

On Feb 9, 8:52 pm, "lloydhome" <[EMAIL PROTECTED]> wrote:
> Putting code in app/pages/... is not going to get you your notes as
> the NotesController (or some other controller you write) will need to
> be called.  As is, the PagesController is being called and it does not
> get your notes.
>
> Following the tutorial you mentioned, you would want a page in /app/
> views/notes/default.thtml  and a method in NotesController called
> default() to get the notes.  Or if you want to use the scaffold
> generated index, change your application app/config/routes.php to
> point "/" to "/notes/index".  All of this is explained in the 
> manualhttp://manual.cakephp.org- you really need to read it through several
> times to catch everything.
>
> HTH,
>
> David Lloyd
> --
> lloydhome consultinghttp://lloydhome.com
>
> On Feb 9, 7:02 am, "Mr.Blue" <[EMAIL PROTECTED]> wrote:
>
> > HI there,
>
> > Would you like to show me how could I use $scaffold on front page of
> > Cake PHP. I place this code on /app/pages/default.html in order to
> > list the notes on the front page. Such 
> > as:http://localhostinsteadofhttp://localhost/notesasusual
> > (I follow this tutorial:http://www.sitepoint.com/article/application-
> > development-cakephp)
>
> > My Notes
> > 
> >
> >Id
> >Title
> >Created
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >  
> >
> > 
>
> > However, cakePHP threw some errors. I read manual carefully, but it
> > doesn't mention how could I implement database to the front page.
> > Please help me.
>
> > Thank you very much !
> > Best Regards


--~--~-~--~~~---~--~~
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: selecting date range

2007-02-09 Thread jeroen

That works, thank you very much!

jeroen

On Feb 7, 3:28 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Funny, I just did something similar to this yesterday :)
>
> // used because i had multiple conditions.
> $conditions = array();
>
> // if you're using DATETIME like the created and updated fields do,
> you
> // should even be able to leave off the H:m:s if time is irrelevant
> $conditions[] = "`Course`.`date` > " . "'" . date( 'Y-m-d H:m:s' ) .
> "'";
>
> $this->set('courses', $this->Course->findAll($conditions));
>
> And if you want, say, the last 7 days, you can use strtotime() to
> provide different date ranges.  I make no claims as to speed, but it
> "works for me".
>
> There is more information in the manual under "Complex Find
> Conditions" here:http://manual.cakephp.org/chapter/models
>
> Best of luck,
> Ralph
>
> On Feb 6, 4:10 pm, "jeroen" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm pretty new to cakephp, so the answer is probably pretty obvious,
> > but I'm struggling on this for too long now...
>
> > One of my models (say 'Course') has a date field, and in the index()
> > method where I would like to pass only those records which have a date
>
> > > 'now'.
>
> > However I have no idea how to define such a constraint. From what I
> > found by googling around, I assembled the following, but it does not
> > work (no records selected):
>
> > function index() {
> > $constraint['Course.date'] = ' > '. date('Y-m-d H:i') ';
> > $this->set('courses', $this->Course->findAll($constraint));
> > }
>
> > I'm using 1.1.13.4450
>
> > Any hints are appreciated,
> > jeroen


--~--~-~--~~~---~--~~
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: How to use smarty cache in cakephp?

2007-02-09 Thread lloydhome

I have a SmartyView that handles caching by utilizing cake's page
caching.  It handles full-page caching great.  If you use
 it should work as long as the tag is in the layout
file.  I have need for a cachable, non-static ajax call with no layout
and this solution nor cake's default works for me.  So I have an idea
for that too but you'll need to be patient.

The file is at http://www.lloydhome.com/files/smarty.ph_.txt and needs
to be renamed and placed in your /app/views directory.

To use in your controller:

var $view = 'Smarty';
var $cacheAction = 300;  // 5 minutes
var $helpers = array('Cache');

HTH,

David Lloyd
--
lloydhome consulting
http://lloydhome.com

On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
> I also use Smarty but since it is a View and not recognized by the
> core it is not advantageous to use its caching.  I would argue that
> this it actually better to not try without good reason.  The problem
> with this approach is the logic still occurs in the controller ad the
> only time savings is in rendering the view.
>
> The SmartyView doesn't cache the output the way cake wants it but I
> have some ideas on that I am going to try...  It will be easy to setup
> whole page caching but using  will be harder.  I'll post
> back with what I find.
>
> David Lloyd
> --
> lloydhome consultinghttp://www.lloydhome.com
>
> On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > I combine smarty & cackephp followng this article: http://
> > projects.simpleteq.com/CakePHP/smarty.html
> > but I don't know how to use smarty cache .
> > Call for help. 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: mod rewrite issue with 1and1 servers

2007-02-09 Thread [EMAIL PROTECTED]

Awesome, glad you got this working!  I am going to mark these posts as
excellent so that others with the same problem may find a solution.

=D

On Feb 9, 8:15 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> Thanks PaulV.  Thats hitting the nail squarely on the head. And right in the
> sweet spot too.
>
> worked first time.  Although since I baked it in a project directory I only
> needed the last two .htaccess
>
>  *"mod_rewrite is voodoo. Damned cool voodoo, but still voodoo. ''*
>
> Brian Moore
>  [EMAIL PROTECTED]
>
> Thats the icing on the cake, for the day.
> Bake on!
>
> On 09/02/07, PaulV <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am also using the Business Pro account from UK 1&1 and also had the
> > same problems with mod_rewrite.
>
> > I fixed mine by using the following .htaccess files
>
> > /.htaccess
>
> > 
> >RewriteEngine on
> >RewriteRule^$ /app/webroot/[L]
> >RewriteRule(.*) /app/webroot/$1 [L]
> > 
>
> > /app/.htaccess
>
> > 
> > RewriteEngine on
> > RewriteRule^$/app/webroot/[L]
> > RewriteRule(.*) /app/webroot/$1[L]
> > 
>
> > /app/webroot/.htaccess
>
> > 
> > RewriteEngine On
> > RewriteCond %{REQUEST_FILENAME} !-d
> > RewriteCond %{REQUEST_FILENAME} !-f
> > RewriteRule ^(.*)$ /app/webroot/index.php?url=$1 [QSA,L]
> > 
>
> > I am also told by someone else (thanks Jeremy) who got this to work a
> > while ago that the following work, but I have not tried them:
>
> > root .htaccess:
>
> >RewriteEngine on
> >RewriteBase /
> >RewriteRule^$ app/webroot/[L]
> >RewriteRule(.*) app/webroot/$1 [L]
> >AddType x-mapp-php5 .php
>
> > here is the one in my app folder:
>
> > RewriteEngine on
> > RewriteBase /
> > RewriteRule^$webroot/[L]
> > RewriteRule(.*) webroot/$1[L]
>
> > and here is the one in my app/webroot folder:
>
> > RewriteEngine On
> > RewriteBase /
> > RewriteCond %{REQUEST_FILENAME} !-d
> > RewriteCond %{REQUEST_FILENAME} !-f
> > RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Associations trouble

2007-02-09 Thread Erich C. Beyrent

I am trying to link two tables, states and registered_states.

The states table has id, name, and code as fields, and registered_states 
has states_id.

I defined as hasMany association in the registered_states model, and now 
want to produce a list of all the registered states and their associated 
state.

I'm getting the list of registered states, but no state data:

Array
(
 [0] => Array
 (
 [RegisteredState] => Array
 (
 [states_id] => 10
 )

 [State] => Array
 (
 )

 )
)

What I'm particularly interested in retrieving is the state code for 
each registered state.

How can I accomplish this?

-Erich-

--~--~-~--~~~---~--~~
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: Getting data from other conrtoller fails

2007-02-09 Thread zafoeta

I was definitely the confused one (or better, the newbie :) )
Thanks a lot!
This helped!


--~--~-~--~~~---~--~~
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: why use jQuery instead of Prototype

2007-02-09 Thread joel

You know, I really like MooTools, and use it in a handful of sites.
http://mootools.net

Has anyone use MooTools and jQuery to compare them?

-Joel


--~--~-~--~~~---~--~~
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: why use jQuery instead of Prototype

2007-02-09 Thread joel

You know, I really like MooTools, and use it in a handful of sites.
http://mootools.net

Has anyone use MooTools and jQuery to compare them?

-Joel


--~--~-~--~~~---~--~~
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: core.po

2007-02-09 Thread Mariano Iglesias

Start by reading the gettext manual:

http://www.gnu.org/software/gettext/manual/gettext.html

Also refer to this thread on how to create your po language packs for
CakePHP 1.2:

http://groups.google.com/group/cake-php/browse_thread/thread/996b916448eb9d6
a

(browse to the end of the thread)

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Ámon Tamás
Enviado el: Viernes, 09 de Febrero de 2007 09:21 a.m.
Para: Cake PHP
Asunto: core.po

How can I make core.po and core.mo (or default,pot) files to my application?


--~--~-~--~~~---~--~~
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: mod rewrite issue with 1and1 servers

2007-02-09 Thread Sam Sherlock
Thanks PaulV.  Thats hitting the nail squarely on the head. And right in the
sweet spot too.

worked first time.  Although since I baked it in a project directory I only
needed the last two .htaccess


 *"mod_rewrite is voodoo. Damned cool voodoo, but still voodoo. ''*
>
Brian Moore
 [EMAIL PROTECTED]

Thats the icing on the cake, for the day.
Bake on!

On 09/02/07, PaulV <[EMAIL PROTECTED]> wrote:
>
>
> I am also using the Business Pro account from UK 1&1 and also had the
> same problems with mod_rewrite.
>
> I fixed mine by using the following .htaccess files
>
> /.htaccess
>
> 
>RewriteEngine on
>RewriteRule^$ /app/webroot/[L]
>RewriteRule(.*) /app/webroot/$1 [L]
> 
>
> /app/.htaccess
>
> 
> RewriteEngine on
> RewriteRule^$/app/webroot/[L]
> RewriteRule(.*) /app/webroot/$1[L]
> 
>
> /app/webroot/.htaccess
>
> 
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ /app/webroot/index.php?url=$1 [QSA,L]
> 
>
> I am also told by someone else (thanks Jeremy) who got this to work a
> while ago that the following work, but I have not tried them:
>
> root .htaccess:
>
>RewriteEngine on
>RewriteBase /
>RewriteRule^$ app/webroot/[L]
>RewriteRule(.*) app/webroot/$1 [L]
>AddType x-mapp-php5 .php
>
> here is the one in my app folder:
>
> RewriteEngine on
> RewriteBase /
> RewriteRule^$webroot/[L]
> RewriteRule(.*) webroot/$1[L]
>
> and here is the one in my app/webroot folder:
>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>
>
> >
>

--~--~-~--~~~---~--~~
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: Accesing AJAX Form Post data

2007-02-09 Thread the_woodsman


"It's making the call, but the form data doesn't seem to be getting to
the controller. "

Have you tried using FF/FireBug to examine the Ajax call being made,
and the response you're getting back?

Wood


On Feb 9, 6:45 am, "Wey" <[EMAIL PROTECTED]> wrote:
> Here's the relevant code:
>
>  echo $html->formTag('/ShoppingCarts/show','post');
>
> /* ... form fields ... */
>
> echo $ajax->submit('Update Quantity', array('url' => '/ShoppingCarts/
> update_quantity', 'complete' => 'contents'));
> ?>
> 


--~--~-~--~~~---~--~~
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: Authentication against a postgreSQL database

2007-02-09 Thread daveg

Yes, that's what I want. For me, this is a good idea since you have
the following advantages:
- Restrict users to certain tables and columns on a database level
instead on application level providing security in case a user
circumvents the application level security.
- No duplication of authentication/ACL functionality
- Possibility to use all kinds of functionality in the database using
PL/pgSQL with regards to storing record-changes in subtables,
timestamps and other user/security related stuff
- Possibility for accessing the database with other frontends (like MS
Access using ODBC) without needing to duplicate authentication code/
functionality in those front-ends
- If you use a general database user, you give them more permissions
in a database server then when using separate users


--~--~-~--~~~---~--~~
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: Enterprise features with cakephp

2007-02-09 Thread nate

On Feb 9, 6:17 am, "alew3" <[EMAIL PROTECTED]> wrote:
> Thanks to all the quick replies. I guess cake is up to the job on all
> my main requirements. A nice Continuous Integration tool is the
> missing ingredient at the moment. Maybe a project on this could be
> started?

Absolutely.  Are you volunteering to head up that project?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Ajax form question

2007-02-09 Thread MrTufty

Hi guys, thought I'd throw this out here because I simply can't get my
head around it.

I currently have user authentication working on my site, after my
problems the other day with validation. I'm happy with the way that
works, except for one thing.

In the header of my site I have a couple of links - one points to the
login page, the other to the signup page. What I want to be able to do
is click on each of those, and pop up a modal Ajax dialog box (think
Greybox style), containing the form. The user should then be able to
submit that, if there's errors it'll show them in that box, if not,
the user will be created/logged in and then redirected back to where
they were.

The part I'm having trouble with is redirection from an Ajax form. The
way I understand it is if I do the redirection in the controller
actions the way I normally would, only the Ajax div will be getting
updated, which is not what I want.

Am I right about this? How could I make it work the way I want?

Any help is much appreciated, as always. My next job is to tackle ACL
and the like, that should be fun. :|


--~--~-~--~~~---~--~~
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: Getting data from other conrtoller fails

2007-02-09 Thread Grant Cox

As the_woodsman said, requestAction does not return all the set()
values.  But it does return the returned value.  So if your index
action was

function index(){
$locations = $this->Location->findAll();
$this->set('locations', $locations);
return $locations;
}

then you would get what you expect from the requestAction.

But as mentioned, if all you want is a findAll, instance the model
locally and do that.  requestAction should only be used when you
really need the result of a controller action, because the controller
is doing a substantial amount of work that is not feasible to relocate
into a model, app_controller, or a component.


--~--~-~--~~~---~--~~
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: Regarding http://cakephp.org page layout

2007-02-09 Thread nate

We'll get around to fixing the site in IE7 at some point (hopefully
soon), but keep in mind that the idea of "designing" for IE7 is still
somewhat of a moving target.

But as for your client, I propose an alternative solution: tell them
you have chosen a different framework, but then use Cake anyway.  If
they are dense enough to believe that a server-side framework has any
bearing whatsoever on client-side design, they won't know the
difference.

On Feb 9, 4:54 am, "mutabor" <[EMAIL PROTECTED]> wrote:
> Hi,
> We have this situation: we are talking to the client about using Cake
> in his project development. The answer was: "I do not think this is
> reliable framework, just look at their site (IE7)".
> Although we keep on telling him that this fact does not matter, could
> Cake Dev Team fix layout problems in IE7? I think this will definitely
> help Cake (and us also :) )


--~--~-~--~~~---~--~~
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: automatically building documentation

2007-02-09 Thread the_woodsman

Our setup:

We use PHPDoc for generating our documentation, which is automated and
refreshes the output nightly, and we link to these in the project's
wiki.

Generally, we keep the PHPDoc for low level stuff (classes, methods,
members, etc) use the WIki for high level documentation (how classes
work together, sequence of method calls, etc).

Hope that helps.

Wood


On Feb 9, 1:07 pm, "c1sc0" <[EMAIL PROTECTED]> wrote:
> Hi bakers,
>
> As good agile developers we're trying to automate testing, building &
> documenting our cake applications. I'm stumbling into a couple of
> questions:
>
> * Developer Documentation
> ** What is cakephp using to build the 'API' documentation? phpdoc?
> ** Anyone care to comment on how they maintain (developer)
> documentation in their projects?
>
> * End User Documentation
> ** Currently our approach is to build a wiki page for each project, is
> this a valid approach?
> ** What about integrating e.g. dokuwiki (www.splitbrain.org/projects/
> dokuwiki ) in cakephp?
>
> Cheers - Francis Dierick


--~--~-~--~~~---~--~~
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: Getting data from other conrtoller fails

2007-02-09 Thread the_woodsman

I think one of us is confused, but I'm not sure who ;)

Request action doesn't return the variables that happen to get 'set'
in that action - I mean, what if it sets 50 variables for the view,
would it return all of them in some crazy, nested array?

A better way to do what you're attempting may be to simply use the
Locations model in your Users controller, with the member variable:

var $uses=array('User', 'Location');

then you can call $this->Location->findAll() in the Users controller
too!






On Feb 9, 12:09 pm, "zafoeta" <[EMAIL PROTECTED]> wrote:
> Hi cake-php group,
>
> I am experiencing a rather strange problem.
> I am a newbie in php and cake-php so please forgive me if this should
> be a basic question.
> I followed the cakephp manual, but i cannot find the error.
>
> My problem:
> I have a controller for locations which looks like this:
>
>  class LocationsController extends AppController
> {
> var $name = 'Locations';
> //var $scaffold;
>
> function index()
> {
> $this->set('locations',$this->Location->findAll());
> }
>
> function view($id)
> {
> $this->set('location',$this->Location->findById($id));
> }}
>
> ?>
> Further I have a controller for users which looks like this:
>  class UsersController extends AppController
> {
> var $name = 'Users';
> //var $scaffold;
>
> function index()
> {
> $this->set('users',$this->User->findAll());
> 
> $this->set('locations',$this->requestAction('/locations/index'));
> }}
>
> ?>
>
> As you can see above, the locations data should now be accessible in
> the users view.
> But if try a trivial loop over the locations in /users/index.thtml as
> follows
>  echo $location['Location']['location'];
> endforeach;?>
>
> I get the warning:
> Warning: Invalid argument supplied for foreach() in /var/www/html/cake/
> app/views/users/index.thtml on line 42
>
> I do not see any syntax error, also the locations view looks ok and
> the code works there.


--~--~-~--~~~---~--~~
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: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-09 Thread Max

I have successfully done this. Will post soon on my blog...

On Feb 6, 8:48 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 2/7/07, timblack1 <[EMAIL PROTECTED]> wrote:
>
>
>
> > The reason is that Joomla components ARE applications.  They run in a
>
> Excellent reasons - Do let us know of your progress in making CakePHP
> applications into Joomla components
>
> Cheers
> Tarique
>
> --
> =
> PHP for E-Biz:http://sanisoft.com
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> =


--~--~-~--~~~---~--~~
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: Associations stored in a table?!

2007-02-09 Thread Max

Hi Mindchanger,

I will be interested in knowing more about the main requirements
behind this... It looks interesting.

On Feb 9, 1:50 am, "mindcharger" <[EMAIL PROTECTED]> wrote:
> Hi Hawk,
>
> I'm currently developing a system that shares that "dynamic table
> creation" requirement with yours.
> As far as I understand the problem, it's more a DB issue than a CAKE
> issue.
>
> I don't know if it will help you, but I will try to explain how I did
> it.
>
> 1) I have a table on the DB that "describes" the other tables I
> create. To this table I call a "descriptor". Assume it has several
> columns, but one of them is called "table_name".
> 2) Creating a new table encompasses two steps:
>   i) Add a record to the "descriptor" table
>  ii) Create the proper table
> 3) To access the table you must do 2 DB accesses:
>  i) Get all the descriptor records into a HTML select-box or something
> (Ex.: "SELECT table_name FROM descriptors;")
>  ii) Get the chosen table into a var and then acessing the desired
> table
> (Ex.:
> $table_name = ;
> $query = "SELECT * FROM $table_name;";
> $data = $this->{MODEL-NAME}->query($query);
> )
>
> The "$data = $this->{MODEL-NAME}->query($query);" allows you to force
> the Model to execute your query.
>
> As for the model, I found that when I want to use this "dynamic table
> device" I have no use for the associated table, so I define:
>
> $useTable=false;
>
> ...on the model.
>
> I hope it helps you. If the explanation was not clear or if you have
> any other doubt feel free to ask me.
>
> Good luck!
>
> On Feb 8, 9:53 am, "Hawk|" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > i wonder if it would be possible to store the associations in a table
> > instead of storing them in the models/model.php file. So it would be
> > more flexible. I need to create  tables dynamic and associate them on
> > the fly with others and i want to do this without touching the model
> > file itself.
> > Someone allready is using a similar method?
> > or someone has an idea how to do this?.
> > It would be a great help for me to get some response to this issue.
>
> > Thx a lot Hawk.


--~--~-~--~~~---~--~~
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: Change content on frontpage ?

2007-02-09 Thread lloydhome

Putting code in app/pages/... is not going to get you your notes as
the NotesController (or some other controller you write) will need to
be called.  As is, the PagesController is being called and it does not
get your notes.

Following the tutorial you mentioned, you would want a page in /app/
views/notes/default.thtml  and a method in NotesController called
default() to get the notes.  Or if you want to use the scaffold
generated index, change your application app/config/routes.php to
point "/" to "/notes/index".  All of this is explained in the manual
http://manual.cakephp.org - you really need to read it through several
times to catch everything.

HTH,

David Lloyd
--
lloydhome consulting
http://lloydhome.com


On Feb 9, 7:02 am, "Mr.Blue" <[EMAIL PROTECTED]> wrote:
> HI there,
>
> Would you like to show me how could I use $scaffold on front page of
> Cake PHP. I place this code on /app/pages/default.html in order to
> list the notes on the front page. Such as:http://localhostinstead 
> ofhttp://localhost/notesas usual
> (I follow this tutorial:http://www.sitepoint.com/article/application-
> development-cakephp)
>
> My Notes
> 
>
>Id
>Title
>Created
>
>
>
>
>
>
>
>
>
>
>  
>
> 
>
> However, cakePHP threw some errors. I read manual carefully, but it
> doesn't mention how could I implement database to the front page.
> Please help me.
>
> Thank you very much !
> Best Regards


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Getting data from other conrtoller fails

2007-02-09 Thread zafoeta

Hi cake-php group,

I am experiencing a rather strange problem.
I am a newbie in php and cake-php so please forgive me if this should
be a basic question.
I followed the cakephp manual, but i cannot find the error.

My problem:
I have a controller for locations which looks like this:

set('locations',$this->Location->findAll());
}

function view($id)
{
$this->set('location',$this->Location->findById($id));
}
}
?>
Further I have a controller for users which looks like this:
set('users',$this->User->findAll());

$this->set('locations',$this->requestAction('/locations/index'));
}
}
?>

As you can see above, the locations data should now be accessible in
the users view.
But if try a trivial loop over the locations in /users/index.thtml as
follows


I get the warning:
Warning: Invalid argument supplied for foreach() in /var/www/html/cake/
app/views/users/index.thtml on line 42

I do not see any syntax error, also the locations view looks ok and
the code works there.


--~--~-~--~~~---~--~~
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: mod rewrite issue with 1and1 servers

2007-02-09 Thread PaulV

I am also using the Business Pro account from UK 1&1 and also had the
same problems with mod_rewrite.

I fixed mine by using the following .htaccess files

/.htaccess


   RewriteEngine on
   RewriteRule^$ /app/webroot/[L]
   RewriteRule(.*) /app/webroot/$1 [L]


/app/.htaccess


RewriteEngine on
RewriteRule^$/app/webroot/[L]
RewriteRule(.*) /app/webroot/$1[L]
 

/app/webroot/.htaccess


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app/webroot/index.php?url=$1 [QSA,L]


I am also told by someone else (thanks Jeremy) who got this to work a
while ago that the following work, but I have not tried them:

root .htaccess:

   RewriteEngine on
   RewriteBase /
   RewriteRule^$ app/webroot/[L]
   RewriteRule(.*) app/webroot/$1 [L]
   AddType x-mapp-php5 .php

here is the one in my app folder:

RewriteEngine on
RewriteBase /
RewriteRule^$webroot/[L]
RewriteRule(.*) webroot/$1[L]

and here is the one in my app/webroot folder:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



automatically building documentation

2007-02-09 Thread c1sc0

Hi bakers,

As good agile developers we're trying to automate testing, building &
documenting our cake applications. I'm stumbling into a couple of
questions:

* Developer Documentation
** What is cakephp using to build the 'API' documentation? phpdoc?
** Anyone care to comment on how they maintain (developer)
documentation in their projects?

* End User Documentation
** Currently our approach is to build a wiki page for each project, is
this a valid approach?
** What about integrating e.g. dokuwiki ( www.splitbrain.org/projects/
dokuwiki ) in cakephp?

Cheers - Francis Dierick


--~--~-~--~~~---~--~~
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: How to use smarty cache in cakephp?

2007-02-09 Thread lloydhome

I also use Smarty but since it is a View and not recognized by the
core it is not advantageous to use its caching.  I would argue that
this it actually better to not try without good reason.  The problem
with this approach is the logic still occurs in the controller ad the
only time savings is in rendering the view.

The SmartyView doesn't cache the output the way cake wants it but I
have some ideas on that I am going to try...  It will be easy to setup
whole page caching but using  will be harder.  I'll post
back with what I find.

David Lloyd
--
lloydhome consulting
http://www.lloydhome.com


On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
> I combine smarty & cackephp followng this article: http://
> projects.simpleteq.com/CakePHP/smarty.html
> but I don't know how to use smarty cache .
> Call for help. 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: UTF8 and CakePHP - Best Practices

2007-02-09 Thread Sergei

I can say about my practice, though I work with russian letters. I use
MySQL 4.1 as DB which has good UTF8 support. You should set utf8 as
default encoding for new databases and the text fields. When
connecting, you should send "set names 'utf8'" query to DB. I send
this query in patched file dbo_mysqli.php (cake/libs/model/dbo/
folder).

The only problem I noticed is the HTML-link helper, which didn't use
encoding parameter. But I think it's fixed now. Anyway you can open
the source and change it to whatever you like.

As for filenames, I use only basic latin letters.

On 9 Фев., 19:38, "Alex" <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I've often had problems using UTF-8 in CakePHP with german chars in
> HTML and/or filenames. I saw that in some cases (and some html helper
> functions / some file system functions) I have to trick around with
> en-/decoding functions. Are there any Best Practices on how to use
> CakePHP correctly with UTF-8 and how to en-/decode all strings in all
> cases (HTML output, DB access, file access) correctly?
> Why does Cakes helpers sometimes use htmlspecialchars and sometimes
> htmlentites? For some german (and other) chars is this very important.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



core.po

2007-02-09 Thread Ámon Tamás

Hello,

How can I make core.po and core.mo (or default,pot) files to my application?

-- 
Ámon Tamás
http://linkfelho.amon.hu


--~--~-~--~~~---~--~~
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: Enterprise features with cakephp

2007-02-09 Thread alew3

Thanks to all the quick replies. I guess cake is up to the job on all
my main requirements. A nice Continuous Integration tool is the
missing ingredient at the moment. Maybe a project on this could be
started?

Thanks for all the information!
Alessandro

On Feb 9, 1:24 am, Darian Anthony Patrick <[EMAIL PROTECTED]>
wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> alew3 wrote:
> > - is there any continuous integration/automatted build and test
> > solution that works with cakephp / svn?
>
> There currently is no mature PHP-specific CI server like CruiseControl
> is to Java.
>
> I started writing one but haven't gotten very far.
>
> Others have mentioned using ant for build management.  I prefer phing
> for PHP projects.
>
> > - is there support for database migrations (like rails)
>
> I'd really like to see intelligent schema diff'ing in this space to make
> it really easy for developers to work with databases.  This is not at
> all something that has to with CakePHP specifically.  Just a general
> comment.
>
> > - what is the best text editor for using with cake (linux or windows)
>
> I like Komodo IDE 4.0 with xdebug and kcachegrind.
>
> - --
> Darian Anthony Patrick
> Principal, Application Development
> Criticode LLC
> (215) 240-6566 Office
> (866) 789-2992 Facsimile
> Web:  http://criticode.com
> Email: [EMAIL PROTECTED]
> JID:   [EMAIL PROTECTED]
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFFy/doKpzEXPWA4IcRAvPNAJ4jGk93W4jyYJvj6UxvgCCeHawD1QCbBW1U
> 2KVXOn7uCqwUQ4wKB/Q45vc=
> =e/p4
> -END PGP SIGNATURE-


--~--~-~--~~~---~--~~
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: problem using image verification class as vendor

2007-02-09 Thread lukemack

dont worry - i fixed it. putting the full path to the open_basedir
directory and placing the font in there works.

On 9 Feb, 10:38, "lukemack" <[EMAIL PROTECTED]> wrote:
> hi,
>
> i am having a problem using an image verification class as a vendor. i
> can use the class outside of cake fine but when included as a vendor,
> the imagettftext() function within the class will not find its font (i
> have got the font in the same directory as the class, where it should
> be)
>
> can anyone suggest why this might be? you can see it working here:
>
> http://devweb.loopfruit.co.uk/picture.php
>
> and not working here (within cake)
>
> http://cake.lukem.co.uk/users/imageTest
>
> the class code is:
>
> 
> //
> // Verification Image.
> // v0.1
> //
> // An antispam image, generates a code, creates an image out of it,
> and
> // registers this code in a session. User input will be checked
> against
> // this session value. If it is valid no spambot is the one that is
> submitting
> // this form.
> //
> // Install instructions:
> // Put the file of your ttf in the same directory as this script.
> Also note that
> // you call session_start() before using this class in any script.
> //
> //
> // As always I appreciate feedback. So don't hesitate to contact me.
> //
> // author: Jaap van der Meer ([EMAIL PROTECTED])
> //
>
> class verification_image {
> // the image that will be outputted
> private $image;
>
> // the width of the image thats outputted
> private $_w;
>
> // the height of the image that's outputted
> private $_h;
>
> // the color used for the text
> private $text_color;
>
> // the background used in the the text
> private $bg_color;
>
> // the font to be user
> public $ttf_font;
>
> // constructor to setup the image properties
> // width - the width of the image
> // height - the height of the image
> // font - the font to be used, must be in same directory
> function verification_image($width = 120, $height = 40, $font 
> = "")
> {
> $this->_w = $width;
> $this->_h = $height;
>
> $this->ttf_font = $font;
> }
>
> // initializes the image
> function init() {
>
> $this->image = imagecreate($this->_w, $this->_h);
> //$background_color = 
> imagecolorallocate($this->image, 255, 255,
> 255);
> $this->set_bgcolor(255,255,255);
> $this->set_textcolor(255,34,91);
>
> }
>
> // sets the bgcolor
> function set_bgcolor($r,$g,$b) {
> $background_color = imagecolorallocate($this->image, 
> $r, $g, $b);
>
> }
>
> // sets the textcolor
> function set_textcolor($r,$g,$b) {
> $this->text_color = imagecolorallocate($this->image, 
> $r, $g, $b);
> }
>
> // draws the string
> function draw() {
> $code = $this->generate_code();
> // register the code in the session
> $this->register_code($code);
>
> // offsets for x and y in the image
> $x = 1;
> $y = 20;
>
> // walk through each character in the
> // code, to print it
> for($i = 0; $i < strlen($code); $i++) {
>
> $calc_y = rand(200,250) / 10;
> //imagestring( $this->image, 3, $x, $calc_y,  
> $code{$i}, $this->text_color);
>
> $angle = rand(-20,20);
> $this->write_string($x, $calc_y, $angle, 
> $code{$i});
> $x += rand(17,19) ;
> }
>
> }
>
> function write_string($x_offset, $y_offset, $angle, $string) {
>
> // check if a font is set
> if($this->ttf_font != "") {
> // does the file font exist on the 
> server
> if(file_exists($this->ttf_font)) {
> putenv('GDFONTPATH=' . 
> realpath('.'));
> $font_size = 20;
> $grey = 
> imagecolorallocate($this->ima

Change content on frontpage ?

2007-02-09 Thread Mr.Blue

HI there,

Would you like to show me how could I use $scaffold on front page of
Cake PHP. I place this code on /app/pages/default.html in order to
list the notes on the front page. Such as: http://localhost instead of
http://localhost/notes as usual
(I follow this tutorial: http://www.sitepoint.com/article/application-
development-cakephp)

My Notes

   
   Id
   Title
   Created
   
   
   
   
   
   
   
   
   
   
 
   


However, cakePHP threw some errors. I read manual carefully, but it
doesn't mention how could I implement database to the front page.
Please help me.

Thank you very much !
Best Regards


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



UTF8 and CakePHP - Best Practices

2007-02-09 Thread Alex


Hi everybody,

I've often had problems using UTF-8 in CakePHP with german chars in
HTML and/or filenames. I saw that in some cases (and some html helper
functions / some file system functions) I have to trick around with
en-/decoding functions. Are there any Best Practices on how to use
CakePHP correctly with UTF-8 and how to en-/decode all strings in all
cases (HTML output, DB access, file access) correctly?
Why does Cakes helpers sometimes use htmlspecialchars and sometimes
htmlentites? For some german (and other) chars is this very important.

Greetings,
Alex


--~--~-~--~~~---~--~~
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: Passing functions to views

2007-02-09 Thread zafoeta


mindcharger wrote:
> I think this is a fairly good opportunity to learn...
and to turn good designed off-the-shelf-code into so called spaghetti-
code ...


--~--~-~--~~~---~--~~
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: SMS with Cake

2007-02-09 Thread magnetism

I have a blog post with a clickatell api for sending sms from cakephp:
http://phpmysqlapache.com/wordpress/category/cakephp/

I hope it helps


--~--~-~--~~~---~--~~
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: route problem again (pls help! sos)

2007-02-09 Thread Ámon Tamás

Ámon Tamás wrote:
> Hello,
> 
> I try the nect things in the routes.php
> $Route->connect('/eng|hun/', array('controller' => 'categories', 
> 'action' => 'index', '1'));
> $Route->connect('/eng|hun/:controller/:action/*', array('controller, 
> action'));
> 
> But when I try the following urls I get different content?
> 
> for
> http://mediabazar/eng/ is good I get the front page.
> http://mediabazar/hun/ is good I get the front page.
> http://mediabazar/hun/classadds/lista/10 is good I get the list
> but
> http://mediabazar/eng/classadds/lista/10
> 

The problem is solved with the bootstrap.php

-- 
Ámon Tamás
http://linkfelho.amon.hu


--~--~-~--~~~---~--~~
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: Route problem

2007-02-09 Thread Ámon Tamás

Eric C Blount wrote:
> What if in bootstrap.php you did something like the following 
> (completely untested):
>  
> if (ereg('^/eng/', $_GET["url"])) {
> $_GET["url"] = str_replace('/eng/', '', $_GET["url"]);
> $GLOBALS['lang'] = 'eng';
> }
>  
> Then you could just route it normally (without the language path) and 
> check for the $GLOBALS['lang'] variable in the controller.
>  
> I'm sure you could come up with a more elegant solution to figuring out 
> which language, like checking for a two or three letter language code. 
> I'm just giving an example of bootstrap.php to show that you can take 
> things out of the $_GET['url'] and set variables from there.

Thank you

The keyword was the bootstrap.php :) I use the next code in here (cake1.2)

   $parts=split('/',$_GET["url"]);
   $lng = array_shift($parts);
   if (!in_array($lng, array('hun','eng'))) {
 $lng = 'hun'; //or redirect?
   }else{
 $_GET["url"] = join("/", $parts);
   }

   Configure::write('Config.language', $lng);


-- 
Ámon Tamás
http://linkfelho.amon.hu


--~--~-~--~~~---~--~~
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: Route problem

2007-02-09 Thread Eric C Blount
Oh, yeah, I forgot to mention:

Props to Nate in http://bakery.cakephp.org/articles/view/56 for giving me
the idea. You have no idea how much I've used this example for things like
this...

Eric


On 2/9/07, Eric C Blount <[EMAIL PROTECTED]> wrote:
>
> What if in bootstrap.php you did something like the following (completely
> untested):
>
> if (ereg('^/eng/', $_GET["url"])) {
> $_GET["url"] = str_replace('/eng/', '', $_GET["url"]);
> $GLOBALS['lang'] = 'eng';
> }
>
> Then you could just route it normally (without the language path) and
> check for the $GLOBALS['lang'] variable in the controller.
>
> I'm sure you could come up with a more elegant solution to figuring out
> which language, like checking for a two or three letter language code. I'm
> just giving an example of bootstrap.php to show that you can take things
> out of the $_GET['url'] and set variables from there.
>
> HTH,
> Eric
>
>
>
> On 2/9/07, Ámon Tamás <[EMAIL PROTECTED]> wrote:
> >
> > mindcharger wrote:
> > > Hi,
> > >
> > > I think if you edit ans study the routes.php file carefully you might
> > > be able to make it!!
> > >
> > > Good luck
> >
> > Sorry, but I do not really understand it. What I must to make in
> > routes.php to work it?
> >
> > >
> > > On Feb 8, 3:30 pm, Ámon Tamás <[EMAIL PROTECTED]> wrote:
> > >> Max wrote:
> > >>> I am looking for the same solution..
> > >> Hmmm. I think it is a very difficult thing... :)
> > >> I like to make something similar like in drupal i18n module. This is
> > >> working in the same way.
> > >>
> > >> I try to see the routes but do not find any solution. Is there any
> > >> tutorial or examples about routes?
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>> On Feb 8, 12:38 am, Ámon Tamás < [EMAIL PROTECTED]> wrote:
> >  Hello,
> >  I have a site with cake with normal routing (like
> /controller/action/).
> >  And I like to make it multilingual. I wondering to change every
> link to
> >  /lngcode/controller/action, where is lngcode is the language code.
> What
> >  is the easiest way to make it?
> >  Thanks for helps
> >  --
> >  Ámon Tamás
> > >> --
> > >> Ámon Tamáshttp://linkfelho.amon.hu
> > >
> > >
> > > >
> > >
> >
> >
> > --
> > Ámon Tamás
> > http://linkfelho.amon.hu
> >
> >
> > > >
> >
>
>
>
>

--~--~-~--~~~---~--~~
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: Route problem

2007-02-09 Thread Eric C Blount
What if in bootstrap.php you did something like the following (completely
untested):

if (ereg('^/eng/', $_GET["url"])) {
$_GET["url"] = str_replace('/eng/', '', $_GET["url"]);
$GLOBALS['lang'] = 'eng';
}

Then you could just route it normally (without the language path) and check
for the $GLOBALS['lang'] variable in the controller.

I'm sure you could come up with a more elegant solution to figuring out
which language, like checking for a two or three letter language code. I'm
just giving an example of bootstrap.php to show that you can take things out
of the $_GET['url'] and set variables from there.

HTH,
Eric



On 2/9/07, Ámon Tamás <[EMAIL PROTECTED]> wrote:
>
> mindcharger wrote:
> > Hi,
> >
> > I think if you edit ans study the routes.php file carefully you might
> > be able to make it!!
> >
> > Good luck
>
> Sorry, but I do not really understand it. What I must to make in
> routes.php to work it?
>
> >
> > On Feb 8, 3:30 pm, Ámon Tamás <[EMAIL PROTECTED]> wrote:
> >> Max wrote:
> >>> I am looking for the same solution..
> >> Hmmm. I think it is a very difficult thing... :)
> >> I like to make something similar like in drupal i18n module. This is
> >> working in the same way.
> >>
> >> I try to see the routes but do not find any solution. Is there any
> >> tutorial or examples about routes?
> >>
> >>
> >>
> >>
> >>
> >>> On Feb 8, 12:38 am, Ámon Tamás <[EMAIL PROTECTED]> wrote:
>  Hello,
>  I have a site with cake with normal routing (like
/controller/action/).
>  And I like to make it multilingual. I wondering to change every link
to
>  /lngcode/controller/action, where is lngcode is the language code.
What
>  is the easiest way to make it?
>  Thanks for helps
>  --
>  Ámon Tamás
> >> --
> >> Ámon Tamáshttp://linkfelho.amon.hu
> >
> >
> > >
> >
>
>
> --
> Ámon Tamás
> http://linkfelho.amon.hu
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



problem using image verification class as vendor

2007-02-09 Thread lukemack

hi,

i am having a problem using an image verification class as a vendor. i
can use the class outside of cake fine but when included as a vendor,
the imagettftext() function within the class will not find its font (i
have got the font in the same directory as the class, where it should
be)

can anyone suggest why this might be? you can see it working here:

http://devweb.loopfruit.co.uk/picture.php

and not working here (within cake)

http://cake.lukem.co.uk/users/imageTest

the class code is:

_w = $width;
$this->_h = $height;

$this->ttf_font = $font;
}


// initializes the image
function init() {

$this->image = imagecreate($this->_w, $this->_h);
//$background_color = imagecolorallocate($this->image, 
255, 255,
255);
$this->set_bgcolor(255,255,255);
$this->set_textcolor(255,34,91);

}

// sets the bgcolor
function set_bgcolor($r,$g,$b) {
$background_color = imagecolorallocate($this->image, 
$r, $g, $b);

}

// sets the textcolor
function set_textcolor($r,$g,$b) {
$this->text_color = imagecolorallocate($this->image, 
$r, $g, $b);
}

// draws the string
function draw() {
$code = $this->generate_code();
// register the code in the session
$this->register_code($code);

// offsets for x and y in the image
$x = 1;
$y = 20;

// walk through each character in the
// code, to print it
for($i = 0; $i < strlen($code); $i++) {

$calc_y = rand(200,250) / 10;
//imagestring( $this->image, 3, $x, $calc_y,  
$code{$i}, $this-
>text_color);
$angle = rand(-20,20);
$this->write_string($x, $calc_y, $angle, 
$code{$i});
$x += rand(17,19) ;
}

}


function write_string($x_offset, $y_offset, $angle, $string) {

// check if a font is set
if($this->ttf_font != "") {
// does the file font exist on the 
server
if(file_exists($this->ttf_font)) {
putenv('GDFONTPATH=' . 
realpath('.'));
$font_size = 20;
$grey = 
imagecolorallocate($this->image, 128, 128, 128);
// draw a shadow
imagettftext($this->image, 
$font_size, $angle, $x_offset + 1,
$y_offset + 1, $grey, $this->ttf_font, $string);
// draw the text
imagettftext($this->image, 
$font_size, $angle, $x_offset,
$y_offset, $this->text_color, $this->ttf_font, $string);

} else {
die("Font doesn't exist, or not 
in same directory as a .ttf");
}
} else {
die("No font set.");
}
}

// generates a time based random code
// offset is the minutes to be added
function generate_code() {
// define the seed out of which characters the seed 
will be
constructed
$string = md5(rand(0,));
$output = substr($string, 14, 6);
return $output;
}


// returns the code that is registered
// in the session
function get_registered_code() {
return $_SESSION['verification_key'];
}

// sets the code, this will be registered as
// the code in the session
function register_code($c) {
$_SESSION['verification_key'] = $c;
}

// checks if the code is valid
function validate_code($code) {
return $code == $this->get_registered_code();
}

// output it to screen
function _output() {
// initialize the image
$this->init

Re: Route problem

2007-02-09 Thread Ámon Tamás

mindcharger wrote:
> Hi,
> 
> I think if you edit ans study the routes.php file carefully you might
> be able to make it!!
> 
> Good luck

Sorry, but I do not really understand it. What I must to make in 
routes.php to work it?

> 
> On Feb 8, 3:30 pm, Ámon Tamás <[EMAIL PROTECTED]> wrote:
>> Max wrote:
>>> I am looking for the same solution..
>> Hmmm. I think it is a very difficult thing... :)
>> I like to make something similar like in drupal i18n module. This is
>> working in the same way.
>>
>> I try to see the routes but do not find any solution. Is there any
>> tutorial or examples about routes?
>>
>>
>>
>>
>>
>>> On Feb 8, 12:38 am, Ámon Tamás <[EMAIL PROTECTED]> wrote:
 Hello,
 I have a site with cake with normal routing (like /controller/action/).
 And I like to make it multilingual. I wondering to change every link to
 /lngcode/controller/action, where is lngcode is the language code. What
 is the easiest way to make it?
 Thanks for helps
 --
 Ámon Tamás
>> --
>> Ámon Tamáshttp://linkfelho.amon.hu
> 
> 
> > 
> 


-- 
Ámon Tamás
http://linkfelho.amon.hu


--~--~-~--~~~---~--~~
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: Passing functions to views

2007-02-09 Thread mindcharger

I think this is a fairly good opportunity to learn...

;-)


On Feb 8, 3:50 pm, "Károly Kiripolszky" <[EMAIL PROTECTED]>
wrote:
> Mostly because I don't know how to use the HtmlHelper in the
> controller... :P


--~--~-~--~~~---~--~~
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: Route problem

2007-02-09 Thread mindcharger

Hi,

I think if you edit ans study the routes.php file carefully you might
be able to make it!!

Good luck

On Feb 8, 3:30 pm, Ámon Tamás <[EMAIL PROTECTED]> wrote:
> Max wrote:
> > I am looking for the same solution..
>
> Hmmm. I think it is a very difficult thing... :)
> I like to make something similar like in drupal i18n module. This is
> working in the same way.
>
> I try to see the routes but do not find any solution. Is there any
> tutorial or examples about routes?
>
>
>
>
>
> > On Feb 8, 12:38 am, Ámon Tamás <[EMAIL PROTECTED]> wrote:
> >> Hello,
>
> >> I have a site with cake with normal routing (like /controller/action/).
> >> And I like to make it multilingual. I wondering to change every link to
> >> /lngcode/controller/action, where is lngcode is the language code. What
> >> is the easiest way to make it?
>
> >> Thanks for helps
> >> --
> >> Ámon Tamás
>
> --
> Ámon Tamáshttp://linkfelho.amon.hu


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Regarding http://cakephp.org page layout

2007-02-09 Thread mutabor

Hi,
We have this situation: we are talking to the client about using Cake
in his project development. The answer was: "I do not think this is
reliable framework, just look at their site (IE7)".
Although we keep on telling him that this fact does not matter, could
Cake Dev Team fix layout problems in IE7? I think this will definitely
help Cake (and us also :) )


--~--~-~--~~~---~--~~
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: Associations stored in a table?!

2007-02-09 Thread mindcharger

Hi Hawk,

I'm currently developing a system that shares that "dynamic table
creation" requirement with yours.
As far as I understand the problem, it's more a DB issue than a CAKE
issue.

I don't know if it will help you, but I will try to explain how I did
it.

1) I have a table on the DB that "describes" the other tables I
create. To this table I call a "descriptor". Assume it has several
columns, but one of them is called "table_name".
2) Creating a new table encompasses two steps:
  i) Add a record to the "descriptor" table
 ii) Create the proper table
3) To access the table you must do 2 DB accesses:
 i) Get all the descriptor records into a HTML select-box or something
(Ex.: "SELECT table_name FROM descriptors;")
 ii) Get the chosen table into a var and then acessing the desired
table
(Ex.:
$table_name = ;
$query = "SELECT * FROM $table_name;";
$data = $this->{MODEL-NAME}->query($query);
)

The "$data = $this->{MODEL-NAME}->query($query);" allows you to force
the Model to execute your query.

As for the model, I found that when I want to use this "dynamic table
device" I have no use for the associated table, so I define:

$useTable=false;

...on the model.

I hope it helps you. If the explanation was not clear or if you have
any other doubt feel free to ask me.

Good luck!


On Feb 8, 9:53 am, "Hawk|" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i wonder if it would be possible to store the associations in a table
> instead of storing them in the models/model.php file. So it would be
> more flexible. I need to create  tables dynamic and associate them on
> the fly with others and i want to do this without touching the model
> file itself.
> Someone allready is using a similar method?
> or someone has an idea how to do this?.
> It would be a great help for me to get some response to this issue.
>
> Thx a lot Hawk.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to use smarty cache in cakephp?

2007-02-09 Thread rollenc

I combine smarty & cackephp followng this article: http://
projects.simpleteq.com/CakePHP/smarty.html
but I don't know how to use smarty cache .
Call for help. 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
-~--~~~~--~~--~--~---



route problem again (pls help! sos)

2007-02-09 Thread Ámon Tamás

Hello,

I try the nect things in the routes.php
$Route->connect('/eng|hun/', array('controller' => 'categories', 
'action' => 'index', '1'));
$Route->connect('/eng|hun/:controller/:action/*', array('controller, 
action'));

But when I try the following urls I get different content?

for
http://mediabazar/eng/ is good I get the front page.
http://mediabazar/hun/ is good I get the front page.
http://mediabazar/hun/classadds/lista/10 is good I get the list
but
http://mediabazar/eng/classadds/lista/10

is wrong because I get the front page again. What is the wrong in my Routes?

-- 
Ámon Tamás
http://linkfelho.amon.hu


--~--~-~--~~~---~--~~
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: Strange behaviour

2007-02-09 Thread apalankat

Thank you very much,
right now I don't have time to try this solution you say, I'll try it
on Monday.
By the moment I "solved" the problem hardcoding /cake/libs/views/
helpers/html.php, the function url, forcing the $output to be '/
mycakeapp' . $url

But this doesn't seem a nice solution, so I will try yours.
Thanks!
Marc

On Feb 9, 8:18 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I think I found something for you to try when you ge tthe time.
>
> There is a bug about cakephp and cgi on apache servers.  Here is the
> link:https://trac.cakephp.org/ticket/66
>
> The problem doesn't seem exactly like yours but, maybe the fix can
> help get rid of the cgi link replacements.
>
> The problem:
> -
> I've finally uploaded cake to my server and now I'm desperately trying
> to get it to work:
>
> When I remove the .htaccess files and uncomment the lines in core and
> index.php (BASE_URL) my cake urls (as genertaed by the helpers all
> look like:
>
> http://www.pauljholden.com/cgi-sys/php4/skunkworx/comments
>
> Which pulls up a screen like:
>
> Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI
> binary was compiled with force-cgi-redirect enabled. This means that a
> page will only be served up if the REDIRECT_STATUS CGI variable is
> set, e.g. via an Apache Action directive.
>
> For more information as to why this behaviour exists, see the manual
> page for CGI security.
>
> For more information about changing this behaviour or re-enabling this
> webserver, consult the installation file that came with this
> distribution, or visit the manual page.
>
> Any ideas?
>
> Here is the instruction:
> 
> I've solved this problem by changing a couple of lines of the cake
> index file and the core file, which allowed me to revert to using
> index.php?url= which works fine.
>
> In cake/index.php $elements = explode('/index.php?url=',$uri); //
> added ?url=
>
> In core.php define('BASE_URL', $_SERVER['PATH_INFO'].'?url=');
>
> (There's an identical line in cake/index.php - but I think the core
> overwrites it, though it should really only be defined in one place)
>
> Deleted the .htaccess, etc.
>
> On Feb 8, 12:54 am, "apalankat" <[EMAIL PROTECTED]> wrote:
>
> > hi,
> > i think it's installed as a CGI, and this is why it does the /cgi-bin/
> > cgiwrap/ thing. So the only thing I need is to know what variable (and
> > in what file) uses cake to determine the root of the app.
> > I have been looking through the files, but i saw ROOT, WWW_ROOT, and
> > so many other variables, i need to know which one I have to hardcode
> > to make it work.
> > Thanks!
>
> > On Feb 8, 2:43 am, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > What is your directory structure?  How was cake installed onto the
> > > server?  Is PHP installed as a module or as cgi?
> > > To me, it looks like PHP is installed as CGI and the server itself is
> > > running Virtual Hosting.  Can you confirm these?
>
> > > On Feb 7, 2:17 pm, "apalankat" <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
> > > > I configured a cake app in my university server, and I have a problem:
> > > > all the links created by the application (links to actions,
> > > > stylesheets, javascripts) have a "/cgi-bin/cgiwrap/" prepended.
> > > > Here's an example from the page /mycakeapp/posts on the server.
> > > > Instead of linking the posts with  > > > href="/mycakeapp/posts/view/2">post2 it links them with  > > > href="/cgi-bin/cgiwrap/mycakeapp/
>
> > > > posts/view/2" >post2
>
> > > > I don't think anyone ever saw that, so I lost all hope of finding a
> > > > solution... but here it is,
> > > > Thanks for reading!


--~--~-~--~~~---~--~~
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: mod rewrite issue with 1and1 servers

2007-02-09 Thread Sam Sherlock
thanks for taking the time to provide me this information.

I am on the UK servers of 1and1.  I will be looking into this later.

I am really grateful to yourself and Chris for your assistance.

I will try a few things out, and get back in touch with the support
people and see if this can be resolved.  I am sure it can.

>From what you have said it all sounds promising.

thanks again - S

On 09/02/07, kitten <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> > Its giving me a error 404 with advert links now.
>
> But does that mean that mod_rewrite is working now for your application?
> Adn
> only advert links do not work? How do these "advert links" look like?
> >
> > Did you leaving the other .htaccess as is?
>
> The other .htaccess only send the request to the webroot dir. In my case,
> the domain is pointing to the webroot dir (as recommended for deployment),
> so the other .htaccess files have no effect.
> >
> > Do you have a Business Pro Package?
>
> It's a package called "1&1 Business" (not Pro) over here, but it should
> make
> no difference. But 1and1.com might have another server configuration than
> 1and1.de...
> >
> > thanks anyhow but it aint happening.
>
> Other hosts sometimes need an additional
>
> RewriteBase /
>
> in the .htaccess. You might want to try this (and experiment with others
> paths than /).
>
> Heiner
> >
> > On 09/02/07, kitten <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> Hi :)
> >>
> >> I got Cake with mod_rewrite working on 1und1 servers (the german
> >> branch...)
> >> with a little change to the .htaccess in webroot:
> >>
> >> 
> >> RewriteEngine On
> >> RewriteCond %{REQUEST_FILENAME} !-d
> >> RewriteCond %{REQUEST_FILENAME} !-f
> >> RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
> >> 
> >>
> >> Please note the slash before index.php
> >>
> >> Hope this helps
> >>
> >> Heiner
> >>
> >>
> >>
> >>> thanks - I am certain this can be made to happen
> >>>
> >>> a different format of error 404 this time. A bit plainer than before,
> >> their
> >>> usual error 404 has a load of adverts on it
> >>>
> >>> perhaps making that line less specific? I dunno how that could be
> done.
> >>>
> >>> maybe {yeah I am not fully ofay with mod rewrite}
> >>> (.*) -> catches everything can this line be made more specific?
> >>>
> >>>
> >>>
> >>> On 09/02/07, [EMAIL PROTECTED] <
> >>> [EMAIL PROTECTED]> wrote:
> 
> 
>  Hrmm, don't give up just yet!  I just read the FAQ and it seems, if
>  indeed you have the type of hosting control mentioned in this FAQ,
> try
>  to add this code to the .htaccess file.
> 
>  
>   AllowOverride All
>  
> 
>  The FAQ tells me that mod_rewrite is enabled and should work for you
>  but, you probably have to tell it which directory for it to work on.
> 
>  Anyways, try that.  Just add it to all your .htaccess files (I think
>  there are 3).
> 
>  Let me know how it goes!
> 
>  On Feb 8, 10:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > Thanks for the response.
> >
> > Changing AllowOverride from None to All is what got it working on my
>  WAMP
> > server
> > as I understand Mod Rewrite won't work unless its set to All.  As
> mod
> > rewrite does work
> > on the package (there are some rudimentary examples in their FAQ)
> > Their FAQ
> 
> >>
> Pagehttp://faq.1and1.com/scripting_languages_supported/configuring_apache...
> >
> > Wordpress using Mod
>  Rewritehttp://elliottback.com/wp/archives/2005/05/06/permalinks-down/
> >
> > I can get it all to work via built in rewrite, it works fine.  Guess
> I
>  will
> > have to resign myself to
> > not using mod rewrite - shame because its cool (tidy & clean)
> >
> > Did / does your host claim to support mod rewrite?
> >
> > On 09/02/07, [EMAIL PROTECTED] <
> >
> > [EMAIL PROTECTED]> wrote:
> >
> >> Looks like you will have to use the built-in rewrite rule.  I have
> >> had
> >> problem with a server running virtual hosting... they need to
> change
> >> AllowOverride to All in their httpd.conf file as well as the one in
> >> your virtual conf file.
> >
> >> Check out the built in rewrite services, here -->
> >> http://manual.cakephp.org/appendix/blog_tutorial(Section 5).  Skip
> to
> >> this part "define ('BASE_URL', env('SCRIPT_NAME'));".
> >
> >> On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> >>> I have managed to extract information from the support guys at the
> >> hosting
> >>> company here is what
> >>> they say about the mod_rewrite rules of cake
> >
>  It would seem that the second line of code is simply not valid.
>  This
>  code here:
> >
>  RewriteRule (.*) webroot/$1[L]
> >
>  it is likely that matching (.*) is too broad, this is probably
> the
> >> cause
>  of the issue. You likely need to use a more

Re: mod rewrite issue with 1and1 servers

2007-02-09 Thread kitten

Hi,

> Its giving me a error 404 with advert links now.

But does that mean that mod_rewrite is working now for your application? Adn
only advert links do not work? How do these "advert links" look like?
> 
> Did you leaving the other .htaccess as is?

The other .htaccess only send the request to the webroot dir. In my case,
the domain is pointing to the webroot dir (as recommended for deployment),
so the other .htaccess files have no effect.
> 
> Do you have a Business Pro Package?

It's a package called "1&1 Business" (not Pro) over here, but it should make
no difference. But 1and1.com might have another server configuration than
1and1.de... 
> 
> thanks anyhow but it aint happening.

Other hosts sometimes need an additional

RewriteBase /

in the .htaccess. You might want to try this (and experiment with others
paths than /).

Heiner
> 
> On 09/02/07, kitten <[EMAIL PROTECTED]> wrote:
>> 
>> 
>> Hi :)
>> 
>> I got Cake with mod_rewrite working on 1und1 servers (the german
>> branch...)
>> with a little change to the .htaccess in webroot:
>> 
>> 
>> RewriteEngine On
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
>> 
>> 
>> Please note the slash before index.php
>> 
>> Hope this helps
>> 
>> Heiner
>> 
>> 
>> 
>>> thanks - I am certain this can be made to happen
>>> 
>>> a different format of error 404 this time. A bit plainer than before,
>> their
>>> usual error 404 has a load of adverts on it
>>> 
>>> perhaps making that line less specific? I dunno how that could be done.
>>> 
>>> maybe {yeah I am not fully ofay with mod rewrite}
>>> (.*) -> catches everything can this line be made more specific?
>>> 
>>> 
>>> 
>>> On 09/02/07, [EMAIL PROTECTED] <
>>> [EMAIL PROTECTED]> wrote:
 
 
 Hrmm, don't give up just yet!  I just read the FAQ and it seems, if
 indeed you have the type of hosting control mentioned in this FAQ, try
 to add this code to the .htaccess file.
 
 
  AllowOverride All
 
 
 The FAQ tells me that mod_rewrite is enabled and should work for you
 but, you probably have to tell it which directory for it to work on.
 
 Anyways, try that.  Just add it to all your .htaccess files (I think
 there are 3).
 
 Let me know how it goes!
 
 On Feb 8, 10:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> Thanks for the response.
> 
> Changing AllowOverride from None to All is what got it working on my
 WAMP
> server
> as I understand Mod Rewrite won't work unless its set to All.  As mod
> rewrite does work
> on the package (there are some rudimentary examples in their FAQ)
> Their FAQ
 
>> Pagehttp://faq.1and1.com/scripting_languages_supported/configuring_apache...
> 
> Wordpress using Mod
 Rewritehttp://elliottback.com/wp/archives/2005/05/06/permalinks-down/
> 
> I can get it all to work via built in rewrite, it works fine.  Guess I
 will
> have to resign myself to
> not using mod rewrite - shame because its cool (tidy & clean)
> 
> Did / does your host claim to support mod rewrite?
> 
> On 09/02/07, [EMAIL PROTECTED] <
> 
> [EMAIL PROTECTED]> wrote:
> 
>> Looks like you will have to use the built-in rewrite rule.  I have
>> had
>> problem with a server running virtual hosting... they need to change
>> AllowOverride to All in their httpd.conf file as well as the one in
>> your virtual conf file.
> 
>> Check out the built in rewrite services, here -->
>> http://manual.cakephp.org/appendix/blog_tutorial(Section 5).  Skip to
>> this part "define ('BASE_URL', env('SCRIPT_NAME'));".
> 
>> On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>>> I have managed to extract information from the support guys at the
>> hosting
>>> company here is what
>>> they say about the mod_rewrite rules of cake
> 
 It would seem that the second line of code is simply not valid.
 This
 code here:
> 
 RewriteRule (.*) webroot/$1[L]
> 
 it is likely that matching (.*) is too broad, this is probably the
>> cause
 of the issue. You likely need to use a more specific terms. The
 other
 two lines work fine however:
> 
 RewriteEngine on
 RewriteRule ^$webroot/[L]
> 
 although it gives 404 errors, seeing as "webroot" doesn't
 currently
 exist.
> 
>>> its working without the htaccess, but I would like to get it to work
>> with
>>> since that should work
>>> on the package that I have.
> 
>>> I think that 1and1 impose some restrictions on mod_rewrite since
 they
>> are a
>>> Mass Hosting environment
>>> and I suspect that some of this information is withheld.  I also
 think
>> that
>>> they did'nt really look into things
>

Re: mod rewrite issue with 1and1 servers

2007-02-09 Thread Sam Sherlock
Its giving me a error 404 with advert links now.

Did you leaving the other .htaccess as is?

Do you have a Business Pro Package?

thanks anyhow but it aint happening.

On 09/02/07, kitten <[EMAIL PROTECTED]> wrote:
>
>
> Hi :)
>
> I got Cake with mod_rewrite working on 1und1 servers (the german
> branch...)
> with a little change to the .htaccess in webroot:
>
> 
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
> 
>
> Please note the slash before index.php
>
> Hope this helps
>
> Heiner
>
>
>
> > thanks - I am certain this can be made to happen
> >
> > a different format of error 404 this time. A bit plainer than before,
> their
> > usual error 404 has a load of adverts on it
> >
> > perhaps making that line less specific? I dunno how that could be done.
> >
> > maybe {yeah I am not fully ofay with mod rewrite}
> > (.*) -> catches everything can this line be made more specific?
> >
> >
> >
> > On 09/02/07, [EMAIL PROTECTED] <
> > [EMAIL PROTECTED]> wrote:
> >>
> >>
> >> Hrmm, don't give up just yet!  I just read the FAQ and it seems, if
> >> indeed you have the type of hosting control mentioned in this FAQ, try
> >> to add this code to the .htaccess file.
> >>
> >> 
> >>  AllowOverride All
> >> 
> >>
> >> The FAQ tells me that mod_rewrite is enabled and should work for you
> >> but, you probably have to tell it which directory for it to work on.
> >>
> >> Anyways, try that.  Just add it to all your .htaccess files (I think
> >> there are 3).
> >>
> >> Let me know how it goes!
> >>
> >> On Feb 8, 10:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> >>> Thanks for the response.
> >>>
> >>> Changing AllowOverride from None to All is what got it working on my
> >> WAMP
> >>> server
> >>> as I understand Mod Rewrite won't work unless its set to All.  As mod
> >>> rewrite does work
> >>> on the package (there are some rudimentary examples in their FAQ)
> >>> Their FAQ
> >>
> Pagehttp://faq.1and1.com/scripting_languages_supported/configuring_apache...
> >>>
> >>> Wordpress using Mod
> >> Rewritehttp://elliottback.com/wp/archives/2005/05/06/permalinks-down/
> >>>
> >>> I can get it all to work via built in rewrite, it works fine.  Guess I
> >> will
> >>> have to resign myself to
> >>> not using mod rewrite - shame because its cool (tidy & clean)
> >>>
> >>> Did / does your host claim to support mod rewrite?
> >>>
> >>> On 09/02/07, [EMAIL PROTECTED] <
> >>>
> >>> [EMAIL PROTECTED]> wrote:
> >>>
>  Looks like you will have to use the built-in rewrite rule.  I have
> had
>  problem with a server running virtual hosting... they need to change
>  AllowOverride to All in their httpd.conf file as well as the one in
>  your virtual conf file.
> >>>
>  Check out the built in rewrite services, here -->
>  http://manual.cakephp.org/appendix/blog_tutorial(Section 5).  Skip to
>  this part "define ('BASE_URL', env('SCRIPT_NAME'));".
> >>>
>  On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > I have managed to extract information from the support guys at the
>  hosting
> > company here is what
> > they say about the mod_rewrite rules of cake
> >>>
> >> It would seem that the second line of code is simply not valid.
> >> This
> >> code here:
> >>>
> >> RewriteRule (.*) webroot/$1[L]
> >>>
> >> it is likely that matching (.*) is too broad, this is probably the
>  cause
> >> of the issue. You likely need to use a more specific terms. The
> >> other
> >> two lines work fine however:
> >>>
> >> RewriteEngine on
> >> RewriteRule ^$webroot/[L]
> >>>
> >> although it gives 404 errors, seeing as "webroot" doesn't
> >> currently
> >> exist.
> >>>
> > its working without the htaccess, but I would like to get it to work
>  with
> > since that should work
> > on the package that I have.
> >>>
> > I think that 1and1 impose some restrictions on mod_rewrite since
> >> they
>  are a
> > Mass Hosting environment
> > and I suspect that some of this information is withheld.  I also
> >> think
>  that
> > they did'nt really look into things
> >>>
> > although it gives 404 errors, seeing as "webroot" doesn't currently
>  exist.
> >>>
> > though it does.  Has anyone  managed to get mod rewrite to work on
> >> 1and1
> > with cakephp or got any suggestions
> > is they a way to make this line (below) narrower / less specific?
> >>>
> > RewriteRule (.*) webroot/$1[L]
> >>>
> >> I read elsewhere on the web that other users have had issues with
> >>>
> > mod_rewrite in wordpress
> > fore instance and they have been able to tweak the rules.
> >>>
> > - S
> >>
> >>
> >>>
> >>
> >
> > >
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To