2.0 Redirect route not working

2011-10-22 Thread majna
Can someone please confirm that redirect route is working as described in 
2.0
http://book.cakephp.org/2.0/en/development/routing.html?highlight=router#redirect-routing

Some examples that should be working:

Router::redirect('/new/*', 'http://google.com', array('status' = 302));
Router::redirect('/old/*', array('controller' = 'pages', 'action' = 'display' 
,'home'));
Router::redirect('/older/*', '/pages/display/home');
 
I'm getting missing Controller exception and notices from Router. All Router 
test are passed.
Windows and Ubuntu, PHP 5.3.5

tnx


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Moving part of a Tree in other section

2011-10-22 Thread WebbedIT
What code are you using to move the post with children and what error
do you get?

On Oct 22, 2:48 am, Constantin.FF constantin...@gmail.com wrote:
 My Post model have Tree behavior, and everything work just fine. Each
 post has a parent_id and lft,rght column.
 If I create and move posts in single level, everything is OK.

 But I get an error when I try to move a post which has one or more
 children. How to deal with this? Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: 2.0 view folders naming convention

2011-10-22 Thread majna
I'm building on 2.0 for 10 months now and I like new folder convention. I 
don't wanna ever go back :)

Only upgrade issue I had was SVN on Windows (case insensitive) but git-svn 
and upgrade shell is a way to go.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Moving part of a Tree in other section

2011-10-22 Thread Constantin FF
Just changing the parent_id. How to change the tree also?

On Sat, Oct 22, 2011 at 12:21 PM, WebbedIT p...@webbedit.co.uk wrote:

 What code are you using to move the post with children and what error
 do you get?

 On Oct 22, 2:48 am, Constantin.FF constantin...@gmail.com wrote:
  My Post model have Tree behavior, and everything work just fine. Each
  post has a parent_id and lft,rght column.
  If I create and move posts in single level, everything is OK.
 
  But I get an error when I try to move a post which has one or more
  children. How to deal with this? Thanks

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Can't change color of rows in table?

2011-10-22 Thread WebbedIT
Yves, do not place css direct into your html, use ids and classes and
control the styling from a css file.  That way when you decide to
reuse the code for another site with a different colour scheme you
chance colours in the css file rather than numerous view templates.

All the help people have tried to give you assumed you were doing
this, but from your snippet you have not been adding classes.  If
using Html-tableCells() there is a parameter to create the altrow
classes on your behalf:
http://book.cakephp.org/view/1447/tableCells

HTH, Paul.


On Oct 21, 5:13 pm, Yves S. Garret yoursurrogate...@gmail.com
wrote:
 Yes.  Here is a small snippet:

                     /td --
         td
         /td
         td
         /td
         td
         /td
     /tr
         tr bgcolor=#AA
         td
             Kathy        /td
         td
             Peanuts        /td
         !-- td
                     /td --
         td
         /td
         td
         /td
         td
         /td
     /tr
         tr bgcolor=#00
         td
             Robert        /td
         td
             Jonhson        /td
         !-- td
                     /td --
         td
         /td
         td
         /td
         td
         /td
     /tr
         tr bgcolor=#AA
         td
             John        /td
         td
             Smith        /td
         !-- td
                     /td --
         td
         /td
         td
         /td
         td
         /td
     /tr
         tr bgcolor=#00
         td
             Bleh        /td







 On Fri, Oct 21, 2011 at 2:10 AM, Andras Kende and...@kende.com wrote:

  On the rendered page view source do you see the tr class alternating ?
  Of its there then its a css is not being applied correctly
  would just do the whole thing with jquery and css..

  Andras

  On Oct 20, 2011, at 2:50 PM, Yves S. Garret wrote:

  I just tried that, it didn't work.

  Same table row colors.

  On Thu, Oct 20, 2011 at 1:48 PM, Arno.E arno.esterhui...@gmail.comwrote:

  Hey, Yves

  I've edited the pastebin of your view, have a look at:
 http://bin.cakephp.org/view/1202214697

  Cheers
  Arno

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
  others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group
  athttp://groups.google.com/group/cake-php

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
  others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group
  athttp://groups.google.com/group/cake-php

   --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
  others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group
  athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Multiple relational table data pagination with title sorting.

