Bom, na realidade o html helper não fica disponível sozinho, ele
precisa ser chamado dentro do controller ao qual será trabalhado.
Você pode criar o seu próprio helper e fazer como este exemplo
Exemplo:
class UsersController extends AppController
{
var $name = 'Users';
var $helpers = array(
Olá!
Alguém sabe como fazer p/ um helper ser acessível em todas as views? Como o
HtmlHelper.
Abraço
--
André Porto Leal Piantino [EMAIL PROTECTED]
SkypeId: andrepiantino
--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP
Eu estou em uma batalha o cake está ganhando de 100 a 0, como é que eu
faço pra criar a home do site?
Tenho que fazer um helper para cada coisa que eu tiver na home page do
site? Eu pensei que tinha que fazer um HomeController e já dava, mas,
me enganei feio, mudei até o admin route para home e
As a heads up make sure you avoid reserved words in php as well as cake
On 8/12/07, Muhammad Ishaq [EMAIL PROTECTED] wrote:
Thanks a lot Geoff, It solved the problem... :) Everything works fine now...
CakePHP is really MVC taken to the extreme...
On 8/13/07, Geoff Ford [EMAIL PROTECTED]
Hii to all,
I'm using cake php for editorial process page. In that page we have
several field, in which user can edit those. After this he can click
to next or prev button to move either way to edit another page.
Suppose if he click on next , it will show a alert message Do you
want to save the
I call for a model with bindmodel. Then I bind another model to that
model.
$this-controller-$model-Section-Layout-bindModel
Section binds Layout, and Layout binds TemplateLayout.
With recursive is set to 2 on the model Section, I get all the results
I need. The problem Is that I get extra
Hello,
One solution is to use javascript.
You'll have to use a listener on the field you want to check, like
this (using prototype) :
$('yourTextField').observe('blur', function(e)
or
$('yourform').observe('submit', function(e)
{
var textfield = Event.element(e)
// perform an ajax request to
Hello,
One solution is to use javascript.
You'll have to use a listener on the field you want to check, like
this (using prototype) :
$('yourTextField').observe('blur', function(e)
or
$('yourform').observe('submit', function(e)
{
var textfield = Event.element(e)
// perform an ajax request to
in model (kode_kab.php)
i have script like this :
...
var $belongsTo = array ('KodeProv' = array(
'className' = 'KodeProv',
'conditions'='',
'order'='',
'foreignKey'='kode_kab_prov_id')
);
...
and in model (kode_prov)
...
var $hasMany = array ('KodeKab' =
In this case the URL with GET parameters is not readable at all :-).
For examle this is might be a result of search or filter form.
On Aug 13, 7:42 am, Grant Cox [EMAIL PROTECTED] wrote:
It's intentional, for convenience.
The simplest solution would be to use
I just made an ajax app that has a couple of refreshing divs in it,
using $ajax-remoteTimer. The elements usually update with the right
content, but once and a while, this error message is served instead:
Warning: Unexpected character in input: ' in
A small request for developers of Security component. :-) Please make
an ability to switch off form data validation and autocreation of
hidden '__Token' fields when using Security and form/ajax helper in
Cake 1.2.
I know about Controller-disableFields. But automatically generated
__Tokens are
On 8/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
A small request for developers of Security component. :-) Please make
an ability to switch off form data validation and autocreation of
hidden '__Token' fields when using Security and form/ajax helper in
Cake 1.2.
I know about
This is not a bug. Unless the query generated includes a join to the
TemplateLayout model's table, then you cannot include those fields.
What associations are there between the three models? Since Cake's
JOINS will only join a single association, it may be possible for you
to query the Layout
I'm really not sure what could be causing the issue. However, when
you run your site in production mode (DEBUG 0) then this file will not
be written to - only read from. So as long as it's not corrupted when
you first switch to DEBUG 0 it'll remain ok regardless of load.
On Windows I get
The PHP back end has encountered a syntax error, but reporting the
'wrong' line.
Actually, the line is correct. That's the point at which the PHP
backend gave up processing the file.
i.e. the syntax error only became apparent when the whole block of
code (terminated by the } ) was processed.
Hi,
Maybe a bit off-topic but how can I use the requested action in the
model I user for authorization?
I use type 'model' as authorization:
$this-Auth-authorize = array('model'='User');
and I have a function in my user model
function isAuthorized($user = null)
{
//...
}
In that function I
You you want to check on based on the action then you should use the
controller based auth. Model based auth gets the action based on how
the action is mapped to the CRUD. So, in the model that is all you
deal with, create, read, update, delete.
I think this bakery article answers your question:
http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller
I prefer to add a page-by-page route in routes.php:
Router::connect('/contact', array('controller' = 'pages', 'action' =
'display', 'contact'));
Better yet, (doesn't use an 'A' tag to mark up the destination:)
div id='Verb'This is where I want to go/div
a href='#Verb'Send me there/a
On Aug 8, 11:42 pm, Geoff Ford [EMAIL PROTECTED] wrote:
Links to the same page do not require the full url so why not use straight
html?
a name=Verb/
I use these forms to make a custom filters or searches.
On Aug 13, 4:09 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
On 8/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
A small request for developers of Security component. :-) Please make
an ability to switch off form data validation
yeah I am doing something with a quantity in a HABTM, it will work.
check out felix's blog post - best description of the new 'with'
parameter in 1.2 and how to use it - read the commetns too!!!:
link -
var $helpers = array('Cache');
--~--~-~--~~~---~--~~
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
The following component (+example controller using it) might help...
I use it a lot.
===
http://bakery.cakephp.org/articles/view/ecache-easy-per-user-or-per-anything-cache-of-html-or-arrays
Caching is basically required for any data-heavy or interaction-heavy
site... but you need to
Caching is basically required for any data-heavy or interaction-heavy
site... but you need to be in control of who gets what cache; more
specifically, you need to be sure people only get their own cached
content.
Cake 1.2 has caching... great caching if your contact is the same
for everyone...
Hi!
I'd like to set up a rss feed for my cake app and I need a way to get
the absolute url of my app (http://www.domain.com/...) to fill the
link/link and guid/guid tags of my feed. Can anyone help me,
please?
Thanks in advance
--~--~-~--~~~---~--~~
You
Hi,
I was wondering if bakery.cakephp.org is really having some problems,
or is it something wrong with my browser. for example:
- I cannot create my profile there (it says action profile/add doesn't
exist)
- In the morning, I couldn't login through Fire Fox, when I tried IE, it let
me
I'm having hard time imaging why the need for array layout like the
latter -- implementation or algorithm where this array needed may have
a rethinking.
...but, and I'm not math expert (well, this isn't a question of math
anyway), you could just...
1) sort the 1st array
2) you can now take
I can also add the post-submission code to look out for the string
'NULL' instead of an ID,
This is what I'd do ;p) I'm using 1.1, tho.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to
Back at this after a coupla days away - thanks much for all the input.
Still having trouble with something entirely too basic. Based on
Geoff's last input, here's my current code:
In controller:
function getListData($data){
$data = $this-Model-query(SELECT
Also search seems to work only from homepage ? not in other pages :s
--~--~-~--~~~---~--~~
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
Oh yeah and you can't post question marks and whatever in the title..
can be pretty annoying at times.
On Aug 13, 9:00 pm, Mech7 [EMAIL PROTECTED] wrote:
Also search seems to work only from homepage ? not in other pages :s
--~--~-~--~~~---~--~~
You received
In another attempt at getting this up and running, I copied the
relevant code from the php file that was being called, and added a
method inside
my app_controller and created a view of the same name. Here is my new
function:
function sc_select_ajax_handler( )
{
Use HtmlHelper::url [1]
Regards,
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
[1]
http://api.cakephp.org/class_html_helper.html#50485bc686b21a873c7e1d9972f84360
On 8/13/07, nitifixis [EMAIL PROTECTED] wrote:
Hi!
I'd like to set up a rss feed for my cake app and I need a way to
I'm trying to configure a setup with multiple apps that are accessible
to each other. The sort of setup we need might be N number of apps
running on one CakePHP installation with this sort of install:
www.domain.edu/news/
www.domain.edu/polls/
www.domain.edu/catalog/
These apps would need to be
svn update
--~--~-~--~~~---~--~~
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
I'm using the latest (5501) from 1.2 branch of the repository.
I baked my app with scaffolding and the associated actions at the
bottom of the page are generating two different result urls.
li?php echo $html-link(__('List', true).' '.__('Recipes', true),
array('controller'= 'recipes',
IIRC, cake was populating ENUM fields in dropdown. But, when I tried
the new 1.2 branch version (https://svn.cakephp.org/repo/branches/
1.2.x.x ), I found that it isn't working. Is anything has been changed
(for any reason)?
--
?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!com
I am trying to follow through the manual on ACL, through SSH i have
initdb and then started to create aro as directed...
however, for starters null is not accepted. It advises replacing this
with '0' so i do...
then trying to work out the set parent... this does not match manual
to help notes in
That has been answered in this list many times before.
http://manual.cakephp.org/chapter/models
Look there for genrateList, pay attention to $keyPath/$valuePath,
study the examples.
You can also search this list.
Another way is to set $displayName in the model.
On Aug 13, 3:27 am, [EMAIL
On Aug 8, 12:05 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Inline editing has more to do with the client-side scripting than the
backend framework (of course they have to work together).
I really like the editing capabilities of the ExtJS
On Aug 13, 8:50 pm, nitifixis [EMAIL PROTECTED] wrote:
I'd like to set up a rss feed for my cake app and I need a way to get
the absolute url of my app (http://www.domain.com/...) to fill the
link/link and guid/guid tags of my feed. Can anyone help me,
please?
$rss-url('/', true);
If
On Aug 14, 12:16 am, LunarDraco [EMAIL PROTECTED] wrote:
I'm using the latest (5501) from 1.2 branch of the repository.
I baked my app with scaffolding and the associated actions at the
bottom of the page are generating two different result urls.
snip
https://trac.cakephp.org/ticket/3060
It is pretty easy to get going with the extjs lib
1) unzip the whole thing including css files, images, etc. in you
webroot/js directory. I tried putting it in the vendor directories but
paths get screwed up.
2) In each of the cake templates you want to use it
echo $html-css(array(
gwoo,
I've tried the svn update and still have the same results.
I'm now at revision 5516
The router.php file was last modified by you on 8/7, this does not
seem to be the problem.
As I reverted to revision 5474 of the file and still have the problem.
I've updated my view to only have the two
I've been scratching my head over this straightforward problem.
I have a relatively static but site-configurable front menu array
structure that
appears on all pages in my app instantiated via default.ctp (using the
useful
http://bakery.cakephp.org/articles/view/css-menu-helper )
I had assumed
http://php-coding-practices.com/cakephp-specific/how-to-put-combined-fields-into-cakephps-model-generatelist/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
I want to get some JSON that treats true/false like booleans instead
of strings -- this, they are unquoted.
Cake's JavaScript helper ($javascript-object) handles booleans
without quoting, but unless I specifically typecast the data as
boolean, it looks like a string.
$javascript-object has the
I just wanted to discuss about the ways we can integrate Yahoo Browser
Based Authentciation.
Is it the right solution to write the whole code required by yahoo in
the AppController beforeFilter() Function?
--~--~-~--~~~---~--~~
You received this message because
I just wanted to discuss about the ways we can integrate Yahoo Browser
Based Authentciation.
Is it the right solution to write the whole code required by yahoo in
the AppController beforeFilter() Function?
--~--~-~--~~~---~--~~
You received this message because
Hello everybody,
I'm a newbie to this wonderful framework, and I'm finding it more and
more interesting.
I've got a small problem modeling a relationship between my entities
using Cake's relationships.
Let's say that I have a table of Workers, people who work :), and a
table of Sites, places
I've setup a simple Users table with scaffolding to test the master/
slave setup suggested in this thread:
http://groups.google.com/group/cake-php/browse_thread/thread/58ea010f930fab6c/df64d493b24d5a67
But it does not work for me either (as I've read someone else is
having the same problem)
make sure that you are using
'connect' = 'mysql_connect'
not pconnect in your db config
On 8/13/07, Masao [EMAIL PROTECTED] wrote:
I've setup a simple Users table with scaffolding to test the master/
slave setup suggested in this thread:
As you said, the Javascript helper object() function already correctly
deals with booleans. So the problem is just with your data - so what
is your data? Do you mean because the data from the database is
actually a string based int (ie '0' or '1'), and you want this to be a
boolean before going
The data is just a straight draw from the database such as a
controller
$data=$this-Contact-findAll(
null,
array('id','uid','fullName','email','admin','active'),
$order,
Found this one earlier. What myGenerateList does, it does very well,
much easier than using an afterFind to concat things. But, from what I
can tell thus far, it has the same limitation, in that it can't
combine data across two models and display it in a third.
On Aug 13, 2:58 pm, cdomigan
Hi Andrea
I've got a small problem modeling a relationship between my entities
using Cake's relationships.
Let's say that I have a table of Workers, people who work :), and a
table of Sites, places where those people must go to work.
I'd like to create a Presence relationship between
Aside from finding a few javascript examples about changing form
information in a parent windows from a child window I've actually not
found anything regarding the above subject line. What I'm trying to do
is upload images in an iframe and then update the proper div with
ajax. If at all possible.
You've got a error in the getListData function - remove the curly barce
between the end of the query and $listdata = array();
Geoff
On 8/14/07, Beertigger [EMAIL PROTECTED] wrote:
Found this one earlier. What myGenerateList does, it does very well,
much easier than using an afterFind to
Thanks, Geoff,
I caught that one earlier, also found what I think was a missing ] to
close the
$listdata[$data['Team']['team'] = $data['Sport']['sport'] . '-' .
$data['Team']['team'];
now: $listdata[$data['Team']['team'] = $data['Sport']['sport'] . '-' .
$data['Team']['team']];
Still no
Yeah, I agree with daschl, you don't need a specific host that runs
CakePHP. It's not like Ruby on Rails. CakePHP is simply a set of PHP
Scripts that can be executed by the PHP Interpreter. Any web host that
have PHP4/PHP5 installed will do.
daschl wrote:
well, you dont need a host running
I have done this, but I have used a bit of perl script as well in
order to handle the uploading file.
make a search on caketimer with google, this is where I found most
information for this.
On Aug 14, 3:10 am, Dave [EMAIL PROTECTED] wrote:
Aside from finding a few javascript examples about
62 matches
Mail list logo