Re: Cupcake Forum with CKEditor

2011-10-04 Thread Miles J
Well, 2.0 isn't backwards compatible with 1.9 at all :/

I would suggest doing a fresh 2.0 install, but if you already data in
your old forum, it may be problematic.

On Oct 4, 4:51 am, WhyNotSmile  wrote:
> Brilliant, thank you!  I really appreciate the Cupcake Forum, by the
> way - it works really well.
>
> Are there any advantages in upgrading to version 2.0?  How much work
> would it be?  And is it stable?  I thought I'd downloaded the latest
> stable version when I got it last week, but may have been looking in
> the wrong place or something.
>
> Thanks again for all your work on it.
>
> Sharon
>
> On Oct 3, 6:23 pm, Miles J  wrote:
>
>
>
>
>
>
>
> > No that should do it. I was just stripping HTML since it was BB code
> > only.
>
> > @Webbed - Yeah, my site is a bit outdated :/
>
> > On Oct 3, 3:06 am, WhyNotSmile  wrote:
>
> > > I'm using version 1.9.
>
> > > I think I've figured it out though - I removed the 'strip_tags' from a
> > > few lines, and that has let the CK editor output go through ok.
>
> > > Is there anything I need to add in to replace that, for security etc?
>
> > > Sharon
>
> > > On Oct 2, 3:24 am, Miles J  wrote:
>
> > > > Well technically wrong, I released 2.0 Beta a month ago.
>
> > > >https://github.com/milesj/cake-forum
>
> > > > Secondly, what version are you using? 1.9 or 2.0? As they are vastly
> > > > different.
>
> > > > On Sep 30, 11:59 pm, WebbedIT  wrote:
>
> > > > > MilesJ would be the best person, but not sure if he has much time to
> > > > > support it nowadays.
>
> > > > > It has not had an update since March 2010 so will probably need
> > > > > various changes to work in Cake 1.3 too.
>
> > > > > HTH, Paul.
>
> > > > > On Sep 30, 5:34 pm, WhyNotSmile  wrote:
>
> > > > > > I've integrated the excellent Cupcake Forum into my CakePHP app, and
> > > > > > now I'd like to use CK editor for the posts, rather than BB Code.
>
> > > > > > I've searched online, but I can't find any way to do this.
>
> > > > > > I have integrated CK editor. and that's fine, but something in 
> > > > > > Cupcake
> > > > > > is stripping out the formatting before saving the content, so I end 
> > > > > > up
> > > > > > with just plain text.  Can anyone point me in the right direction 
> > > > > > for
> > > > > > preventing it from removing HTML?
>
> > > > > > Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread Ryan Schmidt

On Oct 4, 2011, at 19:45, Matt Kaufman wrote:

> What is BOM?

http://en.wikipedia.org/wiki/Byte_order_mark

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 2.0 Component Merging

2011-10-04 Thread Robert
OddI'll start from scratch and manually port over all my code
piece by piece to ensure functionality.

On Oct 4, 12:23 pm, mark_story  wrote:
> As far as I know, and based on what the tests say, the $components
> property is still being merged with AppController/
> PluginAppController.  Based on a simple test I just did it worked for
> me as well.
>
> -Mark
>
> On Oct 3, 12:24 am, Robert  wrote:
>
>
>
>
>
>
>
> > Yep, I saw that. I have the Auth component defined in the components
> > array of my AppController. My UsersController inherits the
> > AppController, so shouldn't the components array from the
> > AppController be merged into the components array in the
> > UsersController?
>
> > On Oct 3, 12:07 am, Andras Kende  wrote:
>
> > > Try this:http://book.cakephp.org/2.0/en/controllers/components.html
>
> > > Andras
>
> > > On Oct 2, 2011, at 10:56 PM, Robert wrote:
>
> > > > Hey All,
>
> > > > Was there a change in the way that components are loaded up in
> > > > controllers? I looked at the source and didn't notice anything
> > > > different between 1.3 and 2.0 surrounding this.
>
> > > > I pasted my 1.3 source into a 2.0 directory structure and I'm in the
> > > > process of re-cake-ifying itand in my Users controller I have
> > > > $this->Auth->allow() being called in beforeFilter. With that, cake
> > > > complains "Fatal error: Call to a member function allow() on a non-
> > > > object" because the Auth component isn't loaded.
>
> > > > However, I have verified that it is loaded in AppController (the
> > > > parent controller), shouldn't the two components arrays be merged?
>
> > > > This works in 1.3, I literally did a copy and paste of the app code.
>
> > > > --
> > > > Our newest site for the community: CakePHP Video 
> > > > Tutorialshttp://tv.cakephp.org
> > > > Check out the new CakePHP Questions 
> > > > sitehttp://ask.cakephp.organdhelpothers with their CakePHP related 
> > > > questions.
>
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com For more options, visit this 
> > > > group athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Html helper - stop adding prefix unless explicitly specified

