function afterAddConfigItems(Am_Form_Setup_ProtectDatabased $form) { parent::afterAddConfigItems($form); $form->addText('protect.joomla.secret')->setLabel(array('Secret Word', "You can get it from Joomla configuration.php file.")); $form->addText('protect.joomla.live_site')->setLabel(array('Live Site URL', "You can get it from Joomla configuration.php file.")); $form->addSelect('protect.joomla.version', '', array('options' => $this->versions, 'default' => $this->defaultVersion))->setLabel(array('Joomla version', "")); if ($this->haveJomsocial() || $this->getConfig('jomsocial')) { $form->addAdvCheckbox('protect.joomla.jomsocial')->setLabel("Update JomSocial groups"); } if ($this->haveJacl() || $this->getConfig('jacl')) { $form->addAdvCheckbox('protect.joomla.jacl')->setLabel("Update JACL groups"); } }
public function afterAddConfigItems(Am_Form_Setup_ProtectDatabased $form) { parent::afterAddConfigItems($form); /* $options = $this->getLevels(); $form->addSelect('protect.wordpress.default_wplevel', array(), array("options" =>$options)) ->setLabel(array("Default user level", "default level - user will be reset to this access level when no active subscriptions exists (for example all subscriptions expired) ")); */ $form->addText('protect.wordpress.folder', array('size' => 70))->setLabel(array($this->getTitle() . ' Folder', "\n Folder where you have " . $this->getTitle() . " installed")); $form->addAdvCheckbox('protect.wordpress.use_wordpress_theme')->setLabel(array('Use Wordpress theme', 'aMember will use theme that you set in wordpress for header and footer')); /* $form->addAdvCheckbox('protect.wordpress.network') ->setLabel(array('Network Enabled', 'Check this if you have Wordpress Network Enabled')); */ $form->addText('protect.wordpress.auth_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Auth Key', "\n AUTH_KEY setting from " . $this->getTitle() . " config")); $form->addText('protect.wordpress.secure_auth_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Secure Auth Key', "\n SECURE_AUTH_KEY setting from " . $this->getTitle() . " config")); $form->addText('protect.wordpress.logged_in_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Logged In Key', "\n LOGGED_IN_KEY setting from " . $this->getTitle() . " config")); $form->addText('protect.wordpress.nonce_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Nonce Key', "\n NONCE_KEY setting from " . $this->getTitle() . " config")); $form->addText('protect.wordpress.auth_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Auth Salt', "\n AUTH_SALT setting from " . $this->getTitle() . " config")); $form->addText('protect.wordpress.secure_auth_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Secure Auth Salt', "\n SECURE_AUTH_SALT setting from " . $this->getTitle() . " config")); $form->addText('protect.wordpress.logged_in_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Logged In Salt', "\n LOGGED_IN_SALT setting from " . $this->getTitle() . " config")); $form->addText('protect.wordpress.nonce_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Nonce Salt', "\n NONCE_SALT setting from " . $this->getTitle() . " config")); }
public function afterAddConfigItems(Am_Form_Setup_ProtectDatabased $form) { parent::afterAddConfigItems($form); /* $options = $this->getLevels(); $form->addSelect('protect.wordpress.default_wplevel', array(), array("options" =>$options)) ->setLabel(array("Default user level", "default level - user will be reset to this access level when no active subscriptions exists (for example all subscriptions expired) ")); */ $configPrefix = sprintf('protect.%s.', $this->getId()); $form->addText($configPrefix . 'folder', array('size' => 70))->setLabel(array($this->getTitle() . ' Folder', "\n Folder where you have " . $this->getTitle() . " installed")); $form->addAdvCheckbox($configPrefix . 'use_wordpress_theme')->setLabel(array('Use Wordpress theme', 'aMember will use theme that you set in wordpress for header and footer')); /* $form->addAdvCheckbox('protect.wordpress.network') ->setLabel(array('Network Enabled', 'Check this if you have Wordpress Network Enabled')); */ $form->addText($configPrefix . 'auth_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Auth Key', "\n AUTH_KEY setting from " . $this->getTitle() . " config")); $form->addText($configPrefix . 'secure_auth_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Secure Auth Key', "\n SECURE_AUTH_KEY setting from " . $this->getTitle() . " config")); $form->addText($configPrefix . 'logged_in_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Logged In Key', "\n LOGGED_IN_KEY setting from " . $this->getTitle() . " config")); $form->addText($configPrefix . 'nonce_key', array('size' => 70))->setLabel(array($this->getTitle() . ' Nonce Key', "\n NONCE_KEY setting from " . $this->getTitle() . " config")); $form->addText($configPrefix . 'auth_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Auth Salt', "\n AUTH_SALT setting from " . $this->getTitle() . " config")); $form->addText($configPrefix . 'secure_auth_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Secure Auth Salt', "\n SECURE_AUTH_SALT setting from " . $this->getTitle() . " config")); $form->addText($configPrefix . 'logged_in_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Logged In Salt', "\n LOGGED_IN_SALT setting from " . $this->getTitle() . " config")); $form->addText($configPrefix . 'nonce_salt', array('size' => 70))->setLabel(array($this->getTitle() . ' Nonce Salt', "\n NONCE_SALT setting from " . $this->getTitle() . " config")); $form->addSelect($configPrefix . 'display_name', '', array('options' => array('username' => 'Username', 'name_f_name_l' => 'First & Last Name')))->setLabel('Set display name for new users to: '); if ($this->haveSimplePress() || $this->getConfig('simple_press')) { $form->addAdvCheckbox($configPrefix . 'simple_press')->setLabel("Update SimplePress database"); } if ($this->haveWpCorseware() || $this->getConfig('wp_corseware')) { $form->addAdvCheckbox($configPrefix . 'wp_courseware')->setLabel("Enable WP Courseware support"); } if ($this->haveBuddyPress() || $this->getConfig('buddy_press')) { $form->addAdvCheckbox($configPrefix . 'buddy_press')->setLabel("Enable BuddyPress Groups Support")->setId('buddy-press'); $form->addMagicSelect($configPrefix . 'buddy_press_groups', array(), array('options' => $this->getBuddyPressGroups()))->setLabel(array("Manage only these BP groups", 'aMember will have full controll on these groups'))->setId('buddy-press-groups'); $form->addScript()->setScript(<<<CUT \$(function(){ \$('#buddy-press').change(function(){ \$("#buddy-press-groups").closest('.row').toggle(this.checked); }).change(); }); CUT ); } if ($this->haveNetworkSupport() || $this->getConfig('network')) { $form->addAdvCheckbox($configPrefix . 'network')->setLabel('Enable Wordpress Network Support')->setId('network'); $form->addAdvCheckbox($configPrefix . 'network_create_blog')->setLabel(array("Enable 'Create Blog' functionality"))->setId('network-create-blog'); $form->addAdvCheckbox($configPrefix . 'network_add_to_blogs')->setLabel(array("Enable 'Add user to different blogs'"))->setId('network-add-to-blogs'); $form->addScript()->setScript(<<<CUT \$(function(){ \$('#network').change(function(){ \$("#network-create-blog").closest('.row').toggle(this.checked); \$("#network-add-to-blogs").closest('.row').toggle(this.checked); }).change(); }); CUT ); } $form->addSelect($configPrefix . "version", null, array('options' => array(4 => '4.0 and newer', 3 => 'older then 4.0')))->setLabel('Wordpress version'); }