public function renderAviaryConfigurationForm() { $values = N2ImageAviary::loadSettings(); $form = new N2Form($this->appType); $form->loadArray($values); $form->loadXMLFile(N2Loader::getPath('models', 'system') . '/forms/aviary.xml'); echo N2Html::openTag("form", array("id" => "nextend-config", "method" => "post", "action" => N2Request::getRequestUri())); $form->render('aviary'); echo N2Html::closeTag("form"); }
public function actionAviary() { if ($this->canDo('nextend_config')) { N2Loader::import('libraries.image.aviary'); $aviary = N2Request::getVar('aviary', false); if ($aviary) { if ($this->validateToken()) { N2ImageAviary::storeSettings($aviary); N2Message::success(n2_('Saved.')); N2Request::redirect($this->appType->router->createUrl(array("settings/aviary", array('layout' => N2Request::getCmd('layout', ''))))); } else { $this->refresh(); } } $this->addView("../../inline/sidebar/settings", array("appObj" => $this), "sidebar"); $this->addView("aviary"); $this->render(); } }
function fetchElement() { $fixed = N2XmlHelper::getAttribute($this->_xml, 'fixed'); if ($fixed == '1') { $this->fixed = true; } N2ImageAviary::init(); $html = parent::fetchElement(); $params = array(); N2ImageHelper::initLightbox(); N2JS::addInline("new NextendElementImage('" . $this->_id . "', " . json_encode($params) . " );"); if ($this->fixed) { $aviary = ''; $html .= '<div id="' . $this->_id . '_preview" class="n2-form-element-preview n2-form-element-preview-fixed n2-border-radius" style="' . $this->getImageStyle() . '"> ' . $aviary . ' </div>'; } else { $aviary = ''; $html .= $aviary; } return $html; }
public function actionGetHighResolutionAuth() { N2Loader::import('libraries.image.aviary'); $this->response->respond(array('highResolutionAuth' => N2ImageAviary::getHighResolutionAuth())); }
n2_e('Fill the captcha'); ?> </li> <li><?php n2_e('Click the "ADD APPLICATION" button'); ?> </li> <li><?php n2_e('Then you can copy and paste your Client ID and Client secret to this form and Save it'); ?> </li> </ol> </div> </div> <?php $values = N2ImageAviary::loadSettings(); if ($values['public'] && $values['secret']) { ?> <div class="n2-form-tab "> <div class="n2-h2 n2-content-box-title-bg"><?php n2_e('High resolution feature'); ?> </div> <div class="n2-description"> <p><?php n2_e('By default Aviary is limited in the image size up to 1 megapixel. If you would like to edit bigger images, you can ask them (it\'s free) to enable high resolution image support on your app. '); ?> </p> <a class="n2-button n2-button-big n2-button-green" href="mailto:websupport@creativesdk.zendesk.com?Subject=Web%20High%20Resolution%20Upgrade%20Inquiry&Body=Hello%2C%0AI%20would%20like%20to%20ask%20you%20to%20enable%20high%20resolution%20image%20support%20on%20my%20app.%0AMy%20Client%20id%20is%3A%20<?php