2011-10-04 Thread rchavik
You could create a custom helper inheriting HtmlHelper, then use the 
joeb'sAnalogue pluginto masquerade your 
helper as core HtmlHelper. This way, you don't have to 
modify your view files

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread O.J. Tibi
No, what Larry meant was ob_start() is an ugly hack, and you shouldn't use 
it.

You might want to take a look at the other thread. Most probably, your 
controller file has a Byte Order Mark (BOM). Use a UTF-8 text editor that 
doesn't insert BOMs into your file, or if you can disable BOM insertions 
from your editor, do so.

It's a given fact that BOMs don't work well with PHP.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread O.J. Tibi
BOM is short for Byte Order Mark. It acts like a "magic bit" for the 
application to detect if the document is Unicode, some other variant of 
Unicode, or any other encoding. And yes, coders should turn off BOM in their 
editors by default. :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


requestAction array based urls inside plugin

2011-10-04 Thread Corie
Regarding the new array based URLs in a requestAction, can this work
for plugins as well?

I tried with and without a plugin key and got errors. The
requestAction works when using the old style string URL.

$data = $this->requestAction(
array(
'plugin' => 'pluginName',
'controller' => 'controllerName',
'action' => 'index'
)
);

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Matt Kaufman
Lol- yeah I was taken back by this!  'good tip' is all I could come up with.

Sent from my iPhone

On Oct 4, 2011, at 5:46 PM, "Larry E. Masters"  wrote:

> You have got to be kidding me. You would not seriously suggest this to 
> someone would you?
> 
> --
> Larry E. Masters
> 
> 
> On Mon, Oct 3, 2011 at 11:34 PM, vaibhav pathak  
> wrote:
> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
> 
> 
>   }
> 
> ?>
> from
>  vaibhav pathak
> 
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Larry E. Masters
You have got to be kidding me. You would not seriously suggest this to
someone would you?

-- 
Larry E. Masters


On Mon, Oct 3, 2011 at 11:34 PM, vaibhav pathak  wrote:

> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
>
>
>   }
>
> ?>
> from
>  vaibhav pathak
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread Matt Kaufman
What is BOM?

Sent from my iPhone

On Oct 4, 2011, at 2:27 AM, BLABLABLA  wrote:

> HI..
> 
> The problem was the encoding. I have had the encoding UTF8, but needed the
> encoding UTF8 without BOM. 
> 
> --
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp4860658p4867920.html
> Sent from the CakePHP mailing list archive at Nabble.com.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Matt Kaufman
Nice tip

Sent from my iPhone

On Oct 3, 2011, at 9:34 PM, vaibhav pathak  wrote:

> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
> 
> 
>   }
> 
> ?>
> from
> vaibhav pathak
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread BLABLABLA
HI..

The problem was the encoding. I have had the encoding UTF8, but needed the
encoding UTF8 without BOM. 

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp4860658p4867920.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread vaibhav pathak
hi friend
try ob_start(); function before the starting of class
CategoriesController extends AppController like in following manner.

from
 vaibhav pathak

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Force Trailing Slash and No WWW

2011-10-04 Thread Ryan Schmidt

On Oct 4, 2011, at 06:16, euromark wrote:

> you should know that it should be the other way around!
> none => www
> 
> http://domain => http://www.domain
> 
> thats just how everyone does it...

It's demonstrably not how *everyone* does it. Many web sites, perhaps even 
most, have the www prefix, but certainly not all.

> some conventions make sense to
> stick to
> but thats thats just my 5 cents

My opinion is that it is a good idea to do so however, not just because it's 
common and familiar, but for performance reasons as well; please read:

http://developer.yahoo.com/performance/rules.html#cookie_free


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Replacing tabs with spaces, finding the user view

2011-10-04 Thread Ryan Schmidt
cake bake replaces existing files; it doesn't attempt to merge with your 
existing files.

Feel free to customize the bake templates as described earlier in this thread, 
for example to change the templates to use spaces instead of tabs.


On Oct 4, 2011, at 09:21, Yves S. Garret wrote:

> Sure it is.  I originally had my code with spaces.  After I ran cake bake 
> all, they're now tabs.
> 
> On Mon, Oct 3, 2011 at 4:46 PM, Ryan Schmidt wrote:
> 
>> That's really not a CakePHP question, but my text editor has a function for 
>> doing that; see if your text editor does. Or, if you like the UNIX command 
>> line, the "expand" command is useful. For example to convert tabs to spaces 
>> at 4 spaces per indent:
>> 
>> expand -t 4 somefile > x
>> 
>> Examine x, make sure it looks like you want it, then:
>> 
>> mv x somefile


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: history log table

