Re: ACL for groups

2009-03-27 Thread djiize
For nested groups, you should read this post: http://edwardawebb.com/programming/php-programming/cakephp/nested-trees-cakephp In ACL, I (personnaly) think it's a good idea to have a ROOT group, even if you don't use it now, maybe later ;) If you don't want one, a NULL value should suffice. On 2

Re: Links from an other controller in my view

2009-02-19 Thread djiize
$html->link('Add User', array('controller' => 'users', 'action' => 'add')); On 19 fév, 12:01, amarradi wrote: > Hello together, > > i have 2 Controller EntriesController and UsersController. > > And i have views for the Entries and views for the user. > > If i set an link like in an view from En

Re: The logged in username on view a Question about the AuthComponent

2009-02-19 Thread djiize
oh thanks AD7six, didn't think of that (shame on me) On 19 fév, 11:39, AD7six wrote: > On Feb 19, 11:30 am, djiize wrote: > > > in your beforeFilter of beforeRender : > > $this->set($this->Auth->user()); > > Why bother. It's in the session, just rea

Re: The logged in username on view a Question about the AuthComponent

2009-02-19 Thread djiize
in your beforeFilter of beforeRender : $this->set($this->Auth->user()); On 19 fév, 11:14, amarradi wrote: > Hello together, > > my Controller has the following action > function beforeFilter() { >         parent::beforeFilter(); >         $this->Auth->allow('index','search'); >     } > > if i cl

Re: File upload stopped working

2009-02-04 Thread djiize
gt;file('ImportFile'); ?> > $form->end(); > > Which should and did work. > > But now I get something like this in $_FILES: > Array ( >    [data] => Array ( >      [name] => Array ( >        [ImportFile] => etc... > > which looks perfectly fin

Re: File upload stopped working

2009-02-04 Thread djiize
maybe see output of the Form Helper in general I think it's see "data[model][field]" here? you need to format your names this way to automatically populate $this->data var maybe just data[field] suffice, but I don't know as I always use FormHelper, you can try yourself On 4 fév, 08:05, Günther

Re: can we generate 2D barcode with TCPDF..

2008-10-23 Thread djiize
it is really possible you can also generate 2D barcode in PDF with TCPDF and Cake On 23 oct, 11:49, Penfold <[EMAIL PROTECTED]> wrote: > i think so > > On 23 Oct, 10:34, xelios <[EMAIL PROTECTED]> wrote: > > > Is it possible to generate 2D barcode with TCPDF.. --~--~-~--~~

Re: file does not start with '%PDF-'

2008-10-23 Thread djiize
add "%PDF-" at the beginning of your PDF file On 23 oct, 09:25, xelios <[EMAIL PROTECTED]> wrote: > While using TCPDF with CakePHP, > > It generates an error "file does not start with '%PDF-'" > > What to do now! --~--~-~--~~~---~--~~ You received this message beca

Re: TCPDF is not generating pdf...

2008-10-23 Thread djiize
either your pdf is blank empty or your pdf is not generated On 23 oct, 12:00, xelios <[EMAIL PROTECTED]> wrote: > "nope" itself is a big clue... > > On Oct 23, 2:49 pm, Penfold <[EMAIL PROTECTED]> wrote: > > > nope > > > On 23 Oct, 06:51, xelios <[EMAIL PROTECTED]> wrote: > > > > on visiting the

Re: problem with using TCPDF...

2008-10-23 Thread djiize
your cake app cannot find the class XTCPDF On 23 oct, 07:03, xelios <[EMAIL PROTECTED]> wrote: > I am using TCPDF for creating pdf. I have following problem: > > Fatal error: Class 'XTCPDF' not found in C:\xampp\htdocs\cake12\CakePHP > \app\views\books\view_pdf.ctp on line 3.. > > please help me!

Re: Write view output to file - best MVC approach?

2008-10-22 Thread djiize
1st idea : test it, you'll see if your server crash 2nd idea : maybe there is a way to override View (like an AppView for instance) I don't know of it's possible, but if I were you, I'll check towards this way On 22 oct, 17:08, "Liebermann, Anja Carolin" <[EMA

Re: Write view output to file - best MVC approach?

2008-10-22 Thread djiize
in Controller code, a call to $this->render() returns the content of the view HTH On 22 oct, 15:49, "Liebermann, Anja Carolin" <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I make good progress with my xml-export. > Since I expect the output to become very big, I would like to write the > result

Re: Best profiler for cake php?

2008-09-09 Thread djiize
Do you have a PHP accelerator (as Zend Optimizer) ? Try do disabled it On 9 sep, 10:42, RichardAtHome <[EMAIL PROTECTED]> wrote: > I'd also like this info. XDebug crashes my apache (on windows) too :-( > > On Sep 9, 5:42 am, Dianne  van Dulken <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I was just

Re: changing links according to selected language

2008-07-03 Thread djiize
Did your read the 2 links I sent you ? On 3 juil, 18:52, K3 <[EMAIL PROTECTED]> wrote: > Yes, i was asked to include language string so the search engine can > better index the pages. > > @leo: we dont need high rating, just want both language versions t be > indexed by the search engine. So we c

Re: changing links according to selected language

2008-07-03 Thread djiize
In SEO point of view, it's better to have language in the URL : the 2 languages will be indexed with each its own URL How search engines will deal with 1 URL with different content ? For routes magic, see this article from Nate : http://c7y.phparch.com/c/entry/1/art,cake-seo This one too: http:

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-07 Thread djiize
I read somewhere that from PHP6, E_STRICT will be merged in E_ALL If you drop PHP4 support, be ready for PHP6 support ;) Personally, I usually follow core dev rules for Cake, and it's the same thing for PHP. They have Strict mode, so I try to have strict compliant code. As Aranworld said, if eac

Re: Where to put new functions

2008-06-05 Thread djiize
easy way : in app/config/bootstrap.php Cake way : create a custom Helper in app/views/helpers/ On 5 juin, 15:17, moment11 <[EMAIL PROTECTED]> wrote: > I want a simple function that I can use in all my views: > >         function export_var($the_var) { >                if (isset($the_var)) { >    

Re: RC1 breaks my auth.

2008-06-05 Thread djiize
add Cookie to your components list in the controller leo a écrit : > I haven't had time to pin this down further than > > If I use the cake directory from the 1.2 beta auth works but if I use > the 1.2 rc1 it's broken. > > The cookie code came from the manual @ 5.2.2.7 > > The error is: > >

Re: How can I get the name of the view that is being rendered in my layout?

2008-06-03 Thread djiize
you're right, that's why I said "by default" too ;) but it's a good idea to insist on this feature like you did On 3 juin, 13:08, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On Tue, Jun 3, 2008 at 4:25 PM, djiize <[EMAIL PROTECTED]> wrote:

Re: Problems with cakePHP on serevre - pictures and css files not found

2008-06-03 Thread djiize
mod_rewrite activated? On 3 juin, 13:46, Margarittka <[EMAIL PROTECTED]> wrote: > Hi! > > I carry out site to the server. Result - pictures are not reflected > and css files do not seen. But om the local server all is ok. Hosting > is masterhost. I place folder bakesale at the folder httpdocs. Wh

Re: How can I get the name of the view that is being rendered in my layout?

2008-06-03 Thread djiize
$this->action is the name of the action, and by default, this is the same as the view one On 3 juin, 12:45, MarcS <[EMAIL PROTECTED]> wrote: > thanks Tarique, > > I knew about being able to get the controller name. I was hoping there > would be something similar for the view name > > On Jun 3, 11

Re: Result of a query gets messed up

2008-05-29 Thread djiize
and what if you define an alias to your column? select users.id, users.name, my_custom_function(users.id, 'ABC') AS custom, users.phone from users where users.id > 500; or better : "AS users.custom" and another question, do you need to specify "users.id" instead of just "id" ? In your example, i

Re: Different performance between 1.1 and 1.2

2008-05-29 Thread djiize
Don't do benchmark with debug on, it's useless. Even if Cake 1.1 is faster than 1.2 with debug on, it won't tell you if it's the same when debug is off ! On 29 mai, 17:31, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 28 Mag, 19:33, Joel Perras <[EMAIL PROTECTED]> wrote: > > > On May 28, 12

Re: Saving NOW() in model

2008-05-22 Thread djiize
x27;t really matter whether or not you obtain the date from > Apache/PHP or MySQL; as long as you are consistent. > > On May 22, 4:01 am, djiize <[EMAIL PROTECTED]> wrote: > > > I use the same way as Stephen > > Because what if MySQL is hosted on another server than A

Re: Can any body help me please for tiny MCE editor issue

2008-05-22 Thread djiize
how do you load tiny_mce.js file? do you use JavascriptHelper like that? echo $javascript->link('tiny_mce'); I saw several questions from you these days, and many can be answered by the use of core helpers You should know that CakePHP manipulates URL (to make them pretty), and that change the way

Re: Saving NOW() in model

2008-05-22 Thread djiize
I use the same way as Stephen Because what if MySQL is hosted on another server than Apache/PHP ? You'll save Apache/PHP time which can be different of MySQL time (no the same meridian for instance). Of course, it's a very specific case. And my servers are time synchronised together, but some time

Re: Layout change in edit case(help me please)

2008-05-20 Thread djiize
} > >         function delete($id) { >         $this->User->del($id); > $this->flash('The user with id: '.$id.' has been deleted.', 'http:// > 192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index'); > > } > >         function add()

Re: Layout change in edit case(help me please)

2008-05-20 Thread djiize
it's due to Cake routing and URL rewriting in some cases, prefer HTML helper instead your own HTML in your layout, change by css('style') ?> and change al by image('your_image.gif') ?> And last, in your "flash" calls, don't repeat the host, path, etc... just do: $this->flash('Your detail has

Re: "save" oddity

2008-04-30 Thread djiize
try a pr($this->data) in your controller and you'll the date is not "DB compliant" (it is split in several parts) do a $this->cleanUpFields() before Model->save() On 30 avr, 13:13, "annie.r.knight" <[EMAIL PROTECTED]> wrote: > I'm very new to CakePHP so please do bear with me. > > I've used the s

Re: Components, how many is too many?

2008-04-29 Thread djiize
h. And it always seems that most of the > code deals with either managing Sessions/Cookies/authentication keys > at those third party sites, or other state related issues like setting > variables for views, or testing for different form values before > sending the data to the model. > &

Re: Components, how many is too many?

2008-04-27 Thread djiize
and that's where MVC and OOP are very useful MVC because: I'm pretty sure some parts of your components can be turned in Model/ Behavior/Datasource (gData, Flicker data access, ... are Model's logic) OOP because: why your ServicesController loads all components when it only needs some? Maybe you

Re: Can I use AuthComponent without ACL and existing User Table

2008-04-24 Thread djiize
hi 1. you can use existaing tables, see userModel and fields Auth variables 2. ACL not needed if you just do authentication. If you need authorization too, you can use ACL or whatever else 3. Auth is a somewhat wrapper for authentication and authorization. The last part can be done by ACL. But AC

Re: how can access the Auth info form view

2008-04-23 Thread djiize
when logged, you can pass user's data to the view $this->set('loggedin_user', $this->Auth->user()); and in your view: if (empty($loggedin_user)) { // not logged in } else { // logged in } On 23 avr, 08:14, candesprojects <[EMAIL PROTECTED]> wrote: > And without $session->check('Auth.User.id'

Re: SSL enable for some site sections

2008-04-02 Thread djiize
you can setup a callback with: $this->Security->blackHoleCallback = 'switch2secure'; and in your controller: function switch2secure($param) { // param will be array('secure') in your case // redirect to https } On 2 avr, 11:49, Kusok <[EMAIL PROTECTED]> wrote: > I need to enable https for some

Re: Adding meta description tags on a view page

2008-03-28 Thread djiize
in the head section of your layout, add this line: it will be replaced by all $html->meta(), $meta->css() and $javascript- >link() with inline to false On 28 mar, 02:08, Rusty <[EMAIL PROTECTED]> wrote: > Hi, > > I'm not sure if I am doing something wrong, but I am trying to add a > meta tag on

Re: upload an image to a directory

2008-03-26 Thread djiize
search for Upload behavior in Group and Bakery On 26 mar, 05:46, damo <[EMAIL PROTECTED]> wrote: > I'm sure this is super easy also, but can't find how to do it in the > cookbook for 1.2. > > So what I want to do is using the form helper upload a file (jpeg or > jpg) and then save it to the direc

Re: Application Design Issue

2008-03-10 Thread djiize
you can load a Model in a component see App::import('Model', 'ModelName') but it's not very MVC compliant, so if you can avoid that... ;) Maybe you could do your business in AppController, or better in a behavior (or many) ? On 10 mar, 13:58, sleepy1038 <[EMAIL PROTECTED]> wrote: > Could I use

Re: MVC Architecture: model <--> controller <--> view

2008-03-03 Thread djiize
If Views directly ask Models to have Data: 1- what is Controllers' purpose? 2- how do you do business Logic with your data? On 3 mar, 12:32, Marcel <[EMAIL PROTECTED]> wrote: > Hi! > > I've been doing some research about MVC implementations in different > frameworks. Now in allmost every book I h

Re: UUID as primary key

2008-02-13 Thread djiize
1.2 Manual beta http://tempdocs.cakephp.org/#TOC62419 1.2 Cookbook http://book.cakephp.org/view/70/primary-keys-used-as-uuids 1.2 API source http://api.cakephp.org/1.2/libs_2model_2model_8php-source.html#l01213 On 12 fév, 23:41, Aaron Shafovaloff <[EMAIL PROTECTED]> wrote: > On this page (http:/

Re: Bug while using PHPmailer

2008-02-13 Thread djiize
if you want to use the core component, delete or move/rename your own email.php component. It overrides the core's one On 13 fév, 16:02, djiize <[EMAIL PROTECTED]> wrote: > good start to Email core component:http://book.cakephp.org/view/176/email > > On 13 fév, 15:41, searchm

Re: Bug while using PHPmailer

2008-02-13 Thread djiize
good start to Email core component: http://book.cakephp.org/view/176/email On 13 fév, 15:41, searchmax <[EMAIL PROTECTED]> wrote: > Hi djiize, > > Thanks a ton i have resolved that bug. Actually there is a space after > the (?>) closing tag and after removing that my

Re: Bug while using PHPmailer

2008-02-13 Thread djiize
in your email.php component file, check if there's nothing after closing tag (?>) and FYI, there's an Email core component in Cake On 13 fév, 11:04, searchmax <[EMAIL PROTECTED]> wrote: > My code was working fine with sessions but when i added the email(phpmailer), > I am getting the below error

Re: Yet another Auth and ACL question

2008-02-01 Thread djiize
it seems to be the correct behavior: - if you're not logged in, it redirectts you to login page - if you're logged, it checks if you're allowed to access to controller: * if yes, ok * if not, it redirects you back and tell you "access denied" Why do you want to be redirected to login since you

Re: how to find referrer url?

2008-01-22 Thread djiize
1- Did you try to follow Daniel Hofstetter's answer ? 2- Did you try to search by yourself ? http://api.cakephp.org/class_controller.html#e87c8e6edf53aadc511e3d050d71a494 Cake 1.1 API -> Controller::referer() function is here http://groups.google.com/group/cake-php/search?group=cake-php&q=referer&

Re: What do fields "foreign_key" in ACL do?

2008-01-22 Thread djiize
it's for bind a model as ARO let's say Users are ARO, so you have 'User' in 'model' and id of user in 'foreign_id' you can have mutltiple ARO: User, Group, Role, Application, ... go see in AclBehavior that automates this On 22 jan, 10:29, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi all, >

Re: cakephp 1.2 beta, How to add metalanguage support in my application?

2008-01-21 Thread djiize
http://groups.google.com/group/cake-php/web/frequent-discussions Go to section "How to add i18n support?" On 21 jan, 11:40, ali <[EMAIL PROTECTED]> wrote: > Can any body tell me in detail, how I can add multi language support > in application. I am newby to cakephp. Please help me in this regard,

Re: Auth Component encrypting password before validation.

2008-01-18 Thread djiize
andomly > salted sha256 implementation, but my brains leaked out of my ears > (that'll teach me to code at 3am). > > Steve > > On Jan 18, 11:30 am, djiize <[EMAIL PROTECTED]> wrote: > > > You can already choose your hashing method, see in function > > Auth::h

Re: Auth Component encrypting password before validation.

2008-01-18 Thread djiize
You can already choose your hashing method, see in function Auth::hashPasswords If you define Auth->authenticate variable with the name of an object of your own that definse the function hashPasswords, this function will be called instead of the Auth default one If you just want md5 or sha256 ins

Re: Auth Component - Edit User blank password

2008-01-14 Thread djiize
pass...and if > that is set, I'd set password = chgn_pass. > -- > Kevin Lloyd > 3HN Designshttp://www.3HNDesigns.com/ > (214) 473-4207 > > On 1/14/08, djiize <[EMAIL PROTECTED]> wrote: > > > > > I use 2 ways, it depends of project, design, ... : >

Re: Auth Component - Edit User blank password

2008-01-14 Thread djiize
x27;m confused... > > So what if they do want to edit the password? Do you check $this->data > before save and populate the fileds array in save() conditionally? > > I guess my real question is why not just don't put the password field on the > form. > > On Jan 14,

Re: sessions being dropped on redirect or whenever i call a new page

2008-01-14 Thread djiize
there was a ticket about session regenerated for img in the page I didn't remind if it was fixed before or after the beta maybe you should try with a newer SVN code but as precedent advice said, check before if there's undescore in your localhost or subdomain. On 14 jan, 12:43, wirtsi <[EMAIL PRO

Re: Auth Component - Edit User blank password

2008-01-14 Thread djiize
and better, use the security component, it will secure your forms very well but it's another topic On 14 jan, 14:03, djiize <[EMAIL PROTECTED]> wrote: > you're welcome > in addition, it's always a good practice to specify which fileds to > update in each Model->s

Re: Auth Component - Edit User blank password

2008-01-14 Thread djiize
you're welcome in addition, it's always a good practice to specify which fileds to update in each Model->save() call it will prevent POST forgery On 14 jan, 12:37, Mike Digital Egg <[EMAIL PROTECTED]> wrote: > Hey djiize , that worked great, thanks :) > > Mike >

Re: Auth Component - Edit User blank password

2008-01-14 Thread djiize
you can speciify which fields to update with the 3rd parameter of Model->save(): http://api.cakephp.org/1.2/class_model.html#ebe42ae387be89985b5a35dd428f5c81 On 14 jan, 11:03, Mike Digital Egg <[EMAIL PROTECTED]> wrote: > Hi, > > I am using the Auth component for 1.2 and it is all working fine >

Re: Requesting picture in webroot but controller requested

2007-12-21 Thread djiize
r message > > cheers... > > On 21 Dez., 12:48, djiize <[EMAIL PROTECTED]> wrote: > > > maybe because images folder is "img" > > try using $html->image helper function in your views > > > On 21 déc, 12:35, stefuNz <[EMAIL PROTECTED]> wrote:

Re: Requesting picture in webroot but controller requested

2007-12-21 Thread djiize
maybe because images folder is "img" try using $html->image helper function in your views On 21 déc, 12:35, stefuNz <[EMAIL PROTECTED]> wrote: > Hi.. > > I really don't get it ! I'm using CakePHP 1.2, nightly build from 18. > dec > > when i request /cake/images/picture.png, cake is looking for >

Re: image link dorks up my session

2007-12-19 Thread djiize
some days ago: http://groups.google.com/group/cake-php/browse_thread/thread/6a48d8467e5b505b/89a0434b7447829e?lnk=gst&q=session#89a0434b7447829e (look at Grant Cox's message) On 19 déc, 20:23, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > "What was the answer you were looking for?" > I am loo

Re: define layout for error404.thtml

2007-12-11 Thread djiize
did you try: layout = 'error'; ?> in your error404.thtml ? On 11 déc, 15:37, grigri <[EMAIL PROTECTED]> wrote: > how about > > class AppController extends Controller { > function beforeRender() { > if ($this->viewPath == 'errors') { > $this->layout = 'error'; > } > } > > } > > O

Re: views without controllers

2007-12-10 Thread djiize
default page (see routes.php) is /app/views/home.ctp you can cusomize this page like you want, and import data from DB in it with elements/requestAction: http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction On 10 déc, 17:17, "Mike Green" <[EMAIL PROTECTED]> wrote:

Re: Anyone up for a 1.2 query construction challenge?

2007-12-07 Thread djiize
there is an argument for generateList that group your result by state: $places_list= $this->Hobby->Place->generateList(null, 'name ASC', null, null, null, '{n}.Place.state'); and with a little post-processing, you'll have counts: foreach ($places_list as $state => $places) { foreach ($place

Re: Big problems with admin routing and Auth/ACL

2007-11-28 Thread djiize
point 2. unknown action admin_img is maybe due to wrong image paths in your views, do you use Html helper? On Nov 27, 10:42 pm, Dodger <[EMAIL PROTECTED]> wrote: > Hi, > > 1. Whenever I open an admin URL, such as /admin/videos, I get the following > warning: > > 2007-11-27 23:28:18 Warning: Warni

Re: Clear definitions for M V C? (newbie)

2007-11-26 Thread djiize
Controller: business logic Model: data logic View: presentation logic http://en.wikipedia.org/wiki/Model-view-controller http://manual.cakephp.org/chapter/basic_concepts On Nov 26, 1:11 pm, powtac <[EMAIL PROTECTED]> wrote: > Hi, Im trying to move an existing project into cakephp (and also into >

Re: prefixes on cake identifiers to avoid naming collisions

2007-11-14 Thread djiize
PHP functions are not prefixed too, then you need to know their names to not use the same. I think Cake is the same, it has its keywords list, it's your job to know them. Waiting for namespaces support in PHP (6?) keymaster wrote: > Anyone know if there is a particular reason cake does not use >

Re: Auth/ACL problem: "You are not authorized to access that location."

2007-11-13 Thread djiize
ject. It'll email you > when a new package is released. Watch your spam folder, I find my > alerts sometimes end up in there. > > Ralph > > On Nov 13, 4:58 am, djiize <[EMAIL PROTECTED]> wrote: > > > Hi again > > I update my Cake install with the last S

Re: Auth/ACL problem: "You are not authorized to access that location."

2007-11-13 Thread djiize
Hi again I update my Cake install with the last SVN branch, and now it works like a charm. Thanks again for your work Is there any way to be warned when a new version is available? Seb. On Nov 13, 11:28 am, djiize <[EMAIL PROTECTED]> wrote: > Hi jeff > thanks for this plugin, it lo

Re: Auth/ACL problem: "You are not authorized to access that location."

2007-11-13 Thread djiize
Hi jeff thanks for this plugin, it looks great on the demo but when I installed it in my app, it says Missing controller You are seeing this error because controller PagesController could not be found. It seems I should add some routes to redirect /admin/acl/aros to / plugins/acl/views/acl/adm

Re: Transform column names

2007-11-12 Thread djiize
I think the best way for you is to create a TransformField behavior, and override afterFind (to populate 'title' in array) and beforeSave (to change 'title' to 'FP002EX' in UPDATE) in it. If it's just for one table, directly override them in your model. Maybe you'll need to override other callback

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread djiize
One best practice, specify which fields are to be saved: http://api.cakephp.org/1.2/class_model.html#ebe42ae387be89985b5a35dd428f5c81 The third argument of the Model->save() is an array "List of fields to allow to be written" and in your CREATE TABLE, add "DEFAULT 0" to "active" field. On 12 oct,

Re: Badword Bahavior

2007-10-08 Thread djiize
to access another Model from a controller, add this: var $uses = array('Guestbook', 'Badword'); // all models you need that aren't associated with an loaded one and now $this->Badword->find*() magic happens! On 8 oct, 18:46, Zoltan <[EMAIL PROTECTED]> wrote: > That's the way I would do it too :

Re: Uploading Large Files

2007-10-05 Thread djiize
some folks on this group had fun with SWFUpload, try to search it in the group On 5 oct, 16:41, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to figure out what's the best way to upload large files. > Let's say 10MB+. It has to be part of the web interface therefore FTP > i

Re: Doxyfile

2007-09-11 Thread djiize
I'm using PHPDocumentor to generate API and have something very similar to the online one with no patch or tweak On 11 sep, 15:05, "Mike Green" <[EMAIL PROTECTED]> wrote: > I too would like to get hold of this. I've asked Mr Nut on irc a > couple of times and sent him an email, but hes a workahol

Re: API Documentation Generator

2007-09-06 Thread djiize
Where did you see it was parsed by Doxygen? I still use PHPDocumentor, and I remember a post from phpNut saying it was parsed by this tool... http://www.phpdoc.org/ On 6 sep, 16:00, MarkH <[EMAIL PROTECTED]> wrote: > I'm investigating the use of Doxygen / PHPDocumentor with Cake > programs. > > A

Re: Cake & Mysql& UTF-8 :(

2007-08-31 Thread djiize
if you have Cake 1.2, add 'encoding' => 'utf8' in conf/database.php if you have Cake 1.1, call query("SET NAME 'UTF8' ") just after connexion (don't remember if in database.php or app_model.php) On 31 août, 18:36, Mech7 <[EMAIL PROTECTED]> wrote: > Ah that is great google can't handle them either

Re: formatting of log file

2007-08-30 Thread djiize
if you look at source: http://api.cakephp.org/1.2/cake__log_8php-source.html#l00092 you'll see that write() add a "\n" for each log, so I don't know why you don't have new lines With which text editor do you open your log file? On 30 août, 12:55, rtanz <[EMAIL PROTECTED]> wrote: > is this thing p

Re: Saving search criteria - Clueless!

2007-08-21 Thread djiize
o recover array from string // search properties with conditions $properties = $this->Property->findAll($conditions); I didn't tested this code, but you've the idea. Tell me if you have questions On 21 août, 17:12, djiize <[EMAIL PROTECTED]> wrote: > simple way: >

Re: Saving search criteria - Clueless!

2007-08-21 Thread djiize
simple way: you can serialize your conditions array in a new field http://php.net/serialize but beware of future DB modifications (field renaming, etc...) On 21 août, 16:00, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm building a property site (trying anyway!) > > I've constructed my sear

Re: Newbie starting questions for 1.2.x!

2007-08-21 Thread djiize
> function beforeFilter() { > if( $this->action != 'view' AND > $this->action != 'index' ) { > $this->__validateLoginStatus(); > } > } > ---

Re: Newbie starting questions for 1.2.x!

2007-08-21 Thread djiize
what params the beforeFilter function accepts. > That isn't in the output... > > On 21 Aug., 12:57, djiize <[EMAIL PROTECTED]> wrote: > > > 2. create a file app_controller.php in /app and write that (or copy > > from /cake/app_controller.php): > > > class AppC

Re: Newbie starting questions for 1.2.x!

2007-08-21 Thread djiize
to get behind the 'action' Parameter for the beforeFilter > function, because i only want to use it on specific actions. > So I thought I look at the API... > > On 21 Aug., 12:07, djiize <[EMAIL PROTECTED]> wrote: > > > 1. in Cake conventions, function prefixed with __

Re: Newbie starting questions for 1.2.x!

2007-08-21 Thread djiize
1. in Cake conventions, function prefixed with __ is private, so you're correct 2. if you need to access a function from several controllers, don't put it in a specific one, move it to app_controller.php. Since all your controllers extend AppController, $this- >__validateLogin() is OK IMHO a vali

Re: where to put independent functions

2007-08-16 Thread djiize
If you want to access by http://mysite.com/uploadfile, you'll need to wrap it in an controller's action let's say: controller: UploadController action: uploadfile and write a route that redirect /uploadfile to /upload/uploadfile If you want a function and its view, in Cake words, it's a control

Re: where to put independent functions

2007-08-16 Thread djiize
since it's business logic, you can make a component for that (UploadComponent) and include it in your controller(s) ( var $components = array('Upload') ) in addition, for simple fonctions, you can add them in /app/config/ bootstrap.php. This file is loaded at the start of the request, and its con

Re: Can you use helpers in controllers?

2007-08-09 Thread djiize
I don't know if you can access helpers from controller, but I know you shouldn't do it! Helpers are for views, components are for controllers (and behaviors for models) A component + helper combo is possible, maybe your solution. On 9 août, 11:00, Mike Green <[EMAIL PROTECTED]> wrote: > Dear al

Re: constants issue

2007-08-09 Thread djiize
you have access from almost everywhere to: $this->name // controller name (events) $this->action // action name (view) and several constants are in /cake/basics.php On 9 août, 08:17, francky06l <[EMAIL PROTECTED]> wrote: > You want to extract this from where, I mean, in a controller ? > beforeFi

Re: How to force a 404 error?

2007-06-25 Thread djiize
the simple way: $this->redirect('qsdfqsdf'); // or whatever non-existent page you want (/page-doesnt-exist for instance) notice: only work with DEBUG = 0 On 25 juin, 10:28, Braindead <[EMAIL PROTECTED]> wrote: > Hi, I'm using CakePHP for a week now. And now I'm searching for a > possibility to f

Re: HABTM relationship and meta-data in link-table

2007-06-20 Thread djiize
Take this cautiously, it's just an experiment. I just found an interest for the 'with' parameter when defining an HABTM when reading the source code. So I defined that: class Estate extends AppModel { var $name = 'Estate'; var

Re: Design questions

2007-06-20 Thread djiize
best place for validation of data is in models, but it's flexible enough ;) look for $validation member in Model class, and also beforeValidation callback On 20 juin, 09:35, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Ok one more question.. If i have multiple controllers that i want all > t

Re: i18n and sprintf

2007-06-14 Thread djiize
> msgid "Tomatoes" > msgstr "Tomates" That's a way to do that, but same things, you will have to list ALL possibilities. If data comes from DB, it's almost impossible. Another way if data comes from DB, you can use the Translate behavior. It permits you to have some fileds in several languages.

Re: i18n and sprintf

2007-06-11 Thread djiize
the 1st method is the correct one, because you .po file needn't need to know all $name possibilities then you can translate "Edit %s" to "Whatever %s" you want, and %s can be tomatoes or potatoes or carrots or ... On 11 juin, 18:20, Gilles Dubois <[EMAIL PROTECTED]> wrote: > In CakePHP, in partic

Re: Sessions Issue

2007-05-30 Thread djiize
I had an issue like that with WAMP, it was due to an "underscore" in the subdomains and the session didn't "fix". Maybe not your case, but I must told you in case of ;) On 30 mai, 14:51, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 5/29/07, Ketan Patel <[EMAIL PROTECTED]> wrote: > > > > > Hi C

Re: Changing datasources to support web services.

2007-05-24 Thread djiize
instead of doing: $this->setDataSource('whatever'); you can do that: class MyModel extends AppModel { $useDbConfig = 'whatever'; //... } On 24 mai, 17:37, shmit <[EMAIL PROTECTED]> wrote: > Because I like to answer my own questions, I found the solution to > this. > > Here's how you set up t

Re: Best Practices - Associations & calling functions

2007-05-13 Thread djiize
It should work if you have a function cleanComment() in your Comment model. $this->Post->Comment is an instance of the comment model and have all its functions. But the better is to test if it's right and tell us the result ;) On 13 mai, 20:46, johnvv <[EMAIL PROTECTED]> wrote: > I'm wondering w

Re: Get rid of default header

2007-05-09 Thread djiize
Don't edit the files in /cake folders, it's the CORE of Cake, and should never been modified! All your files must be in /app and/or /vendors Create default.ctp in /app/views/layouts/ if not exists And read the manual for layout/view/conventions rules On 9 mai, 11:48, AD7six <[EMAIL PROTECTED]> wr

Re: how to deal with static pages ,can I routes url to a html page?

2007-05-09 Thread djiize
search for "Pages controller" in the group for short: it's a special controller, you just add .thtml|.ctp files in /app/viws/pages/ folder and they are visible at mysite.com/pages/ file (without extension) On 9 mai, 10:42, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > how you guys to deal with

Re: Disapearing text in IE

2007-05-09 Thread djiize
It's a CSS cause but I don't know exactly where in the file, I always start projects with a blank CSS On 9 mai, 11:01, Harro <[EMAIL PROTECTED]> wrote: > I have the latest stable release of cake, with no edits to the CSS. > But when I use tags such as , ect. in the view files, the text > is invi

Re: problem with index page

2007-05-09 Thread djiize
it seems you have not the mysql extension for PHP if you have PHP5, try mysqli instead of mysql in your database conf file On 9 mai, 09:43, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi i am new to cakephp , i am facing one problem , i followed the > tutorial > fromhttp://www.learncake.com

Re: Main index page

2007-05-04 Thread djiize
Hi jeffy 1. to custom the homepage, create the file /app/views/pages/home.thtml (or .ctp with Cake 1.2) 2. search in the manual and group for Pages controller On 4 mai, 15:12, jeffy <[EMAIL PROTECTED]> wrote: > Hi guys > > A newbie question, I can't find the answer: > > 1. How can I set a main i

Re: tag behavior, where was it ?

2007-05-02 Thread djiize
The Bakery / Code / Behaviors / Simple Tagging Behavior http://bakery.cakephp.org/ On 2 mai, 11:06, thequietlab <[EMAIL PROTECTED]> wrote: > Hi, > > I remember I've seen somewhere a tag behavior and now I can't find > it .. > > Can anyone help ? > > Thanks, > thequietlab --~--~-~--~

Re: Associate two models without using the primary key

2007-04-04 Thread djiize
in manual: http://manual.cakephp.org/chapter/models section 4, you can pass extra parameters to associations On 4 avr, 17:06, Gonçalo Marrafa <[EMAIL PROTECTED]> wrote: > Hi. > > Can i associate two models using another field other than the primary > key? > > What i have is a set of entities that

Re: problem with html->link

2007-04-04 Thread djiize
if you uncomment BASE_URL, don't forget to delete .htaccess files in / /app and /app/webroot On 4 avr, 15:20, "andy corpes" <[EMAIL PROTECTED]> wrote: > Hi again Djiize > > I was looking in the wrong place, my define of the BASE_URL was commented > out!!

  1   2   >