Author Topic: Development CMP  (Read 12551 times)

0 Members and 1 Guest are viewing this topic.

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 166
  • Karma: +0/-0
Re: Development CMP
« Reply #15 on: June 29, 2011, 07:48:07 AM »
master...

berulang kali gwe coba ternyata masih belum bsia ngeluarin gridnya....ada tutorial yang membantu?

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #16 on: June 29, 2011, 09:17:20 AM »
loh, katanya udah bisa di komputer lain?
sudah nyoba di browser2 yang lain, belum?
Firefox udah keluar yang versi 5, loach...
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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 166
  • Karma: +0/-0
Re: Development CMP
« Reply #17 on: June 29, 2011, 09:23:04 AM »
iya nih aneh gridnya........udah di ff, chrome, safari ga jalan2 yah?

ini kode home.panel.js
Quote
Supports.panel.Home = function(config) {
    config = config || {};
    Ext.apply(config,{
        border: false
        ,baseCls: 'modx-formpanel'
        ,items: [{
            html: '<h2>'+_('supports.management')+'</h2>'
            ,border: false
            ,cls: 'modx-page-header'
        },{
            xtype: 'modx-tabs'
            ,bodyStyle: 'padding: 10px'
            ,defaults: { border: false ,autoHeight: true }
            ,border: true
            ,items: [{
                title: _('supports')
                ,defaults: { autoHeight: true }
                [{
               html: '<p>'+_('doodles.management_desc')+'</p><br />'
               ,border: false
            },{
               xtype: 'doodles-grid-doodles'
               ,preventRender: true
            }]
            }]
        }]
    });
    Supports.panel.Home.superclass.constructor.call(this,config);
};
Ext.extend(Supports.panel.Home,MODx.Panel);
Ext.reg('supports-panel-home',Supports.panel.Home);

ini kode supports.grid.js
Quote
Supports.grid.Supports = function(config) {
    config = config || {};
    Ext.applyIf(config,{
        id: 'supports-grid-supports'
        ,fields: ['id','name','description','menu']
        ,paging: true
        ,remoteSort: true
        ,anchor: '97%'
        ,autoExpandColumn: 'name'
        ,columns: [{
            header: _('id')
            ,dataIndex: 'id'
            ,sortable: true
            ,width: 60
        },{
            header: _('supports.name')
            ,dataIndex: 'name'
            ,sortable: true
            ,width: 100
            ,editor: { xtype: 'textfield' }
        },{
            header: _('supports.description')
            ,dataIndex: 'description'
            ,sortable: false
            ,width: 350
            ,editor: { xtype: 'textfield' }
        }]
    });
    Supports.grid.Supports.superclass.constructor.call(this,config)
};
Ext.extend(Supports.grid.Supports,MODx.grid.Grid);
Ext.reg('supportss-grid-supports',Supports.grid.Supports);

adakah yang salah?
« Last Edit: June 29, 2011, 10:30:50 AM by crackers »

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #18 on: June 29, 2011, 05:51:42 PM »
untuk yang supports.grid.js, yang di bawah ini mana?
  • url
  • baseParams
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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 166
  • Karma: +0/-0
Re: Development CMP
« Reply #19 on: June 30, 2011, 02:14:42 AM »
Code: (js) [Select]
Supports.grid.Supports = function(config) {
    config = config || {};
    Ext.applyIf(config,{
        id: 'supports-grid-supports'
,url: Supports.config.connectorUrl
        ,baseParams: { action: 'mgr/supports/getList' }
        ,fields: ['id','name','description','menu']
        ,paging: true
        ,remoteSort: true
        ,anchor: '97%'
        ,autoExpandColumn: 'name'
        ,columns: [{
            header: _('id')
            ,dataIndex: 'id'
            ,sortable: true
            ,width: 60
        },{
            header: _('supports.name')
            ,dataIndex: 'name'
            ,sortable: true
            ,width: 100
            ,editor: { xtype: 'textfield' }
        },{
            header: _('supports.description')
            ,dataIndex: 'description'
            ,sortable: false
            ,width: 350
            ,editor: { xtype: 'textfield' }
        }]
    });
    Supports.grid.Supports.superclass.constructor.call(this,config)
};
Ext.extend(Supports.grid.Supports,MODx.grid.Grid);
Ext.reg('supportss-grid-supports',Supports.grid.Supports);

ini connector.php
Code: (php) [Select]
<?php
require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php';
require_once 
MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
require_once 
MODX_CONNECTORS_PATH.'index.php';
 
$corePath $modx->getOption('supports.core_path',null,$modx->getOption('core_path').'components/supports/');
require_once 
$corePath.'model/supports/supports.class.php';
$modx->supports = new Supports($modx);
 
$modx->lexicon->load('supports:default');
 
/* handle request */
$path $modx->getOption('processorsPath',$modx->supports->config,$corePath.'processors/');
$modx->request->handleRequest(array(
    
'processors_path' => $path,
    
'location' => '',
));
?>