2011-10-04 Thread elogic
When I put the $actAs within my user model for example I get the
following error:


Undefined property: UsersController::$activeUser [APP/
app_controller.php, line 20]


Thanks







On Oct 5, 8:20 am, elogic  wrote:
> Thanks, so where do I add the $activeUser part?
>
> On Oct 5, 2:06 am, majna  wrote:
>
>
>
>
>
>
>
> > Add $actsAs to AppModel

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: history log table

2011-10-04 Thread elogic
Thanks, so where do I add the $activeUser part?



On Oct 5, 2:06 am, majna  wrote:
> Add $actsAs to AppModel

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Getting Bake to work on Linux

2011-10-04 Thread andrewperk
Well it turns out it did not fix the problem all the way, I'm further
than I was before. I hastily didn't check the whole process of baking.
After entering bake, telling it what I want to bake, and then telling
it to use the default database config I get another error saying it
can't connect to my MySQL server through the socket, it also says
there's no tables in my database when there are.

Thanks for any help.

Here's the error that bake gives me:

Warning (2): mysql_connect() [http://php.net/
function.mysql-connect]: Can't connect to local MySQL server through
socket '/var/run/mysqld/mysqld.sock' (2) [CORE/cake/libs/model/
datasources/dbo/dbo_mysql.php, line 561]Code | Context
$config =   array(
"persistent" => false,
"host" => "*",
"login" => "*",
"password" => "*",
"database" => "*",
"port" => "*",
"driver" => "mysql",
"prefix" => "*"
)mysql_connect - [internal], line ??
DboMysql::connect() - CORE/cake/libs/model/datasources/dbo/
dbo_mysql.php, line 561
DboSource::__construct() - CORE/cake/libs/model/datasources/
dbo_source.php, line 143
ConnectionManager::getDataSource() - CORE/cake/libs/model/
connection_manager.php, line 114
ModelTask::getAllTables() - CORE/cake/console/libs/tasks/model.php,
line 838
ModelTask::listAll() - CORE/cake/console/libs/tasks/model.php, line
781
ModelTask::getName() - CORE/cake/console/libs/tasks/model.php, line
864
FixtureTask::__interactive() - CORE/cake/console/libs/tasks/
fixture.php, line 118
FixtureTask::execute() - CORE/cake/console/libs/tasks/fixture.php,
line 71
BakeShell::main() - CORE/cake/console/libs/bake.php, line 116
ShellDispatcher::dispatch() - CORE/cake/console/cake.php, line 377
ShellDispatcher::ShellDispatcher() - CORE/cake/console/cake.php, line
139
[main] - CORE/cake/console/cake.php, line 666Warning (2): mysql_query() expects parameter
2 to be resource, boolean given [CORE/cake/libs/model/datasources/
dbo/dbo_mysql.php, line 613]Code | Context$sql
=   "SHOW TABLES FROM `caketesting`;"mysql_query - [internal], line ??
DboMysql::_execute() - CORE/cake/libs/model/datasources/dbo/
dbo_mysql.php, line 613
DboMysql::listSources() - CORE/cake/libs/model/datasources/dbo/
dbo_mysql.php, line 626
ModelTask::getAllTables() - CORE/cake/console/libs/tasks/model.php,
line 848
ModelTask::listAll() - CORE/cake/console/libs/tasks/model.php, line
781
ModelTask::getName() - CORE/cake/console/libs/tasks/model.php, line
864
FixtureTask::__interactive() - CORE/cake/console/libs/tasks/
fixture.php, line 118
FixtureTask::execute() - CORE/cake/console/libs/tasks/fixture.php,
line 71
BakeShell::main() - CORE/cake/console/libs/bake.php, line 116
ShellDispatcher::dispatch() - CORE/cake/console/cake.php, line 377
ShellDispatcher::ShellDispatcher() - CORE/cake/console/cake.php, line
139
[main] - CORE/cake/console/cake.php, line 666Your
database does not have any tables.



On Oct 3, 10:09 am, andrewperk  wrote:
> Thanks you guys, that fixed it.
>
> On Sep 27, 4:43 am, LipeDjow  wrote:
>
>
>
>
>
>
>
> > Also check if php5-mysql is enabled for the php CLI.
>
> > LipeDjow

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Data retrieval with parameters on multiple models

2011-10-04 Thread 8vius
I have several tables:

-Notes
-Users
-Favorites (favorite notes)
-Shares (shared notes)

