I need to create routes that include a colon to produce URLs like http://app.com/prjct:a9b5c. Obviously it's currently simple to use a slash instead with the default routing.
$SLUG = array('slug' => '[-_A-Za-z0-9]+');
Router::connect('/prjct/:slug', array('controller' => 'projects', 'action' => 'show'), $SLUG);
But routes specificatio...
Hello all,
There could be a vary simple way to achieve what I am trying to do in cakephp but I am unable.
here is what I am trying to do :
I have a settings file which I read through configuration object and the setting as
$config['pageMeta']=array(
'1'=>array('desc'=>'<?php echo $param1 ?> some data, <?php echo $param2 ?> some conten...
hello friends,
Can any one list me out what are the drawbacks of CakePHP framework over other PHP frameworks?
1) And please explain why that missing feature is so important for a PHP project?
2) How that missing feature help the web developers those who using the Framework with that feature?
...
Little history; I hate the fact that I can't use enums in CakePHP, but I get it. However, another pet peev I have is that my Booleans return 0 or 1 and there is no way to universally turn them to yes' and no's.
So I though I would create a little function in the afterFind method of the AppModel to do this for me. The first step I wante...
I'm attempting to create a social network and i want it to be similar to how facebook is designed, but with many major changes to the interface and an entire new montezing system. Should I use elgg, CakePHP, or maybe something else(needs to be PHP)?
...
Hi.
My CakePHP Folder Structure
1. app / webroot / img
2. cake
3. vendors
4. assets
<?php echo $html->image('cake_logo.png', array('alt' => 'CakePHP'))?>
Is it possible to access my external asset directory with the CakePHP Image helper?
...
Is it somehow possible to create a hasMany Relationship which makes use of an ID outside of the Model? For example one User has many Comments, but I would like to find just the comments of the logged in user:
public $hasMany = array(
'MyComment' => array(
'className' => 'Comment',
'foreignKey' => 'user_id',
...
I am using the TCPDF app in CakePHP as a vendor. I have everything setup according to the instructions. I am able to produce a valid PDF and it works great. Now I want to take the results of an HTML rendered view that already exists and create a PDF from it.
I set the HTML variable and use that in the view as:
$pdf->writeHTML($html, tru...
(I'm really hoping I put in enough due dilligence on google and the search bar before posting this)
I'm getting started with CakePHP and just created my first model, controller, and view.
When I browse to http://localhost/~me/MyApp/Lists I get a 404 and I'm not sure why
Here's my controller
<?php
class ListsController extends App...
hello folks,
I am developing a site which is clone of swoopo auction site and its use cakephp framework.
there is integrated FCKEditor and it is not working. It is gives me following error massage.
The requested URL /js/fckeditor/editor/fckeditor.html was not found on this server.
Additionally, a 404 Not Found error was encounter...
Hello Friends;
I am working on a project which is auction site and it is actually
clone of www.swoop.com
this clone is developed on CakePHP platform and I have a issues there.
I purchase that script from
http://www.moneymakersnetwork.info/products/Swoopo-Clone-PHP-Script.html
and there is a demo
http://demo.bidscout.net
username- d...
Hi
I'm working on one web application.
I wanted to provide interactive debugging to my web application, so i have installed xdebug on my machine( windows ) successfully. Done with all the configuration settings in php.ini file. I am able to debug normal php scripts except cakephp project.
I hv used cakephp and eclipse IDE for developm...
While serving images through CakePHP, I'm getting
The image
"http://DOMAIN/PLUGIN/images/image.png"
cannot be displayed, because it
contains errors.
There is a bug report already existing, http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/864
As mentioned in the above bug report, whitespace is the culprit here....
Hi ,
I need to set up multiple projects on lampp. How can i create sub domains for these multiple projects.
My projects are in cakePHP.
Can anyone help me?
...
Hi, I have a modifier procedure to show the "date" of an event.
if($event['Event']['is_multi_day']){
if( date('n',strtotime($event['Event']['start_day']) ) == date('n',strtotime($event['Event']['end_day'])) )
$date = date('j',strtotime($event['Event']['start_day'])).' - '.
date('j',strtotime(...
Hello I am using cakePHP's bake console to create a cakePHP application. But when I run the scripts, it says that the present user does not have permission to create a folder in the directory. So to find out the user who is being denied, I echoed whoami from the PHP script, and got the user. Now I made that user the owner of the director...
Hi guys
I am a cakephp newbie and I tried to setup my connection to mysql. I had it worked before but after I changed my mysql database name, it won't connect anymore even thought I changed the database name in database.php inside the config folder. Do I have to run the cakephp console again??
Your tmp directory is writable.
The File...
Hi guys
I am a cakephp newbie and I had trouble to view the files under the view folder through browser.
I used cakephp console to bake model, controller and views. (ex: Invoices_controller.php for controller, invoice.php for model and a invoices folders under views folder). According to the tutorial I read, I can access the invoice vi...
Hi,
I want a function to alter one field, "is_featured" to 1(true) of Event model of given ID, to mark an event as "Featured".
class EventsController extends AppController{
function feature($id){}
}
...
Hi I want to do this.
UPDATE images SET is_primary = 0 WHERE event_id = $id
from events controller, where Event hasMany Image.
...