2011-10-22 Thread WebbedIT
Need to try more yourself and show us the code you are using when you
get stuck.

On Oct 21, 10:54 am, saddam hossoin saddamhoss...@gmail.com wrote:
 I have six model are Company-Brand-SubBrand-Product-Ad-Monitoring. i 
 want to get data pagination with title filter. I want

 to find A Brand  based Monitoring report. and Company based Monitoring
 report.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: 2.0 Redirect route not working

2011-10-22 Thread Andras Kende
Strange, these 3 redirect routes  only worked form me with core.php 
Configure::write('debug', 2);  
Otherwise:

Not Found
Error: The requested address '/new/' was not found on this server.

server is : cakephp 2.0, ubuntu nginx php5.3.5 fpm

Andras Kende

On Oct 22, 2011, at 4:16 AM, majna wrote:

 Can someone please confirm that redirect route is working as described in 2.0
 http://book.cakephp.org/2.0/en/development/routing.html?highlight=router#redirect-routing
 
 Some examples that should be working:
 
 Router::redirect('/new/*', 'http://google.com', array('status' = 302));
 Router::redirect('/old/*', array('controller' = 'pages', 'action' = 
 'display' ,'home'));
 Router::redirect('/older/*', '/pages/display/home');
  
 I'm getting missing Controller exception and notices from Router. All Router 
 test are passed.
 Windows and Ubuntu, PHP 5.3.5
 
 tnx
 
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
  
  
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: error after loading cakephp at dreamhost (newbie)

2011-10-22 Thread manuj
problem solved

On Oct 21, 9:09 pm, manuj getma...@gmail.com wrote:
 error after loading cakephp at dreamhost

 Fatal Error (256): [MissingHelperException] Helper class FormHelper
 could not be found.
 #0 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/View/
 View.php(577): HelperCollection-load('Form', Array)
 #1 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/View/
 View.php(359): View-loadHelpers()
 #2 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Controller/
 Controller.php(898): View-render('error500', NULL)
 #3 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ExceptionRenderer.php(281): Controller-render('error500')
 #4 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ExceptionRenderer.php(194): ExceptionRenderer-_outputMessageSafe('error500')

 #5 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ExceptionRenderer.php(170): 
 ExceptionRenderer-_cakeError(Object(MissingHelperException))

 #6 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ErrorHandler.php(127): ExceptionRenderer-render(Array, Array)
 #7 [internal function]: ErrorHandler::handleException()
 #8 {main} [CORE/Cake/Error/ErrorHandler.php, line 136]

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Can't change color of rows in table?

2011-10-22 Thread Swarna Dhomne
style type=text/css
td.datacellone {
background-color: #CC; color: black;
}
td.datacelltwo {
background-color: #CC; color: black;
}
/style
table
trtd class=datacelloneOne/tdtd class=datacelloneFish/td/tr
trtd class=datacelltwoTwo/tdtd class=datacelltwoFish/td/tr
trtd class=datacelloneRed/tdtd class=datacelloneFish/td/tr
trtd class=datacelltwoBlue/tdtd class=datacelltwoFish/td/tr
/table

OneFishTwoFishRedFishBlueFish

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Multiple testAction inside a single test

2011-10-22 Thread Matteo Landi
Bug resolved: 
https://github.com/cakephp/cakephp/commit/c5ca10ca6932b76f505fec39f6e78b34dfcc5b9e


Cheers,
Matteo

