Commits

christiansalazar committed cf623dc

readme 1

Comments (0)

Files changed (1)

 		[send a "message" via CURL POST to a given "URL"+"uid=123456"]
 
 	[the yii application]
-		receive the "message" and send to a prefedined class instance 
+		receive the "message" and send to a predefined class instance 
 		previously associated to the UID provided in the URL.
 
 	
 2. The UID specified in the URL is crc32 hashed, so it is short. An example
 URL could be:	
 
-	http://myapp.com/incomingmessage/da73a857	(if you are using rewrite rules)
-	or
-	http://myapp.com/index.php?r=/somecontroller/incoming&uid=da73a857
+		http://myapp.com/incomingmessage/da73a857	(if you are using rewrite rules)
+		or
+		http://myapp.com/index.php?r=/somecontroller/incoming&uid=da73a857
 
 3. When a remote user perform a POST into this URL and (a) when this URL is
 enabled in the server side and (b) the remote IP address match the IP rules
 
 2.	Register this extension in your imports:
 
-	'import'=>array(
-		'application.models.*',
-		'application.components.*',
-		'application.extensions.yiifilemanager.*',			// required
-		'application.extensions.yiifilemanagerfilepicker.*',//if youre using it
-		'application.extensions.yiifilemanagerremote.*', 	// required
-	),
+		'import'=>array(
+			'application.models.*',
+			'application.components.*',
+			'application.extensions.yiifilemanager.*',			// required
+			'application.extensions.yiifilemanagerfilepicker.*',//if youre using it
+			'application.extensions.yiifilemanagerremote.*', 	// required
+		),
 
 3.	Copy the provided template from 
 
-	'../extensions/yiifilemanagerremote/templates/MyIncomingDataAction.php'	
-	to
-	'protected/components/MyIncomingDataAction.php'
+		'../extensions/yiifilemanagerremote/templates/MyIncomingDataAction.php'	
+		to
+		'protected/components/MyIncomingDataAction.php'
 	
 4.	Edit the class method to feet your needs, pay attention to:
 
-	class MyIncomingDataAction 
-		extends YiiFileManagerAbstractAction 
-			implements IYiiFileManagerAction {
-		public function getDb(){
-			return Yii::app()->db;
-		}
-		public function getFilemanager(){
-			return Yii::app()->fileman; 
+		class MyIncomingDataAction 
+			extends YiiFileManagerAbstractAction 
+				implements IYiiFileManagerAction {
+			public function getDb(){
+				return Yii::app()->db;
+			}
+			public function getFilemanager(){
+				return Yii::app()->fileman; 
+			}
 		}
-	}
-
-	// getFileManager returns Yii::app()->fileman because
-	// you have this configuration for yiifilemanager component:
-	'components'=>array(
-		'fileman' => array(
-			'class'=>'application.extensions.yiifilemanager.YiiDiskFileManager',
-			'storage_path' => "/var/tmp/fileman",
-	),
+
+		// getFileManager returns Yii::app()->fileman because
+		// you have this configuration for yiifilemanager component:
+		'components'=>array(
+			'fileman' => array(
+				'class'=>'application.extensions.yiifilemanager.YiiDiskFileManager',
+				'storage_path' => "/var/tmp/fileman",
+		),
 
 5.	Register the action into any controller: