cornernote / yii-embed-wordpress

Simple integration of Yii directly into your WordPress site
http://cornernote.github.io/yii-embed-wordpress/
Other
8 stars 9 forks source link

How do I pass configuration. #4

Closed rifaideen closed 1 year ago

rifaideen commented 9 years ago

how can I set db configuration as like in normal yii application via config/main.php I need help on this. my yii app running separately. I want to use its model in wordpress app. so give me an example.

cornernote commented 9 years ago

You won't have a config.php file, but you can still modify the yii app config...

You should have YourPlugin::yiiInit() method, inside you do like this:

Yii::app()->option = 'value';
rifaideen commented 9 years ago

Ok. I have another doubt. I have models for yii app. how do I use here?

cornernote commented 9 years ago

I'm on my phone so can't help until tomorrow. There is an example in the docs of a plugin with a model. On 14/11/2014 11:07 PM, "rifaideen" notifications@github.com wrote:

Ok. I have another doubt. I have models for yii app. how do I use here?

— Reply to this email directly or view it on GitHub https://github.com/cornernote/yii-embed-wordpress/issues/4#issuecomment-63057886 .

rifaideen commented 9 years ago

It's ok thank you. my scenario is totally different than you shown in the documentation.

Thanks and regards - Rifaideen

On Fri, Nov 14, 2014 at 7:00 PM, cornernote notifications@github.com wrote:

I'm on my phone so can't help until tomorrow. There is an example in the docs of a plugin with a model. On 14/11/2014 11:07 PM, "rifaideen" notifications@github.com wrote:

Ok. I have another doubt. I have models for yii app. how do I use here?

— Reply to this email directly or view it on GitHub < https://github.com/cornernote/yii-embed-wordpress/issues/4#issuecomment-63057886>

.

— Reply to this email directly or view it on GitHub https://github.com/cornernote/yii-embed-wordpress/issues/4#issuecomment-63064238 .

cornernote commented 9 years ago

If you have existing models, simply put them into your models directory and they should work (assuming that your models path is in your include path).

If you need further help please give more details on what is not working.