Re: cakephp 1.3.10 - URL rewriting is not properly configured on your server

2011-06-08 Thread saidbakr
So it is a bug in home.ctp and cake.generic.css and it could be solved as follows: add an id tag to the div that includes the rewriting error, the tag will take the value : id="url-rewriting-warning". then in cake.generic.css at the end of it add the following rule: #url-rewriting-warning{ display

Paginate HABTM results ?

2011-01-20 Thread saidbakr
Hi, I have categories and posts tables are in many-to-many relationship through the table categories_posts table. Both Category and Post models contains hasAndBelongsTo relationship. In the view action of categories controller, I able to view the specified category and listing all related posts w

Re: Applications build with 1.2.6 could run with 1.2.8?

2010-08-27 Thread saidbakr
se files and now the application is using the default > paths again. > > This is one reason why you should always work under version control: > you would immediately see what has changed and would be able to revert > inadvertent changes. > > On Aug 27, 2:54 am, saidbakr wrote: >

Applications build with 1.2.6 could run with 1.2.8?

2010-08-26 Thread saidbakr
Hi, I have an application build with CakePHP 1.2.6. I downloaded CakePHP 1.2.8 and then I replaced the current cake folder with the new cake folder, where all paths are kept without change. However, the cake does not able to work with the new 1.2.8. In other word: my cake 1.2.6 library was found i

Re: $validate Does not work as expected!