On Fri, Oct 21, 2011 at 11:38 AM, Matteo Landi landima...@gmail.com wrote:
 Hi everybody,

 I'm implementing a test for a controller, and I'm experiencing a
 strange problem: it seems that if I call ``testAction`` multiple time
 inside the same test function, assertions start to fail as if requests
 were not properly sent to controllers.

 The example below shows a successful test; as you can notice I created
 multiple test functions for the same view, and in each I call
 ``testAction`` exactly once.

 class UsersControllerTest extends ControllerTestCase {
        public $fixtures = array('app.user');

        /**
         * Helper function which automatically converts the output of an 
 action to
         * a JSON object.
         */
        public function getJsonResult($url, $args = array()) {
                $data = $this-testAction($url, $args);
                return json_decode($data, true);
        }


        public function testJsonView() {
                // Empty id
                $result = $this-getJsonResult('/users.json', array(
                        'data' = array(),
                        'method' = 'GET',
                        'return' = 'contents'
                ));
                $this-assertType('array', $result);
                $this-assertArrayHasKey('error', $result);
                $this-assertRegExp('/[rR]equired.*id/', $result['error']);
        }

        public function testJsonView1() {
                // Invalid id
                $result = $this-getJsonResult('/users.json', array(
                        'data' = array('id' = 'a'),
                        'method' = 'GET',
                        'return' = 'contents'
                ));
                $this-assertNull($result);
        }

        public function testJsonView2() {
                // Ok
                $result = $this-getJsonResult('/users.json', array(
                        'data' = array('id' = 1),
                        'method' = 'GET',
                        'return' = 'contents'
                ));
                $this-assertType('array', $result);
                $this-assertArrayHasKey('id', $result);
                $this-assertEquals(1, $result['id']);
        }
 }

 Now, if move all those tests inside the same function (like presented
 below), I get assertion errors after the third call ``testAction``.

 class UsersControllerTest extends ControllerTestCase {
        public $fixtures = array('app.user');

        /**
         * Helper function which automatically converts the output of an 
 action to
         * a JSON object.
         */
        public function getJsonResult($url, $args = array()) {
                $data = $this-testAction($url, $args);
                return json_decode($data, true);
        }


        public function testJsonView() {
                // Empty id
                $result = $this-getJsonResult('/users.json', array(
                        'data' = array(),
                        'method' = 'GET',
                        'return' = 'contents'
                ));
                $this-assertType('array', $result);
                $this-assertArrayHasKey('error', $result);
                $this-assertRegExp('/[rR]equired.*id/', $result['error']);

                // Invalid id
                $result = $this-getJsonResult('/users.json', array(
                        'data' = array('id' = 'a'),
                        'method' = 'GET',
                        'return' = 'contents'
                ));
                $this-assertNull($result);

                // Ok
                $result = $this-getJsonResult('/users.json', array(
                        'data' = array('id' = 1),
                        'method' = 'GET',
                        'return' = 'contents'
                ));
                $this-assertType('array', $result);
                $this-assertArrayHasKey('id', $result);
                $this-assertEquals(1, $result['id']);
        }
 }

 Are there any constrains in calling ``testAction`` inside a test
 method? It seems that after the first call , the function starts to
 return array().


 Regards,
 Matteo

 --
 http://www.matteolandi.net/




-- 
http://www.matteolandi.net/

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Any word on the CakePHP Training?

2011-10-22 Thread Nate
Just curious what's going on with the CakePHP Training. Kinda excited
about it. I could definitely use some help!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Can't get mod_rewrite to work correctly

2011-10-22 Thread Ryan Schmidt

On Oct 21, 2011, at 22:54, Yves S. Garret wrote:

 Whenever I run sudo ./lampp restart, I get the following error:
 
 httpd: Syntax error on line 114 of /opt/lampp/etc/httpd.conf: Cannot load 
 /opt/lampp/libexec/apache2/mod_rewrite.so into server: 
 /opt/lampp/libexec/apache2/mod_rewrite.so: cannot open shared object file: No 
 such file or directory

Obviously, you don't have the file /opt/lampp/libexec/apache2/mod_rewrite.so.

In your httpd.conf, you wrote:

LoadModule rewrite_module libexec/apache2/mod_rewrite.so 

This doesn't make sense. Look at all the other lines near it:

LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so

Obviously you should use the same format for mod_rewrite.so:

LoadModule negotiation_module modules/mod_rewrite.so


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Can't get mod_rewrite to work correctly

2011-10-22 Thread Yves S. Garret
Yeah, that was pretty silly.  I blame that on being up so long :-)

Now I got this error just by going to localhost, same as going to
localhost/cakery (where I put cake).

Bad Request

Your browser sent a request that this server could not understand.