Users hasMany Notes, Shares and Favorites are join tables between
Users and Notes.

I want to perform a Note search where I can filter by shared,
favorites and created by the user. Also I want to be able to search by
a parameter provided that can match either the title of the Note or
the User's username.

I know that for the Favorites and Shared I could just look matching by
id on those tables, but this won't return other related models of the
Notes which I want so I have to do the search on the Notes model to
get all the data I need.

I'm not sure how to proceed with this, I thought maybe using joins but
how can I specify an OR condition for the LIKEs as in  User.username
LIKE $parameter OR Note.title LIKE $parameter? Because one condition
is specified in the join and the other in the find conditions for the
model.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Replacing tabs with spaces, finding the user view

2011-10-04 Thread Vitor Pacheco
you can use some IDE like Netbeans or Eclipse to convert tabs to 
spaces... setting up the project correctly, you should get it too easy 
...


Em terça-feira, 4 de outubro de 2011 11:21:17, Yves S. Garret escreveu:
Sure it is.  I originally had my code with spaces.  After I ran cake 
bake all, they're now tabs.


On Mon, Oct 3, 2011 at 4:46 PM, Ryan Schmidt 
mailto:google-2...@ryandesign.com>> wrote:



On Oct 3, 2011, at 10:25, Yves S. Garret wrote:

> Well, to be specific, I couldn't find anything on modifying the
tabs vs. spaces info online after googling.

That's really not a CakePHP question, but my text editor has a
function for doing that; see if your text editor does. Or, if you
like the UNIX command line, the "expand" command is useful. For
example to convert tabs to spaces at 4 spaces per indent:

expand -t 4 somefile > x

Examine x, make sure it looks like you want it, then:

mv x somefile


--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org
and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com
 For more options,
visit this group at http://groups.google.com/group/cake-php


--
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and 
help others with their CakePHP related questions.



To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this 
group at http://groups.google.com/group/cake-php


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.



To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 2.0 Component Merging

2011-10-04 Thread mark_story
As far as I know, and based on what the tests say, the $components
property is still being merged with AppController/
PluginAppController.  Based on a simple test I just did it worked for
me as well.

-Mark

On Oct 3, 12:24 am, Robert  wrote:
> Yep, I saw that. I have the Auth component defined in the components
> array of my AppController. My UsersController inherits the
> AppController, so shouldn't the components array from the
> AppController be merged into the components array in the
> UsersController?
>
> On Oct 3, 12:07 am, Andras Kende  wrote:
>
>
>
>
>
>
>
> > Try this:http://book.cakephp.org/2.0/en/controllers/components.html
>
> > Andras
>
> > On Oct 2, 2011, at 10:56 PM, Robert wrote:
>
> > > Hey All,
>
> > > Was there a change in the way that components are loaded up in
> > > controllers? I looked at the source and didn't notice anything
> > > different between 1.3 and 2.0 surrounding this.
>
> > > I pasted my 1.3 source into a 2.0 directory structure and I'm in the
> > > process of re-cake-ifying itand in my Users controller I have
> > > $this->Auth->allow() being called in beforeFilter. With that, cake
> > > complains "Fatal error: Call to a member function allow() on a non-
> > > object" because the Auth component isn't loaded.
>
> > > However, I have verified that it is loaded in AppController (the
> > > parent controller), shouldn't the two components arrays be merged?
>
> > > This works in 1.3, I literally did a copy and paste of the app code.
>
> > > --
> > > Our newest site for the community: CakePHP Video 
> > > Tutorialshttp://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp 
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: history log table

2011-10-04 Thread majna
Add $actsAs to AppModel

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Combinates 8 elements using diferenet method

2011-10-04 Thread darkwolf
Hello EveryBody, I'm developing a web application with cakephp and
mysql. I have a CSV file that i'm using for compare every registry
with the Database, I need to Know if they are equals or not respect to
the database. But the method that i'm using maybe is not the best.
Mathematical Combinations from 8 elements are many to do a Sql query.
Anybody could tell me another method to do this sql query?. Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: One core, multiple apps, shared classes

2011-10-04 Thread Ernesto
everything is working fine except the assets sharing.

it looks like cake cannot find my "Assets" plugin :\

