1. #21
    Ext User
    Join Date
    Mar 2008
    Posts
    1
    Vote Rating
    0
    sommai.k is on a distinguished road

      0  

    Default


    I change some code for support compress feature. At class ExtDAPI method _print line 232 - 244.

    Code:
    Code:
    function _print($api) {
    		$CI =& get_instance();
    		$CI->output->set_header('Content-Type: text/javascript');
    
    		$ret = ($this->_namespace ? 
    			'Ext.ns(\'' . substr($this->_descriptor, 0, strrpos($this->_descriptor, '.')) . '\'); ' . $this->_descriptor:
    			'Ext.ns(\'Ext.app\'); ' . 'Ext.app.REMOTING_API'
    		);
    		$ret = $ret.' = ';
    		$ret = $ret.json_encode($api);
    		$ret = $ret.';';
    		$CI->output->set_output($ret);
    	}

  2. #22
    Ext User
    Join Date
    Dec 2007
    Posts
    1
    Vote Rating
    0
    zcool is on a distinguished road

      0  

    Default


    I'm traing to make an upload using the CI Upload library and Ext Direct and it dosen't works. Could someone put me an example about this?, both parts (JS and PHP) please.

  3. #23
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    686
    Vote Rating
    22
    Dumbledore will become famous soon enough Dumbledore will become famous soon enough

      0  

    Default


    i reading the first post and i am new to codeigniter... What does basePath() mean? This run into an error.
    A complete Sample-Code were great!


    [Edit]:

    base_path() is not a function. For me it must be <?=$this->config->item('base_url') .$this->config->item('index_page');?>

  4. #24
    Ext User
    Join Date
    Dec 2009
    Posts
    49
    Vote Rating
    0
    siberian is on a distinguished road

      0  

    Default Session access within Direct API

    Session access within Direct API


    I am trying to access the user session from C.I. within the Ext.Direct API function

    eg:
    Code:
    $perms = $this->session->userdata('perms');
    But C.I. tells me:
    Code:
    Severity: Notice  --> Undefined property: SponsorAPI::$session
    Does anyone have a recipe for accessing the session?

    In a controller context the session works fine, its only at this next level down that it fails.

    Tx!

  5. #25
    Ext User
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    21
    Vote Rating
    0
    Julio Betta is on a distinguished road

      0  

    Default


    try this..

    PHP Code:
    $CI get_instance();
    $CI->load->library('session');
    $perms $CI->session->userdata('perms'); 

  6. #26
    Ext User
    Join Date
    Dec 2009
    Posts
    49
    Vote Rating
    0
    siberian is on a distinguished road

      0  

    Default That worked!

    That worked!


    Worked like a champ, tx!

  7. #27
    Ext JS Premium Member
    Join Date
    May 2010
    Posts
    15
    Vote Rating
    0
    tfcoding is on a distinguished road

      0  

    Default


    Hmm i have read the Thread more than 2 Times, and i dont get into it, some Help would be very nice, first of all the base_path() thing did not work for me, ok i solved this with the base_url, the trouble starts now with the not reachable direct/router method.

    Is there anybody who get ext direct working with ci, and could give me some help.

    that would be very nice

  8. #28
    Ext User
    Join Date
    Dec 2009
    Posts
    49
    Vote Rating
    0
    siberian is on a distinguished road

      0  

    Default


    You will need to be more specific i think. Can you post the error your getting, your calling code and your direct controller?

    Tx!
    j

    Quote Originally Posted by tfcoding View Post
    Hmm i have read the Thread more than 2 Times, and i dont get into it, some Help would be very nice, first of all the base_path() thing did not work for me, ok i solved this with the base_url, the trouble starts now with the not reachable direct/router method.

    Is there anybody who get ext direct working with ci, and could give me some help.

    that would be very nice

  9. #29
    Ext JS Premium Member
    Join Date
    May 2010
    Posts
    15
    Vote Rating
    0
    tfcoding is on a distinguished road

      0  

    Default


    I have Setup the the scripts in a way, i normaly do it,

    PHP Code:
    <link rel="stylesheet" type="text/css" href="<?=base_url().'extJS/resources/css/ext-all.css'?>" />

    <script type="text/javascript" src="<?=base_url().'extJS/adapter/ext/ext-base.js'?>"></script>
    <script type="text/javascript" src="<?=base_url().'extJS/ext-all.js'?>"></script>
    <script type="text/javascript" src="<?=base_url()?>index.php/direct/api"></script>
    If i now call my default Controller i get the error

    http://www.domain.tld/direct/router" 404 Error,

    that seems pretty clear to me, but i dont get right into it, because it seems i am the only one with this error...

    The right URL must be http://www.domain.tld/index.php/direct/router", i have done a small worakround to test the functionality of ext direct, with a htaccess file and cutting the index.php away, but i get a response , similar to this one
    {"action":"Time","method":"get","data":null,"type":"rpc","tid":2}

    I have tried to figure this behaviour out but now i am at a point where i can't think about this problem anymore :-P

  10. #30
    Ext User
    Join Date
    Dec 2009
    Posts
    49
    Vote Rating
    0
    siberian is on a distinguished road

      0  

    Default


    What does your apache error log say?