2010-07-23 Thread saidbakr
The form does not contain any hidden fields for "mdate". I just want the controller to be able to supply the model with the mdate value instead of the user input. Hence the mdate value is already empty because there is no any value for it in the form. I think that Cake applying an automated data (d

Re: How could controller inform about layout or view existing?

2010-07-23 Thread saidbakr
d simply override them on a case-by-case > basis within your theme folder." > > So it looks, that you just need to create in view for session-flash > with default markup and put it properly in /app/views/ folder > structure and this should work. > > On 22 Lip, 12:55, said

Re: How could controller inform about layout or view existing?

2010-07-22 Thread saidbakr
> > On Jul 22, 5:19 am, saidbakr wrote: > > > Hi, > > > I use themes in my application, so there is multiple layouts and views > > for each controller could be handled. For one of the themes used, I > > created a layout called "flash" which is dedicated

Re: $validate Does not work as expected!

2010-07-22 Thread saidbakr
idating or saving manually that datetime of your records. > > > On 21 jul, 17:37, saidbakr wrote: > > > > Hi, > > > > In the pages controller I've created an action called "contact" to > > > allow receiving messages from visitors and then th

How could controller inform about layout or view existing?

2010-07-21 Thread saidbakr
Hi, I use themes in my application, so there is multiple layouts and views for each controller could be handled. For one of the themes used, I created a layout called "flash" which is dedicated for displaying flash messages, so in the controller I used the following line of code: $this->Session->s

$validate Does not work as expected!

2010-07-21 Thread saidbakr
Hi, In the pages controller I've created an action called "contact" to allow receiving messages from visitors and then this messages are stored in the database. I have a field in the table contacts called "mdate" which is dedicated for storing the MySQL datetime of the message sent. The mdate has

Re: A question to core developers

2010-07-18 Thread saidbakr
Hi, I need an example that demonstrates the security risk in a CakePHP application depends on extract!!! On Jul 19, 1:40 am, Graham Weldon wrote: > Extract is only ever used on settings and the like. > While we do a lot to ensure the security and safety of the framework, > we do not provide secur

Discussion on optimizing-cakes-performance

2010-07-18 Thread saidbakr
I'd like to see an example regarding the Database Configuration. In other word an SQL structure dump. Sorry, it is just a new pie request. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are su

Expire Session with Auth

2010-07-16 Thread saidbakr
Hi, In my application, after sometime of inactivity, the authentication is expired and then the areas that it requires authentication redirects the user to the login page. This is nice. However, I have some kind of third party file browser and I use CakePHP session to handle the authentication of

Re: Wrapping form elements inside ?

2010-07-11 Thread saidbakr
' => '')); ?> > > On 10 Lip, 08:48, "matzeh...@googlemail.com" > > wrote: > > Hi, > > > with the option 'div'=>false you can disable the surrounding div > > Container. > > But adding a p with the form helper.. hm.. >

Re: Current URL ?

2010-07-09 Thread saidbakr
herehttp://api.cakephp.org/class/view > > In the controller, $this->base and > $this->actionhttp://api.cakephp.org/class/controller > > On Fri, Jul 9, 2010 at 6:44 PM, saidbakr wrote: > > Hi, > > > Is there any method to get the current URL of the application, eith

Wrapping form elements inside ?

2010-07-09 Thread saidbakr
Hi How could I Wrapping forms Elements inside p tag instead of div tag? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gr

Current URL ?

2010-07-09 Thread saidbakr
Hi, Is there any method to get the current URL of the application, either from view or the controller? For example: suppose we are at the follwoing url of the application http://mysite.com/posts/view/12 I want to get this url? Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Functions in View could not able to load Helpers?

2010-07-01 Thread saidbakr
So why global does not work? for example: function foo(){ global $html; } On Jul 1, 12:22 pm, "Dr. Loboto" wrote: > You need to pass these variables into function. > > On Jul 1, 2:57 am, saidbakr wrote: > > > Sorry, it was just typing mistake. I already write it w

i18n and link

2010-06-30 Thread saidbakr
Hi, I use link method of the Html helper in a custom helper that I have made. I tried to make the link title uses __( ) to maintain translaton but it produce the link text title only without full a href html tag. For example: //method of the helper has this line of code echo $this->Html->link(__(

Re: Functions in View could not able to load Helpers?

2010-06-30 Thread saidbakr
d be: > > .$html->link($catName, > > On Jun 30, 5:13 pm, saidbakr wrote: > > > Hi, > > I have a little function in one of my views. This function could not > > able to use helpers. For example: > > > //add.ctp > > > // some html > >

Functions in View could not able to load Helpers?

2010-06-30 Thread saidbakr
Hi, I have a little function in one of my views. This function could not able to use helpers. For example: //add.ctp // some html '.$html->link[$catName, array('controller'=>'categories','action'=>'view','id'=>$catId)).''; } ?> I don't know how could I able to make the html helper accessible by

Re: Which is the best hosting server for CakePHP?

2010-06-30 Thread saidbakr
I think that hostmonster is very good! http://www.hostmonster.com/track/saidbakr/azzazi On Jun 30, 12:44 pm, jodator wrote: > I have similar thoughts on VPS after switching to one. > It's not as easy as shared hosting, but you can find tons of tutorials > online. > >

Re: find output array!

2010-06-30 Thread saidbakr
Oh, this soultion seems to be fine, but there is some additional problem. In fact my array is something like the following: Array ( [0] => Array ( [0] => Array ( [Category] => Array ( [

Re: find output array!

2010-06-29 Thread saidbakr
Oh, this soultion seems to be fine, but there is some additional problem. In fact my array is something like the following: Array ( [0] => Array ( [0] => Array ( [Category] => Array ( [i

Re: Functions does not find global in views?!!

2010-06-29 Thread saidbakr
> Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 29 Jun 2010, at 00:13, saidbakr wrote: > > > Hi, > > I set to a view variable called $tests and it is array of some data. > > In the view, print_r($tests) prints out the array c

find output array!

2010-06-28 Thread saidbakr
Hi, >From documentation, find may output array like the following: Array ( [0] => Array ( [ModelName] => Array ( [id] => 83 [field1] => value1 [field2] => value2 [field3] => valu

Functions does not find global in views?!!

2010-06-28 Thread saidbakr
Hi, I set to a view variable called $tests and it is array of some data. In the view, print_r($tests) prints out the array construction correctly and without any problems. In the regarded view, I created a function to perform a simple task on the values of $tests. However, when I try to define the

Re: Modification of a helper method?

2010-06-12 Thread saidbakr
instead of html link. On Jun 12, 11:47 pm, saidbakr wrote: > Hi, > > What could I do if I want to modify the link method of the Html > helper? Of course I don't want to touch the core lib. Check out the new CakePHP Questions site http://cakeqs.org and help others with their Cak

Modification of a helper method?

2010-06-12 Thread saidbakr
Hi, What could I do if I want to modify the link method of the Html helper? Of course I don't want to touch the core lib. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the

Re: How to get admin home page?

2010-06-12 Thread saidbakr
ontrollers beside some administrative data, such as, unapproved comments, number of registered users and so on. Regards. On Jun 12, 3:33 pm, Sam Sherlock wrote: > Hi Saidbakr > > I think some meaning is lost in translation > > are you trying to have mysite.com/admin display a

Re: How to get admin home page?

2010-06-12 Thread saidbakr
ontroller'=>'pages', 'action'=>'display', > 'prefix'=>'admin') > > use 'prefix'=>'admin' or 'admin'=>true to redirect to admin pages. > > On Sat, Jun 12, 2010 at 5:06 AM, saidbakr wrote:

Re: How to get admin home page?

2010-06-11 Thread saidbakr
In other word, What does make something like redirect('controller'=>'pages', 'action'=>'display') perform redirection to missing action "admin_display"? On Jun 12, 12:03 am, saidbakr wrote: > Hi, > Admin actions "admin_actionn

How to get admin home page?

2010-06-11 Thread saidbakr
Hi, Admin actions "admin_actionname()" works fine something like this: http://thesite.com/admin/contros/actionname What I need is to set another page to work as admin home to be http://thesite.com/admin/ I manged this from pages controller by setting an action called admin and set route to it,

Is there beforeFilter for admin_actions?

2010-06-11 Thread saidbakr
Hi, In the controller there is some actions with the prefix admin_, and we know they are meant by admin route for the application. **My question is: how to invoke some of code before all of these admin_actions?!** //For instance, I'd like to check the privileges of the user and see if he/her is

Re: PHPmyAdmin utf-8_general_ci problem

2010-06-10 Thread saidbakr
you get that from? > its "just" > > 'encoding' => 'utf8' > > On 9 Jun., 23:18, saidbakr wrote: > > > Hello, > > > I set my database config as follows: > > > var $default = array( > >                 'driv

PHPmyAdmin utf-8_general_ci problem

2010-06-09 Thread saidbakr
Hello, I set my database config as follows: var $default = array( 'driver' => 'mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'root', 'password' => 'pward', 'database' => 'site',

persistent connection and performance?

2010-06-09 Thread saidbakr
Hi, My development server is built on XAMPP 1.7.3 which is running on computer operated by WindowsXP SP3. The performance is, notably, low of my cake applications. I use persistent false in database.php configuration. I don't know, exactly, what's the reason of low performance. Does it due to XAM

Re: Auth Component and user information.

2010-06-07 Thread saidbakr
06-14 19:35:00 [email] => said@gmail.com [rule_id] => 1 ) ) On Jun 7, 8:27 pm, cricket wrote: > On Jun 7, 11:39 am, saidbakr wrote: > > > > > Hi, > > > I use User model to handle user's basic data such as Name, username, > > password and so on

Re: Auth Component and user information.

2010-06-07 Thread saidbakr
Well, but what about the data in the associated Model Rules? How could I get it? On Jun 7, 8:27 pm, cricket wrote: > On Jun 7, 11:39 am, saidbakr wrote: > > > > > Hi, > > > I use User model to handle user's basic data such as Name, username, > > passw

Auth Component and user information.

2010-06-07 Thread saidbakr
Hi, I use User model to handle user's basic data such as Name, username, password and so on. The User model is associated with Rule model by belongsTo association, while Rule model is associated to User model by hasMany association. The later model "Rule" is meant by something like users groups

Does it a bug in requestAction ?

2010-06-06 Thread saidbakr
Hello, Actions start with "_" underscore in its name is going to be private and it is not allowed to access them externally, i.e from the URL. However, they are accessible internally by calling them from another action. The case is, requestAction() method does not able to call actions start with

Re: Total count of posts?

2010-06-06 Thread saidbakr
underscore _ such as _postcount. My question now is how to make requestAction able to call private action? On Jun 6, 4:20 am, Andras Kende wrote: > Hello, > > in the controller: > $this->set('postcount', $this->Post-find('count')); > > in the view: >

Total count of posts?

2010-06-05 Thread saidbakr
Hi, How could I set dynamic data in the layout? In other word, I need to place the total count of posts in the layout footer. My application has posts controller and post model. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. Yo

Re: What's __() function?

2010-03-23 Thread saidbakr
Well, So, What is about the true parameter? On Mar 24, 2:30 am, Miles J wrote: > __() is used for translation. It matches a slug with the correct mo/po > file within the correct language/region. > > Its for localization. > > On Mar 23, 5:11 pm, saidbakr wrote: > >

What's __() function?

2010-03-23 Thread saidbakr
Hello, This is an example: [CODE] $this->Session->setFlash(__('Post is not found.', true)); [/CODE] What is the function __(), where I got its documentation and of course what is the difference between writing the previous code without __() function such as: [CODE] $this->Session->setFlash('Post

Re: Official forum for CakePHP

2009-07-11 Thread saidbakr
Very good option to use this forum, but the question is: Does it official forum? It is not easy to trust any website, specially, those talking about thing you wish to use in your work without an official adaption for it. I mean by "trust" the both sides, Security and the value of content. I will b

Official forum for CakePHP

2009-07-09 Thread saidbakr
Hello, I wonder about CakePHP does not have an official forum. I think it will be very important and useful action for support. I don't feel comfort with Groups, it does not allow to format code examples and loose categorization. I think that forums.cakephp.org will be an essential factor for spr

Re: Eclipse + CakePHP to develop a Web application

2009-07-08 Thread saidbakr
completion of helpers in views, you have to create an arbitrary > file in you app folder with some instantiated helpers (that are never > really instantiated because the file isn't included): > > $html = new HtmlHelper(); > $javascript = new JavascriptHelper(); > > Regards, > &

Eclipse + CakePHP to develop a Web application

2009-07-07 Thread saidbakr
Hello, I'd like to know how to use Eclipse and CakePHP combination to develop a web application. I don't care about svn or development in teamwork. I just need Eclipse to autocomplete all the code. For example: In the Blog Tutorial on Cakephp.org Create a Posts Controller section of the tutorial