Hi. to all
in my controller i am using one function.
function text() {
;;; 1000 lines of code
;;;
}
function add() {
//Here i want same code. is having in text function. it is possible to
call text() here.
// i want to reduce the code.
}
Check out the new CakePHP Questions site
I solved it, You can check out the code on my blog
http://www.whatartist.com/blog/2010/07/making-cakedc-tags-plugin-delete-by-model-only/
On Jul 8, 4:35 am, abocanegra aaronbocane...@gmail.com wrote:
I have been enjoying the Tag Plugin by CakeDC. However, I am having an
issue when it is
Bharadwaj, That's the best I could come up with in the PHP world.
Unfortunately the PEAR packages look outdated, and the Kohana
component is for that framework - not sure how it would work as a
stand-alone. There are ports in other languages (python and Objective-
C), but that doesn't help us.
Rule '/^[a-z]$/i' accepts strictly one latin symbol in any case.
Example: 'a' or 'B'.
Rule '/^[a-z][A-Z]$/i' is same as '/^[a-z][A-Z]$/' and accept strictly
two latin symbols, first in lowercase and second in upper. Example:
'aB'.
Rule '/^[a-zA-Z]$/i' is same as '/^[a-zA-Z]$/' and same as
Hi friends,
i dont know this questions has been asked before or maybe straight forward.
But i am not able to relate this to any solution.
i had one flip-flop function triggered via a $html-link() this will check a
Boolean column from database and displays Active or Inactive on the
anchor of
$this-text();
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 14 Jul 2010, at 07:15, Master Ram wrote:
Hi. to all
in my controller i am using one function.
function text() {
;;; 1000 lines of code
;;;
}
function add() {
//Here i
its very unlikely that all 1000 lines need to be in the controller
most of them can be outsourced to libs, components or even model
functions
only the remaining lines (maybe the half) should then be divided - and
only if it makes sense
you should add _ in front of the method, though. this way its
hi,
i am trying to pimp up my forms with css. but it seems a little more
difficult with cake. technically i wanna have my login form close to
facebook. elements side by side
username - inputfield password - inputfield
remember me forgot password?
i know it works like that:
You probably just need to tweak the CSS using display: inline and so on.
What does the HTML output look like? It'll be easier to advise once we see that.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 14 Jul 2010, at 10:43, Tomfox Wiranata wrote:
hi,
i
hi jeremy,
is there a feature that show how it looks in html?
On 14 Jul., 11:48, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
You probably just need to tweak the CSS using display: inline and so on.
What does the HTML output look like? It'll be easier to advise once we see
well i guess you meant it the other way around^^
add() and _text()
On 14 Jul., 11:04, euromark dereurom...@googlemail.com wrote:
its very unlikely that all 1000 lines need to be in the controller
most of them can be outsourced to libs, components or even model
functions
only the remaining
View page source in your browser.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 14 Jul 2010, at 10:54, Tomfox Wiranata wrote:
hi jeremy,
is there a feature that show how it looks in html?
On 14 Jul., 11:48, Jeremy Burns | Class Outfit
If you have the cake.generic.css file or default cake php file.
there you will get a .input, textarea
classs
just change as you need
On Wed, Jul 14, 2010 at 3:43 PM, Tomfox Wiranata
tomfox.wiran...@gmail.comwrote:
hi,
i am trying to pimp up my forms with css. but it seems a little more
of course ^^
here you go :)
form id=UserLoginForm method=post action=/muh/users/login
accept-charset=utf-8
div style=display:none;input type=hidden name=_method
value=POST //div
div class=loginfield requiredlabel
for=UserUsernameBenutzername/label
input name=data[User][username] type=text
With my current craze of moving all logic from my models to my
controllers, a slight problem has risen - namely I can't seem to use
$this-paginate() in a Model function thats called in a controller.
$this-find() works perfectly find, and I'm trying to replace $this-
find( 'all', $conditions );
Read up on call backs and the cake's ajax afterRender or
beforeRender/load - it'll give you a better understanding on how best
to you use AJAX.
On 14 July, 08:37, engine radicalet...@gmail.com wrote:
Hi friends,
i dont know this questions has been asked before or maybe straight forward.
But i
(Sorry I meant from my Controllers to my Models!)
On 14 July, 12:12, Shaz shazam...@gmail.com wrote:
With my current craze of moving all logic from my models to my
controllers, a slight problem has risen - namely I can't seem to use
$this-paginate() in a Model function thats called in a
Hi
i am using ordinary search functionality in my business controller . but
now need to implement FULL TEXT SEARCH.
can any one give idea ?? Thanks in advance
Thanks
Annamalai.S
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
I would defer to Dr. Loboto on this, since he obviously knows more
about regex than I do. Maybe he can suggest the correct rule . . . ?
My only response to your last post, Felix, is that you cannot remove /
i since the / is required to delimit the regex. In other words,
just removei.
Good
What DB are you using?
Often fulltext search is implemented in a DB level (MySQL with MyISAM tabes
and Postgres has this feature built in).
2010/7/14 Annamalai annamala...@gmail.com
Hi
i am using ordinary search functionality in my business controller . but
now need to implement FULL TEXT
Hi,
[sorry, for the CSS question in what is primarily a CakePHP list]
I'm sure many of you had the issue : in the record view, the column
width for the fields is fixed, lending field names over the field
values. I can't find where to change this in the CSS file. Hints ?
TIA,
Charles
Check out
It makes no sense for paginate to be called as-is in a model.
The `paginate` method is part of the controller, because it relies on
URL settings (which page, sort order, etc) which only the controller
can access. Allowing the model to access these parameters directly
would violate MVC - in a bad
On Wed, July 14, 2010 2:45 pm, Charles Bueche wrote:
Hi,
[sorry, for the CSS question in what is primarily a CakePHP list]
I'm sure many of you had the issue : in the record view, the column
width for the fields is fixed, lending field names over the field
values. I can't find where to
A regexp that only allows letters, numbers and spaces?
'/^[a-z0-9\\x20]*$/i'
A regexp that only allows words of letters and numbers, each
separated by a single space:
'/^(?:[a-z0-9]+\\x20)*[a-z0-9]$/'
hth
grigri
On Jul 14, 2:44 pm, McBuck DGAF mcbuckd...@gmail.com wrote:
I would defer to Dr.
Ok, I've got everything working now!
The rules I have ended up with are;
First name: 'rule' = '/^[a-zA-Z]+$/',
Second name: 'rule' = '/^[a-zA-Z]+$/',
Company name: 'rule' = '/^[a-zA-Z\s]+$/',
(Company name should also allow spaces)
I realise that I could use /i instead of the [a-zA-Z] bit
Hi Mike,
you rock my world, found and patched !
Firebug installed, it looks nice, I will have to dig into it.
Thanks for the advice,
Charles
On 7/14/10 15:51, Mike Karthauser wrote:
On Wed, July 14, 2010 2:45 pm, Charles Bueche wrote:
Hi,
[sorry, for the CSS question in what is primarily
i've been attempting to reduce memory consumption on my app too.
use debug($this) to see the different objects loaded into memory, and make
sure to pass by reference where possible.
i also added this snippet at the bottom of my default.ctp:
echo 'uMemory Usage:/ubr /';
$memory_in_bytes =
Thanks for your reply .
I am using MySQL with MyISAM tables.
and this my table structure, fields marked red color are need to use in
search
CREATE TABLE IF NOT EXISTS businesses (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
created date NOT NULL,
modified datetime NOT NULL,
user_id
On Tue, Jul 13, 2010 at 2:57 PM, Felix Fennell fe...@felixfennell.co.uk wrote:
Removing the /i doesn't do anything unfortunately - I read the
handbook page too and thought it should work.
They use this to check for any string using alphanumeric characters +
dashes + underscores;
Hello,
I am very new to cake and started using to test things out and so far
loving it. Have had some complications and been searching everywhere
for answers on it but no luck.
Here's what I have:
two models: Artists Albums which are associated with each other with
the hasMany / hasOne
Hi all,
I follow the document
http://book.cakephp.org/view/1284/Class-Attributes-and-Variables
to send mail.
Address the message is going to (string). Separate the addresses with
a comma if you want to send the email to more than one recipient.
I tried to send many to email with separate comma
Hi everyone,
I am currently investigating CakePHP for an upcoming project, however
I have read some articles suggesting the performance of CakePHP 1.2 is
well behind that of comparable frameworks under load.
In particular, one article (found here:
Hello,
How i can route my URLs without showing the ID in the URL. For example
i have:
www.mywebsite.com/id-article-title.html and i want only
www.mywebsite.com/article-title.html
Regards
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related
So I guess you need to apply some style to div.loginfield label and
div.loginfield input[type=text]. Perhaps make them display: inline for a
start and give the label a width?
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 14 Jul 2010, at 11:02, Tomfox
Have you try caching the queries? Just add var $cacheQueries=true; in
your app_model.php
Cache query will not make a query twice example;
$this-set('name',$this-Model-field('name',array('id'=$id)));
//more code
if($this-Model-field('name',array('id'=$id))=='something'){
//doSomething
}
Thanks grigri, cricket, I've got it working now - I worked out the +
thing from a regex tutorial.
On 14 July 2010 02:09, cricket zijn.digi...@gmail.com wrote:
On Tue, Jul 13, 2010 at 2:57 PM, Felix Fennell fe...@felixfennell.co.uk
wrote:
Removing the /i doesn't do anything unfortunately - I
Here there is a good example :)
http://dev.mysql.com/doc/refman/5.1/en/fulltext-natural-language.html
You should add a fulltext index to that table. Probably in Cake you will
need to do a $this-Model-query, I don't know if with find methods you can
use MATCH expression.
2010/7/14 Annamalai
Have you tried to decalre the display field?
if you add the line
var $displayField = 'name';
in the artists model class it should show the name instead of the id field.
Hope that helps!
On Wed, Jul 14, 2010 at 4:15 AM, Jramirez07 jramire...@gmail.com wrote:
Hello,
I am very new to cake
perhaps the problem is that the Taggable behavior has no beforeDelete
callback
On Wed, Jul 14, 2010 at 2:45 AM, abocanegra aaronbocane...@gmail.comwrote:
I solved it, You can check out the code on my blog
http://www.whatartist.com/blog/2010/07/making-cakedc-tags-plugin-delete-by-model-only/
hi matthew
On Wed, July 14, 2010 5:44 am, Matthew Porter wrote:
Hi everyone,
I am currently investigating CakePHP for an upcoming project, however
I have read some articles suggesting the performance of CakePHP 1.2 is
well behind that of comparable frameworks under load.
In particular, one
See the following thread describing some of the highest traffic cake
sites...
http://groups.google.com/group/cake-php/browse_thread/thread/a87ac46d4f590566/e2c097afb7eda061?lnk=gstq=cakephp+high+traffic+sites#
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their
On Wed, Jul 14, 2010 at 5:42 AM, alopes adrianolopesfrei...@gmail.com wrote:
Hello,
How i can route my URLs without showing the ID in the URL. For example
i have:
www.mywebsite.com/id-article-title.html and i want only
www.mywebsite.com/article-title.html
Add a column to your table to hold
Hi Bakers!
Is it ok to render an element from a controller? Or as a best
practice, let the controller always render the view and then in the
view render the element?
Thanks! KS
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You
It's usually best to have the view render the elements and to pass
settings/variables to view that passes it on to the element but
to every rule there are exceptions.
On Wed, Jul 14, 2010 at 1:52 PM, sanedevil sanede...@gmail.com wrote:
Hi Bakers!
Is it ok to render an element from a
Hi.
I have urls like this in my project:
www.mysite.com/practitioners/view/1
and I want to convert them to:
www.mysite.com/the-name-of-the-practitioner
So I started using slugs (and the corresponding db field) and
configured this:
Router::connect('/:slug/
One use I've had for rendering an element in the controller(well, from
a component actually) is for a form plugin- my users could put a
bbcode like tag in the body of a page and it would render the proper
form within their content... normally I would do this processing with
a helper, but the form
Above your route for the slugs you need to add a route for every
controller as follows:
Router::connect('/example/:action',array('controller'='example',
'action' = 'index'));
Or, you could modify your slugs routing and add a path before the slug
e.g.
Router::connect('example/:slug/
Thanks a lot Sam. Great idea.
I'll add the routes for the other controllers.
Regards.
On 14 jul, 16:33, Sam s...@masterscommission360.com wrote:
Above your route for the slugs you need to add a route for every
controller as follows:
Can you get it to work with just one recipient? Because my first
question is if you (or your host) has setup sendmail properly. You
can always use a SMTP server to send your mail which is usually
recommended for bulk email anyway.
Nick
On Jul 13, 9:27 pm, googong gong...@gmail.com wrote:
Hi
Thanks everyone.
Seems CakePHP can handle some serious load. It's a pity there isn't
more information on this and performance tuning tips in the Cookbook.
It's also a shame there is no mention of performance improvements in
the release notes for each version.
Something CakePHP really needs to
I have read some articles suggesting the performance of CakePHP 1.2 is
well behind that of comparable frameworks under load.
In particular, one article (found
here:http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/)
Alternatively, can anyone comment on the validity or otherwise
Its a good idea never to route something to the root, you should
always put them in a container.
/user/miles
/team/lakers
/band/u2
Etc.
On Jul 14, 4:23 pm, Roland Pish rolandp...@gmail.com wrote:
Thanks a lot Sam. Great idea.
I'll add the routes for the other controllers.
Regards.
On 14
why don't you dike this smartie thing out?
On Jul 13, 4:11 am, Grzegorz Pawlik grzegorzpaw...@gmail.com wrote:
That's not what I'm asking about. Lets say I NEED to use TIMESTAMP and
CURRENT_TIMESTAMP as default value, and in that case cakePHP
misbehaves.
On Jul 13, 7:04 am, Walther
Yes other options are fine
-one to recipient,
-one and many cc recipient.
-one and many bcc recipient.
I wonder why to option need to be string because cc and bcc are
array and it works fine.
On Jul 15, 6:37 am, nurvzy nur...@gmail.com wrote:
Can you get it to work with just one recipient?
Thanks for your reply ...
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
Yes, this kind of suck. I wanted to have both created_at and
updated_at fields, which I remember being trivial at mysql, but cake
doesnt allow you to:
- have two or more timestamp fields
- name your timestamp field whatever you want
On 13 jul, 04:11, Grzegorz Pawlik grzegorzpaw...@gmail.com
I don't know if this would work for you and your set up, but could you populate
and set the timestamp from within Cake using the date() function instead of
relying on the database?
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 15 Jul 2010, at 05:26, djogo
Hi All,
I have an applicetion developed using cake php.
in which we can add,delete,and update the data.
once i view and delete any record it will delete from database ,but
once clicking browser's back button it reloads the deleted record's
data.
kindly let me know the solution.
thansk in
See this thread:
http://groups.google.com/group/cake-php/browse_thread/thread/94b90f0a9a0cdfd1/7ccde5a6f8f86f95?hl=enlnk=gstq=back+button#7ccde5a6f8f86f95
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 15 Jul 2010, at 05:38, vanishri wrote:
Hi All,
I
Thanks @ohcibi
Yes, I realise the article is old ... however, it is still not
flattering for Cake.
It would be ideal if there was a follow-up test, or even something
from the Cake team indicating how to get the best performance out of
the framework to address these concerns.
To the uninitiated,
60 matches
Mail list logo