コード例 #1
0
 private function __construct()
 {
     $this->db =& EL_Db::get_instance();
     $this->categories =& EL_Categories::get_instance();
     $this->options =& EL_Options::get_instance();
     $this->functions =& EL_Admin_Functions::get_instance();
 }
コード例 #2
0
    private function __construct()
    {
        $this->db =& EL_Db::get_instance();
        $this->options =& EL_Options::get_instance();
        $this->categories =& EL_Categories::get_instance();
        // All available attributes
        $this->atts = array('initial_date' => array('val' => 'upcoming<br />year e.g. "2013"', 'std_val' => 'upcoming', 'visible' => true, 'desc' => 'This attribute specifies which events are initially shown. The standard is to show the upcoming events.<br />
			                                          Specify a year e.g. "2013" to change this behavior.'), 'cat_filter' => array('val' => 'none<br />category slug', 'std_val' => 'none', 'visible' => true, 'desc' => 'This attribute specifies events of which categories are shown. The standard is "none" to show all events.<br />
			                                          Specify a category slug or a list of category slugs separated by a comma "," e.g. "tennis,hockey" to only show events of the specified categories.'), 'num_events' => array('val' => 'number', 'std_val' => '0', 'visible' => true, 'desc' => 'This attribute specifies how many events should be displayed if upcoming events is selected.<br />
			                                          0 is the standard value which means that all events will be displayed.'), 'show_nav' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'visible' => true, 'desc' => 'This attribute specifies if the calendar navigation should be displayed.<br />
			                                          Choose "false" to always hide and "true" to always show the navigation.<br />
			                                          With "event_list_only" the navigation is only visible in the event list and with "single_event_only" only for a single event'), 'show_starttime' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'visible' => true, 'desc' => 'This attribute specifies if the starttime is displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the starttime.<br />
			                                          With "event_list_only" the starttime is only visible in the event list and with "single_event_only" only for a single event'), 'show_location' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'visible' => true, 'desc' => 'This attribute specifies if the location is displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the location.<br />
			                                          With "event_list_only" the location is only visible in the event list and with "single_event_only" only for a single event'), 'show_cat' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'false', 'visible' => true, 'desc' => 'This attribute specifies if the categories are displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the category.<br />
			                                          With "event_list_only" the categories are only visible in the event list and with "single_event_only" only for a single event'), 'show_details' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'visible' => true, 'desc' => 'This attribute specifies if the details are displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the details.<br />
			                                          With "event_list_only" the details are only visible in the event list and with "single_event_only" only for a single event'), 'details_length' => array('val' => 'number', 'std_val' => '0', 'visible' => true, 'desc' => 'This attribute specifies if the details should be truncate to the given number of character in the event list.<br />
			                                          With the standard value 0 the full details are displayed.<br />
			                                          This attribute has no influence if only a single event is shown.'), 'link_to_event' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'event_list_only', 'visible' => true, 'desc' => 'This attribute specifies if a link to the single event should be added onto the event name in the event list.<br />
			                                          Choose "false" to never add and "true" to always add the link.<br />
			                                          With "event_list_only" the link is only added in the event list and with "single_event_only" only for a single event'), 'title_length' => array('val' => 'number', 'std_val' => '0', 'visible' => false, 'desc' => 'This attribute specifies if the title should be truncate to the given number of character in the event list.<br />
			                                          With the standard value 0 the full details are displayed.<br />
			                                          This attribute has no influence if only a single event is shown.'), 'location_length' => array('val' => 'number', 'std_val' => '0', 'visible' => false, 'desc' => 'This attribute specifies if the title should be truncate to the given number of character in the event list.<br />
			                                          With the standard value 0 the full details are displayed.<br />
			                                          This attribute has no influence if only a single event is shown.'), 'url_to_page' => array('val' => 'url', 'std_val' => '', 'visible' => false, 'desc' => 'This attribute specifies that the link should follow the given url.<br />
			                                          The standard is to leave this attribute empty, then the url will be calculated automatically from the actual page or post url.<br />
			                                          This is o.k. for the normal use of the shortcode. This attribute is normally only required for the event-list widget.'), 'sc_id_for_url' => array('val' => 'number', 'std_val' => '', 'visible' => false, 'desc' => 'This attribute the specifies shortcode id of the used shortcode on the page specified with "url_to_page" attribute.<br />
			                                          The empty standard value is o.k. for the normal use. This attribute is normally only required for the event-list widget.'));
        $this->num_sc_loaded = 0;
        $this->single_event = false;
    }
コード例 #3
0
 private function __construct()
 {
     $this->options =& EL_Options::get_instance();
     $this->functions =& EL_Admin_Functions::get_instance();
     $this->db =& EL_Db::get_instance();
     $this->categories =& EL_Categories::get_instance();
     $this->example_file_path = EL_URL . '/files/events-import-example.csv';
 }
コード例 #4
0
 public function __construct()
 {
     $this->db =& EL_Db::get_instance();
     $this->categories =& EL_Categories::get_instance();
     global $status, $page;
     //Set parent defaults
     parent::__construct(array('singular' => 'event', 'plural' => 'events', 'ajax' => false));
 }
コード例 #5
0
ファイル: admin-new.php プロジェクト: berniecultess/infirev
 private function __construct()
 {
     $this->db =& EL_Db::get_instance();
     $this->options =& EL_Options::get_instance();
     $this->categories =& EL_Categories::get_instance();
     $this->is_new = !(isset($_GET['action']) && ('edit' === $_GET['action'] || 'added' === $_GET['action'] || 'modified' === $_GET['action']));
     $this->is_duplicate = $this->is_new && isset($_GET['id']) && is_numeric($_GET['id']);
 }
コード例 #6
0
 public static function &get_instance()
 {
     // Create class instance if required
     if (!isset(self::$instance)) {
         self::$instance = new EL_Categories();
     }
     // Return class instance
     return self::$instance;
 }
コード例 #7
0
 public function __construct($is_disabled)
 {
     $this->options =& EL_Options::get_instance();
     $this->db =& EL_Db::get_instance();
     $this->categories =& EL_Categories::get_instance();
     $this->is_disabled = $is_disabled;
     //Set parent defaults
     parent::__construct(array('singular' => __('event', 'event-list'), 'plural' => __('events', 'event-list'), 'ajax' => false));
 }
コード例 #8
0
ファイル: sc_event-list.php プロジェクト: hallepas/Erwin-WP
 private function __construct()
 {
     $this->options =& EL_Options::get_instance();
     $this->db =& EL_Db::get_instance();
     $this->categories =& EL_Categories::get_instance();
     // All available attributes
     $this->atts = array('initial_event_id' => array('std_val' => 'all'), 'initial_date' => array('std_val' => 'upcoming'), 'initial_cat' => array('std_val' => 'all'), 'initial_order' => array('std_val' => 'date_asc'), 'date_filter' => array('std_val' => 'all'), 'cat_filter' => array('std_val' => 'all'), 'num_events' => array('std_val' => '0'), 'show_filterbar' => array('std_val' => 'true'), 'filterbar_items' => array('std_val' => 'years_hlist'), 'show_starttime' => array('std_val' => 'true'), 'show_location' => array('std_val' => 'true'), 'show_cat' => array('std_val' => 'false'), 'show_details' => array('std_val' => 'true'), 'details_length' => array('std_val' => '0'), 'link_to_event' => array('std_val' => 'event_list_only'), 'add_feed_link' => array('std_val' => 'false'), 'title_length' => array('std_val' => '0'), 'location_length' => array('std_val' => '0'), 'url_to_page' => array('std_val' => ''), 'sc_id_for_url' => array('std_val' => ''));
     $this->num_sc_loaded = 0;
     $this->single_event = false;
 }
コード例 #9
0
 private function __construct()
 {
     $this->db =& EL_Db::get_instance();
     $this->categories =& EL_Categories::get_instance();
 }
コード例 #10
0
ファイル: admin.php プロジェクト: geekpondering/wtg
 public function action_delete_category($cat_id)
 {
     require_once EL_PATH . 'includes/categories.php';
     EL_Categories::get_instance()->delete_post_category($cat_id);
 }
コード例 #11
0
ファイル: sc_event-list.php プロジェクト: geekpondering/wtg
    private function __construct()
    {
        $this->db =& EL_Db::get_instance();
        $this->options =& EL_Options::get_instance();
        $this->categories =& EL_Categories::get_instance();
        // All available attributes
        $this->atts = array('initial_event_id' => array('val' => 'all<br />event-id', 'std_val' => 'all', 'desc' => __('With this attribute you can specify an event from which the event-details are shown initially. The standard is to show the event-list.<br />
			                                             Specify an event-id e.g. "13" to change this behavior. It is still possible to go back to the event-list via the filterbar or url parameters.')), 'initial_date' => array('val' => 'all<br />upcoming<br />past<br />year', 'std_val' => 'upcoming', 'desc' => __('This attribute specifies which events are initially shown. The standard is to show the upcoming events.<br />
			                                             Specify a year e.g. "2014" to change this behavior. It is still possible to change the displayed event date range via the filterbar or url parameters.')), 'initial_cat' => array('val' => 'all<br />category slug', 'std_val' => 'all', 'desc' => __('This attribute specifies the category of which events are initially shown. The standard is to show events of all categories.<br />
			                                             Specify a category slug to change this behavior. It is still possible to change the displayed categories via the filterbar or url parameters.')), 'date_filter' => array('val' => 'all<br />upcoming<br />past<br />year', 'std_val' => 'all', 'desc' => 'This attribute specifies the dates and date ranges of which events are displayed. The standard is "all" to show all events.<br />
			                                          Filtered events according to date_filter value are not available in the event list.<br />
			                                          You can find all available values with a description and examples in "Available Date Formats" and "Available Date Range Formats" below.<br />
			                                          See "Filter Syntax" description if you want to define complex filters.<br />
			                                          When you only use OR connections (no AND connection) the years selection in the filterbar will also be filtered accordingly.'), 'cat_filter' => array('val' => 'all<br />category slugs', 'std_val' => 'all', 'desc' => 'This attribute specifies the categories of which events are shown. The standard is "all" or an empty string to show all events.<br />
			                                          Filtered events defined in categories which doesn´t match cat_filter are not shown in the event list. They are also not available if a manual url parameter is added.<br />
			                                          The filter is specified via the given category slug. See "Filter Syntax" description if you want to define complex filters.<br />
			                                          When you only use OR connections (no AND connection) the category selection in the filterbar will also be filtered accordingly.'), 'num_events' => array('val' => 'number', 'std_val' => '0', 'desc' => 'This attribute specifies how many events should be displayed if upcoming events is selected.<br />
			                                          0 is the standard value which means that all events will be displayed.<br />
			                                          Please not that in the actual version there is no pagination of the events available.'), 'show_filterbar' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'desc' => 'This attribute specifies if the filterbar should be displayed. The filterbar allows the users to select filters to limit the listed events.<br />
			                                          Choose "false" to always hide and "true" to always show the navigation.<br />
			                                          With "event_list_only" the filterbar is only visible in the event list and with "single_event_only" only for a single event'), 'filterbar_items' => array('val' => 'years_hlist<br />years_dropdown<br />cats_hlist<br />cats_dropdown<br />reset_link', 'std_val' => 'years_hlist', 'desc' => 'This attribute specifies the available items in the filterbar. This options are only valid if the filterbar is displayed (see show_filterbar attribute).<br /><br />
			                                          Find below an overview of the available filterbar items and their options:<br />
			                                          <small><table class="el-filterbar-table">
			                                              <th class="el-filterbar-item">filterbar item</th><th class="el-filterbar-desc">description</th><th class="el-filterbar-options">item options</th><th class="el-filterbar-values">option values</th><th class="el-filterbar-default">default value</th><th class="el-filterbar-desc2">option description</th></thead>
			                                              <tr><td>years</td><td>Show a list of all available years. Additional there are some special entries available (see item options).</td><td>show_all<br />show_upcoming<br />show_past<br />years_order</td><td>true | false<br />true | false<br />true | false<br />desc | asc</td><td>true<br />true<br />false<br />desc</td><td>Add an entry to show all events.<br />Add an entry to show all upcoming events.<br />Add an entry to show events in the past.<br />Set descending or ascending order of year entries.</tr>
			                                              <tr><td>cats</td><td>Show a list of all available categories.</td><td>show_all</td><td>true | false</td><td>true</td><td>Add an entry to show events from all categories.</td></tr>
			                                              <tr><td>reset</td><td>Only a link to reset the eventlist filter to standard.</td><td>caption</td><td>any text</td><td>Reset</td><td>Set the caption of the link.</td></tr>
			                                          </table></small>
			                                          Find below an overview of the available filterbar display options:<br />
			                                          <small><table class="el-filterbar-table">
			                                             <th class="el-filterbar-doption">display option</th><th class="el-filterbar-desc3">description</th><th class="el-filterbar-for">available for</th></thead>
			                                             <tr><td>hlist</td><td>"hlist" shows a horizonal list seperated by "|" with a link to each item</td><td>years, cat</td></tr>
			                                             <tr><td>dropdown</td><td>"dropdown" shows a select box where an item can be choosen. After the selection of an item the page is reloaded via javascript to show the filtered events.</td><td>years, cat</td></tr>
			                                             <tr><td>link</td><td>"link" shows a simple link which can be clicked.</td><td>reset</td></tr>
			                                          </table></small>
			                                          <p>Find below some declaration examples with descriptions:</p>
			                                          <code>years_hlist,cats_dropdown</code><br />
			                                          In this example you can see that the filterbar item and the used display option is seperated by "_". You can define several filterbar items seperated by comma (","). The items will be aligned on the left side.
			                                          <p><code>years_dropdown(show_all=false|show_past=true),cats_dropdown;;reset_link</code><br />
			                                          In this example you can see that filterbar options can be added in brackets in format "option_name=value". You can also add multiple options seperated by a pipe ("|").<br />
			                                          The 2 semicolon (";") devides the bar in 3 section. The first section will be displayed left-justified, the second section will be centered and the third section will be right-aligned. So in this example the 2 dropdown will be left-aligned and the reset link will be on the right side.</p>'), 'show_starttime' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'desc' => 'This attribute specifies if the starttime is displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the starttime.<br />
			                                          With "event_list_only" the starttime is only visible in the event list and with "single_event_only" only for a single event'), 'show_location' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'desc' => 'This attribute specifies if the location is displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the location.<br />
			                                          With "event_list_only" the location is only visible in the event list and with "single_event_only" only for a single event'), 'show_cat' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'false', 'desc' => 'This attribute specifies if the categories are displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the category.<br />
			                                          With "event_list_only" the categories are only visible in the event list and with "single_event_only" only for a single event'), 'show_details' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'true', 'visible' => true, 'desc' => 'This attribute specifies if the details are displayed in the event list.<br />
			                                          Choose "false" to always hide and "true" to always show the details.<br />
			                                          With "event_list_only" the details are only visible in the event list and with "single_event_only" only for a single event'), 'details_length' => array('val' => 'number', 'std_val' => '0', 'desc' => 'This attribute specifies if the details should be truncate to the given number of characters in the event list.<br />
			                                          With the standard value 0 the full details are displayed.<br />
			                                          This attribute has no influence if only a single event is shown.'), 'link_to_event' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'event_list_only', 'desc' => 'This attribute specifies if a link to the single event should be added onto the event name in the event list.<br />
			                                          Choose "false" to never add and "true" to always add the link.<br />
			                                          With "event_list_only" the link is only added in the event list and with "single_event_only" only for a single event'), 'add_feed_link' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only', 'std_val' => 'false', 'desc' => 'This attribute specifies if a rss feed link should be added.<br />
			                                          You have to enable the feed in the eventlist settings to make this attribute workable.<br />
			                                          On that page you can also find some settings to modify the output.<br />
			                                          Choose "false" to never add and "true" to always add the link.<br />
			                                          With "event_list_only" the link is only added in the event list and with "single_event_only" only for a single event'), 'title_length' => array('val' => 'number', 'std_val' => '0', 'hidden' => true, 'desc' => 'This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />
			                                          With the standard value 0 the full details are displayed.<br />
			                                          This attribute has no influence if only a single event is shown.'), 'location_length' => array('val' => 'number', 'std_val' => '0', 'hidden' => true, 'desc' => 'This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />
			                                          With the standard value 0 the full details are displayed.<br />
			                                          This attribute has no influence if only a single event is shown.'), 'url_to_page' => array('val' => 'url', 'std_val' => '', 'hidden' => true, 'desc' => 'This attribute specifies that the link should follow the given url.<br />
			                                          The standard is to leave this attribute empty, then the url will be calculated automatically from the actual page or post url.<br />
			                                          This is o.k. for the normal use of the shortcode. This attribute is normally only required for the event-list widget.'), 'sc_id_for_url' => array('val' => 'number', 'std_val' => '', 'hidden' => true, 'desc' => 'This attribute the specifies shortcode id of the used shortcode on the page specified with "url_to_page" attribute.<br />
			                                          The empty standard value is o.k. for the normal use. This attribute is normally only required for the event-list widget.'));
        $this->num_sc_loaded = 0;
        $this->single_event = false;
    }