Hi all,
while i was baking cakePHP with a mysql database, I have this
situation where I was requested to confirm an association "Payment
belongsTo Pay? (y/n)". I find this weird cos I do not have a database
called Pay. Is pay some kind of an attribute in cakePHP that i should
associate with it? I
Even if i use array_push($this->data['Genre']['id'], 51); without the
conditional statement it still doesn't add 51 to the Genre id array.
$this->data['Genre'][] = 51; doesn't work either. I've tried a few
variations and can't get it to work. First I need to figure out how to
add values to the $th
Deb, I may be sticking my nose in unnecessarily, and if so, please
accept my apologies, but when Samuel says "custom datasources are
accessible" he isn't referring to creating the web service. He is
referring to some of that Cake vocabulary. DataSource is a class in
Cake. Check out the inherite
*sigh* - Looked at web site and that is NOT the problem, but this is
not over, it seems. I ran into it again on some unit tests, and when
using the bake script, I still getting errors on certain tables. Here
is some output:
Welcome to CakePHP v1.2.1.8004 Console
I'm a technical editor for php|architect, and I can vouch for the fact
that ZF is appearing recently in articles because those were the
articles being submitted. The mag has run articles on CakePHP,
symphony, etc., in the past, and will run articles on ZF and other
frameworks n the future. php|a
Thanks John,
I'll take a look at it... :)
On 15 jan, 17:53, Flipflops wrote:
> Hi Mike
>
> I built a calendar helper about a year ago. It is pretty basic -
> literally just a shell that lays out the days of the week and a back
> and forward button. Its up to you to get the data to it in the rig
if (isset($this->data['Genre']['id']) &&
is_array($this->data['Genre']['id']) && !in_array('51',
$this->data['Genre']['id']))
{
$this->data['Genre'][] = 51;
// or, array_push($this->data['Genre'], 51);
}
On Thu, Jan 22, 2009 at 8:28 PM, kai wrote:
>
> In $this->data:
>[Genre] => Array
In $this->data:
[Genre] => Array
(
[id] => Array
(
[0] => 2
[1] => 55
)
)
In sql:
WHERE `Genre_id` IN ('2', '55')
Yeah, I want to add to their selection, not override it.
On Jan 22, 5:21 pm,
i use $form->end();
and it does submit trough ajax updater successfully.
see the code which is generated by ajax->form();
you will figure out that it just a normal new Ajax.Updater().
sometimes i meet my limitation when use ajax on cake,
so i just write normal html and javascript on the view
If a user "chooses a genre" what does the data look like? Before your
code does anything. Is it well formed?
If you want to set ['Genre']['id'] to some value, what does the data
look like before that? It seems like you're trying to override the
user's selection, rather than add to it. Do you want
First thing is to make sure that the page with the form is being
served with the proper encoding. Use $html->charset() in your layout.
The form should submit using the character set that it was displayed
with.
Next, make sure that that's what your browser is using--check "page
info" in the browse
Cake isn't limited to MySQL, nor (when using that particular DB) to
InnoDB. If you want to use ENGINE=MEMORY for sessions (a perfectly a
sound idea) I don't see any reason why that'd be a problem.
On Thu, Jan 22, 2009 at 5:49 PM, Miles J wrote:
>
> Yes Ive seen them, but id prefer to use a MEMOR
When a user submits a form I'm hoping to apply some logic to their
choice. The form takes user input and translates their selection into
conditions to use in a query. One part of the selection is the choice
to choose a genre. I'm hoping to say something like, if user chooses
one genre or more then
If the value of disabled form element could changed dynamically (maybe you have
some lil process on your view), maybe you need some little javascript script
here...
function test(){
document.ItemEdit.getElementById('ItemQuantytyHid').value =
document.ItemEdit.getElementById('ItemQuantyty')
> I want to have a form text input get submitted, but also want it to be
> disabled on display.
>From http://www.w3.org/TR/html401/interact/forms.html#h-17.12 :
...the INPUT element is disabled. Therefore, it cannot receive user
input nor will its value be submitted with the form.
you also need
> Bump! Anyone ...?
Don't bump, if nobody answers is probably that it has been answered
before or you can easily find the answer in google.
> On Jan 21, 4:16 pm, Pyrite wrote:
>> Is there a way I can restrict controllers by group?
>>
>> Like $this->Auth->require('someGroup');
>>
>> Otherwise, i
Hi Jason,
if the password-hash is not the solution, additionally you can go this
way.
There is a good tutorial with a demo-download on:
http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
Try this and compare the steps with your application and your config.
I think, so you can get
Can you explain what data and how it works?
Place extra calls, queries in your afterFind().
--~--~-~--~~~---~--~~
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.
Yes Ive seen them, but id prefer to use a MEMORY table. Anyone done
this before, or will it not work since Cake uses InnoDB?
Also what about the user groups, I mainly ask because I heard ACL lags
a bit with a ton of users.
--~--~-~--~~~---~--~~
You received this me
Make sure your password in the DB is hashed.
Also check your salt:
http://www.milesj.me/blog/read/3/debugging-the-cakephp-auth-component
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to thi
Hi Pyrite,
I found a nice tutorial from francky06l on:
http://www.cakephpforum.net/
"Set authorization according to role"
Hope that helps
RoVo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To pos
hi,
i am currently developing an application with CakePHP, but i have a
serious problem with encoding. my database records are in Turkish.
when i view a record, there is no problem and i can view Turkish
characters. but when i try to edit a record, all fields that contain
at least a Turkish charac
I want to have a form text input get submitted, but also want it to be
disabled on display.
Eg. $form->input('frmInputQuantity', array('label'=>'Quantity:',
'disabled'=>'disabled'));
This does not get submitted into $this->data. How can I change what
gets posted to $this->data with the form help
How do you put the close tag in a form created by $ajax->form() ?? Why
is there not an $ajax->formEnd() similar to the FormHelper's $form->end
() ?
Also, when I create a form with $ajax->form(), and I add a submit with
$ajax->submit(), it does not submit the form. A usage example would be
great.
On Thu, Jan 22, 2009 at 2:21 AM, Diego Caro wrote:
>
> Hi for all.
>
> I read [1], but that method doesn't works for me. I want to translate
> the short name a month (for example: "Jan", to "Ene" in spanish )
> using TimeHelper (timeAgoInWords function). How to make it?
>
> Thanks, and good luck
Bump! Anyone ...?
On Jan 21, 4:16 pm, Pyrite wrote:
> Is there a way I can restrict controllers by group?
>
> Like $this->Auth->require('someGroup');
>
> Otherwise, if the user is not a member of that group they don't get
> access.
>
> Also, where does the information in $this->Auth->user() get
My site only uses a 2 select, the 2nd select then shows a bunch of
form input fields. The code you posted helped a lot!
I would just stick with Javascript on the client end to hide things,
that's what I am having to do. If Select A changes, I call javascript
to just hide the form input fields unt
Hi Martin,
you are right! Better to search for the '>', not for "\n"
My imaginable solution may be like this way - put the attributes to an
array...
$this->__header = trim( str_replace( a( '<'.'?', '?'.'>' ), a('', ''),
substr(trim($this->__rawData), 0, strpos(trim($this->__rawData),
'?'.'>') )
I had the same problem in my mediaplayer plugin and solved it by using
mediaView to serve flash (.swf) files from webroot. It works.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this gr
As part of my login query, I am writing the user role to the the
session with $this->Session->write('User.role',$this->$dbuser['User']
['role']).
However, when I call the $this->Session->read('User.role'), it is only
returning the first character of the role.
If I place the whole result in the s
Hello,
I just started using CakePHP and can't get the AuthComponent to accept
a valid username and password - I keep getting "Login failed. Invalid
username or password." I've set up a "users" table in my db with the
login credentials set to:
username: username
password: password
Here is my cod
HI,
I had already found this post it was most helpful.
What i ended up doing is using the sitemap example to create my xml
file.
I found $xml->serialize gave me attributes instead of elements. Which
is not what i would class as xml.
On Jan 21, 9:17 pm, Webweave wrote:
> Of course it depends o
Got it!
{ Big sigh }
Cake's Xml classes use PHPs "Xml Parser". And PHPs parser
automatically converts the contents to UTF-8.
http://www.php.net/manual/en/xml.encoding.php
So no matter what I had in the file (of the three supported charsets
at least) I will end up with utf-8 text. Good to know.
websta i try this before but get the same problem, and of course thank you
for that tip
and RoVo thank you t give me the appropriate knowledge about the use of
prefix and now i face a new problem is how to make a custom routing to two
dir one for admin and other for the super admin like i enplane
Hi ReVo,
$__header contains a string of the first line in the xml. this will
usually contain something like
xml version="1.0" encoding="UTF-8"
since the tag characters are stripped away. But it may also contain
the whole of, or part of, the xml since xml files are valid without
any whitespace.
A
AppController extends Controller {
...
function beforeFilter() {
$this->Auth->autoRedirect = false;
...
}
UsersController extends AppController {
function login() {
if ($user = $this->Auth->user()) {
$url = ...
$this->redirect($url);
Aha! After further investigation, the .htaccess from cake's root was
missing. Once I created that, all was fixed.
On Jan 22, 10:20 am, Tony Thomas wrote:
> I'm moving my CakePHP app onto to a Media Temple Dedicated Virtual
> server and my paths are all wrong.
>
> There seem to be two issues, one
How are you creating the links? If you're using the HtmlHelper and an
array to build the URL, pass 'admin' => 0 as the last param.
On Thu, Jan 22, 2009 at 11:56 AM, gkc wrote:
>
> I am currently using the default admin routing for the few pages that
> have admin functions. However, for pages th
Like I said in the first reply here, a "who's online" feature was
discussed in this group very recently. I just found the thread:
http://groups.google.com/group/cake-php/browse_frm/thread/50fd37fe850cb31/6e65e7fcc6c0e1bc?lnk=gst&q=who%27s+online#6e65e7fcc6c0e1bc
There's an older one here:
http:
I am currently using the default admin routing for the few pages that
have admin functions. However, for pages that dont have admin
functions, the links still display admin in front and thus I get
function/ view errors. How can I remove the admin part from the link
that does not have any admin f
I'm moving my CakePHP app onto to a Media Temple Dedicated Virtual
server and my paths are all wrong.
There seem to be two issues, one more severe than the other:
First, the paths to webroot don't work, so the head of my document
links my stylesheet like so:
Notice that first, index.php is in
Hey thanks. I'm just building a simple registration app, it's for
work so it won't be on the internet just yet. I am just making
SOAP calls, I don't have to invent the services. I thought since
the app is simple it would be a good time to try out a new
framework.
Deb
On Jan 22, 10:05 am, Samuel
Does anyone know how to redirect a user once they login succesfully
based on their User Group Id?
When a user is created they are assigned a User.Group_id in the table.
I need to get the group_id and redirect.
Using Auth Component.
I have 3 groups:
Admin -> group_id = 0
Manager -> group_id = 1
M
Adam
I created an article for full Validation of User Models.
It includes the methods to validate username , email, require special
characters, length and matching passwords passwords. It also takes
care to ensure that emails and usernames are unique.
It also has some logic to ignore these fie
Hello
i'm having some troubles with an HABTM relationship.
the following code isn't my real app, just a simplified version.
my app has 3 models
- Customer
- Phone_Number
- Customer_PhoneNumber
in "Customer" model i defined the HABTM relationship:
class Customer extends AppModel {
var
Hi Martin,
the header is stored in:
var $__header = null;
may be, it's only used in the header-function of xml.php?!?
but alternatively you can use the option-param e.g.:
$rss = new XML($url_to_an_rss_feed, array('encoding'=>'ISO-8859-1') );
If you have PHP5, as well you can use SimpleXML - lik
http://www.google.com/search?q=cakephp%20soap%20model
there are some good links hidden in google ;) Really what you are
probably looking for is doing a custom datasource. So that might be
the key to finding things in the bakery and book. Sometimes the key
is figuring out where the heck to star
Hi there,
I'm considering using cakephp for a small project. The only thing is
instead of using a database, we use SOAP calls and I couldn't figure
out from the docs if this would work ok.
Would it?
Thanks,
Deb
--~--~-~--~~~---~--~~
You received this message bec
Turns out I had neglected to read the FAQ on scriptaculous requiring
all .js files to be available - or specify which ones you need!
Hope this helps someone.
matt
On Jan 21, 3:26 pm, mrg wrote:
> On Oct 12 2008, 12:37 am, ORCC wrote:
>
> [..trimmed...]
>
>
>
>
>
> > The page seems to load cor
On Jan 22, 12:10 pm, Liket wrote:
> Can't seem to execute the cake.bat. Set all the environment variables
> correctly, I think. Using xampp server so my environment varaibles is
> set to C:/xampp/htdocs/cake and C:/xampp/php
>
> I make my way to C:/xampp/htdocs/app and type cake. Cake starts
>
Hi,
This must be something obvious I am missing, so I thought I'd ask.
I load an rss feed:
App::import('Core', 'Xml');
$rss = new XML($url_to_an_rss_feed);
And thought that these would automatically reflect the encoding (and
version for that matter) of the xml loaded:
debug( $rss->encoding );
de
Hey,
Has anyone posted this issue to the bug tracking system?
It looks like generated cache file doesn't contain model loading like
1.1 version did.
I don't want to rewrite all forms by hand.
Gediminas
On Jan 21, 11:44 am, chanon wrote:
> CakePHP 1.2 Final has been released and this is still
You don't really need to change the location in the source to display
sql debugging in a pretty way.
http://snook.ca/archives/cakephp/debug_styles/
For any debug() statements you put in your code you would have to
override that function and save them all until you get to the layout.
But the reaso
Can't seem to execute the cake.bat. Set all the environment variables
correctly, I think. Using xampp server so my environment varaibles is
set to C:/xampp/htdocs/cake and C:/xampp/php
I make my way to C:/xampp/htdocs/app and type cake. Cake starts
listing diffrent options and so on. But half way
Hi,
Suppose i have to execute multiple queries .. and display the data
together using the pagination helper .. how do i do that .. i ll have
to execute multiple queries because its giving me data in order of
relevance ..
Abhishek
--~--~-~--~~~---~--~~
You received
FIXXED!! YAY!
Ok, I have to navigate to 'D:/Server/cake/'
then type 'cake bake -app ../www/app1'
and it works!!!
Hope this helps someone else!
d.
On Jan 22, 11:21 am, "designv...@gmail.com"
wrote:
> No worries! Thanks anyways!
>
> Is there anyone else out there that could maybe shed som
Ok, so I have figured one thing out - i wasnt using the CLI version of
PHP ??
Anyways, I have bake coming up now, but it wont recognise existing
apps, tries to create new ones everytime...
Any ideas anyone?
TIA
d.
On Jan 22, 11:21 am, "designv...@gmail.com"
wrote:
> No worries! Thanks anyway
Hey folks,
if you are in Berlin or close by, Tim and I are organizing a CakePHP
meetup there next week Friday. If you are interested in coming, leave
a comment on our blog:
http://tinyurl.com/ab5j65
-- Felix Geisendörfer aka the_undefined
--~--~-~--~~~---~--~~
Yo
I'm working with no prefixes..
On Jan 21, 10:04 pm, "websta*"
wrote:
> If you get your database connection details from the ConnectionManager you
> will at least be able to deduce your table prefix and integrate this into
> your querries.
>
> -Original Message-
> From: cake-php@googlegro
No worries! Thanks anyways!
Is there anyone else out there that could maybe shed some light?
d.
On Jan 20, 4:23 pm, leo wrote:
> Sorry, I can't offer any more help.
> I've switched to Mac, I ditched AMP stacks and I bake by hand, not
> with a machine - somehow it seems quicker that way.
>
> On
No worries! Thanks anyways!
Is there anyone else out there that could maybe shed some light?
d.
On Jan 20, 4:23 pm, leo wrote:
> Sorry, I can't offer any more help.
> I've switched to Mac, I ditched AMP stacks and I bake by hand, not
> with a machine - somehow it seems quicker that way.
>
> On
Hi all,
I'd like to change the location where cake inserts its debug
statements (SQL queries, timings) in my layout. The reason is that
when my app goes alpha and is sent to QA I would like them to quickly
know which queries are being fired and what is happening but in an
optional way. Hence usin
What about the other 2 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
To unsubscribe from this group, send email to
cake
It would be great if all coding is given free here.
On Sat, Jan 17, 2009 at 11:07 AM, Miles J wrote:
>
> If so, how did you do the following:
>
> - Determining if a user has read a thread or leave it unread, also
> marking all threads as read
> - Whos online (thinking of using a model for a memo
>From http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
(first comment)
SELECT SEC_TO_TIME( SUM( TIME_TO_SEC( `time` ) ) ) AS total_time FROM
time_table;
So you should be able to add a "fields" to your search where you put
the above MySQL trick. You may also want to add a "GROU
Thanks RoVo,
That's what I was afraid of. I don't like modifying dist-files, but it
looks like I have to.
Let's just hope nothing changes in index.php for a while :)
/Martin
On Jan 20, 1:16 pm, RoVo wrote:
> Hi Martin,
>
> > Unfortunately defining "TMP" in bootstrap.php is too late.
> > It is
Hi medo,
Please read this article in the bakery:
http://bakery.cakephp.org/articles/view/using-cake_admin-for-multiple-user-types
May be, that helps you...
Like websta said, the right way is, to use of 'prefix':
'prefix'=>'admin'
But use it in both routings, like this:
Router::connect( '/admin/
67 matches
Mail list logo