ini config.core.php
Code: (php) [Select]
<?php
define
('MODX_CORE_PATH'dirname(dirname(__FILE__)).'/core/');
define('MODX_CONFIG_KEY''config');
?>


ada yang salah kah?
« Last Edit: July 09, 2011, 12:19:46 PM by goldsky »

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #20 on: June 30, 2011, 04:39:52 AM »
Quote
Ext.extend(Supports.grid.Supports,MODx.grid.Grid);
Ext.reg('supportss-grid-supports',Supports.grid.Supports);

Maksudnya
Quote
Ext.extend(Supports.grid.Supports,MODx.grid.Grid);
Ext.reg('supports-grid-supports',Supports.grid.Supports);
kali, ya?
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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 166
  • Karma: +0/-0
Re: Development CMP
« Reply #21 on: July 01, 2011, 12:22:56 AM »
still master......  :'( adapakah get list tu harus bener? karena pas gwe cobain yang doodles tak ilangin masih bisa jalan...yah????? bingung jadinya

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #22 on: July 04, 2011, 08:24:59 PM »
PM gw aksesnya dah, gw liat dari pintu belakang aja dolo. :P
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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 166
  • Karma: +0/-0
Re: Development CMP
« Reply #23 on: July 09, 2011, 11:33:47 AM »
Setelah berhasil memunculkan gridnya sekarang eh yang ga muncul data di databasenya......

kode untuk processornya (getlist.php) seperti ini
Code: (php) [Select]
$isLimit = !empty($scriptProperties['limit']);
$start = $modx->getOption('start',$scriptProperties,0);
$limit = $modx->getOption('limit',$scriptProperties,10);
$sort = $modx->getOption('sort',$scriptProperties,'name');
$dir = $modx->getOption('dir',$scriptProperties,'ASC');
 
/* build query */
$c = $modx->newQuery('Support');
$count = $modx->getCount('Support',$c);
$c->sortby($sort,$dir);
if ($isLimit) $c->limit($limit,$start);
$supports = $modx->getIterator('Support', $c);
 
/* iterate */
$list = array();
foreach ($supports as $support) {
    $supportArray = $support->toArray();
    $list[]= $supportArray;
}
return $this->outputArray($list,$count);

adakah yang salah?
« Last Edit: July 09, 2011, 12:20:23 PM by goldsky »

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #24 on: July 09, 2011, 12:18:16 PM »
processor-nya gak salah.
coba liat initialize() method di support.class.php dong?
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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #25 on: July 09, 2011, 06:31:35 PM »
gini aja, bro.
email gw aja seluruh package CMPnya ke goldsky at modx-id dot com.
sekalian aja yang komplit pake telor.
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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #26 on: July 12, 2011, 08:32:17 PM »
Sekedar menutup permasalahan yang telah dipecahkan, kodenya bung crackers ternyata hanya kurang sebaris kode pada Class utamanya pada bagian __construct() untuk memanggil mysql schema yang udah dibuat.

Code: (php) [Select]
        $this->modx->addPackage('supports', $this->config['modelPath']);

Semoga menjadi informasi yang berguna untuk yang mengalami masalah yang 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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 166
  • Karma: +0/-0
Re: Development CMP
« Reply #27 on: August 07, 2011, 10:21:07 PM »
lagi2 ada masalah ga ngerti ini cmp gimana yah cara kerjanya.....aku load database kenapa ga muncul lagi di grid yah?

Quote
Hosting.grid.Hosting = function(config) {
    config = config || {};
    Ext.applyIf(config,{
        id: 'hosting-grid-hosting'
        ,url: Hosting.config.connectorUrl
        ,baseParams: { action: 'mgr/hosting/getList' }
        ,fields: ['id','server_name']
        ,paging: true
        ,remoteSort: true
        ,anchor: '97%'
        ,autoExpandColumn: 'server_name'
        ,columns: [{
            header: _('id')
            ,dataIndex: 'id'
            ,sortable: true
            ,width: 20
        },{
            header: _('hosting.server_name')
            ,dataIndex: 'server_name'
            ,sortable: true
            ,editor: { xtype: 'textfield' }
        }]
    });
    Hosting.grid.Hosting.superclass.constructor.call(this,config)
};
Ext.extend(Hosting.grid.Hosting,MODx.grid.Grid);
Ext.reg('hosting-grid-hosting',Hosting.grid.Hosting);

ini kodingnya ada yang salah kah?

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Development CMP
« Reply #28 on: August 07, 2011, 10:50:40 PM »
lah?
belon kelar, bro?  :o
puyeng, yak baca ebooknya ExtJs?  ::)

FireBug ngomongnya gimana?
Coba di die('test') dulu tuh getList.
Keluar gak di FireBug?
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!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline crackers

  • Administrator
  • Full Member
  • *****
  • Posts: 166
  • Karma: +0/-0
Re: Development CMP
« Reply #29 on: August 07, 2011, 11:05:27 PM »
iya master pyeng wakakakakka sik dicobain

 

term