On Jun 26, 10:55 am, Smelly_Eddie <[EMAIL PROTECTED]> wrote:
> No advice, really?
Work through the errors? PHP normally gives really easy to understand
errors. When you find one, do a search across your whole project and
fix 'em all. Most will probably be able to be search/replaced in one
batch.
This should work:
EmailTwo = new EmailComponent(); ?>
Just make sure you have the component listed in the
Controller::components array.
On Mar 4, 4:25 pm, Danomite <[EMAIL PROTECTED]> wrote:
> I need a way to have one controller have multiple instances of a
> component. Is there a way to do th
For common elements (stuff that would be in the sidebar or whatever)
app_controller is your best bet. For less common ones just include the
helper in the controller that the elements are being used in. Unless
you have a huge number of controllers it should be pretty simple.
On Mar 4, 5:51 pm, Mec
I'd definitely go for 1.2 using PHP 5.
On Mar 4, 3:32 am, Reza Muhammad <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I was just reading about CakePHP, and I was thinking to use CakePHP
> for my web applications, as it looks fun and easy to code. What I
> would like to know is, which version should
That seems pretty reasonable if you want to keep things really
modular. I say go for it.
On Mar 4, 8:46 pm, Chris <[EMAIL PROTECTED]> wrote:
> At my office, we are working to completely rebuild our existing
> site,www.sportingnews.com. We have mocked up a rough example of a
> page,www.sporting
You could go a couple different ways... Since you have a different
layout you probably also have a different stylesheet. If that's the
case, just modify the message style in it and you're good to go. If
you're using a shared stylesheet you can modify the call to
sessionComponent::setFlash() and se
> However, when i click edit it will only populate the input
> fields not the file field, and if i update it like that it creates a
> new entry and leaves the file field null. Is there something I am
> missing?
File fields cannot be pre-populated as a security measure so files
don't get accident
> There has to be better ways. Any idea?
I don't have anything set up for guests and it works well. If a page
requires a user or admin and there is no valid user session, it gets
denied. No database hit required.
--~--~-~--~~~---~--~~
You received this message beca
> Ah, but I downloaded the homepage for the site using curl and it has
> the same prefix, so it's not just for XLS generation - that's just the
> one that seems to break as a result. The HTML files have the same
> problem, but browsers ignore it. So whichever file it is, it appears
> to be one tha
> Ok .. I understand you can call it from the view .. but if you look 4
> posts above, my goal is to call it inside a controller, like you would
> a flash():
Just set() a variable and have the layout look for said variable and
create the div for it.
In controller:
$this->set('modal', array('Suc
> I am interested to know what other (more experienced) bakers think of it.
> Is it usable? Any suggestions?
It seems like overkill... What do you need a counter for?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "C
> is there a way to not overwrite the field
> unless a new image is uploaded. essentially only activate the file
> upload if somebody adds a file otherwise it remains as it was?
It looks like all your controller does is manage the upload, so you
could simply check to see if that field is populat
> Cool. That´s what I wanna know. But now I have a new question,
> regarding to Auth:
I believe that's the default behavior in AclComponent for protected
pages. So if the user doesn't have access to a page and are not logged
in they will automatically be shown a login form. Along with a flash
con
> I believe that's the default behavior in AclComponent for protected
> pages.
I meant AuthComponent :).
> Another question: where do you set if a page requires a user or admin?
That belongs under the ACL component, Auth just shows they are indeed
logged in. ACL says what they can do. In my set
> That seems like an option to re-create flash(). So you would set a
> variable, the page reloads, and it shows the message. What I am trying
> to do is trigger a popup window without the page reloading.
If you want to do it without reloading the page then you must be
sending out an AJAX call of
It's just a Flash slideshow, feed it some images and it will show
them. If anything it would be a Helper, not a component. You can feed
it images with a view that outputs in XML in this format:
http://www.joomlashine.com/modules/jsn_imageshow/xmldata105.xml?xml=xml11362390
There are plenty of Fl
> I need a multi language site with cakephp. Ok, this topic is discuss
> commonly. But I need a friendly-url solution, something's like:
> http://mywebsite.com/lang/controller/view
Couldn't you just make a space for the language in your routes and
then deal with that variable in AppController:
> So, is there a bug here or am I the
> only one who thinks that on => create has to have more priority than
> the other lines?
What version are you using? From the code it seems like if the on rule
is set it shouldn't be executing anything more:
if (empty($validator['on']) || ($validator['on']
You could also vastly simplify that controller if you had a field for
first_name and a field for last_name. No crazy foreach() loops and
what not, your entire controller could simply be:
data){
$this->set('data', $this->Client-
>findAll(array('Client.first_name LIKE "%' . $this->dat
> Okay, sounds good. So where do I find this information on building my
> own helper? Please provide a link to some instructions if you can.
A helper is definitely what you want here. They are really easy:
http://manual.cakephp.org/chapter/helpers (Section 2, all the way at
the bottom)
Basicall
> I have a CakePHP CRM application with 30,000+ contact records. Each
> Contact hasMany Address records. One feature of my app is to allow my
> client to search for duplicate entries within the contacts table
> before importing new contacts. In short, I am querying the entire
> Contact table and L
I have been enjoying LiquidWeb. I don't host any Cake stuff there at
the moment, but have had no problems with a shared account and have
been really impressed with a VPS (which hosts a fairly busy vBulletin
forum). They don't do crazy overselling like Dreamhost .
--~--~-~--~~--
> I was wondering if anyone has used a cake calendar in their apps -
> what they used and how well it worked, what sort of integration
> problems they encountered, etc.
Not sure exactly what you need, but Yahoo has a really nice calendar
solution inside its YUI platform. You'll recognize it from
> The reason I can't have the database do the searching for me is
> because the criteria I want to search against to find potential
> duplicates doesn't have a direct one-to-one correlation to the
> database table fields.
Hmm. Is there a way you could make them directly correlate? It's a
pretty f
> I may have not explained the setup properly. I don't actually have a
> "full_name" field in either table (import_contacts and contacts are
> the actual MySQL table names). Each of these tables have "fn" and "ln"
> fields, however. So the problem is that I need to somehow find all
> records in th
> Now, here's where we stand...
>
> jonknee's query took about 25-27 seconds and returned 154 records.
>
> b logica's query took about 6 seconds and returned 24 records
Sounds about right, except for the difference in number of dupes. How
many are there in total?
--~--~-~--~~-
> Dardo beat me to it...I was going to suggest the same thing: a custom
> validation method to make sure you have a unique "slot name"
No need to make it custom, it's built into 1.2 Model::isUnique() and
can be accessed as a validation rule:
'rule' => 'isUnique'
It works great, I'm using it fo
> Thanks for your repleys. I got it working.
> This is how I got it to work. Comments welcome.
You're hugely over complicating things... If you use the
SessionComponent as previously suggested, all you'd need to do is:
$this->Session->read()
No crazy SQL, regular expressions, etc etc. Just a m
> Is there a way to do this without an absolute URL?
Did you try with a leading /? With your original method it would only
work on the root directory.
Example:
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
> > Try [1]:
>
> ">
>
His CakePHP app is only inside the frame, so the HTML helper is not
available.
--~--~-~--~~~---~--~~
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@go
Not a problem, it just needs a route set up in config/routes.php,
something like:
Router::connect('/', array('controller'=>'home', 'action'=>'index'));
That's for 1.2, the syntax is a bit different for previous versions
but the idea is the same. Route '/' to a controller and action.
--~--~--
> I'm trying to make a correct validation for my model.
You can also just use the built-in isUnique function right from
validation. No need to roll your own on this one. (Just make the rule
like so: 'rule' => 'isUnique')
--~--~-~--~~~---~--~~
You received this mes
> Are there really any truly REST compliant applications
> yet? or am I missing something major here? Any help/opinions would
> be greatly appreciated.
>
Yes, but not web browsers. There are tons of applications that tie in
with REST APIs and use all four verbs. It would be really nice if web
b
> In fact, it seems that this built-in rule doesn't work!
> Why is this not yet fixed? We allways need to check unicity of a field
> in all of our applications...
What's not working for you? It seems to be working for me. I had a
custom method until I was told about isUnique working through
valid
What's not clear about the error message? You have a high error
reporting level (which is why you are seeing notices) and there are
two problems in abc_controller.php. One is you're trying to access an
array with an invalid key. The other is you're trying to access a
variable that doesn't exist. I
> > Either that or you'll have to run queries using LIMIT and OFFSET to
> > grab what you need one chunk at a time. I don't know any scripting
> > language that handles sucking in 600,000 records via a web page.
>
> Think about phpMyAdmin?
>
PHPMyAdmin makes the DB do all the work. When yo
For one site recently that had a database of restaurants broken down
by neighborhood (and city) I went all keyword based. Worked well (city/
neighborhood are all variable keywords):
/browse/city
/browse/city/neighborhood
/restaurant/city/neighborhood/slug
It took some fairly complex routing to g
> But I would really like to do it the cake way, so my question is, what
> can I do to speed it up over controller/action? And if there is not
> much I can do, how could I at least include the cakePHP database
> connection into the extra php file?
>
The CakePHP way would be to not store the image
> Would view caching help in this circumstance? Assuming that there is
> some good reason for the images to be in the database, then this should
> avoid most of the Cake overhead. Just a thought ...
>
That might speed it up somewhat, but you're still executing thousands
of lines of code to serv
You probably don't want to name a controller
'controller' (redundant)... But beyond that, you'd have to name it
controller_controller.php.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to t
On Apr 13, 6:28 am, schneimi <[EMAIL PROTECTED]> wrote:
> Ok thx jonknee, I understand the problem better now.
>
> The only reason I store them in db is that I have all data at one
> place and it's easy to handle for me, not the best reason I know.
>
> For now I will
On Apr 17, 10:25 am, foongoos <[EMAIL PROTECTED]> wrote:
> I have a free lance developer that wants to do a job for me and he
> sounds very promising. The project is based on cake but I am afraid
> that I will not be able to tell the difference if he used another
> frameowork, maybe CMS or even bo
> Any help?
SELECT user_id, MAX(revision_id) FROM ck GROUP BY user_id
--~--~-~--~~~---~--~~
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
> Any help?
SELECT user_id, MAX(revision_id) FROM your_table GROUP BY user_id
--~--~-~--~~~---~--~~
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 unsub
> So - where should I put the function and how can I call it? Any ideas?
Unless I'm missing something, that would ideally be a helper. You
could call it like any other helper myMethod($date); ?>.
--~--~-~--~~~---~--~~
You received this message because you are subsc
> what is the general hourly charge of a cakephp developer. Can some one
> recomend a good way to hire one without being ripped off or getting
> poor quality work?
It depends on the developer. An experienced developer can get a
project done more quickly (while at the same time with a higher
quali
> So basically, it is adding the correct revision_id to the FIRST entry,
> which is where id=1 is coming from, that make sense?
>
Have you tried running the SQL that was generated and seeing if MySQL
is bringing back the right data? It might be forming an odd query that
brings back the data incor
> I am not sure where to back up to.
>
> Without the asterisk, it doesn't grab the associated data.
>
> Insight on where to step back to?
The asterisk is the key to your problems, so you should dump it. In
its place you'll need the fields you want to use (the relational
data). You should be able
> well my thinking is, if you wanted a field validated, you would have a
> form field present for it, at which point it would pass this field
> along for validation
You should never trust your validation to the form values that should
be coming in from the user (you should never trust *anything*
On Apr 29, 3:13 pm, MarcS <[EMAIL PROTECTED]> wrote:
> I don't think there's a bug in it.
>
> all I have is this
>
> var $validate = array(
> 'name' => VALID_NOT_EMPTY,
> 'url' => array('rule' => 'url','message' => 'this field must
> contain a valid url')
>
> hi! i'm developing an application where the user uploads and downloads
> file. But during downloads, the files like jpegs, txt, those openable
> in the browser open in the browser itself. but i need them to come out
> as pop-ups or dialouge box with "save as" or a download manager/
> accelerator
> Whats not cakephp except the INSERT INTO.
You're ignoring the ORM. For simple queries like you are performing,
writing raw SQL isn't necessary (or even at all desirable).
Instead you would do something like this to lookup your users: $user =
$this->User->FindByEmail($email)
The other queries
Is there any reason you are generating thumbnails on the fly? This
sort of operation is much more efficient to do once (typically when
images are uploaded).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" gr
> but when i point the browser to;http://localhost/posts/
> it shows: The requested URL /posts was not found on this server.
> any ideas what i could be doing wrong?
Is the error generated from CakePHP or Apache? If it's Apache you have
a problem with your.htaccess file (perhaps Apache is not loo
> Well this is what i am trying to achieve -> I am trying to build a
> system which has 80% similar functionalities of wordpress (like posts,
> comments on posts, monthly archives etc). But essentially each post
> would have dynamic form (similar to a poll) associated to
> it.Registered users of t
> So just have a process that checks the remote services every 30-60
> seconds or so, it'll be frequently enough and it'll make the whole
> local data thing so much easier.
>
That's waaay to frequent and could easily look like abuse. Even large
aggregators like Google Reader and Bloglines don't d
> Out of curiosity what is Model::getLastInsertID() and
> Model::getInsertID() normally used for and is there a difference. The
> API has the same description for both methods.
There is no difference. Model:getLastInsertID() simply returns
Model:getInsertID(). As to why they are both there, no id
There is no difference, subdomains aren't special (www or dev, it's
all the same code wise).
--~--~-~--~~~---~--~~
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.
> But what happens when Model does not validate, Insert is not done and there
> is no ID to use as filename?
If the registration form didn't validate, why would you bother doing
anything with the file? They are going to get an error and have to
resubmit the form (with a new photo).
--~--~
> I think a good choice may be Submit user info using AJAX and if everything's
> OK, upload photo.
Hmm, that would probably work nicely. Another way (one that I
appreciate as a user) is to have a small sign up form and then let
users expand their profile. Just get the bare minimum and then once
t
> Anyway, I decided to delete the install and start from scratch. A
> friend said the files are supposed to be installed in httpdocs. They
> were (still are until I delete everything). When you go to the web
> page you're asked to download it instead of view
> it.http://dev.miamiwebservers.com
Y
> What if there was a case where you didn't want to save all of the
> fields again when you're updating a record?
There are a few ways to go, the easiest probably being
Model::saveField():
$this->User->id = 1
$this->User->saveField('username', 'new_username')
Or use some more complex validation
> Huh? If there has been Cake running on that (shared) box how is it not
> configured properly? There was a Cake install on one of my other
> domains when we (a friend and myself) decided Cake would solve the
> issues set out in front of us. Of course, he installed it as he's the
> developer. I'm
> Thanks but, this is my friend's server and I just talked to him on the
> phone. He said that he didn't want to give me total access (to Apache)
> because he didn't want me to break his server. I respect that and,
> will have to wait a couple of day to have all my domains and client's
> domains g
What does the generated HTML look like? Sounds like it's using a
relative path.
--~--~-~--~~~---~--~~
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 unsubs
> Does anyone have any insight on how to go about validating specific
> fields in a model for special circumstances like this? Thanks!
We had a discussion that got into this topic recently:
http://groups.google.com/group/cake-php/browse_thread/thread/dc119a9b9cf4a89/5ef7b179de86f7a1#5ef7b179de8
On May 20, 3:36 am, Matt Huggins <[EMAIL PROTECTED]> wrote:
> I'm trying to import a vendor class, but the class I'm importing in
> turn references another 3rd party class named "cache". Since there is
> already a CakePHP class named "Cache", I get an error message stating
> "Fatal Error: Cannot r
On May 21, 2:35 pm, mmayes <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Does anybody have any experience or recommendations on setting up a
> CakePHP app as a monthly subscription service (ala Basecamp, etc.)? I
> have a client that wants to do something like this, and I would very
> much like to bake
On May 22, 12:14 pm, Chez17 <[EMAIL PROTECTED]> wrote:
> As a project to learn CakePHP, I have been recreating my wordpress
> blog. My issue now is that I want to keep the same rss feed that was
> set up by wordpress and have my new site update that. I have no idea
> how to get started on this, I
On May 22, 12:28 pm, mydesignbuddy <[EMAIL PROTECTED]> wrote:
> PCI compliance is a must nowadays, its the law. Don't store or
> transmit your customers cc data unless you are compliant with PCI
> guidelines. The easiest recurring billing gateway service that I've
> used was Paypal's Payflow (pro
On May 22, 12:50 pm, Chez17 <[EMAIL PROTECTED]> wrote:
> I am using they dynamically generated feed. Does that mean there is no
> way to get the new site to work with the old rss feed?
I'm not sure exactly what you mean about getting the new site to work
with old feed. Are you going to continue u
On May 22, 1:34 pm, Oli <[EMAIL PROTECTED]> wrote:
> hey,
>
> can someone explain me howto validate a form using ajax?
> submission works fine but ive no clue how to validate the form
> correctly before saving the data
>
Validation occurs just the same as a normal request. I don't use the
AJAX he
On May 22, 4:29 pm, Chez17 <[EMAIL PROTECTED]> wrote:
> Thats what I'm getting at. I want to make sure when I switch my site
> over from wordpress to CakePHP, I want all the readers who subscribe
> to my current wordpress rss feed to be automatically subscribed to the
> new CakePHP generated rss f
On May 28, 5:29 pm, John R <[EMAIL PROTECTED]> wrote:
> Hey folks .. OP here ..
>
> Curious if anyone has any insight on this problem that is still
> plaguing my app! Any assistance would be MUCH appreciated.
>
> John
Have you tried peeking at the session and seeing what (if any) address
is locat
I recently upgraded to v1.2 and have been playing around to get Smarty
working (which is how I was using Cake 1.1). It's going fine except
when I call a variable that doesn't exist... Smarty throws the
'Undefined index' error that should be no problem (and in most cases
not be seen), but Cake's de
just commented out the offending lines of code in /cake/libs/
> > > debugger.php. The problem was a call to the get_class() function and
> > > it looks like it's happening with you on line 414 as well. I'd try
> > > commenting out the following:
>
> > >
Hmm. It probably is a FaceBook thing like David said, see here:
http://facebook-developer.net/2007/11/27/implementing-a-simple-facebook-redirect-with-cakephp/
"In Facebook, redirecting the end user cannot be performed with a
standard redirect call as in the above example. Trying to do so will
in
implemented? I'll have to compare to 1.1's code and
> see if I can make sense of what they are trying to do.
>
> Dave
>
> On Jan 23, 3:22 pm, jonknee <[EMAIL PROTECTED]> wrote:
>
> > Great, thanks for the tip. This is almost certainly a bug since the
> &g
If I was trying to sell CakePHP to a boss, here's the route I'd take:
* Rapid development which means more projects can be completed with
the same staff (and a higher per hour billing rate)
* Using a framework keeps code organized which means it's
significantly easier to maintain and bring new pe
I would probably add the length limits to the form as well, I find it
frustrating when I fill out a form and get back errors that were for
limitations I didn't know about.
I didn't see it listed anywhere, but I went ahead and documented what
can be in the $form->input() $options array:
b
I would just set the ID first since you want it in both conditions (if
there is form data and if there is form data).
function edit($id) {
$this->product->id = $id;
But there should also be some validation that the user really does
have access to edit that profile. I'm assuming this
81 matches
Mail list logo