miss the good old 1.2 method :(

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem when downloading a video file

2011-10-04 Thread Ma'moon
Can you post your controller code and let us see how you exactly implemented
this?

On Tue, Oct 4, 2011 at 10:41 AM, thomaus  wrote:

> Nobody no clue?
>
> On Oct 3, 5:36 pm, thomaus  wrote:
> > Thanks for your answers.
> >
> > Here is how I set my header (the video file is a .mp4 one)
> >
> > header('Content-Description: File Transfer');
> > header('Content-Type: video/mp4');
> >
> > // This is for the mp3 file
> > //  header('Content-Type: audio/mp3');
> >
> > header('Content-Disposition: attachment; filename=' .
> $file);
> > header('Content-Transfer-Encoding: binary');
> > header('Expires: 0');
> > header('Cache-Control: must-revalidate, post-check=0,
> pre-check=0');
> > header("Cache-Control: private", false);
> > header('Pragma: public');
> > header('Content-Length: ' . $file_size);
> >
> > But anyway, the code works when not executed with CakePHP, so it
> > should not be a header problem.
> >
> > On Oct 3, 5:11 pm, somebody who carez 
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > You may need to set a correct header for the file to get the browser to
> > > process it correctly.
> >
> > >http://php.net/manual/en/function.readfile.php
> >
> > > Thank you,
> > > -Alex Goretoy
> >
> > > On Mon, Oct 3, 2011 at 10:03 AM, thomaus  wrote:
> > > > Hi there,
> >
> > > > I'm experiencing a very strange problem. I'm trying to remotely
> > > > download a video file.
> >
> > > > I've done a very basic PHP code using the readfile() function. This
> > > > code works absolutely fine.
> >
> > > > Now when I copy / paste the exact same code into my CakePHP
> > > > controller, the URL works, a file is actually downloaded, the size of
> > > > the downloaded file is correct, but the type of the file is not
> > > > recognized, i.e. the video can't be played.
> > > > I tried the same with a mp3 file, just to check if the problem was
> not
> > > > a video format one, and the same problem happened. And again the
> > > > original PHP code is working fine with this mp3 file.
> >
> > > > I have added these 3 lines just in case in my controller :
> > > >Configure::write('debug', 0);
> > > >$this->autoLayout = false;
> > > >$this->autoRender = false;
> > > > but the same problem happens.
> >
> > > > Any idea?
> >
> > > > --
> > > > Our newest site for the community: CakePHP Video Tutorials
> > > >http://tv.cakephp.org
> > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > > others with their CakePHP related questions.
> >
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> > > > athttp://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Core validation rules examples

2011-10-04 Thread euromark
to make sure you should use a full validation array

var $validate = array(
'title' => array(
  'myNotEmptyRule' => array(
'rule' => 'notEmpty',
...


On 4 Okt., 16:53, Jonathan  wrote:
> On Oct 4, 11:49 am, Jens Dittrich  wrote:
>
> > Have you checked the bug reports or fixes from version 1.3.6 to 1.3.12? You
> > are referring to an quite old release, could have been fixed already.
>
> I checked the code from the repository, and it didn't seem to have
> changed. Now I briefly ran through the tickets, but didn't find anyone
> related to this.
>
>   Regards
>
>     Jonathan

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Core validation rules examples

2011-10-04 Thread Jonathan
On Oct 4, 11:49 am, Jens Dittrich  wrote:

> Have you checked the bug reports or fixes from version 1.3.6 to 1.3.12? You
> are referring to an quite old release, could have been fixed already.

I checked the code from the repository, and it didn't seem to have
changed. Now I briefly ran through the tickets, but didn't find anyone
related to this.

  Regards

Jonathan

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem when downloading a video file

2011-10-04 Thread thomaus
Nobody no clue?

On Oct 3, 5:36 pm, thomaus  wrote:
> Thanks for your answers.
>
> Here is how I set my header (the video file is a .mp4 one)
>
>                 header('Content-Description: File Transfer');
>                 header('Content-Type: video/mp4');
>
> //             This is for the mp3 file
> //              header('Content-Type: audio/mp3');
>
>                 header('Content-Disposition: attachment; filename=' . $file);
>                 header('Content-Transfer-Encoding: binary');
>                 header('Expires: 0');
>                 header('Cache-Control: must-revalidate, post-check=0, 
> pre-check=0');
>                 header("Cache-Control: private", false);
>                 header('Pragma: public');
>                 header('Content-Length: ' . $file_size);
>
> But anyway, the code works when not executed with CakePHP, so it
> should not be a header problem.
>
> On Oct 3, 5:11 pm, somebody who carez 
> wrote:
>
>
>
>
>
>
>
> > You may need to set a correct header for the file to get the browser to
> > process it correctly.
>
> >http://php.net/manual/en/function.readfile.php
>
> > Thank you,
> > -Alex Goretoy
>
> > On Mon, Oct 3, 2011 at 10:03 AM, thomaus  wrote:
> > > Hi there,
>
> > > I'm experiencing a very strange problem. I'm trying to remotely
> > > download a video file.
>
> > > I've done a very basic PHP code using the readfile() function. This
> > > code works absolutely fine.
>
> > > Now when I copy / paste the exact same code into my CakePHP
> > > controller, the URL works, a file is actually downloaded, the size of
> > > the downloaded file is correct, but the type of the file is not
> > > recognized, i.e. the video can't be played.
> > > I tried the same with a mp3 file, just to check if the problem was not
> > > a video format one, and the same problem happened. And again the
> > > original PHP code is working fine with this mp3 file.
>
> > > I have added these 3 lines just in case in my controller :
> > >                Configure::write('debug', 0);
> > >                $this->autoLayout = false;
> > >                $this->autoRender = false;
> > > but the same problem happens.
>
> > > Any idea?
>
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Replacing tabs with spaces, finding the user view

2011-10-04 Thread Yves S. Garret
Sure it is.  I originally had my code with spaces.  After I ran cake bake
all, they're now tabs.

On Mon, Oct 3, 2011 at 4:46 PM, Ryan Schmidt wrote:

>
> On Oct 3, 2011, at 10:25, Yves S. Garret wrote:
>
> > Well, to be specific, I couldn't find anything on modifying the tabs vs.
> spaces info online after googling.
>
> That's really not a CakePHP question, but my text editor has a function for
> doing that; see if your text editor does. Or, if you like the UNIX command
> line, the "expand" command is useful. For example to convert tabs to spaces
> at 4 spaces per indent:
>
> expand -t 4 somefile > x
>
> Examine x, make sure it looks like you want it, then:
>
> mv x somefile
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Simple deleteAll() yet I am stuck..

2011-10-04 Thread Thomas Ploch

  
  
http://book.cakephp.org/de/view/1038/deleteAll

If you look at the method definition, you see that the conditions
don't have to be wrapped into an array with an 'conditions' key.

$this->ProjectModule->UsersModule->deleteAll($delCond['conditions']);

should do the trick.

Kind regards
Thomas

On 04.10.2011 15:47, sathyashrayan wrote:

  Thanks for the answer.. I did try your solution

$delCond['conditions'] = array('projects_id'=>
$projects_id,'project_modules_id'=>$projectModuleID);
$this->ProjectModule->UsersModule->deleteAll($delCond);

I am getting these error..

SQL Error: 1054: Unknown column 'conditions' in 'where clause' [CORE
\cake\libs\model\datasources\dbo_source.php, line 684]

Query: SELECT `UsersModule`.`id` FROM `users_modules` AS `UsersModule`
LEFT JOIN `project_modules` AS `ProjectModules` ON
(`UsersModule`.`project_modules_id` = `ProjectModules`.`id`) LEFT JOIN
`users` AS `Users` ON (`UsersModule`.`users_id` = `Users`.`id`) WHERE
conditions IN ('39', '27')

On Oct 4, 5:06 pm, Thomas Ploch  wrote:

  
Hello,
1.) When posting a problem to the group, especially database related problems, posting the "some mysql error" is vital for us to help you.
2.) You are overwriting the conditions array in line 2 of your example:
Try this instead (the 'AND' behavior is the default in cakephp, so you can safely ommit it):
$delCond['conditions'] = array(
    'projects_id'=>$projects_id,
    'project_modules_id'=> $projectModuleID
)
Kind regards
Thomas
On 04.10.2011 13:31, sathyashrayan wrote:This is the query for deleting multiple row. $query = "DELETE FROM users_modules WHERE projects_id='$projects_id' AND project_modules_id='$projectModuleID'"; I tried this $delCond['conditions'] = array('projects_id'=>$projects_id); $delCond['conditions'] = array('AND'=>array('project_modules_id'=> $projectModuleID)); $this->ProjectModule->UsersModule->deleteAll($delCond); But the delete query is not working. It shows some mysql error as a select rather than delete. I am executing this in projects_module_controller.

  
  



  




-- 
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php


Re: Simple deleteAll() yet I am stuck..

2011-10-04 Thread sathyashrayan
Thanks for the answer.. I did try your solution

$delCond['conditions'] = array('projects_id'=>
$projects_id,'project_modules_id'=>$projectModuleID);
$this->ProjectModule->UsersModule->deleteAll($delCond);

I am getting these error..

SQL Error: 1054: Unknown column 'conditions' in 'where clause' [CORE
\cake\libs\model\datasources\dbo_source.php, line 684]

Query: SELECT `UsersModule`.`id` FROM `users_modules` AS `UsersModule`
LEFT JOIN `project_modules` AS `ProjectModules` ON
(`UsersModule`.`project_modules_id` = `ProjectModules`.`id`) LEFT JOIN
`users` AS `Users` ON (`UsersModule`.`users_id` = `Users`.`id`) WHERE
conditions IN ('39', '27')

On Oct 4, 5:06 pm, Thomas Ploch  wrote:
> Hello,
> 1.) When posting a problem to the group, especially database related 
> problems, posting the "some mysql error" is vital for us to help you.
> 2.) You are overwriting the conditions array in line 2 of your example:
> Try this instead (the 'AND' behavior is the default in cakephp, so you can 
> safely ommit it):
> $delCond['conditions'] = array(
>     'projects_id'=>$projects_id,
>     'project_modules_id'=> $projectModuleID
> )
> Kind regards
> Thomas
> On 04.10.2011 13:31, sathyashrayan wrote:This is the query for deleting 
> multiple row. $query = "DELETE FROM users_modules WHERE 
> projects_id='$projects_id' AND project_modules_id='$projectModuleID'"; I 
> tried this $delCond['conditions'] = array('projects_id'=>$projects_id); 
> $delCond['conditions'] = array('AND'=>array('project_modules_id'=> 
> $projectModuleID)); $this->ProjectModule->UsersModule->deleteAll($delCond); 
> But the delete query is not working. It shows some mysql error as a select 
> rather than delete. I am executing this in projects_module_controller.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: One core, multiple apps, shared classes

2011-10-04 Thread Ernesto
nvm i figured it out.

wrongly set CAKE_CORE_INCLUDE_PATH :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Simple deleteAll() yet I am stuck..

2011-10-04 Thread Thomas Ploch

  
  
Hello,

1.) When posting a problem to the group, especially database related
problems, posting the "some mysql error" is vital for us to help
you.

2.) You are overwriting the conditions array in line 2 of your
example:
Try this instead (the 'AND' behavior is the default in cakephp, so
you can safely ommit it):