Additionally, a 400 Bad Request error was encountered while trying to use an
ErrorDocument to handle the request.
Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0c PHP/5.3.8
mod_apreq2-20090110/2.7.1 mod_perl/2.0.5 Perl/v5.10.1 Server at localhost
Port 80

On Sat, Oct 22, 2011 at 6:11 PM, Ryan Schmidt google-2...@ryandesign.comwrote:


 On Oct 21, 2011, at 22:54, Yves S. Garret wrote:

  Whenever I run sudo ./lampp restart, I get the following error:
 
  httpd: Syntax error on line 114 of /opt/lampp/etc/httpd.conf: Cannot load
 /opt/lampp/libexec/apache2/mod_rewrite.so into server:
 /opt/lampp/libexec/apache2/mod_rewrite.so: cannot open shared object file:
 No such file or directory

 Obviously, you don't have the file
 /opt/lampp/libexec/apache2/mod_rewrite.so.

 In your httpd.conf, you wrote:

 LoadModule rewrite_module libexec/apache2/mod_rewrite.so

 This doesn't make sense. Look at all the other lines near it:

 LoadModule dav_fs_module modules/mod_dav_fs.so
 LoadModule vhost_alias_module modules/mod_vhost_alias.so
 LoadModule negotiation_module modules/mod_negotiation.so

 Obviously you should use the same format for mod_rewrite.so:

 LoadModule negotiation_module modules/mod_rewrite.so


 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


how to display image to edit it?

2011-10-22 Thread ahmed fakher

/**
 * Dvds Controller
 *
 * file: /app/controllers/dvds_controller.php
 */

**i build dvd script for dvds library.. when i want to edit dvds
details the image i have uploded dont display but when i see databse
table i see it is already into this table and i find the image in the
webroot img folder (dvds)..so how to show image to edit it?

Dvds Controller

 ?php


class DvdsController extends AppController {
// good practice to include the name variable
var $name = 'Dvds';

// load any helpers used in the views
var $helpers = array('Html', 'Form', 'Javascript', 'Misc');

// global ratings variable
var $ratings = array('0'='0', '1'='1', '2'='2', '3'='3',
'4'='4', '5'='5', '6'='6', '7'='7', '8'='8', '9'='9',
'10'='10');

/**
 * index()
 * main index page for dvds
 * url: /dvds/index
 */
function index() {
// get all dvds from database where status = 1
//$dvds = $this-Dvd-find(Dvd.status=1, null, Dvd.name);
 $dvds = $this-Dvd-find('all', array('conditions' =
array('Dvd.status' = '1')));
// save the dvds in a variable for the view
$this-set('dvds', $dvds);
}

/**
 * view()
 * displays a single dvd and all related info
 * url: /dvds/view/dvd_slug
 */
function view($slug) {
// if slug is null
if(!$slug) {
// set a flash message
$this-Session-setFlash('Invalid slug for DVD',
'flash_bad');
// redirect user
$this-redirect(array('action'='index'));
}

// find dvd in database
$dvd = $this-Dvd-findBySlug($slug);

// if dvd has been found
if(!empty($dvd)) {
// set the dvd for the view
$this-set('dvd', $dvd);
} else {
// set a flash message
$this-Session-setFlash('Invalid slug for DVD',
'flash_bad');
// redirect user
$this-redirect(array('action'='index'));
}
}

/**
 * admin_index()
 * main index page for admin users
 * url: /admin/dvds/index
 */
function admin_index() {
// get all dvds from database where status = 1, order by dvd
name
   //   $dvds = $this-Dvd-findAll(Dvd.status=1, null,
Dvd.name);
$dvds = $this-Dvd-find('all', array('conditions' =
array('Dvd.status' = '1')));

// save the dvds in a variable for the view
$this-set('dvds', $dvds);
}

/**
 * admin_add()
 * allows an admin to add a dvd
 * url: /admin/dvds/add
 */
