Author Topic: Development CMP  (Read 1415 times)

0 Members and 1 Guest are viewing this topic.

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +0/-0
Development CMP
« on: June 06, 2011, 12:59:29 AM »
modxer semua aku ada problem nih....dengan development di revo...

yaitu file confignya untuk cmp

klo di tutorial http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution%2C+Part+II
pada script ini
Code: [Select]
public function initialize($ctx = 'web') {
   switch ($ctx) {
        case 'mgr':
            $this->modx->lexicon->load('doodles:default');
            if (!$this->modx->loadClass('doodlesControllerRequest',$this->config['modelPath'].'doodles/request/',true,true)) {
               return 'Could not load controller request handler.';
            }
            $this->request = new doodlesControllerRequest($this);
            return $this->request->handleRequest();
        break;
    }
    return true;
}
nah yang this->config['modelPath'] ini confignya dapetnya dari mana yah?

terimakasih atas saranya...

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Re: Development CMP
« Reply #1 on: June 06, 2011, 01:06:00 AM »
Ada 3 turunan, diurut berdasarkan tingkatannya:
1. System> System Settings
2. Snippet> Properties
3. Snippet call parameters.

artinya, bisa ada setting-an di semuanya, yang nomor besar bakal override nomor kecil.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +0/-0
Re: Development CMP
« Reply #3 on: June 06, 2011, 01:35:03 AM »
siappppp terimakasih ...... master

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Re: Development CMP
« Reply #4 on: June 06, 2011, 01:36:57 AM »
mas terong? :p
sama-sama
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +0/-0
Re: Development CMP
« Reply #5 on: June 06, 2011, 02:56:31 AM »
menyusul permasalahan lain

Code: [Select]
public function handleRequest() {
        $this->loadErrorHandler();
 
        /* save page to manager object. allow custom actionVar choice for extending classes. */
        $this->action = isset($_REQUEST[$this->actionVar]) ? $_REQUEST[$this->actionVar] : $this->defaultAction;
        $modx =& $this->modx;
        $hosting =& $this->hosting;
        $viewHeader = include $this->hosting->config['corePath'].'controllers/mgr/header.php';
 
        $f = $this->hosting->config['corePath'].'controllers/mgr/'.$this->action.'.php';

        if (file_exists($f)) {
            $viewOutput = include $f;
        } else {
            $viewOutput = 'Controller not found: '.$f;
        }
        return $viewHeader.$viewOutput;

    }

pada baris ini
Code: [Select]
if (file_exists($f)) {
            $viewOutput = include $f;
        } else {
            $viewOutput = 'Controller not found: '.$f;
        }
        return $viewHeader.$viewOutput;

tak coba seperti ini juga belum mempan
Code: [Select]
if (file_exists($f)) {
ob_start();
include $f;
            $viewOutput = ob_get_contents();
ob_end_clean();
        } else {
            $viewOutput = 'Controller not found: '.$f;
        }
filenya ada tapi includenya ga kebaca hmmm ada ide?
« Last Edit: June 06, 2011, 03:03:15 AM by crackers »

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Re: Development CMP
« Reply #6 on: June 06, 2011, 03:07:43 AM »
Udah di check fungsi2 Javascript-nya, sob?
Itu seinget gw, yang di include isinya cuman <div id="header-foo"></div> doang.

Nanti ExtJs yang bakal ngisi.

btw,
kalo emang gak doyan ExtJS, panggil halaman yang PHP juga gak apa-apa, loh...
« Last Edit: June 06, 2011, 03:25:05 AM by goldsky »
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +0/-0
Re: Development CMP
« Reply #7 on: June 06, 2011, 03:29:49 AM »
udahbro
$outputnya cuma 1 ajah seperti klo status includenya ajah gitu......

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Re: Development CMP
« Reply #8 on: June 06, 2011, 03:38:54 AM »
isi header.php dan index.php -nya apaan aja?
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +0/-0
Re: Development CMP
« Reply #9 on: June 06, 2011, 03:44:30 AM »
ini isi header.php
Code: [Select]
$modx->regClientStartupScript($doodles->config['jsUrl'].'mgr/doodles.js');
$modx->regClientStartupHTMLBlock('<script type="text/javascript">
Ext.onReady(function() {
    Doodles.config = '.$modx->toJSON($hosting->config).';
});
</script>');

ini isi index.php

Code: [Select]
//$modx->regClientStartupScript($doodles->config['jsUrl'].'mgr/widgets/doodles.grid.js');
$modx->regClientStartupScript($doodles->config['jsUrl'].'mgr/widgets/home.panel.js');
$modx->regClientStartupScript($doodles->config['jsUrl'].'mgr/sections/index.js');
 
return '<div id="doodles-panel-home-div"></div>';

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Re: Development CMP
« Reply #10 on: June 06, 2011, 03:46:33 AM »
yang header.php tambahin paling bawahnya:

Code: [Select]
<?php // highlighting

return ''; // empty return
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +0/-0
Re: Development CMP
« Reply #11 on: June 06, 2011, 03:48:55 AM »
oh udah bisa master sepertinya settngan phpku disini......tak cobain dikomputer lain jalan normal soalnya heheh
btw2 tapinya kok keluar angka 1 di ujungnya kenapa yah?

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Re: Development CMP
« Reply #12 on: June 06, 2011, 03:52:13 AM »
karena header.php belum ditambahin
Code: [Select]
<?php // highlighting

return ''; // empty return
http://us2.php.net/manual/en/function.include.php#example-130

return include 'file.php' => di file.php harus return something.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +0/-0
Re: Development CMP
« Reply #13 on: June 06, 2011, 04:06:51 AM »
wah betul sekali anda master.....terimakasih....done2 semoga ada banyak pertanyaan lagi ahahhahah

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
  • Karma: +1/-0
  • Less is more
    • Virtudraft Web
Re: Development CMP
« Reply #14 on: June 06, 2011, 05:29:16 AM »
hehehe...
dipersilahken dengan sanget.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
Apache 2.0.63 (Win32)
PHP Version 5.2.9-2
MySQL 5.0.87 (3306)
Security, security, security!
IE 6 must die !
Indonesian Forums
Cheatsheets: Revo's, Evo's
Easy 2 Gallery 1.4.x
Board || GIT || WIKI || Examples || Donate
spiefeed || Doc || GIT
» tutorial, tips, & tricks to here: http://modx-linx.net