$delCond['conditions'] = array(
    'projects_id'=>$projects_id,
    'project_modules_id'=>
$projectModuleID
)

Kind regards
Thomas

On 04.10.2011 13:31, sathyashrayan wrote:

  This is the query for deleting multiple row.

$query = "DELETE FROM users_modules WHERE projects_id='$projects_id'
AND project_modules_id='$projectModuleID'";

I tried this

$delCond['conditions'] = array('projects_id'=>$projects_id);
$delCond['conditions'] = array('AND'=>array('project_modules_id'=>
$projectModuleID));
$this->ProjectModule->UsersModule->deleteAll($delCond);

But the delete query is not working. It shows some mysql error as a
select rather than delete.

I am executing  this in projects_module_controller.




  




-- 
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php


Re: truncate works wrong?

2011-10-04 Thread majna
You changed 'exact' option in second example: 'exact' => true

API:
exact - If false, $text will not be cut mid-word

Can you paste an example to reproduce this defect?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cupcake Forum with CKEditor

2011-10-04 Thread WhyNotSmile
Brilliant, thank you!  I really appreciate the Cupcake Forum, by the
way - it works really well.

Are there any advantages in upgrading to version 2.0?  How much work
would it be?  And is it stable?  I thought I'd downloaded the latest
stable version when I got it last week, but may have been looking in
the wrong place or something.

Thanks again for all your work on it.

Sharon



On Oct 3, 6:23 pm, Miles J  wrote:
> No that should do it. I was just stripping HTML since it was BB code
> only.
>
> @Webbed - Yeah, my site is a bit outdated :/
>
> On Oct 3, 3:06 am, WhyNotSmile  wrote:
>
>
>
>
>
>
>
> > I'm using version 1.9.
>
> > I think I've figured it out though - I removed the 'strip_tags' from a
> > few lines, and that has let the CK editor output go through ok.
>
> > Is there anything I need to add in to replace that, for security etc?
>
> > Sharon
>
> > On Oct 2, 3:24 am, Miles J  wrote:
>
> > > Well technically wrong, I released 2.0 Beta a month ago.
>
> > >https://github.com/milesj/cake-forum
>
> > > Secondly, what version are you using? 1.9 or 2.0? As they are vastly
> > > different.
>
> > > On Sep 30, 11:59 pm, WebbedIT  wrote:
>
> > > > MilesJ would be the best person, but not sure if he has much time to
> > > > support it nowadays.
>
> > > > It has not had an update since March 2010 so will probably need
> > > > various changes to work in Cake 1.3 too.
>
> > > > HTH, Paul.
>
> > > > On Sep 30, 5:34 pm, WhyNotSmile  wrote:
>
> > > > > I've integrated the excellent Cupcake Forum into my CakePHP app, and
> > > > > now I'd like to use CK editor for the posts, rather than BB Code.
>
> > > > > I've searched online, but I can't find any way to do this.
>
> > > > > I have integrated CK editor. and that's fine, but something in Cupcake
> > > > > is stripping out the formatting before saving the content, so I end up
> > > > > with just plain text.  Can anyone point me in the right direction for
> > > > > preventing it from removing HTML?
>
> > > > > Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Html helper - stop adding prefix unless explicitly specified

