dev-master
9999999-devEthnicmedia client
Apache-2.0
The Requires
by Andrew Russkin (EthnicMedia)
extension yii2 ethnicmedia ad post system
Ethnicmedia client
Ethnicmedia client, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist martrix/yii2-ethnicmedia-client "*"
or add, (*4)
"martrix/yii2-ethnicmedia-client": "*"
to the require section of your composer.json
file., (*5)
Add to params.php 'EM_apiKey' => API KEY,, (*6)
Add to SiteController.php, (*7)
public function actions(){ return array( 'emclient' => array( 'class' => '\martrix\ethnicmediaClient\EmclientAction', 'debug' => true, 'lang' => 'en', 'adsLimit' => 20, ), ); } public function actionClassifield(){ $categoryId=Yii::$app->request->get('categoryId'); $page=Yii::$app->request->get('page'); return $this->render('ad',['categoryId'=>$categoryId,'page'=>$page]); }
example of use on template (ad.php):, (*8)
<?php echo \martrix\ethnicmediaClient\Emformwidget::widget(['adId'=>5]); ?> <?php echo \martrix\ethnicmediaClient\Emadsdisplaywidget::widget(['categoryId'=>$categoryId,'page'=>$page]); ?>
Ethnicmedia client
Apache-2.0
extension yii2 ethnicmedia ad post system