Exemple #1
0
 /**
 * Get shortcode parameters for Pricing Option
 *
 * @param string $attribute     The ID of attribute
 * @param bool   $include_value Whether or not including Value parameter (true if call for WR_Item_Pricing_Table_Attr_Value)
 \
 * @return string
 */
 static function get_option($attribute, $include_value = false)
 {
     // get all Predefined Attributes
     $attributes = JSNPBShortcodePricingTable::$attributes;
     // get index of current Option/Attribute
     $idx = JSNPBShortcodePricingTable::$index = JSNPBShortcodePricingTable::$index % 3;
     $title = isset($attributes[$attribute]) ? isset($attributes[$attribute]['title']) ? $attributes[$attribute]['title'] : '' : '';
     $type = isset($attributes[$attribute]) ? isset($attributes[$attribute]['type']) ? $attributes[$attribute]['type'] : '' : '';
     if ($include_value) {
         $value = isset($attributes[$attribute]) ? isset($attributes[$attribute]['value'][$idx]) ? $attributes[$attribute]['value'][$idx] : '' : '';
     }
     $result = array('std' => '', 'prtbl_item_attr_id' => $attribute, 'prtbl_item_attr_title' => $title, 'prtbl_item_attr_type' => $type);
     if (!$include_value) {
         $result['prtbl_item_attr_desc'] = $title;
     } else {
         $result['prtbl_item_attr_value'] = $result['prtbl_item_attr_desc'] = $value;
     }
     return $result;
 }
Exemple #2
0
 /**
  * DEFINE setting options of shortcode in frontend
  */
 public function frontend_element_items()
 {
     $this->items = array('Notab' => array(array('name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_TITLE'), 'id' => 'prtbl_item_title', 'type' => 'text_field', 'class' => 'jsn-input-xxlarge-fluid', 'role' => 'title', 'std' => '', 'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_TITLE')), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_DESCRIPTION'), 'id' => 'prtbl_item_desc', 'type' => 'text_field', 'class' => 'jsn-input-xxlarge-fluid', 'std' => JText::_(''), 'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_CURRENCY_DES')), array('name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_IMAGE'), 'id' => 'prtbl_item_image', 'type' => 'select_media', 'std' => '', 'class' => 'jsn-input-large-fluid', 'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_IMAGE_FILE_DES')), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_CURRENCY'), 'id' => 'prtbl_item_currency', 'type' => 'text_field', 'std' => JText::_(''), 'class' => 'jsn-input-large-fluid', 'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_CURRENCY')), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_PRICE'), 'id' => 'prtbl_item_price', 'type' => 'text_field', 'std' => JText::_(''), 'class' => 'jsn-input-large-fluid wr_pb_price', 'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_PRICE_DES')), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_TIME_LIMITS'), 'id' => 'prtbl_item_time', 'type' => 'text_field', 'std' => JText::_(''), 'class' => 'jsn-input-large-fluid', 'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_TIME_LIMITS_DES')), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_BUTTON_TEXT'), 'id' => 'prtbl_item_button_text', 'type' => 'text_field', 'class' => 'jsn-input-large-fluid pb-pb-limit-length', 'std' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_BUTTON_STD'), 'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_BUTTON_TEXT_DES')), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_BUTTON_LINK'), 'id' => 'link_type', 'type' => 'select', 'std' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_BUTTON_LINK_STD'), 'options' => JSNPagebuilderHelpersType::getLinkTypes(), 'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_BUTTON_LINK_DES'), 'has_depend' => '1'), array('name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_URL'), 'id' => 'button_type_url', 'type' => 'text_field', 'class' => 'jsn-input-xxlarge-fluid', 'std' => 'http://', 'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_URL_DES'), 'dependency' => array('link_type', '=', 'url')), array('name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_OPEN_IN'), 'id' => 'open_in', 'type' => 'select', 'std' => JSNPagebuilderHelpersType::getFirstOption(JSNPagebuilderHelpersType::getOpenInOptions()), 'options' => JSNPagebuilderHelpersType::getOpenInOptions(), 'dependency' => array('link_type', '!=', 'no_link')), array('id' => 'prtbl_item_attributes', 'type' => 'text_field', 'std' => '', 'input-type' => 'hidden', 'container_class' => 'hidden'), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ATTRIBUTES'), 'id' => 'prtbl_attr', 'type' => 'group_table', 'class' => 'has_childsubmodal unsortable', 'shortcode' => $this->config['shortcode'], 'sub_item_type' => $this->config['has_subshortcode'], 'sub_items' => array(JSNPBShortcodePricingTable::get_option('max_domains', true), JSNPBShortcodePricingTable::get_option('storage', true), JSNPBShortcodePricingTable::get_option('ssl_support', true)), 'extract_title' => 'prtbl_item_attr_title'), array('name' => JText::_('JSN_PAGEBUILDER_ELEMENT_PRICINGTABLE_ITEM_OPTION_FEATURED'), 'id' => 'prtbl_item_feature', 'type' => 'radio', 'std' => 'no', 'options' => array('yes' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_YES'), 'no' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_NO')), 'tooltip' => 'Featured')));
 }