2011-10-04 Thread nowotny
On 28 Wrz, 19:44, euromark  wrote:
> i use a custom app helper method i called defaultLink() which resets
> all prefixes unless specified.
> although thats maybe not exactly what you have in mind
> but you could make sth similar with your own default values
>
> either way - called via
> $this->Html->defaultLink();
> in any view as always

Yeah... the idea was for me not to go into hundreds of view files and
editing the code manually...

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Simple deleteAll() yet I am stuck..

2011-10-04 Thread sathyashrayan
This is the query for deleting multiple row.

$query = "DELETE FROM users_modules WHERE projects_id='$projects_id'
AND project_modules_id='$projectModuleID'";

I tried this

$delCond['conditions'] = array('projects_id'=>$projects_id);
$delCond['conditions'] = array('AND'=>array('project_modules_id'=>
$projectModuleID));
$this->ProjectModule->UsersModule->deleteAll($delCond);

But the delete query is not working. It shows some mysql error as a
select rather than delete.

I am executing  this in projects_module_controller.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Force Trailing Slash and No WWW

2011-10-04 Thread euromark
you should know that it should be the other way around!
none => www

http://domain => http://www.domain

thats just how everyone does it... some conventions make sense to
stick to
but thats thats just my 5 cents


On 3 Okt., 22:41, Ryan Schmidt  wrote:
> On Oct 3, 2011, at 15:21, creat1v1ty wrote:
>
> > yeah, I'm familiar with the rewrite rule that would generally be used,
> > however I'm not sure how to do it within the Cake framework.
>
> > In Cake there are 3 .htaccess files:
> > In which of these files should I apply the non-www and trailing slash
> > rules?
>
> In a production environment, ideally you'd turn off .htaccess processing 
> altogether and put any needed rules in your httpd.conf.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Is there any way to mimic cakephp password hasing using java?

2011-10-04 Thread Richard Neil Roque
Thanks, i already got how to do it, i search for the code of security
and figure that it uses sha1 for hashing(default), many thanks again :D

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Is there any way to mimic cakephp password hasing using java?

2011-10-04 Thread Jens Dittrich
yes there is. Read the documentation about what the Auth-password method 
does.
It is hashing the field value with a hashing algorithm defined in Core.php 
and adds the salt value to it. Just use the same hashing method and the same 
salt and you should get the same result. 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Core validation rules examples

2011-10-04 Thread Jens Dittrich
Have you checked the bug reports or fixes from version 1.3.6 to 1.3.12? You 
are referring to an quite old release, could have been fixed already.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Core validation rules examples

2011-10-04 Thread Jonathan
In the cook book there are several examples of core validation rules
like:
  var $validate = array(
'title' => array(
  'rule' => 'notEmpty',
  'message' => 'This field cannot be left blank'
)
  );

However this seems to trigger a preg_match validation with
'notEmpty' (which is an invalid pattern). Tested with Cake 1.3.6.

The solution is to pass an array:
  'rule' => array('notEmpty'),

Can anyone confirm this? - And if so, is it a bug in the code or in
the documentation?

  Regards

Jonathan

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: truncate works wrong?

2011-10-04 Thread heohni
view:

   Text->truncate($data['Gesamtobjekt']
['OBJ_UET_WERBETEXT'], 150, array('ending' => ' ...', 'exact' => true,
'html' => true))?>


source:

  This apartment is situated in one of the most beautiful residential
complexes of Santa Ponsa and has a living-dining area on two levels,
as well a ...


Original text is (from database):
This apartment is situated in one of the most beautiful residential
complexes of Santa Ponsa and has a living-dining area on two levels,
as well as two bedrooms, two bathrooms (1 en suite) and an office. The
spacious open and covered terraces, plus interior patio and a
fantastic 180 m² - sea view over the bay of Santa Ponsa is what makes
the apartment unique. The exclusive apartment complex is situated on
the so-called Ensaimada hill, and has a large and beautiful pool area
with sun terraces.



On 23 Sep., 16:49, majna  wrote:
> can you paste code, input txt and output result
> so one can reproduce this...

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Ajax Link - How to exchange/toogle a link?

2011-10-04 Thread heohni
Hi,

yes I thought about this poss. But I thought I could find a solution
based on cake and not using jquery for it.
But thanks for sharing!!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php