I am INCREDIBLY frustrated right now -- mostly because NOTHING has
gone right so far in this little endeavor.
At this point, I'm trying to map urls to repsective controllers and
actions like so:
Router::connect('/:controller/:action', array
('controller'=>'shorteneds', 'action'=>'index'));
i've
What DB do you use? It is not CakePHP, it 's DBMS problem.
If MySql, set encoding to UTF8 and DB collation to utf8_unicode_ci,
not utf8_general_ci.
On Sep 15, 5:11 am, Roman wrote:
> Hi,
> I have created filter using paginate with extra options taken from
> input fields. Service and database
There is one plugin for ACL-Management through a GUI:
http://dev.newnewmedia.com/cakephp/admin/acl
Perhaps there exist other solutions?
On Sep 15, 4:01 am, takabanana wrote:
> Is there an open source (or publicly available) CakePHP app that does
> the management of standard Cake 1.2 ACL ARO/ACO
Should add, this is all inside a .ctp file (it will be the GUI with
Ajax calls when its finished).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googleg
I'm writing a plugin that makes use of a third-party Javascript
library and CSS (extjs 3.0). However, I am having problems getting
the external CSS file to work properly.
The CSS file contains relative paths to background images, and this is
what is causing the problem.
1) I tried to unpack the
Hello,
I have a question about multiple relations to the same model (http://
book.cakephp.org/view/851/Multiple-relations-to-the-same-model)
I have two tables, Infos and Ielements. Ielement belongsTo Info and
Ielement hasAndBelongsToMany Info (and vica versa).
Both relations work WHEN THE OTHER
It just means that your models are not properly named or not properly
placed. Some people save models with not strictly lower-cased
filenames, some people just misspell filenames or varibales, etc and
etc.
On Sep 15, 3:58 am, Herberth Amaral wrote:
> Sorry for post in this old topic, but I am ha
Thanks for the reply. So in your code, this validation is associated
with password, so wherever I decide to render validation errors for
password, this would be shown there. What if I wanted to render this
validation error separately from other field validations? Ultimately,
I'd like validation er
Add this to your AppModel.
/**
* Validates two inputs against each other
* @param array $data
* @param string $confirmField
* @return boolean
*/
function isMatch($data, $confirmField) {
$data = array_values($data);
$var1 = $data[0];
$var2 = (isset($this->data[$this->n
Is there an open source (or publicly available) CakePHP app that does
the management of standard Cake 1.2 ACL ARO/ACO data through a web GUI?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to
Thanks, for your ans Martin Westin & Marcelo Andrade.
On Sep 14, 1:13 pm, Martin Westin wrote:
> I am sure Safari does cache the page for you. My feeling is that you
> can't fix this with a header. My feeling is that Safari has this
> "feature" for some kinds of "back-clicking" no matter what y
Hi All,
My apologies if this has been discussed before, giving a search of
the forum didn't reveal anything. I'd think this would be easy. I'm
attempting the classic validation of two password fields to ensure
they're identical. I could get this to work by associating a custom
validation method
thats what bbcode, placeholders etc. and sprintf(), replace functions
etc. are for
On 14 Sep., 20:11, brian wrote:
> On Mon, Sep 14, 2009 at 8:06 AM, djogo wrote:
>
> > That's exactly the point, I want it to be in a database column, and
> > allow the end-user to edit it. Therefore, $test would
the nightly build does not have the date problems
so i guess this was an error on building the official release
the version number is still 1.2.4 in the nightly as well though
On 15 Sep., 01:45, frsp wrote:
> Yes, it is a bit strange
>
> * @version $Revision$
> * @modifiedby $LastCh
Yes, it is a bit strange
* @version $Revision$
* @modifiedby$LastChangedBy$
* @lastmodified $Date$
and "return $config['Cake.version'] = '1.2.4.8284';" for cake 1.2.5
Any comments from developers?
On Sep 10, 5:53 am, George H wrote:
> Good going with the release of 1.2.5! I've a
If you have to click "login" and go to the login page, then there isnt
a referrer.
--~--~-~--~~~---~--~~
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 uns
Maybe I been looking at this for too long...
It will not save and I cannot see why...The data gets sent,
debug shows the data being sent and the data pulled from the $userInfo =
$this->User->slugToId($slug); function
the function has the user id data in it.
if (!empty($this->data)) {
is there somebody can help me with this
On Sep 14, 6:48 am, cakephp_rocks wrote:
> this is in my app controller
>
> function beforeFilter( ) {
> parent::beforeFilter();
> $this->Auth->loginAction = array('admin' => false,
> 'controller' =>
> 'users', 'action' => 'login')
I think I figured it out. I used the example from the CakeBook but
one line was causing me grief:
ini_set('session.cookie_domain', env('HTTP_BASE'));
Maybe something about my home development setup but HTTP_BASE is 0.0.1
instead of 127.0.0.1. So I hard coded it to 127.0.0.1 and it works ok
now.
I've had to switch from high because my ajax calls were mangling
sessions info. So I switched to medium. Now it appears no matter
what I do (tried a custom config and all) my session creates a cookie
that expires in 1 week. When was on high the cookie would expire with
the session (i.e. the bro
Sorry for post in this old topic, but I am having the same problem in
my models and their files are properly named. Also, the validation
rules, primary key and relationships that I am setting on these
models can't work. I spent almost an hour searching google a way to
resolve this problem, but I
Hi,
I have created filter using paginate with extra options taken from
input fields. Service and database use UTF-8 (checked). When I try to
filter word with polish characters (e.g. ósma) cakephp does not return
proper value.
Do you have any idea ?
Regards,
Roman
--~--~-~--~~--
On Mon, Sep 14, 2009 at 3:04 PM, ildw.com wrote:
>
> Hello and thanks for your reply,
>
> the problem is that I don't have the header or the footer in the views/
> layouts/
>
> I only have default.ctp like this:
>
>
>
> Listing Websites
> charset('UTF-8'); ?>
> css('style.css'); ?>
>
hey thanks, i just been reading the forums, trying to find the best
links that have tutorials, sample code, thoughts and maybe try to
compile them or start compiling the resources so we can have more
access to cake php in general. right now im looking through the
threads just getting a general ide
Hello and thanks for your reply,
the problem is that I don't have the header or the footer in the views/
layouts/
I only have default.ctp like this:
Listing Websites
charset('UTF-8');?>
css('style.css'); ?>
Listing
Websites
link('Admin panel', '/admin/index'); ?>
and
On Mon, Sep 14, 2009 at 8:06 AM, djogo wrote:
>
> That's exactly the point, I want it to be in a database column, and
> allow the end-user to edit it. Therefore, $test would keep a HTML/RTF
> document with tags .
>
> I want to get it, perform variable substitution, and then e-mail it,
> or save i
Marcelo,
I have created a loop to reformat the array values but I will have a
go at array_map or even array_walk.
Thanks for your help.
Gerard
On Sep 14, 3:27 am, Marcelo Andrade wrote:
> On Sun, Sep 13, 2009 at 4:34 PM, Gerard wrote:
>
> > Marcelo,
>
> > I can't see how Set::format will wo
I just ran into the same issue. In my case, I wanted the form to use
method="get" (or type=>get). This causes cakephp (1.2.5) to use the
wrong string for the name. The id attribute is correctly named, but
not the name attribute. Is this a bug?
Not sure if this is your issue or not, but I did a
then what about
var myVar = $(this).attr('name').substr(4);
myVar = myVar.replace(/\][(.*?)]/gi, '');
myVar = myVar.substr(1, myVar.lentgh);
or why not:
aData = myVar.split('[');
and then cutting the last string?
Faifas
On Mon, Sep 14, 2009 at 17:50, Dave Maharaj :: WidePixels.com <
d...@wide
Try: $form->input(StartDate, array('type'=>'date',
'id'=>'StartDate'));
You should get:
.
.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-p
Hi guys,
i'm using some HABTM-relationships between models, from whom one is an
adaptation model. By switching the adaptation i want to set a kind of
master filter for example in beforeFilter of app_controller.php. But i
always receive a sql error because the adaptation code column isn't
part of
I tried to install your bundle into Netbeans 6.5 but there was no
install under Tools -> Options so downloaded and installed 6.71 and
managed to import your snippets.
To be honest I have no idea how to use them and 6.71 is working very
slowly (freezes for a second or two after every click) so unl
Hi,
I have a dynamic pulldown in a form populated from a db, on an add/
edit function it shows the available addresses in Alphabetical order,
but on edit I would like it to show the current selected address as
default.
This is the line from my controller
$this->set('addresslist',$this->Full
Thanks Richard for the code. Works like charm.
--~--~-~--~~~---~--~~
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
Maybe this article will assist you -
http://teknoid.wordpress.com/2008/07/17/forcing-an-sql-join-in-cakephp/
On Sep 14, 8:52 am, tiberium911 wrote:
> Part of what I need to use CakePHP for is designing a report system
> for computer related data. There are filters on the web page that
> users ca
Insert to your beforeFilter in UsersController:
public function beforeFilter() {
parent::beforeFilter();
Security::setHash('md5'); // always use md5
...
On Sep 14, 10:58 pm, benmatthew wrote:
> I'm having issues with the auth component in CakePHP 1.2. The hashes
> genera
Yeah I tried that. Going with this as it seems to work.
if ($status == 0) {
//Account is Pending admin approval;
$this->redirect(array('controller' => 'users',
'action' => 'pending'));
exit();
do exit() after render.
On Sep 15, 12:21 am, "Dave Maharaj :: WidePixels.com"
wrote:
> I have a simple check in my beforeFilter
>
> function beforeFilter() {
> parent::beforeFilter();
> $this->Auth->autoRedirect = false;
> $status = $this->Session->read('Auth.User.s
Try throwing an "exit();" or "die();" after you render the 'pending'
view.
- Jamie
On Sep 14, 8:21 am, "Dave Maharaj :: WidePixels.com"
wrote:
> I have a simple check in my beforeFilter
>
> function beforeFilter() {
> parent::beforeFilter();
> $this->Auth->autoRedirect = fal
my guess is that your validation rules are not correctly set
On 14 Sep., 09:55, WebbedIT wrote:
> @ Bill: your frustration is not really with CakePHP it's with the
> learning curve that exists when first trying to apply all the
> conventions. It's probably something very simple that is causing
Part of what I need to use CakePHP for is designing a report system
for computer related data. There are filters on the web page that
users can set to limit which computers are returned. Now my problem
with CakePHP lies with the ability to prune results based on
associations. A given computer has
Somewhat closer.
var myVar = $(this).attr('name').substr(4); removes data leaving me with
['User']['username']
['username'] will change from form to form so the replace username will not
work because i will maually have to tell it what to strip out for each form
field.
Image a form that has som
I'm having issues with the auth component in CakePHP 1.2. The hashes
generated seem to be different from what's generated from registration
and login. This creates a mismatch with the hash password stored on
the DB.
$this->Auth->hashPasswords($this->); hashes the same as the Login
function. But t
I have a simple check in my beforeFilter
function beforeFilter() {
parent::beforeFilter();
$this->Auth->autoRedirect = false;
$status = $this->Session->read('Auth.User.status');
if ($status == 0) {
//echo 'Account is Pending';
$this->render('pending')
I had to do this once and it was a pain but I got it working.
Here's what I did:
I hijacked all of the vBulletin membership features and redirected
them to a cake based alternative. So things like login, registration,
editing profile etc in vBulletin were all redirected to a cake
equivalent.
In
first i hope you are not working under windows
because you need DS then (instead of just /)
and i guess you are short of one DS right at the beginning of display
path
those should be relative to the root (DS.'...') - same with error
image
second:
"and as this helper does not use the config.php,
You say the queries are good, but have you run them in a terminal or
DB interface?
It's difficult to say for sure, but I doubt you really need to have
all of those models in the controller's $uses array. It should be
sufficient to rely on the models' associations to get at some of those
models (P
Hi, I'm writing my cookies with Cookie->write('key','value',true); //
true for $encrypt
On read I'd like to know if the cookie I read was encrypted or not.
The Cookie component don't seem to have a method to tell me if a
cookie is encrypted or not..
--~--~-~--~~~---~
Well thats terrible practice. Do not save PHP code within the
database, nor use eval().
On Sep 14, 5:06 am, djogo wrote:
> That's exactly the point, I want it to be in a database column, and
> allow the end-user to edit it. Therefore, $test would keep a HTML/RTF
> document with tags .
>
> I want
Set debug to 2 and also check your error log (including Apache's). You
might have some unrelated error related to this controller.
Also, whenever you use a beforeFilter() make a habit to always call
parent::beforeFilter(), even if AppController doesn't have one,
because you might someday add it.
var myVar = $(this).attr('name').substr(4);
myVar = myVar.replace(/\][username]/gi, '');
myVar = myVar.substr(1, myVar.lentgh);
Faifas
On Mon, Sep 14, 2009 at 15:57, Dave Maharaj :: WidePixels.com <
d...@widepixels.com> wrote:
> I know its more of a jQuery question...i asked on the jQuery grou
Yes that will work, but
I have $form->input('username', array('id' => 'username')). But I need the
model name to pass as a variable. Because on other pages
name="data[User][username] will be name="data[Post][title] or
name="data[Profile][name] and so on.
Js:
$.post('/users/ajax_validate',
Try this: $('input[name="data[User][username]"]) ?
But we're better off by passing an id to the $form->input('username',
array('id' => 'username')).
This way, we'll be able to use $('#username') to access the element.
On Sep 14, 7:57 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> I know its more
this is in my app controller
function beforeFilter( ) {
parent::beforeFilter();
$this->Auth->loginAction = array('admin' => false, 'controller'
=>
'users', 'action' => 'login');
$this->Auth->loginRedirect = '/';
$this->Auth->logoutRedirect
I could easily skip that validation and always let a new vote through.
Only when the same user votes again their original vote would be
updated. That is totally a matter of taste. I just happen to like
being abel to change my mind and update my vote. That doen't work
better for rating users, posts
I know its more of a jQuery question...i asked on the jQuery group but no
luck and its Cake related so I will try here.
All the forms have this structure name="data[Model][field]"
How can I get User as a variable from name="data[User][username]"
var myVar = $(this).attr('name').substr(4);
aler
Here are two ways to do it:
http://book.cakephp.org/view/113/Code-Generation-with-Bake
http://book.cakephp.org/view/105/Scaffolding
Rick
On Sep 13, 2:33 pm, ProBowlUK wrote:
> Can anyone help with example pages (or pointers) for PHP pages that
> manage (Insert, Delete, Update) database tab
I wrote one a while back and posted it to this group. can't seem to
find it now, but here's a link to it stored elsewhere:
http://markmail.org/message/nleqrkgtm2ji6sfe
On Sep 14, 11:10 am, Shaun wrote:
> I have a table called comment_ratings where users can rate comments up
> or down. It look
That's exactly the point, I want it to be in a database column, and
allow the end-user to edit it. Therefore, $test would keep a HTML/RTF
document with tags .
I want to get it, perform variable substitution, and then e-mail it,
or save it in another database column, but I just don't want to
displ
Hey,
you can create a custom validation function which will check for unique data
in both fields.
Faifas
On Mon, Sep 14, 2009 at 13:10, Shaun wrote:
>
> I have a table called comment_ratings where users can rate comments up
> or down. It looks like this:
>
> TABLE: comment_ratings
>id =
I have a table called comment_ratings where users can rate comments up
or down. It looks like this:
TABLE: comment_ratings
id => INT
rating_value => TINYINT
comment_id => INT
user_id => INT
created => DATETIME
modified => DATETIME
Users should only be allowed one vote o
oh thank God someone did read my post and answer it.
thanx webbedIT! but how could i have the array you presented
if i want to maintain the same view as i did on my post?
or can you share me any idea on how to go about saving multiple
OfferedSubject at once, each having their own HABTM Course.
ple
Wow, that was a long post ... not many people will stck around to read
all of that :o)
>From what I have read it appears you are trying to save multiple
OfferedSubject at once, each having their own HABTM Course.
For starters, you simply can't use one save call to do this. You can
use saveAll()
I am assuming the region field denotes if it's a US State or a
Cacandian Province, if so order by region ASC, name ASC
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email
I get also the model name .
Is it possible to obtain:
.
.
Instead of:
.
.
On 14 Set, 09:38, WebbedIT wrote:
> Sure:
>
> $form->input(StartDate, array('type'=>'date'));
--~--~-~--~~~---~--~~
You received this message because you ar
I'm using TinyMCE + MCImageManager (€32) which is really good, but I
believe there are free plugins out there for TinyMCE (only realised
this after buying MCImageManager, but very happy with my purchase).
--~--~-~--~~~---~--~~
You received this message because you a
Thank you for your response..
On Sep 14, 11:01 am, Kees de Bruin wrote:
> SreenivasS. Nair wrote:
> > Hi all
> > i want to store the login ,logout time of all users in my
> > application.
> > For that i wrote a method, CAN I PUT THAT METHOD IN AUTH.PHP FILE AND
> > CALL FROM THE A
@ Bill: your frustration is not really with CakePHP it's with the
learning curve that exists when first trying to apply all the
conventions. It's probably something very simple that is causing your
issue and once you fall into the trap once you should not fall into it
again.
My first app took me
Sure:
$form->input(StartDate, array('type'=>'date'));
--~--~-~--~~~---~--~~
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, se
>>> You'd probably be best off creating a view (in the database, not a
>>> Cake view) to do this. Off the top of my head, the query would use a
>>> self join to grab the most recent record for each client. With proper
>>> indexing, it should be fairly efficient.
>>
>> That seems like overkill to m
hi, u can use isset() function with session id as parameter.it returns
false if session id is not set otherwise return true.
if(isset(session['id'])
echo session['id'];
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
Hi,
i'm quite new to cakePHP and i have a problem with a project started
by someone else.
I have a helper table for the gender of persons named "sexes" and a
related table (hasmany relation) with the translation for the
different languages "sex_translations".
Here is the content of my "Sex" mode
Sreenivas S. Nair wrote:
> Hi all
>i want to store the login ,logout time of all users in my
> application.
> For that i wrote a method, CAN I PUT THAT METHOD IN AUTH.PHP FILE AND
> CALL FROM THE AUTH->LOGIN() AND LOGOUT() METHODS?
> IS DER ANY ISSUES FOR MODIFYING THE AUTH.PHP?
My app_controller.php
My tasks_controller.php
checkSession();
}
}
in my computer, it works fine ( tasks_controller access to
app_controller, output "aaa" )
but when I run on another computer, it not works ( tasks_controller
NOT access to app_controller, and blank page is displayed )
--
- In app_controller.php
- In tasks_controller.php
class TasksController extends AppController {
var $name = "Tasks";
function beforeFilter() {
$this->checkSession();
}
}
In my computer, tasks_controller.php can access app_controller.php and
show "aaa", but whe
$xml = new SimpleXMLElement($xmlFileData);
//print_r($xml);
for($i=0$i<100;$i++){
$image=$xml->header1;
$link=$xml->link1;
doSomething($image,$link);
}
Here i need to fetch header2, hearder3 and so on.
How can i do that?
I tried $image=$xml->header[$i] and severa other th
Can anyone help with example pages (or pointers) for PHP pages that
manage (Insert, Delete, Update) database tables ?
db = list of URLs related to Tenpin Bowling
schema = http://www.ProBowlUK.co.uk/files/ERD_00.pdf
example data = http://www.ProBowlUK.co.uk/files/URLs.pdf
cheers
.
--~
77 matches
Mail list logo