function admin_add() {
// if the form data is not empty
if (!empty($this-data)) {
// check for image
$image_ok = $this-_upload_image();

// if the image was uploaded successfully
if($image_ok) {
// initialise the Dvd model
$this-Dvd-create();

// create the slug
$this-data['Dvd']['slug'] = $this-slug($this-
data['Dvd']['name']);

// check for a dvd with the same slug
$dvd = $this-Dvd-find('first', array(
'conditions' = array(
'Dvd.slug'=$this-data['Dvd']['slug'],
'Dvd.status' = '1'
)
));

// if slug is not taken
if(empty($dvd)) {
// try saving the dvd
if ($this-Dvd-save($this-data)) {
// set a flash message
$this-Session-setFlash('The DVD has been
saved', 'flash_good');

// redirect
$this-redirect(array('action'='index'));
} else {
// set a flash message
$this-Session-setFlash('The DVD could not be
saved. Please, try again.', 'flash_bad');
}
} else {
// set a flash message
$this-Session-setFlash('The DVD could not be
saved. The Name has already been taken.', 'flash_bad');
}
}
}

// find dvd options in a list format
// new 1.2 feature, can also have 'count' and 'first'
$formats= $this-Dvd-Format-find('list');
$types  = $this-Dvd-Type-find('list');
$locations  = $this-Dvd-Location-find('list');
$ratings= $this-ratings;

// set the variables so they can be accessed from the view
$this-set(compact('formats', 'types', 'locations',
'ratings'));
}

/**
 * admin_edit()
 * allows an admin to edit a dvd
 * url: /admin/dvds/edit/id
 */
function admin_edit($id = null) {
// if the id is null and the form data empty
if (!$id  empty($this-data)) {
// set a flash message
$this-Session-setFlash('Invalid Dvd', 'flash_bad');
// redirect the admin

Embedding CakePHP in existing page

2011-10-22 Thread Roman Zawada
Hi guys,
I've voluntiered on creating some db app, and I told those guys that
it will be very easy, since I wanted to use CakePHP. Sadly after some
time they told me they want it inside their already existing web,
which is ancient highly changed PHPNuke.
So what I want is to generate just content of one div inside already
existing page with CakePHP. I looked up the internets, but or I don't
how form proper search query or nothing is out there. I'm rather user
of the framework, not developer, so I don't know much about the
backend and how MVC frameworks are working inside (and this is my
first try with CakePHP, since I'm Rails guy).
What I did so far is disabling mod_rewrite for Cake, inside PHPNuke
module included cakes index.php and rendering views with empty layout.
This somehow works, but the thing is how to form urls. I got it
working by now with
{{{
http://localhost/modules.php/posts?op=modloadname=xfile=indexdo=x
}}}
but with this all links to css and images on phpnuke site are broken.

Is there any way to use something like
{{{
http://localhost/modules.php?op=modloadname=xfile=indexdo=xCakePHP=/posts/bla/bla
}}}
or any other way that could do the job.

Thank you very much

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Embedding CakePHP in existing page

2011-10-22 Thread Jon Bennett
use an iframe.

j

On 22 October 2011 18:34, Roman Zawada zwa...@gmail.com wrote:
 Hi guys,
 I've voluntiered on creating some db app, and I told those guys that
 it will be very easy, since I wanted to use CakePHP. Sadly after some
 time they told me they want it inside their already existing web,
 which is ancient highly changed PHPNuke.
 So what I want is to generate just content of one div inside already
 existing page with CakePHP. I looked up the internets, but or I don't
 how form proper search query or nothing is out there. I'm rather user
 of the framework, not developer, so I don't know much about the
 backend and how MVC frameworks are working inside (and this is my
 first try with CakePHP, since I'm Rails guy).
 What I did so far is disabling mod_rewrite for Cake, inside PHPNuke
 module included cakes index.php and rendering views with empty layout.
 This somehow works, but the thing is how to form urls. I got it
 working by now with
 {{{
 http://localhost/modules.php/posts?op=modloadname=xfile=indexdo=x
 }}}
 but with this all links to css and images on phpnuke site are broken.

 Is there any way to use something like
 {{{
 http://localhost/modules.php?op=modloadname=xfile=indexdo=xCakePHP=/posts/bla/bla
 }}}
 or any other way that could do the job.

 Thank you very much

 --
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php




-- 
jon bennett - www.jben.net - blog.jben.net

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php