Version Description
(2015-02-01) = * added options for month filterbar item * only show years, months and cats with events in filterbar (acc. to available events and date/cat filter * fixed event-list feed * changed textdomain for translations to event-list * some small code and html fixes * some code improvements
Download this release
Release Info
Developer | mibuthu |
Plugin | Event List |
Version | 0.7.1 |
Comparing to | |
See all releases |
Code changes from version 0.7.0 to 0.7.1
- admin/admin.php +7 -7
- admin/css/admin_about.css +1 -0
- admin/includes/admin-about.php +20 -20
- admin/includes/admin-categories.php +25 -25
- admin/includes/admin-main.php +4 -4
- admin/includes/admin-new.php +18 -18
- admin/includes/admin-settings.php +3 -3
- admin/includes/category_table.php +201 -201
- admin/includes/event_table.php +286 -293
- event-list.php +14 -9
- includes/categories.php +27 -14
- includes/css/event-list.css +4 -0
- includes/db.php +6 -24
- includes/feed.php +3 -7
- includes/filterbar.php +94 -102
- includes/options.php +1 -1
- includes/options_helptexts.php +38 -38
- includes/sc_event-list.php +3 -3
- includes/sc_event-list_helptexts.php +31 -22
- includes/widget.php +3 -3
- includes/widget_helptexts.php +31 -31
- languages/event-list-de_DE.mo +0 -0
- languages/{eventlist-de_DE.po → event-list-de_DE.po} +32 -31
- languages/{eventlist.pot → event-list.pot} +28 -28
- languages/eventlist-de_DE.mo +0 -0
- readme.txt +9 -20
admin/admin.php
CHANGED
@@ -42,26 +42,26 @@ class EL_Admin {
|
|
42 |
*/
|
43 |
public function register_pages() {
|
44 |
// Main Menu page
|
45 |
-
add_menu_page(__('Event List','
|
46 |
|
47 |
// All Events subpage
|
48 |
-
$page = add_submenu_page('el_admin_main', __('Events','
|
49 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_main_scripts'));
|
50 |
|
51 |
// New Event subpage
|
52 |
-
$page = add_submenu_page('el_admin_main', __('Add New Event','
|
53 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_new_scripts'));
|
54 |
|
55 |
// Categories subpage
|
56 |
-
$page = add_submenu_page('el_admin_main', __('Event List Categories','
|
57 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_categories_scripts'));
|
58 |
|
59 |
// Settings subpage
|
60 |
-
$page = add_submenu_page('el_admin_main', __('Event List Settings','
|
61 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_settings_scripts'));
|
62 |
|
63 |
// About subpage
|
64 |
-
$page = add_submenu_page('el_admin_main', __('About Event List','
|
65 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_about_scripts'));
|
66 |
}
|
67 |
|
@@ -77,7 +77,7 @@ class EL_Admin {
|
|
77 |
$out = '
|
78 |
<tr>
|
79 |
<td class="first b b-events"><a href="'.$event_link.'">'.$num_events.'</a></td>
|
80 |
-
<td class="t events"><a href="'.$event_link.'">'.__('Events','
|
81 |
</tr>';
|
82 |
echo $out;
|
83 |
}
|
42 |
*/
|
43 |
public function register_pages() {
|
44 |
// Main Menu page
|
45 |
+
add_menu_page(__('Event List','event-list'), __('Event List','event-list'), 'edit_posts', 'el_admin_main', array(&$this, 'show_main_page'), EL_URL.'admin/images/calendar.png', '22.2');
|
46 |
|
47 |
// All Events subpage
|
48 |
+
$page = add_submenu_page('el_admin_main', __('Events','event-list'), __('All Events','event-list'), 'edit_posts', 'el_admin_main', array(&$this, 'show_main_page'));
|
49 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_main_scripts'));
|
50 |
|
51 |
// New Event subpage
|
52 |
+
$page = add_submenu_page('el_admin_main', __('Add New Event','event-list'), __('Add New','event-list'), 'edit_posts', 'el_admin_new', array(&$this, 'show_new_page'));
|
53 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_new_scripts'));
|
54 |
|
55 |
// Categories subpage
|
56 |
+
$page = add_submenu_page('el_admin_main', __('Event List Categories','event-list'), __('Categories','event-list'), 'manage_options', 'el_admin_categories', array(&$this, 'show_categories_page'));
|
57 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_categories_scripts'));
|
58 |
|
59 |
// Settings subpage
|
60 |
+
$page = add_submenu_page('el_admin_main', __('Event List Settings','event-list'), __('Settings','event-list'), 'manage_options', 'el_admin_settings', array(&$this, 'show_settings_page'));
|
61 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_settings_scripts'));
|
62 |
|
63 |
// About subpage
|
64 |
+
$page = add_submenu_page('el_admin_main', __('About Event List','event-list'), __('About','event-list'), 'edit_posts', 'el_admin_about', array(&$this, 'show_about_page'));
|
65 |
add_action('admin_print_scripts-'.$page, array(&$this, 'embed_about_scripts'));
|
66 |
}
|
67 |
|
77 |
$out = '
|
78 |
<tr>
|
79 |
<td class="first b b-events"><a href="'.$event_link.'">'.$num_events.'</a></td>
|
80 |
+
<td class="t events"><a href="'.$event_link.'">'.__('Events','event-list').'</a></td>
|
81 |
</tr>';
|
82 |
echo $out;
|
83 |
}
|
admin/css/admin_about.css
CHANGED
@@ -32,6 +32,7 @@
|
|
32 |
border-collapse: collapse;
|
33 |
width: 100%;
|
34 |
margin: 0.2em 0 1.2em 0;
|
|
|
35 |
}
|
36 |
.el-filterbar-table th {
|
37 |
border: 1px solid #aaa;
|
32 |
border-collapse: collapse;
|
33 |
width: 100%;
|
34 |
margin: 0.2em 0 1.2em 0;
|
35 |
+
line-height: 1.6em;
|
36 |
}
|
37 |
.el-filterbar-table th {
|
38 |
border: 1px solid #aaa;
|
admin/includes/admin-about.php
CHANGED
@@ -23,23 +23,23 @@ class EL_Admin_About {
|
|
23 |
|
24 |
public function show_about() {
|
25 |
if(!current_user_can('edit_posts')) {
|
26 |
-
wp_die(__('You do not have sufficient permissions to access this page.','
|
27 |
}
|
28 |
echo '<div class="wrap">
|
29 |
-
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('About Event List','
|
30 |
<h3 class="el-headline">Help and Instructions</h3>
|
31 |
<p>You can manage your events <a href="admin.php?page=el_admin_main">here</a>.</p>
|
32 |
-
<p>To show the events on your site you have two possibilities
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
A list of all available shortcode attributes with their description is available below.<br />
|
37 |
The available widget options are described in their tooltip text.<br />
|
38 |
For the widget it is important to know that you have to insert an URL to the linked event-list page if you enable one of the links options ("Add links to the single events" or "Add a link to an event page").
|
39 |
This is required because the widget didn´t know in which page or post the shortcode was included.<br />
|
40 |
Additonally you have to insert the correct Shortcode ID on the linked page. This ID describes which shortcode should be used on the given page or post if you have more than one.
|
41 |
So the standard value "1" is normally o.k., but if required you can check the ID by looking into the URL of an event link on your linked page or post.
|
42 |
-
The ID will be added at the end of the query parameter name (e.g. <i>http://www.your-homepage.com/?page_id=99&event_id<strong>1</strong>=11</i>).
|
43 |
</p>
|
44 |
<p>Be sure to also check the <a href="admin.php?page=el_admin_settings">Settings page</a> to get Event List behaving just the way you want.</p>
|
45 |
</div>';
|
@@ -95,19 +95,19 @@ class EL_Admin_About {
|
|
95 |
|
96 |
private function show_filter_syntax() {
|
97 |
return '
|
98 |
-
<h3 class="el-headline">'.__('Filter Syntax','
|
99 |
-
<p>'.__('For date and cat filters you can specify complex filters with the following syntax:','
|
100 |
-
<p>'.__('You can use AND ( "<b>&</b>" ) and OR ( "<b>|</b>" or "<b>,</b>" ) connections to define complex filters. Additionally you can set brackets ( "<b>(</b>" and ("<b>)</b>" ) for nested queries.','
|
101 |
-
'.__('Examples for cat filters:','
|
102 |
-
<p><code>tennis</code> ... '.__('Show all events with category "tennis".','
|
103 |
-
<code>tennis,hockey</code> ... '.__('Show all events with category "tennis" or "hockey".','
|
104 |
-
<code>tennis|(hockey&winter)</code> ... '.__('Show all events with category "tennis" and all events where category "hockey" as well as "winter" is selected.','
|
105 |
}
|
106 |
|
107 |
private function show_date_syntax() {
|
108 |
return '
|
109 |
-
<h3 class="el-headline">'.__('Available Date Formats','
|
110 |
-
<p>'.__('For date filters you can use the following date formats:','
|
111 |
<ul class="el-formats">
|
112 |
'.$this->show_formats($this->options->date_formats).'
|
113 |
</ul>';
|
@@ -115,8 +115,8 @@ class EL_Admin_About {
|
|
115 |
|
116 |
private function show_daterange_syntax() {
|
117 |
return '
|
118 |
-
<h3 class="el-headline">'.__('Available Date Range Formats','
|
119 |
-
<p>'.__('For date filters you can use the following daterange formats:','
|
120 |
<ul class="el-formats">
|
121 |
'.$this->show_formats($this->options->daterange_formats).'
|
122 |
</ul>';
|
@@ -128,11 +128,11 @@ class EL_Admin_About {
|
|
128 |
$out .= '
|
129 |
<li><div class="el-format-entry"><div class="el-format-name">'.$format['name'].':</div><div class="el-format-desc">';
|
130 |
if(isset($format['value'])) {
|
131 |
-
$out .= __('Value','
|
132 |
}
|
133 |
$out .= $format['desc'].'<br />';
|
134 |
if(isset($format['examp'])) {
|
135 |
-
$out .= __('Example','
|
136 |
}
|
137 |
$out .= '</div></div></li>';
|
138 |
}
|
23 |
|
24 |
public function show_about() {
|
25 |
if(!current_user_can('edit_posts')) {
|
26 |
+
wp_die(__('You do not have sufficient permissions to access this page.','event-list'));
|
27 |
}
|
28 |
echo '<div class="wrap">
|
29 |
+
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('About Event List','event-list').'</h2>
|
30 |
<h3 class="el-headline">Help and Instructions</h3>
|
31 |
<p>You can manage your events <a href="admin.php?page=el_admin_main">here</a>.</p>
|
32 |
+
<p>To show the events on your site you have two possibilities:</p>
|
33 |
+
<ul class="el-show-event-options"><li>you can place the <strong>shortcode</strong> <code>[event-list]</code> on any page or post</li>
|
34 |
+
<li>you can add the <strong>widget</strong> "Event List" in your sidebars</li></ul>
|
35 |
+
<p>The displayed events and their style can be modified with the available widget settings and the available attributes for the shortcode.<br />
|
36 |
A list of all available shortcode attributes with their description is available below.<br />
|
37 |
The available widget options are described in their tooltip text.<br />
|
38 |
For the widget it is important to know that you have to insert an URL to the linked event-list page if you enable one of the links options ("Add links to the single events" or "Add a link to an event page").
|
39 |
This is required because the widget didn´t know in which page or post the shortcode was included.<br />
|
40 |
Additonally you have to insert the correct Shortcode ID on the linked page. This ID describes which shortcode should be used on the given page or post if you have more than one.
|
41 |
So the standard value "1" is normally o.k., but if required you can check the ID by looking into the URL of an event link on your linked page or post.
|
42 |
+
The ID will be added at the end of the query parameter name (e.g. <i>http://www.your-homepage.com/?page_id=99&event_id<strong>1</strong>=11</i>).
|
43 |
</p>
|
44 |
<p>Be sure to also check the <a href="admin.php?page=el_admin_settings">Settings page</a> to get Event List behaving just the way you want.</p>
|
45 |
</div>';
|
95 |
|
96 |
private function show_filter_syntax() {
|
97 |
return '
|
98 |
+
<h3 class="el-headline">'.__('Filter Syntax','event-list').'</h3>
|
99 |
+
<p>'.__('For date and cat filters you can specify complex filters with the following syntax:','event-list').'</p>
|
100 |
+
<p>'.__('You can use AND ( "<b>&</b>" ) and OR ( "<b>|</b>" or "<b>,</b>" ) connections to define complex filters. Additionally you can set brackets ( "<b>(</b>" and ("<b>)</b>" ) for nested queries.','event-list').'</p>
|
101 |
+
'.__('Examples for cat filters:','event-list').'
|
102 |
+
<p><code>tennis</code> ... '.__('Show all events with category "tennis".','event-list').'<br />
|
103 |
+
<code>tennis,hockey</code> ... '.__('Show all events with category "tennis" or "hockey".','event-list').'<br />
|
104 |
+
<code>tennis|(hockey&winter)</code> ... '.__('Show all events with category "tennis" and all events where category "hockey" as well as "winter" is selected.','event-list').'</p>';
|
105 |
}
|
106 |
|
107 |
private function show_date_syntax() {
|
108 |
return '
|
109 |
+
<h3 class="el-headline">'.__('Available Date Formats','event-list').'</h3>
|
110 |
+
<p>'.__('For date filters you can use the following date formats:','event-list').'</p>
|
111 |
<ul class="el-formats">
|
112 |
'.$this->show_formats($this->options->date_formats).'
|
113 |
</ul>';
|
115 |
|
116 |
private function show_daterange_syntax() {
|
117 |
return '
|
118 |
+
<h3 class="el-headline">'.__('Available Date Range Formats','event-list').'</h3>
|
119 |
+
<p>'.__('For date filters you can use the following daterange formats:','event-list').'</p>
|
120 |
<ul class="el-formats">
|
121 |
'.$this->show_formats($this->options->daterange_formats).'
|
122 |
</ul>';
|
128 |
$out .= '
|
129 |
<li><div class="el-format-entry"><div class="el-format-name">'.$format['name'].':</div><div class="el-format-desc">';
|
130 |
if(isset($format['value'])) {
|
131 |
+
$out .= __('Value','event-list').': <em>'.$format['value'].'</em><br />';
|
132 |
}
|
133 |
$out .= $format['desc'].'<br />';
|
134 |
if(isset($format['examp'])) {
|
135 |
+
$out .= __('Example','event-list').': <em>'.$format['examp'].'</em>';
|
136 |
}
|
137 |
$out .= '</div></div></li>';
|
138 |
}
|
admin/includes/admin-categories.php
CHANGED
@@ -34,7 +34,7 @@ class EL_Admin_Categories {
|
|
34 |
|
35 |
public function show_categories () {
|
36 |
if(!current_user_can('manage_options')) {
|
37 |
-
wp_die(__('You do not have sufficient permissions to access this page.','
|
38 |
}
|
39 |
$out = '';
|
40 |
|
@@ -47,16 +47,16 @@ class EL_Admin_Categories {
|
|
47 |
|
48 |
// normal output
|
49 |
$out.= '<div class="wrap">
|
50 |
-
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('Event List Categories','
|
51 |
<div id="posttype-page" class="posttypediv">';
|
52 |
if('edit' === $action && isset($_GET['id'])) {
|
53 |
-
$out .=$this->show_edit_category_form(__('Edit Category','
|
54 |
}
|
55 |
else {
|
56 |
// show category table
|
57 |
$out .= $this->show_category_table();
|
58 |
// show add category form
|
59 |
-
$out .= $this->show_edit_category_form(__('Add New Category','
|
60 |
// show cat sync option form
|
61 |
$out .= $this->show_cat_sync_form();
|
62 |
}
|
@@ -81,15 +81,15 @@ class EL_Admin_Categories {
|
|
81 |
$num_affected_events = $this->db->remove_category_in_events($slug_array);
|
82 |
if($this->categories->remove_categories($slug_array, false)) {
|
83 |
$out .= '<div id="message" class="updated">
|
84 |
-
<p><strong>'.sprintf(__('Category "%s" deleted.','
|
85 |
if($num_affected_events > 0) {
|
86 |
-
$out .= '<br />'.sprintf(__('This Category was also removed from %d events.','
|
87 |
}
|
88 |
$out .= '</strong></p>
|
89 |
</div>';
|
90 |
}
|
91 |
else {
|
92 |
-
$out .= '<div id="message" class="error below-h2"><p><strong>'.sprintf(__('Error while deleting category "%s"','
|
93 |
}
|
94 |
}
|
95 |
}
|
@@ -99,16 +99,16 @@ class EL_Admin_Categories {
|
|
99 |
$is_disabled = '1' == $this->options->get('el_sync_cats');
|
100 |
if($is_disabled) {
|
101 |
$this->categories->sync_with_post_cats();
|
102 |
-
$out .= '<div id="message" class="updated"><p><strong>'.__('Sync with post categories enabled.','
|
103 |
}
|
104 |
else {
|
105 |
-
$out .= '<div id="message" class="updated"><p><strong>'.__('Sync with post categories disabled.','
|
106 |
}
|
107 |
}
|
108 |
else if('manualcatsync' === $action) {
|
109 |
if(!$is_disabled) {
|
110 |
$this->categories->sync_with_post_cats();
|
111 |
-
$out .= '<div id="message" class="updated"><p><strong>'.__('Manual sync with post categories sucessfully finished.','
|
112 |
}
|
113 |
}
|
114 |
else if('editcat' === $action && !empty($_POST)) {
|
@@ -116,19 +116,19 @@ class EL_Admin_Categories {
|
|
116 |
if(!isset($_POST['id'])) {
|
117 |
// add new category
|
118 |
if($this->categories->add_category($_POST)) {
|
119 |
-
$out .= '<div id="message" class="updated below-h2"><p><strong>'.sprintf(__('New Category "%s" was added','
|
120 |
}
|
121 |
else {
|
122 |
-
$out .= '<div id="message" class="error below-h2"><p><strong>'.sprintf(__('Error: New Category "$s" could not be added','
|
123 |
}
|
124 |
}
|
125 |
else {
|
126 |
// edit category
|
127 |
if($this->categories->edit_category($_POST, $_POST['id'])) {
|
128 |
-
$out .= '<div id="message" class="updated below-h2"><p><strong>'.sprintf(__('Category "%s" was modified','
|
129 |
}
|
130 |
else {
|
131 |
-
$out .= '<div id="message" class="error below-h2"><p><strong>'.sprintf(__('Error: Category "%s" could not be modified','
|
132 |
}
|
133 |
}
|
134 |
}
|
@@ -137,7 +137,7 @@ class EL_Admin_Categories {
|
|
137 |
if($is_disabled) {
|
138 |
$out .= '<div id="message" class="updated"><p>'.__('Categories are automatically synced with the post categories.<br />
|
139 |
Because of this all options to add new categories or editing existing categories are disabled.<br />
|
140 |
-
If you want to manually edit the categories you have to disable this option.','
|
141 |
}
|
142 |
return $out;
|
143 |
}
|
@@ -162,19 +162,19 @@ class EL_Admin_Categories {
|
|
162 |
}
|
163 |
// Category Name
|
164 |
$out .= '
|
165 |
-
<div class="form-field form-required"><label for="name">'.__('Name','
|
166 |
$out .= $this->functions->show_text('name', $cat_data['name'], $is_disabled);
|
167 |
-
$out .= '<p>'.__('The name is how it appears on your site.','
|
168 |
// Category Slug
|
169 |
$out .= '
|
170 |
-
<div class="form-field"><label for="name">'.__('Slug','
|
171 |
$out .= $this->functions->show_text('slug', $cat_data['slug'], $is_disabled);
|
172 |
-
$out .= '<p>'.__('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.','
|
173 |
// Category Parent
|
174 |
$out .= '
|
175 |
-
<div class="form-field"><label for="parent">'.__('Parent','
|
176 |
$cat_array = $this->categories->get_cat_array('name', 'asc');
|
177 |
-
$option_array = array('' => __('None','
|
178 |
$class_array = array();
|
179 |
foreach($cat_array as $cat) {
|
180 |
if($cat['slug'] != $cat_data['slug']) {
|
@@ -184,10 +184,10 @@ class EL_Admin_Categories {
|
|
184 |
}
|
185 |
$selected = isset($cat_data['parent']) ? $cat_data['parent'] : null;
|
186 |
$out .= $this->functions->show_combobox('parent', $option_array, $selected, $class_array, $is_disabled);
|
187 |
-
$out .= '<p>'.__('Categories can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.','
|
188 |
// Category Description
|
189 |
$out .= '
|
190 |
-
<div class="form-field"><label for="name">'.__('Description','
|
191 |
$out .= $this->functions->show_textarea('desc', $cat_data['desc'], $is_disabled);
|
192 |
$out .= '</div>
|
193 |
<p class="submit"><input type="submit" class="button-primary" value="'.$button_text.'" id="submitbutton"'.$this->functions->get_disabled_text($is_disabled).'></p>';
|
@@ -231,7 +231,7 @@ class EL_Admin_Categories {
|
|
231 |
<h3>'.$sync_option['label'].'</h3>
|
232 |
<form id="catsync" method="POST" action="?page=el_admin_categories&action=setcatsync">';
|
233 |
// Checkbox
|
234 |
-
$out .= $this->functions->show_checkbox('el_sync_cats', $sync_option_value, $sync_option['caption'].' <input type="submit" class="button-primary" value="'.__('Apply','
|
235 |
$out .= '<br />'.$sync_option['desc'];
|
236 |
$out .= '
|
237 |
</form>
|
@@ -241,7 +241,7 @@ class EL_Admin_Categories {
|
|
241 |
$out .= '<br />
|
242 |
<div>
|
243 |
<form id="manualcatsync" method="POST" action="?page=el_admin_categories&action=manualcatsync">
|
244 |
-
<input type="submit" class="button-secondary" value="'.__('Do a manual sync with post categories','
|
245 |
</form>
|
246 |
</div>';
|
247 |
$out .= '
|
34 |
|
35 |
public function show_categories () {
|
36 |
if(!current_user_can('manage_options')) {
|
37 |
+
wp_die(__('You do not have sufficient permissions to access this page.','event-list'));
|
38 |
}
|
39 |
$out = '';
|
40 |
|
47 |
|
48 |
// normal output
|
49 |
$out.= '<div class="wrap">
|
50 |
+
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('Event List Categories','event-list').'</h2>
|
51 |
<div id="posttype-page" class="posttypediv">';
|
52 |
if('edit' === $action && isset($_GET['id'])) {
|
53 |
+
$out .=$this->show_edit_category_form(__('Edit Category','event-list'), __('Update Category','event-list'), $this->categories->get_category_data($_GET['id']));
|
54 |
}
|
55 |
else {
|
56 |
// show category table
|
57 |
$out .= $this->show_category_table();
|
58 |
// show add category form
|
59 |
+
$out .= $this->show_edit_category_form(__('Add New Category','event-list'), __('Add New Category','event-list'));
|
60 |
// show cat sync option form
|
61 |
$out .= $this->show_cat_sync_form();
|
62 |
}
|
81 |
$num_affected_events = $this->db->remove_category_in_events($slug_array);
|
82 |
if($this->categories->remove_categories($slug_array, false)) {
|
83 |
$out .= '<div id="message" class="updated">
|
84 |
+
<p><strong>'.sprintf(__('Category "%s" deleted.','event-list'), $_GET['slug']);
|
85 |
if($num_affected_events > 0) {
|
86 |
+
$out .= '<br />'.sprintf(__('This Category was also removed from %d events.','event-list'), $num_affected_events);
|
87 |
}
|
88 |
$out .= '</strong></p>
|
89 |
</div>';
|
90 |
}
|
91 |
else {
|
92 |
+
$out .= '<div id="message" class="error below-h2"><p><strong>'.sprintf(__('Error while deleting category "%s"','event-list'), $_GET['slug']).'.</strong></p></div>';
|
93 |
}
|
94 |
}
|
95 |
}
|
99 |
$is_disabled = '1' == $this->options->get('el_sync_cats');
|
100 |
if($is_disabled) {
|
101 |
$this->categories->sync_with_post_cats();
|
102 |
+
$out .= '<div id="message" class="updated"><p><strong>'.__('Sync with post categories enabled.','event-list').'</strong></p></div>';
|
103 |
}
|
104 |
else {
|
105 |
+
$out .= '<div id="message" class="updated"><p><strong>'.__('Sync with post categories disabled.','event-list').'</strong></p></div>';
|
106 |
}
|
107 |
}
|
108 |
else if('manualcatsync' === $action) {
|
109 |
if(!$is_disabled) {
|
110 |
$this->categories->sync_with_post_cats();
|
111 |
+
$out .= '<div id="message" class="updated"><p><strong>'.__('Manual sync with post categories sucessfully finished.','event-list').'</strong></p></div>';
|
112 |
}
|
113 |
}
|
114 |
else if('editcat' === $action && !empty($_POST)) {
|
116 |
if(!isset($_POST['id'])) {
|
117 |
// add new category
|
118 |
if($this->categories->add_category($_POST)) {
|
119 |
+
$out .= '<div id="message" class="updated below-h2"><p><strong>'.sprintf(__('New Category "%s" was added','event-list'), $_POST['name']).'.</strong></p></div>';
|
120 |
}
|
121 |
else {
|
122 |
+
$out .= '<div id="message" class="error below-h2"><p><strong>'.sprintf(__('Error: New Category "$s" could not be added','event-list'), $_POST['name']).'.</strong></p></div>';
|
123 |
}
|
124 |
}
|
125 |
else {
|
126 |
// edit category
|
127 |
if($this->categories->edit_category($_POST, $_POST['id'])) {
|
128 |
+
$out .= '<div id="message" class="updated below-h2"><p><strong>'.sprintf(__('Category "%s" was modified','event-list'), $_POST['id']).'.</strong></p></div>';
|
129 |
}
|
130 |
else {
|
131 |
+
$out .= '<div id="message" class="error below-h2"><p><strong>'.sprintf(__('Error: Category "%s" could not be modified','event-list'), $_POST['id']).'.</strong></p></div>';
|
132 |
}
|
133 |
}
|
134 |
}
|
137 |
if($is_disabled) {
|
138 |
$out .= '<div id="message" class="updated"><p>'.__('Categories are automatically synced with the post categories.<br />
|
139 |
Because of this all options to add new categories or editing existing categories are disabled.<br />
|
140 |
+
If you want to manually edit the categories you have to disable this option.','event-list').'</p></div>';
|
141 |
}
|
142 |
return $out;
|
143 |
}
|
162 |
}
|
163 |
// Category Name
|
164 |
$out .= '
|
165 |
+
<div class="form-field form-required"><label for="name">'.__('Name','event-list').': </label>';
|
166 |
$out .= $this->functions->show_text('name', $cat_data['name'], $is_disabled);
|
167 |
+
$out .= '<p>'.__('The name is how it appears on your site.','event-list').'</p></div>';
|
168 |
// Category Slug
|
169 |
$out .= '
|
170 |
+
<div class="form-field"><label for="name">'.__('Slug','event-list').': </label>';
|
171 |
$out .= $this->functions->show_text('slug', $cat_data['slug'], $is_disabled);
|
172 |
+
$out .= '<p>'.__('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.','event-list').'</p></div>';
|
173 |
// Category Parent
|
174 |
$out .= '
|
175 |
+
<div class="form-field"><label for="parent">'.__('Parent','event-list').': </label>';
|
176 |
$cat_array = $this->categories->get_cat_array('name', 'asc');
|
177 |
+
$option_array = array('' => __('None','event-list'));
|
178 |
$class_array = array();
|
179 |
foreach($cat_array as $cat) {
|
180 |
if($cat['slug'] != $cat_data['slug']) {
|
184 |
}
|
185 |
$selected = isset($cat_data['parent']) ? $cat_data['parent'] : null;
|
186 |
$out .= $this->functions->show_combobox('parent', $option_array, $selected, $class_array, $is_disabled);
|
187 |
+
$out .= '<p>'.__('Categories can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.','event-list').'</p></div>';
|
188 |
// Category Description
|
189 |
$out .= '
|
190 |
+
<div class="form-field"><label for="name">'.__('Description','event-list').': </label>';
|
191 |
$out .= $this->functions->show_textarea('desc', $cat_data['desc'], $is_disabled);
|
192 |
$out .= '</div>
|
193 |
<p class="submit"><input type="submit" class="button-primary" value="'.$button_text.'" id="submitbutton"'.$this->functions->get_disabled_text($is_disabled).'></p>';
|
231 |
<h3>'.$sync_option['label'].'</h3>
|
232 |
<form id="catsync" method="POST" action="?page=el_admin_categories&action=setcatsync">';
|
233 |
// Checkbox
|
234 |
+
$out .= $this->functions->show_checkbox('el_sync_cats', $sync_option_value, $sync_option['caption'].' <input type="submit" class="button-primary" value="'.__('Apply','event-list').'" id="catsyncsubmitbutton">');
|
235 |
$out .= '<br />'.$sync_option['desc'];
|
236 |
$out .= '
|
237 |
</form>
|
241 |
$out .= '<br />
|
242 |
<div>
|
243 |
<form id="manualcatsync" method="POST" action="?page=el_admin_categories&action=manualcatsync">
|
244 |
+
<input type="submit" class="button-secondary" value="'.__('Do a manual sync with post categories','event-list').'" id="manualcatsyncbutton"'.$disabled_text.'>
|
245 |
</form>
|
246 |
</div>';
|
247 |
$out .= '
|
admin/includes/admin-main.php
CHANGED
@@ -66,7 +66,7 @@ class EL_Admin_Main {
|
|
66 |
public function show_main() {
|
67 |
// check permissions
|
68 |
if(!current_user_can('edit_posts')) {
|
69 |
-
wp_die(__('You do not have sufficient permissions to access this page.','
|
70 |
}
|
71 |
// TODO: add check_admin_referer to improve security (see /wp-admin/edit.php)
|
72 |
// is there POST data an event was edited must be updated
|
@@ -102,14 +102,14 @@ class EL_Admin_Main {
|
|
102 |
private function show_page_header($action, $editview=false) {
|
103 |
if($editview) {
|
104 |
$duplicate_link = add_query_arg(array('id'=>$_GET['id'], 'action'=>'copy'), '?page=el_admin_new');
|
105 |
-
$header = __('Edit Event','
|
106 |
}
|
107 |
else {
|
108 |
-
$header = __('Events', '
|
109 |
}
|
110 |
echo '
|
111 |
<div class="wrap">
|
112 |
-
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.$header.' <a href="?page=el_admin_new" class="add-new-h2">'.__('Add New','
|
113 |
$this->show_message($action);
|
114 |
}
|
115 |
|
66 |
public function show_main() {
|
67 |
// check permissions
|
68 |
if(!current_user_can('edit_posts')) {
|
69 |
+
wp_die(__('You do not have sufficient permissions to access this page.','event-list'));
|
70 |
}
|
71 |
// TODO: add check_admin_referer to improve security (see /wp-admin/edit.php)
|
72 |
// is there POST data an event was edited must be updated
|
102 |
private function show_page_header($action, $editview=false) {
|
103 |
if($editview) {
|
104 |
$duplicate_link = add_query_arg(array('id'=>$_GET['id'], 'action'=>'copy'), '?page=el_admin_new');
|
105 |
+
$header = __('Edit Event','event-list').' <a href="'.$duplicate_link.'" class="add-new-h2">'.__('Duplicate','event-list').'</a>';
|
106 |
}
|
107 |
else {
|
108 |
+
$header = __('Events', 'event-list');
|
109 |
}
|
110 |
echo '
|
111 |
<div class="wrap">
|
112 |
+
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.$header.' <a href="?page=el_admin_new" class="add-new-h2">'.__('Add New','event-list').'</a></h2>';
|
113 |
$this->show_message($action);
|
114 |
}
|
115 |
|
admin/includes/admin-new.php
CHANGED
@@ -35,12 +35,12 @@ class EL_Admin_New {
|
|
35 |
|
36 |
public function show_new() {
|
37 |
if(!current_user_can('edit_posts')) {
|
38 |
-
wp_die(__('You do not have sufficient permissions to access this page.','
|
39 |
}
|
40 |
$out = '<div class="wrap">
|
41 |
-
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('Add New Event','
|
42 |
if($this->is_duplicate) {
|
43 |
-
$out .= '<span style="color:silver">('.sprintf(__('Duplicate of event id:%d','
|
44 |
}
|
45 |
$out .= $this->edit_event();
|
46 |
$out .= '</div>';
|
@@ -94,28 +94,28 @@ class EL_Admin_New {
|
|
94 |
$out .= '
|
95 |
<table class="form-table">
|
96 |
<tr>
|
97 |
-
<th><label>'.__('Title','
|
98 |
<td><input type="text" class="text form-required" name="title" id="title" value="'.str_replace('"', '"', isset($event->title) ? $event->title : '').'" /></td>
|
99 |
</tr>
|
100 |
<tr>
|
101 |
-
<th><label>'.__('Date','
|
102 |
<td><input type="text" class="text datepicker form-required" name="start_date" id="start_date" value="'.date('Y-m-d', $start_date).'" />
|
103 |
<span id="end_date_area"> - <input type="text" class="text datepicker" name="end_date" id="end_date" value="'.date('Y-m-d', $end_date).'" /></span>
|
104 |
-
<label><input type="checkbox" name="multiday" id="multiday" value="1" /> '.__('Multi-Day Event','
|
105 |
<input type="hidden" id="sql_start_date" name="sql_start_date" value="" />
|
106 |
<input type="hidden" id="sql_end_date" name="sql_end_date" value="" />
|
107 |
</td>
|
108 |
</tr>
|
109 |
<tr>
|
110 |
-
<th><label>'.__('Time','
|
111 |
<td><input type="text" class="text" name="time" id="time" value="'.str_replace('"', '"', isset($event->time) ? $event->time : '').'" /></td>
|
112 |
</tr>
|
113 |
<tr>
|
114 |
-
<th><label>'.__('Location','
|
115 |
<td><input type="text" class="text" name="location" id="location" value="'.str_replace('"', '"', isset($event->location) ? $event->location : '').'" /></td>
|
116 |
</tr>
|
117 |
<tr>
|
118 |
-
<th><label>'.__('Details','
|
119 |
<td>';
|
120 |
$editor_settings = array('drag_drop_upload' => true,
|
121 |
'textarea_rows' => 20);
|
@@ -131,9 +131,9 @@ class EL_Admin_New {
|
|
131 |
</div>
|
132 |
<div id="postbox-container-1" class="postbox-container">
|
133 |
<div id="side-sortables" class="meta-box-sortables ui-sortable">';
|
134 |
-
add_meta_box('event-publish', __('Publish','
|
135 |
$metabox_args = isset($event->categories) ? array('event_cats' => $event->categories) : null;
|
136 |
-
add_meta_box('event-categories', __('Categories','
|
137 |
ob_start();
|
138 |
do_meta_boxes('event-list', 'advanced', null);
|
139 |
$out .= ob_get_contents();
|
@@ -148,9 +148,9 @@ class EL_Admin_New {
|
|
148 |
}
|
149 |
|
150 |
public function render_publish_metabox() {
|
151 |
-
$button_text = $this->is_new ? __('Publish','
|
152 |
$out = '<div class="submitbox">
|
153 |
-
<div id="delete-action"><a href="?page=el_admin_main" class="submitdelete deletion">'.__('Cancel','
|
154 |
<div id="publishing-action"><input type="submit" class="button button-primary button-large" name="publish" value="'.$button_text.'" id="publish"></div>
|
155 |
<div class="clear"></div>
|
156 |
</div>';
|
@@ -163,7 +163,7 @@ class EL_Admin_New {
|
|
163 |
<div id="category-all" class="tabs-panel">';
|
164 |
$cat_array = $this->categories->get_cat_array('name', 'asc');
|
165 |
if(empty($cat_array)) {
|
166 |
-
$out .= __('No categories available.','
|
167 |
}
|
168 |
else {
|
169 |
$out .= '
|
@@ -200,16 +200,16 @@ class EL_Admin_New {
|
|
200 |
</div>';
|
201 |
// TODO: Adding new categories in edit event form
|
202 |
/* <div id="category-adder" class="wp-hidden-children">
|
203 |
-
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js">'.__('+ Add New Category','
|
204 |
<p id="category-add" class="category-add wp-hidden-child">
|
205 |
-
<label class="screen-reader-text" for="newcategory">'.__('Category Name','
|
206 |
<input type="text" name="newcategory" id="newcategory" class="form-required form-input-tip" value="" aria-required="true"/>
|
207 |
-
<input type="button" id="category-add-submit" class="button category-add-submit" value="'.__('Add Category','
|
208 |
</p>
|
209 |
</div>*/
|
210 |
$out .= '
|
211 |
<div id="category-manager">
|
212 |
-
<a id="category-manage-link" href="?page=el_admin_categories">'.__('Goto Category Settings','
|
213 |
</div>
|
214 |
</div>';
|
215 |
echo $out;
|
35 |
|
36 |
public function show_new() {
|
37 |
if(!current_user_can('edit_posts')) {
|
38 |
+
wp_die(__('You do not have sufficient permissions to access this page.','event-list'));
|
39 |
}
|
40 |
$out = '<div class="wrap">
|
41 |
+
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('Add New Event','event-list').'</h2>';
|
42 |
if($this->is_duplicate) {
|
43 |
+
$out .= '<span style="color:silver">('.sprintf(__('Duplicate of event id:%d','event-list'), $_GET['id']).')</span>';
|
44 |
}
|
45 |
$out .= $this->edit_event();
|
46 |
$out .= '</div>';
|
94 |
$out .= '
|
95 |
<table class="form-table">
|
96 |
<tr>
|
97 |
+
<th><label>'.__('Title','event-list').' ('.__('required','event-list').')</label></th>
|
98 |
<td><input type="text" class="text form-required" name="title" id="title" value="'.str_replace('"', '"', isset($event->title) ? $event->title : '').'" /></td>
|
99 |
</tr>
|
100 |
<tr>
|
101 |
+
<th><label>'.__('Date','event-list').' ('.__('required','event-list').')</label></th>
|
102 |
<td><input type="text" class="text datepicker form-required" name="start_date" id="start_date" value="'.date('Y-m-d', $start_date).'" />
|
103 |
<span id="end_date_area"> - <input type="text" class="text datepicker" name="end_date" id="end_date" value="'.date('Y-m-d', $end_date).'" /></span>
|
104 |
+
<label><input type="checkbox" name="multiday" id="multiday" value="1" /> '.__('Multi-Day Event','event-list').'</label>
|
105 |
<input type="hidden" id="sql_start_date" name="sql_start_date" value="" />
|
106 |
<input type="hidden" id="sql_end_date" name="sql_end_date" value="" />
|
107 |
</td>
|
108 |
</tr>
|
109 |
<tr>
|
110 |
+
<th><label>'.__('Time','event-list').'</label></th>
|
111 |
<td><input type="text" class="text" name="time" id="time" value="'.str_replace('"', '"', isset($event->time) ? $event->time : '').'" /></td>
|
112 |
</tr>
|
113 |
<tr>
|
114 |
+
<th><label>'.__('Location','event-list').'</label></th>
|
115 |
<td><input type="text" class="text" name="location" id="location" value="'.str_replace('"', '"', isset($event->location) ? $event->location : '').'" /></td>
|
116 |
</tr>
|
117 |
<tr>
|
118 |
+
<th><label>'.__('Details','event-list').'</label></th>
|
119 |
<td>';
|
120 |
$editor_settings = array('drag_drop_upload' => true,
|
121 |
'textarea_rows' => 20);
|
131 |
</div>
|
132 |
<div id="postbox-container-1" class="postbox-container">
|
133 |
<div id="side-sortables" class="meta-box-sortables ui-sortable">';
|
134 |
+
add_meta_box('event-publish', __('Publish','event-list'), array(&$this, 'render_publish_metabox'), 'event-list');
|
135 |
$metabox_args = isset($event->categories) ? array('event_cats' => $event->categories) : null;
|
136 |
+
add_meta_box('event-categories', __('Categories','event-list'), array(&$this, 'render_category_metabox'), 'event-list', 'advanced', 'default', $metabox_args);
|
137 |
ob_start();
|
138 |
do_meta_boxes('event-list', 'advanced', null);
|
139 |
$out .= ob_get_contents();
|
148 |
}
|
149 |
|
150 |
public function render_publish_metabox() {
|
151 |
+
$button_text = $this->is_new ? __('Publish','event-list') : __('Update','event-list');
|
152 |
$out = '<div class="submitbox">
|
153 |
+
<div id="delete-action"><a href="?page=el_admin_main" class="submitdelete deletion">'.__('Cancel','event-list').'</a></div>
|
154 |
<div id="publishing-action"><input type="submit" class="button button-primary button-large" name="publish" value="'.$button_text.'" id="publish"></div>
|
155 |
<div class="clear"></div>
|
156 |
</div>';
|
163 |
<div id="category-all" class="tabs-panel">';
|
164 |
$cat_array = $this->categories->get_cat_array('name', 'asc');
|
165 |
if(empty($cat_array)) {
|
166 |
+
$out .= __('No categories available.','event-list');
|
167 |
}
|
168 |
else {
|
169 |
$out .= '
|
200 |
</div>';
|
201 |
// TODO: Adding new categories in edit event form
|
202 |
/* <div id="category-adder" class="wp-hidden-children">
|
203 |
+
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js">'.__('+ Add New Category','event-list').'</a></h4>
|
204 |
<p id="category-add" class="category-add wp-hidden-child">
|
205 |
+
<label class="screen-reader-text" for="newcategory">'.__('Category Name','event-list').'</label>
|
206 |
<input type="text" name="newcategory" id="newcategory" class="form-required form-input-tip" value="" aria-required="true"/>
|
207 |
+
<input type="button" id="category-add-submit" class="button category-add-submit" value="'.__('Add Category','event-list').'" />
|
208 |
</p>
|
209 |
</div>*/
|
210 |
$out .= '
|
211 |
<div id="category-manager">
|
212 |
+
<a id="category-manage-link" href="?page=el_admin_categories">'.__('Goto Category Settings','event-list').'</a>
|
213 |
</div>
|
214 |
</div>';
|
215 |
echo $out;
|
admin/includes/admin-settings.php
CHANGED
@@ -28,14 +28,14 @@ class EL_Admin_Settings {
|
|
28 |
|
29 |
public function show_settings () {
|
30 |
if(!current_user_can('manage_options')) {
|
31 |
-
wp_die(__('You do not have sufficient permissions to access this page.','
|
32 |
}
|
33 |
$out = '';
|
34 |
// check for changed settings
|
35 |
if(isset($_GET['settings-updated'])) {
|
36 |
// show "settings saved" message
|
37 |
$out .= '<div id="message" class="updated">
|
38 |
-
<p><strong>'.__('Settings saved.','
|
39 |
</div>';
|
40 |
// check feed rewrite status and update it if required
|
41 |
if('feed' == $_GET['tab']) {
|
@@ -47,7 +47,7 @@ class EL_Admin_Settings {
|
|
47 |
// normal output
|
48 |
$out.= '
|
49 |
<div class="wrap">
|
50 |
-
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('Event List Settings','
|
51 |
if(!isset($_GET['tab'])) {
|
52 |
$_GET['tab'] = 'general';
|
53 |
}
|
28 |
|
29 |
public function show_settings () {
|
30 |
if(!current_user_can('manage_options')) {
|
31 |
+
wp_die(__('You do not have sufficient permissions to access this page.','event-list'));
|
32 |
}
|
33 |
$out = '';
|
34 |
// check for changed settings
|
35 |
if(isset($_GET['settings-updated'])) {
|
36 |
// show "settings saved" message
|
37 |
$out .= '<div id="message" class="updated">
|
38 |
+
<p><strong>'.__('Settings saved.','event-list').'</strong></p>
|
39 |
</div>';
|
40 |
// check feed rewrite status and update it if required
|
41 |
if('feed' == $_GET['tab']) {
|
47 |
// normal output
|
48 |
$out.= '
|
49 |
<div class="wrap">
|
50 |
+
<div id="icon-edit-pages" class="icon32"><br /></div><h2>'.__('Event List Settings','event-list').'</h2>';
|
51 |
if(!isset($_GET['tab'])) {
|
52 |
$_GET['tab'] = 'general';
|
53 |
}
|
admin/includes/category_table.php
CHANGED
@@ -1,204 +1,204 @@
|
|
1 |
-
<?php
|
2 |
if( !defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
-
}
|
5 |
-
|
6 |
-
// load the base class (WP_List_Table class isn't automatically available)
|
7 |
-
if(!class_exists('WP_List_Table')){
|
8 |
-
require_once( ABSPATH.'wp-admin/includes/class-wp-list-table.php' );
|
9 |
-
}
|
10 |
-
require_once( EL_PATH.'includes/options.php' );
|
11 |
-
require_once( EL_PATH.'includes/db.php' );
|
12 |
-
require_once( EL_PATH.'includes/categories.php' );
|
13 |
-
|
14 |
-
class EL_Category_Table extends WP_List_Table {
|
15 |
-
private $options;
|
16 |
-
private $db;
|
17 |
-
private $categories;
|
18 |
-
private $is_disabled;
|
19 |
-
|
20 |
-
public function __construct($is_disabled) {
|
21 |
-
$this->options = &EL_Options::get_instance();
|
22 |
-
$this->db = &EL_Db::get_instance();
|
23 |
-
$this->categories = &EL_Categories::get_instance();
|
24 |
-
$this->is_disabled = $is_disabled;
|
25 |
-
//Set parent defaults
|
26 |
-
parent::__construct( array(
|
27 |
-
'singular' => __('event','
|
28 |
-
'plural' => __('events','
|
29 |
-
'ajax' => false //does this table support ajax?
|
30 |
-
) );
|
31 |
-
}
|
32 |
-
|
33 |
-
/** ************************************************************************
|
34 |
-
* This method is called when the parent class can't find a method
|
35 |
-
* specifically build for a given column.
|
36 |
-
*
|
37 |
-
* @param array $item A singular item (one full row's worth of data)
|
38 |
-
* @param array $column_name The name/slug of the column to be processed
|
39 |
-
* @return string Text or HTML to be placed inside the column <td>
|
40 |
-
***************************************************************************/
|
41 |
-
protected function column_default($item, $column_name) {
|
42 |
-
switch($column_name){
|
43 |
-
case 'desc' :
|
44 |
-
return '<div>'.$item[$column_name].'</div>';
|
45 |
-
case 'slug' :
|
46 |
-
return $item[$column_name];
|
47 |
case 'num_events' :
|
48 |
-
return $this->db->count_events( $item['slug'] );
|
49 |
-
default :
|
50 |
-
echo $column_name;
|
51 |
-
return $item[$column_name];
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
/** ************************************************************************
|
56 |
-
* This is a custom column method and is responsible for what is
|
57 |
-
* rendered in any column with a name/slug of 'name'.
|
58 |
-
*
|
59 |
-
* @see WP_List_Table::::single_row_columns()
|
60 |
-
* @param array $item A singular item (one full row's worth of data)
|
61 |
-
* @return string Text to be placed inside the column <td> (movie title only)
|
62 |
-
***************************************************************************/
|
63 |
-
protected function column_name($item) {
|
64 |
-
// create prefix with indenting according cat level
|
65 |
-
$prefix = str_pad('', 7*$item['level'], '—', STR_PAD_LEFT).' ';
|
66 |
-
$out = '<b>'.$prefix.$item['name'].'</b>';
|
67 |
-
if(!$this->is_disabled) {
|
68 |
-
// prepare Actions
|
69 |
-
$actions = array(
|
70 |
-
'edit' => '<a href="?page='.$_REQUEST['page'].'&id='.$item['slug'].'&action=edit">'.__('Edit','
|
71 |
-
'delete' => '<a href="#" onClick="eventlist_deleteCategory(\''.$item['slug'].'\');return false;">'.__('Delete','
|
72 |
-
);
|
73 |
-
//Return the title contents
|
74 |
-
$out .= $this->row_actions($actions);
|
75 |
-
}
|
76 |
-
return $out;
|
77 |
-
}
|
78 |
-
|
79 |
-
/** ************************************************************************
|
80 |
-
* Required if displaying checkboxes or using bulk actions! The 'cb' column
|
81 |
-
* is given special treatment when columns are processed.
|
82 |
-
*
|
83 |
-
* @see WP_List_Table::::single_row_columns()
|
84 |
-
* @param array $item A singular item (one full row's worth of data)
|
85 |
-
* @return string Text to be placed inside the column <td> (movie title only)
|
86 |
-
***************************************************************************/
|
87 |
-
protected function column_cb($item) {
|
88 |
-
if(!$this->is_disabled) {
|
89 |
-
return '<input type="checkbox" name="slug[]" value="'.$item['slug'].'" />';
|
90 |
-
}
|
91 |
-
else {
|
92 |
-
return '';
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
/** ************************************************************************
|
97 |
-
* This method dictates the table's columns and titles. This should returns
|
98 |
-
* an array where the key is the column slug (and class) and the value is
|
99 |
-
* the column's title text.
|
100 |
-
*
|
101 |
-
* @see WP_List_Table::::single_row_columns()
|
102 |
-
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
|
103 |
-
***************************************************************************/
|
104 |
-
public function get_columns() {
|
105 |
-
return array(
|
106 |
-
'cb' => $this->is_disabled ? '' : '<input type="checkbox" />', //Render a checkbox instead of text
|
107 |
-
'name' => __('Name','
|
108 |
-
'desc' => __('Description','
|
109 |
-
'slug' => __('Slug','
|
110 |
-
'num_events' => __('Events','
|
111 |
-
);
|
112 |
-
}
|
113 |
-
|
114 |
-
/** ************************************************************************
|
115 |
-
* If you want one or more columns to be sortable (ASC/DESC toggle), you
|
116 |
-
* will need to register it here. This should return an array where the key
|
117 |
-
* is the column that needs to be sortable, and the value is db column to
|
118 |
-
* sort by.
|
119 |
-
*
|
120 |
-
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
|
121 |
-
***************************************************************************/
|
122 |
-
public function get_sortable_columns() {
|
123 |
-
$sortable_columns = array(
|
124 |
-
'name' => array( 'name', true ), //true means its already sorted
|
125 |
-
'desc' => array( 'desc', false ),
|
126 |
-
'slug' => array( 'slug', false ),
|
127 |
-
'num_events' => array( 'num_events', false )
|
128 |
-
);
|
129 |
-
// TODO: sorting of tables
|
130 |
-
//return $sortable_columns;
|
131 |
-
return array();
|
132 |
-
}
|
133 |
-
|
134 |
-
/** ************************************************************************
|
135 |
-
* Optional. If you need to include bulk actions in your list table, this is
|
136 |
-
* the place to define them. Bulk actions are an associative array in the format
|
137 |
-
* 'slug'=>'Visible Title'
|
138 |
-
* If this method returns an empty value, no bulk action will be rendered.
|
139 |
-
*
|
140 |
-
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
|
141 |
-
****************************************************************************/
|
142 |
-
public function get_bulk_actions() {
|
143 |
-
if(!$this->is_disabled) {
|
144 |
-
$actions = array(
|
145 |
-
'delete_bulk' => __('Delete','
|
146 |
-
);
|
147 |
-
return $actions;
|
148 |
-
}
|
149 |
-
else {
|
150 |
-
return array();
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
/** ************************************************************************
|
155 |
-
* Function to handle the process of the bulk actions.
|
156 |
-
*
|
157 |
-
* @see $this->prepare_items()
|
158 |
-
***************************************************************************/
|
159 |
-
private function process_bulk_action() {
|
160 |
-
if(!$this->is_disabled) {
|
161 |
-
//Detect when a bulk action is being triggered...
|
162 |
-
if( 'delete_bulk' === $this->current_action() ) {
|
163 |
-
// Show confirmation window before deleting
|
164 |
-
echo '<script language="JavaScript">eventlist_deleteCategory ("'.implode( ', ', $_GET['slug'] ).'");</script>';
|
165 |
-
}
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
/** ************************************************************************
|
170 |
-
* In this function the data for the display is prepared.
|
171 |
-
*
|
172 |
-
* @param string $date_range Date range for displaying the events
|
173 |
-
* @uses $this->_column_headers
|
174 |
-
* @uses $this->items
|
175 |
-
* @uses $this->get_columns()
|
176 |
-
* @uses $this->get_sortable_columns()
|
177 |
-
* @uses $this->get_pagenum()
|
178 |
-
* @uses $this->set_pagination_args()
|
179 |
-
***************************************************************************/
|
180 |
-
public function prepare_items() {
|
181 |
-
$per_page = 15;
|
182 |
-
// define column headers
|
183 |
-
$columns = $this->get_columns();
|
184 |
-
$hidden = array();
|
185 |
-
$sortable = $this->get_sortable_columns();
|
186 |
-
$this->_column_headers = array( $columns, $hidden, $sortable );
|
187 |
-
// handle the bulk actions
|
188 |
-
$this->process_bulk_action();
|
189 |
-
// get the required event data
|
190 |
-
$data = $this->categories->get_cat_array();
|
191 |
-
// setup pagination
|
192 |
-
$current_page = $this->get_pagenum();
|
193 |
-
$total_items = count( $data );
|
194 |
-
$data = array_slice( $data, ( ( $current_page-1 )*$per_page ), $per_page );
|
195 |
-
$this->set_pagination_args( array(
|
196 |
-
'total_items' => $total_items,
|
197 |
-
'per_page' => $per_page,
|
198 |
-
'total_pages' => ceil($total_items/$per_page)
|
199 |
-
) );
|
200 |
-
// setup items which are used by the rest of the class
|
201 |
-
$this->items = $data;
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
1 |
+
<?php
|
2 |
if( !defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
// load the base class (WP_List_Table class isn't automatically available)
|
7 |
+
if(!class_exists('WP_List_Table')){
|
8 |
+
require_once( ABSPATH.'wp-admin/includes/class-wp-list-table.php' );
|
9 |
+
}
|
10 |
+
require_once( EL_PATH.'includes/options.php' );
|
11 |
+
require_once( EL_PATH.'includes/db.php' );
|
12 |
+
require_once( EL_PATH.'includes/categories.php' );
|
13 |
+
|
14 |
+
class EL_Category_Table extends WP_List_Table {
|
15 |
+
private $options;
|
16 |
+
private $db;
|
17 |
+
private $categories;
|
18 |
+
private $is_disabled;
|
19 |
+
|
20 |
+
public function __construct($is_disabled) {
|
21 |
+
$this->options = &EL_Options::get_instance();
|
22 |
+
$this->db = &EL_Db::get_instance();
|
23 |
+
$this->categories = &EL_Categories::get_instance();
|
24 |
+
$this->is_disabled = $is_disabled;
|
25 |
+
//Set parent defaults
|
26 |
+
parent::__construct( array(
|
27 |
+
'singular' => __('event','event-list'), //singular name of the listed records
|
28 |
+
'plural' => __('events','event-list'), //plural name of the listed records
|
29 |
+
'ajax' => false //does this table support ajax?
|
30 |
+
) );
|
31 |
+
}
|
32 |
+
|
33 |
+
/** ************************************************************************
|
34 |
+
* This method is called when the parent class can't find a method
|
35 |
+
* specifically build for a given column.
|
36 |
+
*
|
37 |
+
* @param array $item A singular item (one full row's worth of data)
|
38 |
+
* @param array $column_name The name/slug of the column to be processed
|
39 |
+
* @return string Text or HTML to be placed inside the column <td>
|
40 |
+
***************************************************************************/
|
41 |
+
protected function column_default($item, $column_name) {
|
42 |
+
switch($column_name){
|
43 |
+
case 'desc' :
|
44 |
+
return '<div>'.$item[$column_name].'</div>';
|
45 |
+
case 'slug' :
|
46 |
+
return $item[$column_name];
|
47 |
case 'num_events' :
|
48 |
+
return $this->db->count_events( $item['slug'] );
|
49 |
+
default :
|
50 |
+
echo $column_name;
|
51 |
+
return $item[$column_name];
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
/** ************************************************************************
|
56 |
+
* This is a custom column method and is responsible for what is
|
57 |
+
* rendered in any column with a name/slug of 'name'.
|
58 |
+
*
|
59 |
+
* @see WP_List_Table::::single_row_columns()
|
60 |
+
* @param array $item A singular item (one full row's worth of data)
|
61 |
+
* @return string Text to be placed inside the column <td> (movie title only)
|
62 |
+
***************************************************************************/
|
63 |
+
protected function column_name($item) {
|
64 |
+
// create prefix with indenting according cat level
|
65 |
+
$prefix = str_pad('', 7*$item['level'], '—', STR_PAD_LEFT).' ';
|
66 |
+
$out = '<b>'.$prefix.$item['name'].'</b>';
|
67 |
+
if(!$this->is_disabled) {
|
68 |
+
// prepare Actions
|
69 |
+
$actions = array(
|
70 |
+
'edit' => '<a href="?page='.$_REQUEST['page'].'&id='.$item['slug'].'&action=edit">'.__('Edit','event-list').'</a>',
|
71 |
+
'delete' => '<a href="#" onClick="eventlist_deleteCategory(\''.$item['slug'].'\');return false;">'.__('Delete','event-list').'</a>'
|
72 |
+
);
|
73 |
+
//Return the title contents
|
74 |
+
$out .= $this->row_actions($actions);
|
75 |
+
}
|
76 |
+
return $out;
|
77 |
+
}
|
78 |
+
|
79 |
+
/** ************************************************************************
|
80 |
+
* Required if displaying checkboxes or using bulk actions! The 'cb' column
|
81 |
+
* is given special treatment when columns are processed.
|
82 |
+
*
|
83 |
+
* @see WP_List_Table::::single_row_columns()
|
84 |
+
* @param array $item A singular item (one full row's worth of data)
|
85 |
+
* @return string Text to be placed inside the column <td> (movie title only)
|
86 |
+
***************************************************************************/
|
87 |
+
protected function column_cb($item) {
|
88 |
+
if(!$this->is_disabled) {
|
89 |
+
return '<input type="checkbox" name="slug[]" value="'.$item['slug'].'" />';
|
90 |
+
}
|
91 |
+
else {
|
92 |
+
return '';
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
/** ************************************************************************
|
97 |
+
* This method dictates the table's columns and titles. This should returns
|
98 |
+
* an array where the key is the column slug (and class) and the value is
|
99 |
+
* the column's title text.
|
100 |
+
*
|
101 |
+
* @see WP_List_Table::::single_row_columns()
|
102 |
+
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
|
103 |
+
***************************************************************************/
|
104 |
+
public function get_columns() {
|
105 |
+
return array(
|
106 |
+
'cb' => $this->is_disabled ? '' : '<input type="checkbox" />', //Render a checkbox instead of text
|
107 |
+
'name' => __('Name','event-list'),
|
108 |
+
'desc' => __('Description','event-list'),
|
109 |
+
'slug' => __('Slug','event-list'),
|
110 |
+
'num_events' => __('Events','event-list')
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
/** ************************************************************************
|
115 |
+
* If you want one or more columns to be sortable (ASC/DESC toggle), you
|
116 |
+
* will need to register it here. This should return an array where the key
|
117 |
+
* is the column that needs to be sortable, and the value is db column to
|
118 |
+
* sort by.
|
119 |
+
*
|
120 |
+
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
|
121 |
+
***************************************************************************/
|
122 |
+
public function get_sortable_columns() {
|
123 |
+
$sortable_columns = array(
|
124 |
+
'name' => array( 'name', true ), //true means its already sorted
|
125 |
+
'desc' => array( 'desc', false ),
|
126 |
+
'slug' => array( 'slug', false ),
|
127 |
+
'num_events' => array( 'num_events', false )
|
128 |
+
);
|
129 |
+
// TODO: sorting of tables
|
130 |
+
//return $sortable_columns;
|
131 |
+
return array();
|
132 |
+
}
|
133 |
+
|
134 |
+
/** ************************************************************************
|
135 |
+
* Optional. If you need to include bulk actions in your list table, this is
|
136 |
+
* the place to define them. Bulk actions are an associative array in the format
|
137 |
+
* 'slug'=>'Visible Title'
|
138 |
+
* If this method returns an empty value, no bulk action will be rendered.
|
139 |
+
*
|
140 |
+
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
|
141 |
+
****************************************************************************/
|
142 |
+
public function get_bulk_actions() {
|
143 |
+
if(!$this->is_disabled) {
|
144 |
+
$actions = array(
|
145 |
+
'delete_bulk' => __('Delete','event-list')
|
146 |
+
);
|
147 |
+
return $actions;
|
148 |
+
}
|
149 |
+
else {
|
150 |
+
return array();
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
/** ************************************************************************
|
155 |
+
* Function to handle the process of the bulk actions.
|
156 |
+
*
|
157 |
+
* @see $this->prepare_items()
|
158 |
+
***************************************************************************/
|
159 |
+
private function process_bulk_action() {
|
160 |
+
if(!$this->is_disabled) {
|
161 |
+
//Detect when a bulk action is being triggered...
|
162 |
+
if( 'delete_bulk' === $this->current_action() ) {
|
163 |
+
// Show confirmation window before deleting
|
164 |
+
echo '<script language="JavaScript">eventlist_deleteCategory ("'.implode( ', ', $_GET['slug'] ).'");</script>';
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
/** ************************************************************************
|
170 |
+
* In this function the data for the display is prepared.
|
171 |
+
*
|
172 |
+
* @param string $date_range Date range for displaying the events
|
173 |
+
* @uses $this->_column_headers
|
174 |
+
* @uses $this->items
|
175 |
+
* @uses $this->get_columns()
|
176 |
+
* @uses $this->get_sortable_columns()
|
177 |
+
* @uses $this->get_pagenum()
|
178 |
+
* @uses $this->set_pagination_args()
|
179 |
+
***************************************************************************/
|
180 |
+
public function prepare_items() {
|
181 |
+
$per_page = 15;
|
182 |
+
// define column headers
|
183 |
+
$columns = $this->get_columns();
|
184 |
+
$hidden = array();
|
185 |
+
$sortable = $this->get_sortable_columns();
|
186 |
+
$this->_column_headers = array( $columns, $hidden, $sortable );
|
187 |
+
// handle the bulk actions
|
188 |
+
$this->process_bulk_action();
|
189 |
+
// get the required event data
|
190 |
+
$data = $this->categories->get_cat_array();
|
191 |
+
// setup pagination
|
192 |
+
$current_page = $this->get_pagenum();
|
193 |
+
$total_items = count( $data );
|
194 |
+
$data = array_slice( $data, ( ( $current_page-1 )*$per_page ), $per_page );
|
195 |
+
$this->set_pagination_args( array(
|
196 |
+
'total_items' => $total_items,
|
197 |
+
'per_page' => $per_page,
|
198 |
+
'total_pages' => ceil($total_items/$per_page)
|
199 |
+
) );
|
200 |
+
// setup items which are used by the rest of the class
|
201 |
+
$this->items = $data;
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
admin/includes/event_table.php
CHANGED
@@ -1,312 +1,305 @@
|
|
1 |
-
<?php
|
2 |
if(!defined('ABSPATH')) {
|
3 |
exit;
|
4 |
-
}
|
5 |
-
|
6 |
-
// load the base class (WP_List_Table class isn't automatically available)
|
7 |
-
if(!class_exists('WP_List_Table')){
|
8 |
-
require_once(ABSPATH.'wp-admin/includes/class-wp-list-table.php');
|
9 |
-
}
|
10 |
-
require_once(EL_PATH.'includes/db.php');
|
11 |
-
require_once(EL_PATH.'includes/categories.php');
|
12 |
-
require_once(EL_PATH.'includes/filterbar.php');
|
13 |
-
|
14 |
-
class EL_Event_Table extends WP_List_Table {
|
15 |
-
private $db;
|
16 |
-
private $categories;
|
17 |
-
private $filterbar;
|
18 |
-
private $args;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->db = &EL_Db::get_instance();
|
22 |
-
$this->categories = &EL_Categories::get_instance();
|
23 |
-
$this->filterbar = &EL_Filterbar::get_instance();
|
24 |
-
$this->set_args();
|
25 |
-
|
26 |
-
global $status, $page;
|
27 |
-
//Set parent defaults
|
28 |
-
parent::__construct(array(
|
29 |
-
'singular' => __('event','
|
30 |
-
'plural' => __('events','
|
31 |
-
'ajax' => false //does this table support ajax?
|
32 |
-
));
|
33 |
-
}
|
34 |
-
|
35 |
-
/** ************************************************************************
|
36 |
-
* This method is called when the parent class can't find a method
|
37 |
-
* specifically build for a given column.
|
38 |
-
*
|
39 |
-
* @param array $item A singular item (one full row's worth of data)
|
40 |
-
* @param array $column_name The name/slug of the column to be processed
|
41 |
-
* @return string Text or HTML to be placed inside the column <td>
|
42 |
-
***************************************************************************/
|
43 |
-
protected function column_default($item, $column_name) {
|
44 |
-
switch($column_name) {
|
45 |
-
case 'date' :
|
46 |
-
return $this->format_event_date($item->start_date, $item->end_date, $item->time);
|
47 |
-
case 'details' :
|
48 |
-
return '<div>'.$this->db->truncate(wpautop($item->details), 80).'</div>';
|
49 |
-
case 'pub_user' :
|
50 |
-
return get_userdata($item->pub_user)->user_login;
|
51 |
case 'pub_date' :
|
52 |
-
return $this->format_pub_date($item->pub_date);
|
53 |
-
case 'categories' :
|
54 |
-
return esc_html($this->categories->
|
55 |
-
default :
|
56 |
-
return esc_html($item->$column_name);
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
/** ************************************************************************
|
61 |
-
* This is a custom column method and is responsible for what is
|
62 |
-
* rendered in any column with a name/slug of 'title'.
|
63 |
-
*
|
64 |
-
* @see WP_List_Table::::single_row_columns()
|
65 |
-
* @param array $item A singular item (one full row's worth of data)
|
66 |
-
* @return string Text to be placed inside the column <td> (movie title only)
|
67 |
-
***************************************************************************/
|
68 |
-
protected function column_title($item) {
|
69 |
-
//Prepare Columns
|
70 |
-
$actions = array(
|
71 |
-
'edit' => '<a href="?page='.$_REQUEST['page'].'&id='.$item->id.'&action=edit">'.__('Edit','
|
72 |
-
'duplicate' => '<a href="?page=el_admin_new&id='.$item->id.'&action=copy">'.__('Duplicate','
|
73 |
-
'delete' => '<a href="#" onClick="eventlist_deleteEvent('.$item->id.');return false;">'.__('Delete','
|
74 |
-
|
75 |
-
//Return the title contents
|
76 |
-
return sprintf('<b>%1$s</b> <span style="color:silver">(id:%2$s)</span>%3$s',
|
77 |
-
esc_html($item->title),
|
78 |
-
$item->id,
|
79 |
-
$this->row_actions($actions));
|
80 |
-
}
|
81 |
-
|
82 |
-
/** ************************************************************************
|
83 |
-
* Required if displaying checkboxes or using bulk actions! The 'cb' column
|
84 |
-
* is given special treatment when columns are processed.
|
85 |
-
*
|
86 |
-
* @see WP_List_Table::::single_row_columns()
|
87 |
-
* @param array $item A singular item (one full row's worth of data)
|
88 |
-
* @return string Text to be placed inside the column <td> (movie title only)
|
89 |
-
***************************************************************************/
|
90 |
-
protected function column_cb($item) {
|
91 |
-
//Let's simply repurpose the table's singular label ("event")
|
92 |
-
//The value of the checkbox should be the record's id
|
93 |
-
return '<input type="checkbox" name="id[]" value="'.$item->id.'" />';
|
94 |
-
}
|
95 |
-
|
96 |
-
/** ************************************************************************
|
97 |
-
* This method dictates the table's columns and titles. This should returns
|
98 |
-
* an array where the key is the column slug (and class) and the value is
|
99 |
-
* the column's title text.
|
100 |
-
*
|
101 |
-
* @see WP_List_Table::::single_row_columns()
|
102 |
-
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
|
103 |
-
***************************************************************************/
|
104 |
-
public function get_columns() {
|
105 |
-
return array(
|
106 |
-
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
|
107 |
-
'date' => __('Date','
|
108 |
-
'title' => __('Title','
|
109 |
-
'location' => __('Location','
|
110 |
-
'details' => __('Details','
|
111 |
-
'categories' => __('Categories','
|
112 |
-
'pub_user' => __('Author','
|
113 |
-
'pub_date' => __('Published','
|
114 |
-
);
|
115 |
-
}
|
116 |
-
|
117 |
-
/** ************************************************************************
|
118 |
-
* If you want one or more columns to be sortable (ASC/DESC toggle), you
|
119 |
-
* will need to register it here. This should return an array where the key
|
120 |
-
* is the column that needs to be sortable, and the value is db column to
|
121 |
-
* sort by.
|
122 |
-
*
|
123 |
-
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
|
124 |
-
***************************************************************************/
|
125 |
-
public function get_sortable_columns() {
|
126 |
-
$sortable_columns = array(
|
127 |
-
'date' => array('date', true), //true means its already sorted
|
128 |
-
'title' => array('title', false),
|
129 |
-
'location' => array('location', false),
|
130 |
-
'pub_user' => array('pub_user', false),
|
131 |
-
'pub_date' => array('pub_date', false)
|
132 |
-
);
|
133 |
-
return $sortable_columns;
|
134 |
-
}
|
135 |
-
|
136 |
-
/** ************************************************************************
|
137 |
-
* Optional. If you need to include bulk actions in your list table, this is
|
138 |
-
* the place to define them. Bulk actions are an associative array in the format
|
139 |
-
* 'slug'=>'Visible Title'
|
140 |
-
* If this method returns an empty value, no bulk action will be rendered.
|
141 |
-
*
|
142 |
-
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
|
143 |
-
****************************************************************************/
|
144 |
-
public function get_bulk_actions() {
|
145 |
-
$actions = array(
|
146 |
-
'delete_bulk' => __('Delete','
|
147 |
-
);
|
148 |
-
return $actions;
|
149 |
-
}
|
150 |
-
|
151 |
-
/** ************************************************************************
|
152 |
-
* Function to handle the process of the bulk actions.
|
153 |
-
*
|
154 |
-
* @see $this->prepare_items()
|
155 |
-
***************************************************************************/
|
156 |
-
private function process_bulk_action() {
|
157 |
-
//Detect when a bulk action is being triggered...
|
158 |
-
if('delete_bulk'===$this->current_action()) {
|
159 |
-
// Show confirmation window before deleting
|
160 |
-
echo '<script language="JavaScript">eventlist_deleteEvent ("'.implode(', ', $_GET['id']).'");</script>';
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
public function extra_tablenav($which) {
|
165 |
-
$out = '';
|
166 |
-
// add filter elements
|
167 |
-
if('top' === $which) {
|
168 |
-
$out = '
|
169 |
-
<div class="alignleft actions">';
|
170 |
-
$out .= $this->filterbar->show_years('?page=el_admin_main', $this->args, 'dropdown', 'admin', array('show_past'=>true));
|
171 |
-
$out .= $this->filterbar->show_cats('?page=el_admin_main', $this->args, 'dropdown', 'admin');
|
172 |
-
$out .= '
|
173 |
-
<input type="hidden" name="noheader" value="true" />
|
174 |
-
<input id="event-query-submit" class="button" type="submit" name ="filter" value="'.__('Filter','
|
175 |
-
</div>';
|
176 |
-
}
|
177 |
-
echo $out;
|
178 |
-
}
|
179 |
-
|
180 |
-
/** ************************************************************************
|
181 |
-
* In this function the data for the display is prepared.
|
182 |
-
*
|
183 |
-
* @param string $date_range Date range for displaying the events
|
184 |
-
* @uses $this->_column_headers
|
185 |
-
* @uses $this->items
|
186 |
-
* @uses $this->get_columns()
|
187 |
-
* @uses $this->get_sortable_columns()
|
188 |
-
* @uses $this->get_pagenum()
|
189 |
-
* @uses $this->set_pagination_args()
|
190 |
-
***************************************************************************/
|
191 |
-
public function prepare_items() {
|
192 |
-
$per_page = 20;
|
193 |
-
// define column headers
|
194 |
-
$columns = $this->get_columns();
|
195 |
-
$hidden = array();
|
196 |
-
$sortable = $this->get_sortable_columns();
|
197 |
-
$this->_column_headers = array($columns, $hidden, $sortable);
|
198 |
-
// handle the bulk actions
|
199 |
-
$this->process_bulk_action();
|
200 |
-
// get the required event data
|
201 |
-
$data = $this->get_events();
|
202 |
-
// setup pagination
|
203 |
-
$current_page = $this->get_pagenum();
|
204 |
-
$total_items = count($data);
|
205 |
-
$data = array_slice($data, (($current_page-1)*$per_page), $per_page);
|
206 |
-
$this->set_pagination_args(array(
|
207 |
-
'total_items' => $total_items,
|
208 |
-
'per_page' => $per_page,
|
209 |
-
'total_pages' => ceil($total_items/$per_page)
|
210 |
-
));
|
211 |
-
// setup items which are used by the rest of the class
|
212 |
-
$this->items = $data;
|
213 |
-
}
|
214 |
-
|
215 |
-
private function set_args() {
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
$
|
240 |
-
}
|
241 |
-
//
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
break;
|
254 |
-
case 'location' :
|
255 |
-
array_unshift($sort_array, 'location '.$order);
|
256 |
-
break;
|
257 |
-
case 'pub_user' :
|
258 |
-
array_unshift($sort_array, 'pub_user '.$order);
|
259 |
-
break;
|
260 |
case 'pub_date' :
|
261 |
array_unshift($sort_array, 'pub_date '.$order);
|
262 |
-
break;
|
263 |
-
}
|
264 |
-
// get and return events in the correct order
|
265 |
-
return $this->db->get_events($this->args['actual_date'], $this->args['actual_cat'], 0, $sort_array);
|
266 |
-
}
|
267 |
-
|
268 |
/** ************************************************************************
|
269 |
-
* In this function the start date, the end date and time is formated for
|
270 |
* the output.
|
271 |
*
|
272 |
-
* @param string $start_date The start date of the event
|
273 |
-
* @param string $end_date The end date of the event
|
274 |
* @param string $time The start time of the event
|
275 |
-
***************************************************************************/
|
276 |
-
private function format_event_date($start_date, $end_date, $start_time) {
|
277 |
-
$out = '<span style="white-space:nowrap;">';
|
278 |
-
// start date
|
279 |
-
$out .= mysql2date(__('Y/m/d'), $start_date);
|
280 |
-
// end date for multiday event
|
281 |
-
if($start_date !== $end_date) {
|
282 |
-
$out .= ' -<br />'.mysql2date(__('Y/m/d'), $end_date);
|
283 |
-
}
|
284 |
-
// event time
|
285 |
-
if('' !== $start_time) {
|
286 |
-
// set time format if a known format is available, else only show the text
|
287 |
-
$date_array = date_parse($start_time);
|
288 |
-
if(empty($date_array['errors']) && is_numeric($date_array['hour']) && is_numeric($date_array['minute'])) {
|
289 |
-
$start_time = mysql2date(get_option('time_format'), $start_time);
|
290 |
-
}
|
291 |
-
$out .= '<br />
|
292 |
<span class="time">'.esc_html($start_time).'</span>';
|
293 |
-
}
|
294 |
-
$out .= '</span>';
|
295 |
return $out;
|
296 |
-
}
|
297 |
-
|
298 |
-
private function format_pub_date($pub_date) {
|
299 |
// similar output than for post or pages
|
300 |
$timestamp = strtotime($pub_date);
|
301 |
$time_diff = time() - $timestamp;
|
302 |
if($time_diff >= 0 && $time_diff < 24*60*60) {
|
303 |
-
$date = sprintf(__('%s ago','
|
304 |
}
|
305 |
else {
|
306 |
$date = mysql2date(__('Y/m/d'), $pub_date);
|
307 |
}
|
308 |
-
$datetime = mysql2date(__('Y/m/d g:i:s A'), $pub_date);
|
309 |
-
return '<abbr title="'.$datetime.'">'.$date.'</abbr>';
|
310 |
-
}
|
311 |
-
}
|
312 |
-
|
1 |
+
<?php
|
2 |
if(!defined('ABSPATH')) {
|
3 |
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
// load the base class (WP_List_Table class isn't automatically available)
|
7 |
+
if(!class_exists('WP_List_Table')){
|
8 |
+
require_once(ABSPATH.'wp-admin/includes/class-wp-list-table.php');
|
9 |
+
}
|
10 |
+
require_once(EL_PATH.'includes/db.php');
|
11 |
+
require_once(EL_PATH.'includes/categories.php');
|
12 |
+
require_once(EL_PATH.'includes/filterbar.php');
|
13 |
+
|
14 |
+
class EL_Event_Table extends WP_List_Table {
|
15 |
+
private $db;
|
16 |
+
private $categories;
|
17 |
+
private $filterbar;
|
18 |
+
private $args;
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
$this->db = &EL_Db::get_instance();
|
22 |
+
$this->categories = &EL_Categories::get_instance();
|
23 |
+
$this->filterbar = &EL_Filterbar::get_instance();
|
24 |
+
$this->set_args();
|
25 |
+
|
26 |
+
global $status, $page;
|
27 |
+
//Set parent defaults
|
28 |
+
parent::__construct(array(
|
29 |
+
'singular' => __('event','event-list'), //singular name of the listed records
|
30 |
+
'plural' => __('events','event-list'), //plural name of the listed records
|
31 |
+
'ajax' => false //does this table support ajax?
|
32 |
+
));
|
33 |
+
}
|
34 |
+
|
35 |
+
/** ************************************************************************
|
36 |
+
* This method is called when the parent class can't find a method
|
37 |
+
* specifically build for a given column.
|
38 |
+
*
|
39 |
+
* @param array $item A singular item (one full row's worth of data)
|
40 |
+
* @param array $column_name The name/slug of the column to be processed
|
41 |
+
* @return string Text or HTML to be placed inside the column <td>
|
42 |
+
***************************************************************************/
|
43 |
+
protected function column_default($item, $column_name) {
|
44 |
+
switch($column_name) {
|
45 |
+
case 'date' :
|
46 |
+
return $this->format_event_date($item->start_date, $item->end_date, $item->time);
|
47 |
+
case 'details' :
|
48 |
+
return '<div>'.$this->db->truncate(wpautop($item->details), 80).'</div>';
|
49 |
+
case 'pub_user' :
|
50 |
+
return get_userdata($item->pub_user)->user_login;
|
51 |
case 'pub_date' :
|
52 |
+
return $this->format_pub_date($item->pub_date);
|
53 |
+
case 'categories' :
|
54 |
+
return esc_html($this->categories->convert_db_string($item->$column_name));
|
55 |
+
default :
|
56 |
+
return esc_html($item->$column_name);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
/** ************************************************************************
|
61 |
+
* This is a custom column method and is responsible for what is
|
62 |
+
* rendered in any column with a name/slug of 'title'.
|
63 |
+
*
|
64 |
+
* @see WP_List_Table::::single_row_columns()
|
65 |
+
* @param array $item A singular item (one full row's worth of data)
|
66 |
+
* @return string Text to be placed inside the column <td> (movie title only)
|
67 |
+
***************************************************************************/
|
68 |
+
protected function column_title($item) {
|
69 |
+
//Prepare Columns
|
70 |
+
$actions = array(
|
71 |
+
'edit' => '<a href="?page='.$_REQUEST['page'].'&id='.$item->id.'&action=edit">'.__('Edit','event-list').'</a>',
|
72 |
+
'duplicate' => '<a href="?page=el_admin_new&id='.$item->id.'&action=copy">'.__('Duplicate','event-list').'</a>',
|
73 |
+
'delete' => '<a href="#" onClick="eventlist_deleteEvent('.$item->id.');return false;">'.__('Delete','event-list').'</a>');
|
74 |
+
|
75 |
+
//Return the title contents
|
76 |
+
return sprintf('<b>%1$s</b> <span style="color:silver">(id:%2$s)</span>%3$s',
|
77 |
+
esc_html($item->title),
|
78 |
+
$item->id,
|
79 |
+
$this->row_actions($actions));
|
80 |
+
}
|
81 |
+
|
82 |
+
/** ************************************************************************
|
83 |
+
* Required if displaying checkboxes or using bulk actions! The 'cb' column
|
84 |
+
* is given special treatment when columns are processed.
|
85 |
+
*
|
86 |
+
* @see WP_List_Table::::single_row_columns()
|
87 |
+
* @param array $item A singular item (one full row's worth of data)
|
88 |
+
* @return string Text to be placed inside the column <td> (movie title only)
|
89 |
+
***************************************************************************/
|
90 |
+
protected function column_cb($item) {
|
91 |
+
//Let's simply repurpose the table's singular label ("event")
|
92 |
+
//The value of the checkbox should be the record's id
|
93 |
+
return '<input type="checkbox" name="id[]" value="'.$item->id.'" />';
|
94 |
+
}
|
95 |
+
|
96 |
+
/** ************************************************************************
|
97 |
+
* This method dictates the table's columns and titles. This should returns
|
98 |
+
* an array where the key is the column slug (and class) and the value is
|
99 |
+
* the column's title text.
|
100 |
+
*
|
101 |
+
* @see WP_List_Table::::single_row_columns()
|
102 |
+
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
|
103 |
+
***************************************************************************/
|
104 |
+
public function get_columns() {
|
105 |
+
return array(
|
106 |
+
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
|
107 |
+
'date' => __('Date','event-list'),
|
108 |
+
'title' => __('Title','event-list'),
|
109 |
+
'location' => __('Location','event-list'),
|
110 |
+
'details' => __('Details','event-list'),
|
111 |
+
'categories' => __('Categories','event-list'),
|
112 |
+
'pub_user' => __('Author','event-list'),
|
113 |
+
'pub_date' => __('Published','event-list')
|
114 |
+
);
|
115 |
+
}
|
116 |
+
|
117 |
+
/** ************************************************************************
|
118 |
+
* If you want one or more columns to be sortable (ASC/DESC toggle), you
|
119 |
+
* will need to register it here. This should return an array where the key
|
120 |
+
* is the column that needs to be sortable, and the value is db column to
|
121 |
+
* sort by.
|
122 |
+
*
|
123 |
+
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
|
124 |
+
***************************************************************************/
|
125 |
+
public function get_sortable_columns() {
|
126 |
+
$sortable_columns = array(
|
127 |
+
'date' => array('date', true), //true means its already sorted
|
128 |
+
'title' => array('title', false),
|
129 |
+
'location' => array('location', false),
|
130 |
+
'pub_user' => array('pub_user', false),
|
131 |
+
'pub_date' => array('pub_date', false)
|
132 |
+
);
|
133 |
+
return $sortable_columns;
|
134 |
+
}
|
135 |
+
|
136 |
+
/** ************************************************************************
|
137 |
+
* Optional. If you need to include bulk actions in your list table, this is
|
138 |
+
* the place to define them. Bulk actions are an associative array in the format
|
139 |
+
* 'slug'=>'Visible Title'
|
140 |
+
* If this method returns an empty value, no bulk action will be rendered.
|
141 |
+
*
|
142 |
+
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
|
143 |
+
****************************************************************************/
|
144 |
+
public function get_bulk_actions() {
|
145 |
+
$actions = array(
|
146 |
+
'delete_bulk' => __('Delete','event-list')
|
147 |
+
);
|
148 |
+
return $actions;
|
149 |
+
}
|
150 |
+
|
151 |
+
/** ************************************************************************
|
152 |
+
* Function to handle the process of the bulk actions.
|
153 |
+
*
|
154 |
+
* @see $this->prepare_items()
|
155 |
+
***************************************************************************/
|
156 |
+
private function process_bulk_action() {
|
157 |
+
//Detect when a bulk action is being triggered...
|
158 |
+
if('delete_bulk'===$this->current_action()) {
|
159 |
+
// Show confirmation window before deleting
|
160 |
+
echo '<script language="JavaScript">eventlist_deleteEvent ("'.implode(', ', $_GET['id']).'");</script>';
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
public function extra_tablenav($which) {
|
165 |
+
$out = '';
|
166 |
+
// add filter elements
|
167 |
+
if('top' === $which) {
|
168 |
+
$out = '
|
169 |
+
<div class="alignleft actions">';
|
170 |
+
$out .= $this->filterbar->show_years('?page=el_admin_main', $this->args, 'dropdown', 'admin', array('show_past'=>true));
|
171 |
+
$out .= $this->filterbar->show_cats('?page=el_admin_main', $this->args, 'dropdown', 'admin');
|
172 |
+
$out .= '
|
173 |
+
<input type="hidden" name="noheader" value="true" />
|
174 |
+
<input id="event-query-submit" class="button" type="submit" name ="filter" value="'.__('Filter','event-list').'" />
|
175 |
+
</div>';
|
176 |
+
}
|
177 |
+
echo $out;
|
178 |
+
}
|
179 |
+
|
180 |
+
/** ************************************************************************
|
181 |
+
* In this function the data for the display is prepared.
|
182 |
+
*
|
183 |
+
* @param string $date_range Date range for displaying the events
|
184 |
+
* @uses $this->_column_headers
|
185 |
+
* @uses $this->items
|
186 |
+
* @uses $this->get_columns()
|
187 |
+
* @uses $this->get_sortable_columns()
|
188 |
+
* @uses $this->get_pagenum()
|
189 |
+
* @uses $this->set_pagination_args()
|
190 |
+
***************************************************************************/
|
191 |
+
public function prepare_items() {
|
192 |
+
$per_page = 20;
|
193 |
+
// define column headers
|
194 |
+
$columns = $this->get_columns();
|
195 |
+
$hidden = array();
|
196 |
+
$sortable = $this->get_sortable_columns();
|
197 |
+
$this->_column_headers = array($columns, $hidden, $sortable);
|
198 |
+
// handle the bulk actions
|
199 |
+
$this->process_bulk_action();
|
200 |
+
// get the required event data
|
201 |
+
$data = $this->get_events();
|
202 |
+
// setup pagination
|
203 |
+
$current_page = $this->get_pagenum();
|
204 |
+
$total_items = count($data);
|
205 |
+
$data = array_slice($data, (($current_page-1)*$per_page), $per_page);
|
206 |
+
$this->set_pagination_args(array(
|
207 |
+
'total_items' => $total_items,
|
208 |
+
'per_page' => $per_page,
|
209 |
+
'total_pages' => ceil($total_items/$per_page)
|
210 |
+
));
|
211 |
+
// setup items which are used by the rest of the class
|
212 |
+
$this->items = $data;
|
213 |
+
}
|
214 |
+
|
215 |
+
private function set_args() {
|
216 |
+
$this->args = array('date_filter' => 'all',
|
217 |
+
'cat_filter' => 'all',
|
218 |
+
'sc_id_for_url' => '',
|
219 |
+
'actual_date' => isset($_GET['date']) ? $_GET['date'] : 'upcoming',
|
220 |
+
'actual_cat' => isset($_GET['cat']) ? $_GET['cat'] : 'all',
|
221 |
+
);
|
222 |
+
}
|
223 |
+
|
224 |
+
private function get_events() {
|
225 |
+
// define sort_array
|
226 |
+
$order = 'ASC';
|
227 |
+
if(isset($_GET['order']) && $_GET['order'] === 'desc') {
|
228 |
+
$order = 'DESC';
|
229 |
+
}
|
230 |
+
$orderby = '';
|
231 |
+
if(isset($_GET['orderby'])){
|
232 |
+
$orderby = $_GET['orderby'];
|
233 |
+
}
|
234 |
+
// set standard sort according date ASC, only when date should be sorted desc, DESC should be used
|
235 |
+
if($orderby == 'date' && $order == 'DESC') {
|
236 |
+
$sort_array = array('start_date DESC', 'time DESC', 'end_date DESC');
|
237 |
+
}
|
238 |
+
else {
|
239 |
+
$sort_array = array('start_date ASC', 'time ASC', 'end_date ASC');
|
240 |
+
}
|
241 |
+
// add primary order column to the front of the standard sort array
|
242 |
+
switch($orderby)
|
243 |
+
{
|
244 |
+
case 'title' :
|
245 |
+
array_unshift($sort_array, 'title '.$order);
|
246 |
+
break;
|
247 |
+
case 'location' :
|
248 |
+
array_unshift($sort_array, 'location '.$order);
|
249 |
+
break;
|
250 |
+
case 'pub_user' :
|
251 |
+
array_unshift($sort_array, 'pub_user '.$order);
|
252 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
case 'pub_date' :
|
254 |
array_unshift($sort_array, 'pub_date '.$order);
|
255 |
+
break;
|
256 |
+
}
|
257 |
+
// get and return events in the correct order
|
258 |
+
return $this->db->get_events($this->args['actual_date'], $this->args['actual_cat'], 0, $sort_array);
|
259 |
+
}
|
260 |
+
|
261 |
/** ************************************************************************
|
262 |
+
* In this function the start date, the end date and time is formated for
|
263 |
* the output.
|
264 |
*
|
265 |
+
* @param string $start_date The start date of the event
|
266 |
+
* @param string $end_date The end date of the event
|
267 |
* @param string $time The start time of the event
|
268 |
+
***************************************************************************/
|
269 |
+
private function format_event_date($start_date, $end_date, $start_time) {
|
270 |
+
$out = '<span style="white-space:nowrap;">';
|
271 |
+
// start date
|
272 |
+
$out .= mysql2date(__('Y/m/d'), $start_date);
|
273 |
+
// end date for multiday event
|
274 |
+
if($start_date !== $end_date) {
|
275 |
+
$out .= ' -<br />'.mysql2date(__('Y/m/d'), $end_date);
|
276 |
+
}
|
277 |
+
// event time
|
278 |
+
if('' !== $start_time) {
|
279 |
+
// set time format if a known format is available, else only show the text
|
280 |
+
$date_array = date_parse($start_time);
|
281 |
+
if(empty($date_array['errors']) && is_numeric($date_array['hour']) && is_numeric($date_array['minute'])) {
|
282 |
+
$start_time = mysql2date(get_option('time_format'), $start_time);
|
283 |
+
}
|
284 |
+
$out .= '<br />
|
285 |
<span class="time">'.esc_html($start_time).'</span>';
|
286 |
+
}
|
287 |
+
$out .= '</span>';
|
288 |
return $out;
|
289 |
+
}
|
290 |
+
|
291 |
+
private function format_pub_date($pub_date) {
|
292 |
// similar output than for post or pages
|
293 |
$timestamp = strtotime($pub_date);
|
294 |
$time_diff = time() - $timestamp;
|
295 |
if($time_diff >= 0 && $time_diff < 24*60*60) {
|
296 |
+
$date = sprintf(__('%s ago','event-list'), human_time_diff($timestamp));
|
297 |
}
|
298 |
else {
|
299 |
$date = mysql2date(__('Y/m/d'), $pub_date);
|
300 |
}
|
301 |
+
$datetime = mysql2date(__('Y/m/d g:i:s A'), $pub_date);
|
302 |
+
return '<abbr title="'.$datetime.'">'.$date.'</abbr>';
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
event-list.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
Plugin Name: Event List
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/event-list/
|
5 |
Description: Manage your events and show them in a list view on your site.
|
6 |
-
Version: 0.7.
|
7 |
Author: Michael Burtscher
|
8 |
Author URI: http://wordpress.org/extend/plugins/event-list/
|
9 |
License: GPLv2
|
10 |
|
11 |
A plugin for the blogging MySQL/PHP-based WordPress.
|
12 |
-
Copyright 2012-
|
13 |
|
14 |
This program is free software; you can redistribute it and/or
|
15 |
modify it under the terms of the GNUs General Public License
|
@@ -37,6 +37,7 @@ require_once(EL_PATH.'includes/options.php');
|
|
37 |
|
38 |
// MAIN PLUGIN CLASS
|
39 |
class Event_List {
|
|
|
40 |
private $shortcode;
|
41 |
private $styles_loaded;
|
42 |
|
@@ -45,6 +46,7 @@ class Event_List {
|
|
45 |
* Initializes the plugin.
|
46 |
*/
|
47 |
public function __construct() {
|
|
|
48 |
$this->shortcode = null;
|
49 |
$this->styles_loaded = false;
|
50 |
|
@@ -55,12 +57,8 @@ class Event_List {
|
|
55 |
add_shortcode('event-list', array(&$this, 'shortcode_event_list'));
|
56 |
// Register widgets
|
57 |
add_action('widgets_init', array(&$this, 'widget_init'));
|
58 |
-
//
|
59 |
-
|
60 |
-
if($options->get('el_enable_feed')) {
|
61 |
-
include_once(EL_PATH.'includes/feed.php');
|
62 |
-
$feed = EL_Feed::get_instance();
|
63 |
-
}
|
64 |
|
65 |
// ADMIN PAGE:
|
66 |
if(is_admin()) {
|
@@ -77,7 +75,7 @@ class Event_List {
|
|
77 |
} // end constructor
|
78 |
|
79 |
public function load_textdomain() {
|
80 |
-
load_plugin_textdomain('
|
81 |
}
|
82 |
|
83 |
public function shortcode_event_list($atts) {
|
@@ -93,6 +91,13 @@ class Event_List {
|
|
93 |
return $this->shortcode->show_html($atts);
|
94 |
}
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
public function widget_init() {
|
97 |
// Widget "event-list"
|
98 |
require_once(EL_PATH.'includes/widget.php');
|
3 |
Plugin Name: Event List
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/event-list/
|
5 |
Description: Manage your events and show them in a list view on your site.
|
6 |
+
Version: 0.7.1
|
7 |
Author: Michael Burtscher
|
8 |
Author URI: http://wordpress.org/extend/plugins/event-list/
|
9 |
License: GPLv2
|
10 |
|
11 |
A plugin for the blogging MySQL/PHP-based WordPress.
|
12 |
+
Copyright 2012-2015 Michael Burtscher
|
13 |
|
14 |
This program is free software; you can redistribute it and/or
|
15 |
modify it under the terms of the GNUs General Public License
|
37 |
|
38 |
// MAIN PLUGIN CLASS
|
39 |
class Event_List {
|
40 |
+
private $options;
|
41 |
private $shortcode;
|
42 |
private $styles_loaded;
|
43 |
|
46 |
* Initializes the plugin.
|
47 |
*/
|
48 |
public function __construct() {
|
49 |
+
$this->options = EL_Options::get_instance();
|
50 |
$this->shortcode = null;
|
51 |
$this->styles_loaded = false;
|
52 |
|
57 |
add_shortcode('event-list', array(&$this, 'shortcode_event_list'));
|
58 |
// Register widgets
|
59 |
add_action('widgets_init', array(&$this, 'widget_init'));
|
60 |
+
// Register RSS feed
|
61 |
+
add_action('init', array(&$this, 'feed_init'), 10);
|
|
|
|
|
|
|
|
|
62 |
|
63 |
// ADMIN PAGE:
|
64 |
if(is_admin()) {
|
75 |
} // end constructor
|
76 |
|
77 |
public function load_textdomain() {
|
78 |
+
load_plugin_textdomain('event-list', false, dirname(plugin_basename(__FILE__)).'/languages');
|
79 |
}
|
80 |
|
81 |
public function shortcode_event_list($atts) {
|
91 |
return $this->shortcode->show_html($atts);
|
92 |
}
|
93 |
|
94 |
+
public function feed_init() {
|
95 |
+
if($this->options->get('el_enable_feed')) {
|
96 |
+
include_once(EL_PATH.'includes/feed.php');
|
97 |
+
EL_Feed::get_instance();
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
public function widget_init() {
|
102 |
// Widget "event-list"
|
103 |
require_once(EL_PATH.'includes/widget.php');
|
includes/categories.php
CHANGED
@@ -280,21 +280,34 @@ class EL_Categories {
|
|
280 |
return $this->cat_array[$slug];
|
281 |
}
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
}
|
287 |
-
$slug_array = explode('|', substr( $
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
|
|
|
|
|
|
297 |
}
|
298 |
-
return implode($glue, $
|
299 |
}
|
300 |
}
|
280 |
return $this->cat_array[$slug];
|
281 |
}
|
282 |
|
283 |
+
/**
|
284 |
+
* Convert the slugs-string (e.g. "|slug-1|slug-2|") to another string or a slug array
|
285 |
+
*
|
286 |
+
* @param string $slug_string The slug string to convert
|
287 |
+
* @param string $return_type The type to return. Possible values are:
|
288 |
+
* "name_string" ... to return a string with the category names
|
289 |
+
* "slug_string" ... to return a string with the category slugs
|
290 |
+
* "slug_array" ... to return an array with the category slugs
|
291 |
+
* @param string $glue The glue or separator when a string should be returned
|
292 |
+
*/
|
293 |
+
public function convert_db_string($slug_string, $return_type='name_string', $glue=', ') {
|
294 |
+
if(2 >= strlen($slug_string)) {
|
295 |
+
return ('slug_array' == $return_type) ? array() : '';
|
296 |
}
|
297 |
+
$slug_array = explode('|', substr( $slug_string, 1, -1));
|
298 |
+
switch($return_type) {
|
299 |
+
case 'slug_array':
|
300 |
+
return $slug_array;
|
301 |
+
case $return_type:
|
302 |
+
$string_array = $slug_array;
|
303 |
+
break;
|
304 |
+
default: // name_string
|
305 |
+
$string_array = array();
|
306 |
+
foreach($slug_array as $slug) {
|
307 |
+
$string_array[] = $this->cat_array[$slug]['name'];
|
308 |
+
}
|
309 |
+
sort($string_array, SORT_STRING);
|
310 |
}
|
311 |
+
return implode($glue, $string_array);
|
312 |
}
|
313 |
}
|
includes/css/event-list.css
CHANGED
@@ -60,6 +60,10 @@ li.event {
|
|
60 |
padding-bottom: 0.3em;
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
63 |
.multi-day {
|
64 |
margin: 0 0 0 7.5em;
|
65 |
}
|
60 |
padding-bottom: 0.3em;
|
61 |
}
|
62 |
|
63 |
+
.event-info {
|
64 |
+
display: block !important;
|
65 |
+
}
|
66 |
+
|
67 |
.multi-day {
|
68 |
margin: 0 0 0 7.5em;
|
69 |
}
|
includes/db.php
CHANGED
@@ -67,32 +67,14 @@ class EL_Db {
|
|
67 |
return $wpdb->get_row( $sql );
|
68 |
}
|
69 |
|
70 |
-
public function
|
71 |
global $wpdb;
|
72 |
-
$
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
public function get_event_date( $event ) {
|
77 |
-
global $wpdb;
|
78 |
-
if( $event === 'first' ) {
|
79 |
-
// first year
|
80 |
-
$search_date = 'start_date';
|
81 |
-
$sql = 'SELECT DISTINCT '.$search_date.' FROM '.$this->table.' WHERE '.$search_date.' != "0000-00-00" ORDER BY '.$search_date.' ASC LIMIT 1';
|
82 |
-
}
|
83 |
-
else {
|
84 |
-
// last year
|
85 |
-
$search_date = 'end_date';
|
86 |
-
$sql = 'SELECT DISTINCT '.$search_date.' FROM '.$this->table.' WHERE '.$search_date.' != "0000-00-00" ORDER BY '.$search_date.' DESC LIMIT 1';
|
87 |
-
}
|
88 |
-
$date = $wpdb->get_results($sql, ARRAY_A);
|
89 |
-
if( !empty( $date ) ) {
|
90 |
-
$datestring = substr($date[0][$search_date], 0, 4);
|
91 |
-
}
|
92 |
-
else {
|
93 |
-
$datestring = date('Y', current_time('timestamp'));
|
94 |
}
|
95 |
-
|
|
|
96 |
}
|
97 |
|
98 |
public function get_num_events() {
|
67 |
return $wpdb->get_row( $sql );
|
68 |
}
|
69 |
|
70 |
+
public function get_distinct_event_data($search_string, $date_filter, $cat_filter, $order='asc') {
|
71 |
global $wpdb;
|
72 |
+
$where_string = $this->get_sql_filter_string($date_filter, $cat_filter);
|
73 |
+
if('desc' != $order) {
|
74 |
+
$order = 'asc'; // standard order is ASC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
+
$sql = 'SELECT DISTINCT '.$search_string.' as data FROM '.$this->table.' WHERE '.$where_string.' order by data '.$order;
|
77 |
+
return $wpdb->get_results($sql);
|
78 |
}
|
79 |
|
80 |
public function get_num_events() {
|
includes/feed.php
CHANGED
@@ -17,7 +17,6 @@ class EL_Feed {
|
|
17 |
// Create class instance if required
|
18 |
if(!isset(self::$instance)) {
|
19 |
self::$instance = new self();
|
20 |
-
self::$instance->init();
|
21 |
}
|
22 |
// Return class instance
|
23 |
return self::$instance;
|
@@ -26,10 +25,11 @@ class EL_Feed {
|
|
26 |
private function __construct() {
|
27 |
$this->db = EL_Db::get_instance();
|
28 |
$this->options = EL_Options::get_instance();
|
|
|
29 |
}
|
30 |
|
31 |
public function init() {
|
32 |
-
|
33 |
if($this->options->get('el_head_feed_link')) {
|
34 |
add_action('wp_head', array(&$this, 'print_head_feed_link'));
|
35 |
}
|
@@ -84,10 +84,6 @@ class EL_Feed {
|
|
84 |
</rss>';
|
85 |
}
|
86 |
|
87 |
-
public function add_eventlist_feed() {
|
88 |
-
add_feed($this->options->get('el_feed_name'), array(&$this, 'print_eventlist_feed'));
|
89 |
-
}
|
90 |
-
|
91 |
public function eventlist_feed_url() {
|
92 |
if(get_option('permalink_structure')) {
|
93 |
$feed_link = get_bloginfo('url').'/feed/';
|
@@ -99,7 +95,7 @@ class EL_Feed {
|
|
99 |
}
|
100 |
|
101 |
public function update_feed_rewrite_status() {
|
102 |
-
$feeds = array_keys(get_option('rewrite_rules'), 'index.php?&feed=$matches[1]');
|
103 |
$feed_rewrite_status = (0 < count(preg_grep('@[(\|]'.$this->options->get('el_feed_name').'[\|)]@', $feeds))) ? true : false;
|
104 |
if('1' == $this->options->get('el_enable_feed') && !$feed_rewrite_status) {
|
105 |
// add eventlist feed to rewrite rules
|
17 |
// Create class instance if required
|
18 |
if(!isset(self::$instance)) {
|
19 |
self::$instance = new self();
|
|
|
20 |
}
|
21 |
// Return class instance
|
22 |
return self::$instance;
|
25 |
private function __construct() {
|
26 |
$this->db = EL_Db::get_instance();
|
27 |
$this->options = EL_Options::get_instance();
|
28 |
+
$this->init();
|
29 |
}
|
30 |
|
31 |
public function init() {
|
32 |
+
add_feed($this->options->get('el_feed_name'), array(&$this, 'print_eventlist_feed'));
|
33 |
if($this->options->get('el_head_feed_link')) {
|
34 |
add_action('wp_head', array(&$this, 'print_head_feed_link'));
|
35 |
}
|
84 |
</rss>';
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
87 |
public function eventlist_feed_url() {
|
88 |
if(get_option('permalink_structure')) {
|
89 |
$feed_link = get_bloginfo('url').'/feed/';
|
95 |
}
|
96 |
|
97 |
public function update_feed_rewrite_status() {
|
98 |
+
$feeds = array_keys((array)get_option('rewrite_rules'), 'index.php?&feed=$matches[1]');
|
99 |
$feed_rewrite_status = (0 < count(preg_grep('@[(\|]'.$this->options->get('el_feed_name').'[\|)]@', $feeds))) ? true : false;
|
100 |
if('1' == $this->options->get('el_enable_feed') && !$feed_rewrite_status) {
|
101 |
// add eventlist feed to rewrite rules
|
includes/filterbar.php
CHANGED
@@ -4,14 +4,12 @@ if(!defined('ABSPATH')) {
|
|
4 |
}
|
5 |
|
6 |
require_once( EL_PATH.'includes/db.php' );
|
7 |
-
//require_once( EL_PATH.'includes/options.php' );
|
8 |
require_once( EL_PATH.'includes/categories.php' );
|
9 |
|
10 |
// This class handles the navigation and filter bar
|
11 |
class EL_Filterbar {
|
12 |
private static $instance;
|
13 |
private $db;
|
14 |
-
// private $options;
|
15 |
private $categories;
|
16 |
|
17 |
public static function &get_instance() {
|
@@ -25,12 +23,12 @@ class EL_Filterbar {
|
|
25 |
|
26 |
private function __construct() {
|
27 |
$this->db = &EL_Db::get_instance();
|
28 |
-
// $this->options = &EL_Options::get_instance();
|
29 |
$this->categories = &EL_Categories::get_instance();
|
30 |
}
|
31 |
|
32 |
// main function to show the rendered HTML output
|
33 |
public function show($url, &$args) {
|
|
|
34 |
$out = '
|
35 |
<style type="text/css">
|
36 |
.filterbar { display:table; width:100% }
|
@@ -89,89 +87,72 @@ class EL_Filterbar {
|
|
89 |
}
|
90 |
|
91 |
public function show_years($url, &$args, $type='hlist', $subtype='std', $options=array()) {
|
92 |
-
$
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
94 |
// prepare displayed elements
|
95 |
$elements = array();
|
96 |
-
if(
|
97 |
-
$elements[] = $this->all_element('
|
98 |
}
|
99 |
-
if(
|
100 |
$elements[] = $this->upcoming_element();
|
101 |
}
|
102 |
-
if(
|
103 |
$elements[] = $this->past_element();
|
104 |
}
|
105 |
-
$
|
106 |
-
$
|
107 |
-
|
108 |
-
for($year=$first_year; $year<=$last_year; $year++) {
|
109 |
-
$elements[] = array('slug'=>$year, 'name'=>$year);
|
110 |
-
}
|
111 |
-
}
|
112 |
-
else {
|
113 |
-
for($year=$last_year; $year>=$first_year; $year--) {
|
114 |
-
$elements[] = array('slug'=>$year, 'name'=>$year);
|
115 |
-
}
|
116 |
-
}
|
117 |
-
// filter elements acc. date_filter (if only OR connections are used)
|
118 |
-
if('all' !== $args['date_filter'] && !strpos($args['cat_filter'], '&')) {
|
119 |
-
$tmp_filter = str_replace(array(' ', '(', ')'), '', $args['date_filter']);
|
120 |
-
$tmp_filter = str_replace(',', '|', $tmp_filter);
|
121 |
-
$filter_array = explode('|', $tmp_filter);
|
122 |
-
foreach($elements as $id => $element) {
|
123 |
-
if(!in_array($element['slug'], $filter_array) && 'all' !== $element['slug'] && 'upcoming' !== $element['slug'] && 'past' !== $element['slug']) {
|
124 |
-
unset($elements[$id]);
|
125 |
-
}
|
126 |
-
}
|
127 |
-
}
|
128 |
-
// set selection
|
129 |
-
if(is_numeric($args['event_id'])) {
|
130 |
-
$actual = null;
|
131 |
-
}
|
132 |
-
elseif('all' === $args['actual_date'] || 'upcoming' === $args['actual_date'] || 'past' === $args['actual_date'] || is_numeric($args['actual_date'])) {
|
133 |
-
$actual = $args['actual_date'];
|
134 |
-
}
|
135 |
-
else {
|
136 |
-
$actual = null;
|
137 |
}
|
|
|
138 |
if('dropdown' === $type) {
|
139 |
-
return $this->show_dropdown($elements,
|
140 |
}
|
141 |
else {
|
142 |
-
return $this->show_hlist($elements, $url,
|
143 |
}
|
144 |
}
|
145 |
|
146 |
-
|
147 |
public function show_months($url, &$args, $type='dropdown', $subtype='std', $options=array()) {
|
148 |
-
$
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
-
|
155 |
-
$
|
156 |
}
|
157 |
-
|
158 |
-
$
|
159 |
}
|
160 |
-
$event_months = $this->db->
|
161 |
-
foreach($event_months as $
|
162 |
-
$
|
|
|
163 |
}
|
|
|
164 |
if('hlist' === $type) {
|
165 |
-
return $this->show_hlist($elements, $url,
|
166 |
}
|
167 |
else {
|
168 |
-
return $this->show_dropdown($elements,
|
169 |
}
|
170 |
}
|
171 |
|
172 |
public function show_daterange($url, &$args, $type='hlist', $subtype='std', $options) {
|
173 |
-
$args = $this->parse_args($args);
|
174 |
-
$argname = 'date'.$args['sc_id_for_url'];
|
175 |
// prepare displayed elements
|
176 |
if(isset($options['item_order'])) {
|
177 |
$items = explode('&', $options['item_order']);
|
@@ -184,7 +165,7 @@ class EL_Filterbar {
|
|
184 |
// show all
|
185 |
switch($item) {
|
186 |
case 'all':
|
187 |
-
$elements[] = $this->all_element();
|
188 |
break;
|
189 |
case 'upcoming':
|
190 |
$elements[] = $this->upcoming_element();
|
@@ -193,54 +174,54 @@ class EL_Filterbar {
|
|
193 |
$elements[] = $this->past_element();
|
194 |
}
|
195 |
}
|
196 |
-
//
|
197 |
-
if(is_numeric($args['event_id'])) {
|
198 |
-
$actual = null;
|
199 |
-
}
|
200 |
-
elseif('all' === $args['actual_date'] || 'upcoming' === $args['actual_date'] || 'past' === $args['actual_date']) {
|
201 |
-
$actual = $args['actual_date'];
|
202 |
-
}
|
203 |
-
else {
|
204 |
-
$actual = null;
|
205 |
-
}
|
206 |
if('dropdown' === $type) {
|
207 |
-
return $this->show_dropdown($elements,
|
208 |
}
|
209 |
else {
|
210 |
-
return $this->show_hlist($elements, $url,
|
211 |
}
|
212 |
}
|
213 |
|
214 |
public function show_cats($url, &$args, $type='dropdown', $subtype='std', $options=array()) {
|
215 |
-
$
|
216 |
-
|
|
|
|
|
217 |
// prepare displayed elements
|
218 |
-
$cat_array = $this->categories->get_cat_array();
|
219 |
$elements = array();
|
220 |
-
if(
|
221 |
-
$elements[] = $this->all_element('
|
222 |
}
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
$
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
}
|
236 |
}
|
237 |
-
//
|
238 |
-
$
|
|
|
|
|
|
|
239 |
if('hlist' === $type) {
|
240 |
-
return $this->show_hlist($elements, $url,
|
241 |
}
|
242 |
else {
|
243 |
-
return $this->show_dropdown($elements,
|
244 |
}
|
245 |
}
|
246 |
|
@@ -251,7 +232,7 @@ class EL_Filterbar {
|
|
251 |
if(!isset($options['caption'])) {
|
252 |
$options['caption'] = 'Reset';
|
253 |
}
|
254 |
-
return $this->show_link(remove_query_arg($args_to_remove, $url),
|
255 |
}
|
256 |
|
257 |
private function show_hlist($elements, $url, $name, $actual=null) {
|
@@ -296,25 +277,36 @@ class EL_Filterbar {
|
|
296 |
return '<a href="'.esc_url($url).'"'.$class.'>'.esc_html($caption).'</a>';
|
297 |
}
|
298 |
|
299 |
-
private function all_element($
|
300 |
-
if(
|
301 |
-
$name = __('All','
|
|
|
|
|
|
|
302 |
}
|
303 |
return array('slug' => 'all', 'name' => $name);
|
304 |
}
|
305 |
|
306 |
private function upcoming_element() {
|
307 |
-
return array('slug' => 'upcoming', 'name' => __('Upcoming','
|
308 |
}
|
309 |
|
310 |
private function past_element() {
|
311 |
-
return array('slug' => 'past', 'name' => __('Past','
|
312 |
}
|
313 |
|
314 |
-
private function parse_args(
|
315 |
-
$defaults = array('date' => null,
|
|
|
|
|
|
|
|
|
|
|
316 |
$args = wp_parse_args($args, $defaults);
|
317 |
-
|
|
|
|
|
|
|
318 |
}
|
319 |
|
320 |
public function footer_script() {
|
4 |
}
|
5 |
|
6 |
require_once( EL_PATH.'includes/db.php' );
|
|
|
7 |
require_once( EL_PATH.'includes/categories.php' );
|
8 |
|
9 |
// This class handles the navigation and filter bar
|
10 |
class EL_Filterbar {
|
11 |
private static $instance;
|
12 |
private $db;
|
|
|
13 |
private $categories;
|
14 |
|
15 |
public static function &get_instance() {
|
23 |
|
24 |
private function __construct() {
|
25 |
$this->db = &EL_Db::get_instance();
|
|
|
26 |
$this->categories = &EL_Categories::get_instance();
|
27 |
}
|
28 |
|
29 |
// main function to show the rendered HTML output
|
30 |
public function show($url, &$args) {
|
31 |
+
$this->parse_args($args);
|
32 |
$out = '
|
33 |
<style type="text/css">
|
34 |
.filterbar { display:table; width:100% }
|
87 |
}
|
88 |
|
89 |
public function show_years($url, &$args, $type='hlist', $subtype='std', $options=array()) {
|
90 |
+
$default_options = array (
|
91 |
+
'show_all' => 'true',
|
92 |
+
'show_upcoming' => 'true',
|
93 |
+
'show_past' => 'false',
|
94 |
+
'years_order' => 'asc',
|
95 |
+
);
|
96 |
+
$options = wp_parse_args($options, $default_options);
|
97 |
// prepare displayed elements
|
98 |
$elements = array();
|
99 |
+
if('true' == $options['show_all']) {
|
100 |
+
$elements[] = $this->all_element('date', $type);
|
101 |
}
|
102 |
+
if('true' == $options['show_upcoming']) {
|
103 |
$elements[] = $this->upcoming_element();
|
104 |
}
|
105 |
+
if('true' == $options['show_past']) {
|
106 |
$elements[] = $this->past_element();
|
107 |
}
|
108 |
+
$event_years = $this->db->get_distinct_event_data('substr(`start_date`,1,4)', $args['date_filter'],$args['cat_filter'], $options['years_order']);
|
109 |
+
foreach($event_years as $entry) {
|
110 |
+
$elements[] = array('slug'=>$entry->data, 'name'=>$entry->data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
+
// display elements
|
113 |
if('dropdown' === $type) {
|
114 |
+
return $this->show_dropdown($elements, 'date'.$args['sc_id_for_url'], $subtype, $args['actual_date'], $args['sc_id_for_url']);
|
115 |
}
|
116 |
else {
|
117 |
+
return $this->show_hlist($elements, $url, 'date'.$args['sc_id_for_url'], $args['actual_date']);
|
118 |
}
|
119 |
}
|
120 |
|
|
|
121 |
public function show_months($url, &$args, $type='dropdown', $subtype='std', $options=array()) {
|
122 |
+
$default_options = array (
|
123 |
+
'show_all' => 'false',
|
124 |
+
'show_upcoming' => 'false',
|
125 |
+
'show_past' => 'false',
|
126 |
+
'months_order' => 'asc',
|
127 |
+
'date_format' => 'Y-m',
|
128 |
+
);
|
129 |
+
$options = wp_parse_args($options, $default_options);
|
130 |
+
// prepare displayed elements
|
131 |
+
$elements = array();
|
132 |
+
if('true' == $options['show_all']) {
|
133 |
+
$elements[] = $this->all_element('date', $type);
|
134 |
}
|
135 |
+
if('true' == $options['show_upcoming']) {
|
136 |
+
$elements[] = $this->upcoming_element();
|
137 |
}
|
138 |
+
if('true' == $options['show_past']) {
|
139 |
+
$elements[] = $this->past_element();
|
140 |
}
|
141 |
+
$event_months = $this->db->get_distinct_event_data('substr(`start_date`,1,7)', $args['date_filter'],$args['cat_filter'], $options['months_order']);
|
142 |
+
foreach($event_months as $entry) {
|
143 |
+
list($year, $month) = explode('-', $entry->data);
|
144 |
+
$elements[] = array('slug' => $entry->data, 'name' => date($options['date_format'], mktime(0,0,0,$month,1,$year)));
|
145 |
}
|
146 |
+
// display elements
|
147 |
if('hlist' === $type) {
|
148 |
+
return $this->show_hlist($elements, $url, 'date'.$args['sc_id_for_url'], $args['actual_date']);
|
149 |
}
|
150 |
else {
|
151 |
+
return $this->show_dropdown($elements, 'date'.$args['sc_id_for_url'], $subtype, $args["actual_date"], $args['sc_id_for_url']);
|
152 |
}
|
153 |
}
|
154 |
|
155 |
public function show_daterange($url, &$args, $type='hlist', $subtype='std', $options) {
|
|
|
|
|
156 |
// prepare displayed elements
|
157 |
if(isset($options['item_order'])) {
|
158 |
$items = explode('&', $options['item_order']);
|
165 |
// show all
|
166 |
switch($item) {
|
167 |
case 'all':
|
168 |
+
$elements[] = $this->all_element('date'); // Always show short form ... hlist
|
169 |
break;
|
170 |
case 'upcoming':
|
171 |
$elements[] = $this->upcoming_element();
|
174 |
$elements[] = $this->past_element();
|
175 |
}
|
176 |
}
|
177 |
+
// display elements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
if('dropdown' === $type) {
|
179 |
+
return $this->show_dropdown($elements, 'date'.$args['sc_id_for_url'], $subtype, $args['actual_date'], $args['sc_id_for_url']);
|
180 |
}
|
181 |
else {
|
182 |
+
return $this->show_hlist($elements, $url, 'date'.$args['sc_id_for_url'], $args['actual_date']);
|
183 |
}
|
184 |
}
|
185 |
|
186 |
public function show_cats($url, &$args, $type='dropdown', $subtype='std', $options=array()) {
|
187 |
+
$default_options = array (
|
188 |
+
'show_all' => 'true',
|
189 |
+
);
|
190 |
+
$options = wp_parse_args($options, $default_options);
|
191 |
// prepare displayed elements
|
|
|
192 |
$elements = array();
|
193 |
+
if('true' == $options['show_all']) {
|
194 |
+
$elements[] = $this->all_element('cat', $type);
|
195 |
}
|
196 |
+
//prepare required arrays
|
197 |
+
$cat_array = $this->categories->get_cat_array();
|
198 |
+
$events_cat_strings = $this->db->get_distinct_event_data('`categories`', $args['date_filter'],$args['cat_filter']);
|
199 |
+
$events_cat_array = array();
|
200 |
+
foreach($events_cat_strings as $cat_string) {
|
201 |
+
$events_cat_array = array_merge($events_cat_array, $this->categories->convert_db_string($cat_string->data, 'slug_array'));
|
202 |
+
}
|
203 |
+
$events_cat_array = array_unique($events_cat_array);
|
204 |
+
//create filtered cat_array
|
205 |
+
$filtered_cat_array = array();
|
206 |
+
$required_cats = array();
|
207 |
+
for($i=count($cat_array)-1; 0<=$i; $i--) { // start from the end to have the childs first and be able to add the parent to the required_cats
|
208 |
+
if(in_array($cat_array[$i]['slug'], $events_cat_array) || in_array($cat_array[$i]['slug'], $required_cats)) {
|
209 |
+
array_unshift($filtered_cat_array, $cat_array[$i]); // add the new cat at the beginning (unshift) due to starting at the end in the loop
|
210 |
+
if('' != $cat_array[$i]['parent']) { // the parent is required to show the categories correctly
|
211 |
+
$required_cats[] = $cat_array[$i]['parent'];
|
212 |
}
|
213 |
}
|
214 |
}
|
215 |
+
//create elements array
|
216 |
+
foreach($filtered_cat_array as $cat) {
|
217 |
+
$elements[] = array('slug' => $cat['slug'], 'name' => str_pad('', 12*$cat['level'], ' ', STR_PAD_LEFT).$cat['name']);
|
218 |
+
}
|
219 |
+
// display elements
|
220 |
if('hlist' === $type) {
|
221 |
+
return $this->show_hlist($elements, $url, 'cat'.$args['sc_id_for_url'], $args['actual_cat']);
|
222 |
}
|
223 |
else {
|
224 |
+
return $this->show_dropdown($elements, 'cat'.$args['sc_id_for_url'], $subtype, $args['actual_cat'], $args['sc_id_for_url']);
|
225 |
}
|
226 |
}
|
227 |
|
232 |
if(!isset($options['caption'])) {
|
233 |
$options['caption'] = 'Reset';
|
234 |
}
|
235 |
+
return $this->show_link(remove_query_arg($args_to_remove, $url), $options['caption'], 'link');
|
236 |
}
|
237 |
|
238 |
private function show_hlist($elements, $url, $name, $actual=null) {
|
277 |
return '<a href="'.esc_url($url).'"'.$class.'>'.esc_html($caption).'</a>';
|
278 |
}
|
279 |
|
280 |
+
private function all_element($list_type='date', $display_type='hlist') {
|
281 |
+
if('hlist' == $display_type) {
|
282 |
+
$name = __('All','event-list');
|
283 |
+
}
|
284 |
+
else {
|
285 |
+
$name = ('date' == $list_type) ? __('Show all dates','event-list') : __('Show all categories','event-list');
|
286 |
}
|
287 |
return array('slug' => 'all', 'name' => $name);
|
288 |
}
|
289 |
|
290 |
private function upcoming_element() {
|
291 |
+
return array('slug' => 'upcoming', 'name' => __('Upcoming','event-list'));
|
292 |
}
|
293 |
|
294 |
private function past_element() {
|
295 |
+
return array('slug' => 'past', 'name' => __('Past','event-list'));
|
296 |
}
|
297 |
|
298 |
+
private function parse_args(&$args) {
|
299 |
+
$defaults = array('date' => null,
|
300 |
+
'actual_date' => null,
|
301 |
+
'actual_cat' => null,
|
302 |
+
'event_id' => null,
|
303 |
+
'sc_id_for_url' => '',
|
304 |
+
);
|
305 |
$args = wp_parse_args($args, $defaults);
|
306 |
+
if(is_numeric($args['event_id'])) {
|
307 |
+
$args['actual_date'] = null;
|
308 |
+
$args['actual_cat'] = null;
|
309 |
+
};
|
310 |
}
|
311 |
|
312 |
public function footer_script() {
|
includes/options.php
CHANGED
@@ -39,7 +39,7 @@ class EL_Options {
|
|
39 |
'el_html_tags_in_loc' => array('std_val' => ''),
|
40 |
'el_edit_dateformat' => array('std_val' => ''),
|
41 |
'el_enable_feed' => array('std_val' => ''),
|
42 |
-
'el_feed_name' => array('std_val' => '
|
43 |
'el_feed_description' => array('std_val' => 'Eventlist Feed'),
|
44 |
'el_feed_upcoming_only' => array('std_val' => ''),
|
45 |
'el_head_feed_link' => array('std_val' => '1'),
|
39 |
'el_html_tags_in_loc' => array('std_val' => ''),
|
40 |
'el_edit_dateformat' => array('std_val' => ''),
|
41 |
'el_enable_feed' => array('std_val' => ''),
|
42 |
+
'el_feed_name' => array('std_val' => 'event-list'),
|
43 |
'el_feed_description' => array('std_val' => 'Eventlist Feed'),
|
44 |
'el_feed_upcoming_only' => array('std_val' => ''),
|
45 |
'el_head_feed_link' => array('std_val' => '1'),
|
includes/options_helptexts.php
CHANGED
@@ -9,79 +9,79 @@ $options_helptexts = array(
|
|
9 |
|
10 |
'el_categories' => array('section' => 'categories',
|
11 |
'type' => 'category',
|
12 |
-
'label' => __('Event Categories','
|
13 |
'caption' => '',
|
14 |
-
'desc' => __('This option specifies all event category data.','
|
15 |
|
16 |
'el_sync_cats' => array('section' => 'categories',
|
17 |
'type' => 'checkbox',
|
18 |
-
'label' => __('Sync Categories','
|
19 |
-
'caption' => __('Keep event categories in sync with post categories automatically','
|
20 |
-
'desc' => '<table><tr style="vertical-align:top"><td><strong>'.__('Attention','
|
21 |
-
<td>'.__('Please note that this option will delete all categories which are not available in the post categories! Existing Categories with the same slug will be updated.','
|
22 |
|
23 |
'el_no_event_text' => array('section' => 'general',
|
24 |
'type' => 'text',
|
25 |
-
'label' => __('Text for no events','
|
26 |
'caption' => '',
|
27 |
-
'desc' => __('This option defines the text which is displayed if no events are available for the selected view.','
|
28 |
|
29 |
'el_date_once_per_day' => array('section' => 'general',
|
30 |
'type' => 'checkbox',
|
31 |
-
'label' => __('Date display','
|
32 |
-
'caption' => __('Show date only once per day','
|
33 |
'desc' => __('With this option you can display the date only once per day if multiple events are available on the same day.<br />
|
34 |
If this option is enabled the events are ordered in a different way (end date before start time) to allow using the same date for as much events as possible.')),
|
35 |
|
36 |
'el_html_tags_in_time' => array('section' => 'general',
|
37 |
'type' => 'checkbox',
|
38 |
-
'label' => __('HTML tags','
|
39 |
-
'caption' => __('Allow HTML tags in event time field','
|
40 |
-
'desc' => __('This option specifies if HTML tags are allowed in the event start time field.','
|
41 |
|
42 |
'el_html_tags_in_loc' => array('section' => 'general',
|
43 |
'type' => 'checkbox',
|
44 |
'label' => '',
|
45 |
-
'caption' => __('Allow HTML tags in event location field','
|
46 |
-
'desc' => __('This option specifies if HTML tags are allowed in the event location field.','
|
47 |
|
48 |
'el_edit_dateformat' => array('section' => 'admin',
|
49 |
'type' => 'text',
|
50 |
-
'label' => __('Date format in edit form','
|
51 |
'desc' => __('This option sets a specific date format for the event date fields in the new/edit event form.<br />
|
52 |
The standard is an empty string to use the wordpress standard setting.<br />
|
53 |
All available options to specify the format can be found <a href="http://php.net/manual/en/function.date.php" target="_blank">here</a>')),
|
54 |
|
55 |
'el_enable_feed' => array('section' => 'feed',
|
56 |
'type' => 'checkbox',
|
57 |
-
'label' => __('Enable RSS feed','
|
58 |
-
'caption' => __('Enable support for an event RSS feed','
|
59 |
'desc' => __('This option activates a RSS feed for the events.<br />
|
60 |
You have to enable this option if you want to use one of the RSS feed features.')),
|
61 |
|
62 |
'el_feed_name' => array('section' => 'feed',
|
63 |
'type' => 'text',
|
64 |
-
'label' => __('Feed name','
|
65 |
-
'desc' => __('This options sets the feed name. The standard value is "
|
66 |
-
This name will be used in the feed url (e.g. <code>domain.com/?feed=
|
67 |
|
68 |
'el_feed_description' => array('section' => 'feed',
|
69 |
'type' => 'text',
|
70 |
-
'label' => __('Feed Description','
|
71 |
'desc' => __('This options sets the feed description. The standard value is "Eventlist Feed".<br />
|
72 |
This description will be used in the title for the feed link in the html head and for the description in the feed itself.')),
|
73 |
|
74 |
'el_feed_upcoming_only' => array('section' => 'feed',
|
75 |
'type' => 'checkbox',
|
76 |
-
'label' => __('Listed events','
|
77 |
-
'caption' => __('Only show upcoming events in feed','
|
78 |
'desc' => __('If this option is enabled only the upcoming events are listed in the feed.<br />
|
79 |
If disabled all events (upcoming and past) will be listed.')),
|
80 |
|
81 |
'el_head_feed_link' => array('section' => 'feed',
|
82 |
'type' => 'checkbox',
|
83 |
-
'label' => __('Add RSS feed link in head','
|
84 |
-
'caption' => __('Add RSS feed link in the html head','
|
85 |
'desc' => __('This option adds a RSS feed in the html head for the events.<br />
|
86 |
You have 2 possibilities to include the RSS feed:<br />
|
87 |
The first option is to use this option to include a link in the html head. This link will be recognized by browers or feed readers.<br />
|
@@ -90,7 +90,7 @@ $options_helptexts = array(
|
|
90 |
|
91 |
'el_feed_link_pos' => array('section' => 'feed',
|
92 |
'type' => 'radio',
|
93 |
-
'label' => __('Position of the RSS feed link','
|
94 |
'caption' => array('top' => 'at the top (above the navigation bar)', 'below_nav' => 'between navigation bar and events', 'bottom' => 'at the bottom'),
|
95 |
'desc' => __('This option specifies the position of the RSS feed link in the event list.<br />
|
96 |
The options are to display the link at the top, at the bottom or between the navigation bar and the event list.<br />
|
@@ -98,7 +98,7 @@ $options_helptexts = array(
|
|
98 |
|
99 |
'el_feed_link_align' => array('section' => 'feed',
|
100 |
'type' => 'radio',
|
101 |
-
'label' => __('Align of the RSS feed link','
|
102 |
'caption' => array('left' => 'left', 'center' => 'center', 'right' => 'right'),
|
103 |
'desc' => __('This option specifies the align of the RSS feed link in the event list.<br />
|
104 |
The link can be displayed on the left side, centered or on the right.<br />
|
@@ -106,29 +106,29 @@ $options_helptexts = array(
|
|
106 |
|
107 |
'el_feed_link_text' => array('section' => 'feed',
|
108 |
'type' => 'text',
|
109 |
-
'label' => __('Feed link text','
|
110 |
'desc' => __('This option specifies the caption of the RSS feed link in the event list.<br />
|
111 |
Insert an empty text to hide any text if you only want to show the rss image.<br />
|
112 |
You have to set the shortcode attribute "add_feed_link" to "true" if you want to show the feed link.')),
|
113 |
|
114 |
'el_feed_link_img' => array('section' => 'feed',
|
115 |
'type' => 'checkbox',
|
116 |
-
'label' => __('Feed link image','
|
117 |
-
'caption' => __('Show rss image in feed link','
|
118 |
'desc' => __('This option specifies if the an image should be dispayed in the feed link in front of the text.<br />
|
119 |
You have to set the shortcode attribute "add_feed_link" to "true" if you want to show the feed link.')),
|
120 |
);
|
121 |
|
122 |
$date_formats_desc = array(
|
123 |
-
'year' => __('You can specify a year in 4 digit format.<br /> Other formats will not be accepted.','
|
124 |
-
'month' => __('You can specify a month with 4 digits for the year and 2 digits for the month, seperated by a hyphen (-).<br />Other formats will not be accepted.','
|
125 |
-
'day' => __('You can specify a day with 4 digits for the year, 2 digits for the month and 2 digets for the day, seperated by a hyphen (-).<br /> Other formats will not be accepted.','
|
126 |
);
|
127 |
|
128 |
$daterange_formats_desc = array(
|
129 |
-
'date_range' => __('You can specify a rage or dates seperated by a tilde (~).<br >You can specify any available date format before and after the tilde.','
|
130 |
-
'all' => __('"all" specifies the full time range without any limitation.','
|
131 |
-
'upcoming' => __('"upcoming" specifies a time range from the actual day to the future.','
|
132 |
-
'past' => __('"past" specifies a time rage from the past to the previous day.','
|
133 |
);
|
134 |
?>
|
9 |
|
10 |
'el_categories' => array('section' => 'categories',
|
11 |
'type' => 'category',
|
12 |
+
'label' => __('Event Categories','event-list'),
|
13 |
'caption' => '',
|
14 |
+
'desc' => __('This option specifies all event category data.','event-list')),
|
15 |
|
16 |
'el_sync_cats' => array('section' => 'categories',
|
17 |
'type' => 'checkbox',
|
18 |
+
'label' => __('Sync Categories','event-list'),
|
19 |
+
'caption' => __('Keep event categories in sync with post categories automatically','event-list'),
|
20 |
+
'desc' => '<table><tr style="vertical-align:top"><td><strong>'.__('Attention','event-list').':</strong></td>
|
21 |
+
<td>'.__('Please note that this option will delete all categories which are not available in the post categories! Existing Categories with the same slug will be updated.','event-list').'</td></tr></table>'),
|
22 |
|
23 |
'el_no_event_text' => array('section' => 'general',
|
24 |
'type' => 'text',
|
25 |
+
'label' => __('Text for no events','event-list'),
|
26 |
'caption' => '',
|
27 |
+
'desc' => __('This option defines the text which is displayed if no events are available for the selected view.','event-list')),
|
28 |
|
29 |
'el_date_once_per_day' => array('section' => 'general',
|
30 |
'type' => 'checkbox',
|
31 |
+
'label' => __('Date display','event-list'),
|
32 |
+
'caption' => __('Show date only once per day','event-list'),
|
33 |
'desc' => __('With this option you can display the date only once per day if multiple events are available on the same day.<br />
|
34 |
If this option is enabled the events are ordered in a different way (end date before start time) to allow using the same date for as much events as possible.')),
|
35 |
|
36 |
'el_html_tags_in_time' => array('section' => 'general',
|
37 |
'type' => 'checkbox',
|
38 |
+
'label' => __('HTML tags','event-list'),
|
39 |
+
'caption' => __('Allow HTML tags in event time field','event-list'),
|
40 |
+
'desc' => __('This option specifies if HTML tags are allowed in the event start time field.','event-list')),
|
41 |
|
42 |
'el_html_tags_in_loc' => array('section' => 'general',
|
43 |
'type' => 'checkbox',
|
44 |
'label' => '',
|
45 |
+
'caption' => __('Allow HTML tags in event location field','event-list'),
|
46 |
+
'desc' => __('This option specifies if HTML tags are allowed in the event location field.','event-list')),
|
47 |
|
48 |
'el_edit_dateformat' => array('section' => 'admin',
|
49 |
'type' => 'text',
|
50 |
+
'label' => __('Date format in edit form','event-list'),
|
51 |
'desc' => __('This option sets a specific date format for the event date fields in the new/edit event form.<br />
|
52 |
The standard is an empty string to use the wordpress standard setting.<br />
|
53 |
All available options to specify the format can be found <a href="http://php.net/manual/en/function.date.php" target="_blank">here</a>')),
|
54 |
|
55 |
'el_enable_feed' => array('section' => 'feed',
|
56 |
'type' => 'checkbox',
|
57 |
+
'label' => __('Enable RSS feed','event-list'),
|
58 |
+
'caption' => __('Enable support for an event RSS feed','event-list'),
|
59 |
'desc' => __('This option activates a RSS feed for the events.<br />
|
60 |
You have to enable this option if you want to use one of the RSS feed features.')),
|
61 |
|
62 |
'el_feed_name' => array('section' => 'feed',
|
63 |
'type' => 'text',
|
64 |
+
'label' => __('Feed name','event-list'),
|
65 |
+
'desc' => __('This options sets the feed name. The standard value is "event-list".<br />
|
66 |
+
This name will be used in the feed url (e.g. <code>domain.com/?feed=event-list</code> or <code>domain.com/feed/eventlist</code> for an installation with permalinks')),
|
67 |
|
68 |
'el_feed_description' => array('section' => 'feed',
|
69 |
'type' => 'text',
|
70 |
+
'label' => __('Feed Description','event-list'),
|
71 |
'desc' => __('This options sets the feed description. The standard value is "Eventlist Feed".<br />
|
72 |
This description will be used in the title for the feed link in the html head and for the description in the feed itself.')),
|
73 |
|
74 |
'el_feed_upcoming_only' => array('section' => 'feed',
|
75 |
'type' => 'checkbox',
|
76 |
+
'label' => __('Listed events','event-list'),
|
77 |
+
'caption' => __('Only show upcoming events in feed','event-list'),
|
78 |
'desc' => __('If this option is enabled only the upcoming events are listed in the feed.<br />
|
79 |
If disabled all events (upcoming and past) will be listed.')),
|
80 |
|
81 |
'el_head_feed_link' => array('section' => 'feed',
|
82 |
'type' => 'checkbox',
|
83 |
+
'label' => __('Add RSS feed link in head','event-list'),
|
84 |
+
'caption' => __('Add RSS feed link in the html head','event-list'),
|
85 |
'desc' => __('This option adds a RSS feed in the html head for the events.<br />
|
86 |
You have 2 possibilities to include the RSS feed:<br />
|
87 |
The first option is to use this option to include a link in the html head. This link will be recognized by browers or feed readers.<br />
|
90 |
|
91 |
'el_feed_link_pos' => array('section' => 'feed',
|
92 |
'type' => 'radio',
|
93 |
+
'label' => __('Position of the RSS feed link','event-list'),
|
94 |
'caption' => array('top' => 'at the top (above the navigation bar)', 'below_nav' => 'between navigation bar and events', 'bottom' => 'at the bottom'),
|
95 |
'desc' => __('This option specifies the position of the RSS feed link in the event list.<br />
|
96 |
The options are to display the link at the top, at the bottom or between the navigation bar and the event list.<br />
|
98 |
|
99 |
'el_feed_link_align' => array('section' => 'feed',
|
100 |
'type' => 'radio',
|
101 |
+
'label' => __('Align of the RSS feed link','event-list'),
|
102 |
'caption' => array('left' => 'left', 'center' => 'center', 'right' => 'right'),
|
103 |
'desc' => __('This option specifies the align of the RSS feed link in the event list.<br />
|
104 |
The link can be displayed on the left side, centered or on the right.<br />
|
106 |
|
107 |
'el_feed_link_text' => array('section' => 'feed',
|
108 |
'type' => 'text',
|
109 |
+
'label' => __('Feed link text','event-list'),
|
110 |
'desc' => __('This option specifies the caption of the RSS feed link in the event list.<br />
|
111 |
Insert an empty text to hide any text if you only want to show the rss image.<br />
|
112 |
You have to set the shortcode attribute "add_feed_link" to "true" if you want to show the feed link.')),
|
113 |
|
114 |
'el_feed_link_img' => array('section' => 'feed',
|
115 |
'type' => 'checkbox',
|
116 |
+
'label' => __('Feed link image','event-list'),
|
117 |
+
'caption' => __('Show rss image in feed link','event-list'),
|
118 |
'desc' => __('This option specifies if the an image should be dispayed in the feed link in front of the text.<br />
|
119 |
You have to set the shortcode attribute "add_feed_link" to "true" if you want to show the feed link.')),
|
120 |
);
|
121 |
|
122 |
$date_formats_desc = array(
|
123 |
+
'year' => __('You can specify a year in 4 digit format.<br /> Other formats will not be accepted.','event-list'),
|
124 |
+
'month' => __('You can specify a month with 4 digits for the year and 2 digits for the month, seperated by a hyphen (-).<br />Other formats will not be accepted.','event-list'),
|
125 |
+
'day' => __('You can specify a day with 4 digits for the year, 2 digits for the month and 2 digets for the day, seperated by a hyphen (-).<br /> Other formats will not be accepted.','event-list'),
|
126 |
);
|
127 |
|
128 |
$daterange_formats_desc = array(
|
129 |
+
'date_range' => __('You can specify a rage or dates seperated by a tilde (~).<br >You can specify any available date format before and after the tilde.','event-list'),
|
130 |
+
'all' => __('"all" specifies the full time range without any limitation.','event-list'),
|
131 |
+
'upcoming' => __('"upcoming" specifies a time range from the actual day to the future.','event-list'),
|
132 |
+
'past' => __('"past" specifies a time rage from the past to the previous day.','event-list'),
|
133 |
);
|
134 |
?>
|
includes/sc_event-list.php
CHANGED
@@ -137,7 +137,7 @@ class SC_Event_List {
|
|
137 |
$event = $this->db->get_event($a['event_id']);
|
138 |
$out = $this->html_filterbar($a);
|
139 |
$out .= '
|
140 |
-
<h2>'.__('Event Information:','
|
141 |
<ul class="single-event-view">';
|
142 |
$single_day_only = ($event->start_date == $event->end_date) ? true : false;
|
143 |
$out .= $this->html_event($event, $a, $single_day_only);
|
@@ -187,7 +187,7 @@ class SC_Event_List {
|
|
187 |
|
188 |
private function html_event( &$event, &$a, $single_day_only=false ) {
|
189 |
static $last_event_startdate=null, $last_event_enddate=null;
|
190 |
-
$cat_string = $this->categories->
|
191 |
// add class with each category slug
|
192 |
$out = '
|
193 |
<li class="event '.$cat_string.'">';
|
@@ -238,7 +238,7 @@ class SC_Event_List {
|
|
238 |
$out .= '<span class="event-location">'.$location.'</span>';
|
239 |
}
|
240 |
if( $this->is_visible( $a['show_cat'] ) ) {
|
241 |
-
$out .= '<div class="event-cat">'.esc_attr($this->categories->
|
242 |
}
|
243 |
if( $this->is_visible( $a['show_details'] ) ) {
|
244 |
$out .= '<div class="event-details">'.$this->db->truncate(do_shortcode(wpautop($event->details)), $a['details_length'], $this->single_event).'</div>';
|
137 |
$event = $this->db->get_event($a['event_id']);
|
138 |
$out = $this->html_filterbar($a);
|
139 |
$out .= '
|
140 |
+
<h2>'.__('Event Information:','event-list').'</h2>
|
141 |
<ul class="single-event-view">';
|
142 |
$single_day_only = ($event->start_date == $event->end_date) ? true : false;
|
143 |
$out .= $this->html_event($event, $a, $single_day_only);
|
187 |
|
188 |
private function html_event( &$event, &$a, $single_day_only=false ) {
|
189 |
static $last_event_startdate=null, $last_event_enddate=null;
|
190 |
+
$cat_string = $this->categories->convert_db_string($event->categories, 'slug_string', ' ');
|
191 |
// add class with each category slug
|
192 |
$out = '
|
193 |
<li class="event '.$cat_string.'">';
|
238 |
$out .= '<span class="event-location">'.$location.'</span>';
|
239 |
}
|
240 |
if( $this->is_visible( $a['show_cat'] ) ) {
|
241 |
+
$out .= '<div class="event-cat">'.esc_attr($this->categories->convert_db_string($event->categories)).'</div>';
|
242 |
}
|
243 |
if( $this->is_visible( $a['show_details'] ) ) {
|
244 |
$out .= '<div class="event-details">'.$this->db->truncate(do_shortcode(wpautop($event->details)), $a['details_length'], $this->single_event).'</div>';
|
includes/sc_event-list_helptexts.php
CHANGED
@@ -6,53 +6,62 @@ if(!defined('WPINC')) {
|
|
6 |
$sc_eventlist_helptexts = array(
|
7 |
'initial_event_id' => array('val' => 'all<br />event-id',
|
8 |
'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 />
|
9 |
-
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.','
|
10 |
|
11 |
'initial_date' => array('val' => 'all<br />upcoming<br />past<br />year',
|
12 |
'desc' => __('This attribute specifies which events are initially shown. The standard is to show the upcoming events.<br />
|
13 |
-
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.','
|
14 |
|
15 |
'initial_cat' => array('val' => 'all<br />category slug',
|
16 |
'desc' => __('This attribute specifies the category of which events are initially shown. The standard is to show events of all categories.<br />
|
17 |
-
Specify a category slug to change this behavior. It is still possible to change the displayed categories via the filterbar or url parameters.','
|
18 |
|
19 |
'date_filter' => array('val' => 'all<br />upcoming<br />past<br />year',
|
20 |
'desc' => __('This attribute specifies the dates and date ranges of which events are displayed. The standard is "all" to show all events.<br />
|
21 |
Filtered events according to date_filter value are not available in the event list.<br />
|
22 |
You can find all available values with a description and examples in "Available Date Formats" and "Available Date Range Formats" below.<br />
|
23 |
See "Filter Syntax" description if you want to define complex filters.<br />
|
24 |
-
When you only use OR connections (no AND connection) the years selection in the filterbar will also be filtered accordingly.','
|
25 |
|
26 |
'cat_filter' => array('val' => 'all<br />category slugs',
|
27 |
'desc' => __('This attribute specifies the categories of which events are shown. The standard is "all" or an empty string to show all events.<br />
|
28 |
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 />
|
29 |
The filter is specified via the given category slug. See "Filter Syntax" description if you want to define complex filters.<br />
|
30 |
-
When you only use OR connections (no AND connection) the category selection in the filterbar will also be filtered accordingly.','
|
31 |
|
32 |
'num_events' => array('val' => 'number',
|
33 |
'desc' => __('This attribute specifies how many events should be displayed if upcoming events is selected.<br />
|
34 |
0 is the standard value which means that all events will be displayed.<br />
|
35 |
-
Please not that in the actual version there is no pagination of the events available.','
|
36 |
|
37 |
'show_filterbar' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
38 |
'desc' => __('This attribute specifies if the filterbar should be displayed. The filterbar allows the users to select filters to limit the listed events.<br />
|
39 |
Choose "false" to always hide and "true" to always show the navigation.<br />
|
40 |
-
With "event_list_only" the filterbar is only visible in the event list and with "single_event_only" only for a single event','
|
41 |
|
42 |
'filterbar_items' => array('val' => 'years_hlist<br />years_dropdown<br />months_hlist<br />months_dropdown<br />daterange_hlist<br />daterange_dropdown<br />cats_hlist<br />cats_dropdown<br />reset_link',
|
43 |
'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 />
|
44 |
Find below an overview of the available filterbar items and their options:<br />
|
45 |
<small><table class="el-filterbar-table">
|
46 |
-
<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></
|
47 |
-
<tr><td>years</td><td>Show a list of all available years. Additional there are some special entries available (see item options).</td
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
<tr><td>daterange</td><td>With this item you can display the special entries "all", "upcoming" and "past". You can use all or only some of the available values and you can specify their order.</td><td>item_order</td><td>all | upcoming | past</td><td>all&upcoming&past</td><td>Specifies the displayed values and their order. The items must be seperated by "&".</td></tr>
|
50 |
<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>
|
51 |
<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>
|
52 |
</table></small>
|
53 |
Find below an overview of the available filterbar display options:<br />
|
54 |
<small><table class="el-filterbar-table">
|
55 |
-
<th class="el-filterbar-doption">display option</th><th class="el-filterbar-desc3">description</th><th class="el-filterbar-for">available for</th></
|
56 |
<tr><td>hlist</td><td>"hlist" shows a horizonal list seperated by "|" with a link to each item</td><td>years, months, daterange, cats</td></tr>
|
57 |
<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, months, daterange, cats</td></tr>
|
58 |
<tr><td>link</td><td>"link" shows a simple link which can be clicked.</td><td>reset</td></tr>
|
@@ -67,61 +76,61 @@ $sc_eventlist_helptexts = array(
|
|
67 |
'show_starttime' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
68 |
'desc' => __('This attribute specifies if the starttime is displayed in the event list.<br />
|
69 |
Choose "false" to always hide and "true" to always show the starttime.<br />
|
70 |
-
With "event_list_only" the starttime is only visible in the event list and with "single_event_only" only for a single event','
|
71 |
|
72 |
'show_location' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
73 |
'desc' => __('This attribute specifies if the location is displayed in the event list.<br />
|
74 |
Choose "false" to always hide and "true" to always show the location.<br />
|
75 |
-
With "event_list_only" the location is only visible in the event list and with "single_event_only" only for a single event','
|
76 |
|
77 |
'show_cat' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
78 |
'desc' => __('This attribute specifies if the categories are displayed in the event list.<br />
|
79 |
Choose "false" to always hide and "true" to always show the category.<br />
|
80 |
-
With "event_list_only" the categories are only visible in the event list and with "single_event_only" only for a single event','
|
81 |
|
82 |
'show_details' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
83 |
'desc' => __('This attribute specifies if the details are displayed in the event list.<br />
|
84 |
Choose "false" to always hide and "true" to always show the details.<br />
|
85 |
-
With "event_list_only" the details are only visible in the event list and with "single_event_only" only for a single event','
|
86 |
|
87 |
'details_length' => array('val' => 'number',
|
88 |
'desc' => __('This attribute specifies if the details should be truncate to the given number of characters in the event list.<br />
|
89 |
With the standard value 0 the full details are displayed.<br />
|
90 |
-
This attribute has no influence if only a single event is shown.','
|
91 |
|
92 |
'link_to_event' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
93 |
'desc' => __('This attribute specifies if a link to the single event should be added onto the event name in the event list.<br />
|
94 |
Choose "false" to never add and "true" to always add the link.<br />
|
95 |
-
With "event_list_only" the link is only added in the event list and with "single_event_only" only for a single event','
|
96 |
|
97 |
'add_feed_link' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
98 |
'desc' => __('This attribute specifies if a rss feed link should be added.<br />
|
99 |
You have to enable the feed in the eventlist settings to make this attribute workable.<br />
|
100 |
On that page you can also find some settings to modify the output.<br />
|
101 |
Choose "false" to never add and "true" to always add the link.<br />
|
102 |
-
With "event_list_only" the link is only added in the event list and with "single_event_only" only for a single event','
|
103 |
// Invisible attributes ('hidden' = true): This attributes are required for the widget but will not be listed in the attributes table on the admin info page
|
104 |
'title_length' => array('val' => 'number',
|
105 |
'hidden' => true,
|
106 |
'desc' => __('This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />
|
107 |
With the standard value 0 the full details are displayed.<br />
|
108 |
-
This attribute has no influence if only a single event is shown.','
|
109 |
|
110 |
'location_length' => array('val' => 'number',
|
111 |
'hidden' => true,
|
112 |
'desc' => __('This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />
|
113 |
With the standard value 0 the full details are displayed.<br />
|
114 |
-
This attribute has no influence if only a single event is shown.','
|
115 |
|
116 |
'url_to_page' => array('val' => 'url',
|
117 |
'hidden' => true,
|
118 |
'desc' => __('This attribute specifies that the link should follow the given url.<br />
|
119 |
The standard is to leave this attribute empty, then the url will be calculated automatically from the actual page or post url.<br />
|
120 |
-
This is o.k. for the normal use of the shortcode. This attribute is normally only required for the event-list widget.','
|
121 |
|
122 |
'sc_id_for_url' => array('val' => 'number',
|
123 |
'hidden' => true,
|
124 |
'desc' => __('This attribute the specifies shortcode id of the used shortcode on the page specified with "url_to_page" attribute.<br />
|
125 |
-
The empty standard value is o.k. for the normal use. This attribute is normally only required for the event-list widget.','
|
126 |
);
|
127 |
?>
|
6 |
$sc_eventlist_helptexts = array(
|
7 |
'initial_event_id' => array('val' => 'all<br />event-id',
|
8 |
'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 />
|
9 |
+
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.','event-list')),
|
10 |
|
11 |
'initial_date' => array('val' => 'all<br />upcoming<br />past<br />year',
|
12 |
'desc' => __('This attribute specifies which events are initially shown. The standard is to show the upcoming events.<br />
|
13 |
+
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.','event-list')),
|
14 |
|
15 |
'initial_cat' => array('val' => 'all<br />category slug',
|
16 |
'desc' => __('This attribute specifies the category of which events are initially shown. The standard is to show events of all categories.<br />
|
17 |
+
Specify a category slug to change this behavior. It is still possible to change the displayed categories via the filterbar or url parameters.','event-list')),
|
18 |
|
19 |
'date_filter' => array('val' => 'all<br />upcoming<br />past<br />year',
|
20 |
'desc' => __('This attribute specifies the dates and date ranges of which events are displayed. The standard is "all" to show all events.<br />
|
21 |
Filtered events according to date_filter value are not available in the event list.<br />
|
22 |
You can find all available values with a description and examples in "Available Date Formats" and "Available Date Range Formats" below.<br />
|
23 |
See "Filter Syntax" description if you want to define complex filters.<br />
|
24 |
+
When you only use OR connections (no AND connection) the years selection in the filterbar will also be filtered accordingly.','event-list')),
|
25 |
|
26 |
'cat_filter' => array('val' => 'all<br />category slugs',
|
27 |
'desc' => __('This attribute specifies the categories of which events are shown. The standard is "all" or an empty string to show all events.<br />
|
28 |
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 />
|
29 |
The filter is specified via the given category slug. See "Filter Syntax" description if you want to define complex filters.<br />
|
30 |
+
When you only use OR connections (no AND connection) the category selection in the filterbar will also be filtered accordingly.','event-list')),
|
31 |
|
32 |
'num_events' => array('val' => 'number',
|
33 |
'desc' => __('This attribute specifies how many events should be displayed if upcoming events is selected.<br />
|
34 |
0 is the standard value which means that all events will be displayed.<br />
|
35 |
+
Please not that in the actual version there is no pagination of the events available.','event-list')),
|
36 |
|
37 |
'show_filterbar' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
38 |
'desc' => __('This attribute specifies if the filterbar should be displayed. The filterbar allows the users to select filters to limit the listed events.<br />
|
39 |
Choose "false" to always hide and "true" to always show the navigation.<br />
|
40 |
+
With "event_list_only" the filterbar is only visible in the event list and with "single_event_only" only for a single event','event-list')),
|
41 |
|
42 |
'filterbar_items' => array('val' => 'years_hlist<br />years_dropdown<br />months_hlist<br />months_dropdown<br />daterange_hlist<br />daterange_dropdown<br />cats_hlist<br />cats_dropdown<br />reset_link',
|
43 |
'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 />
|
44 |
Find below an overview of the available filterbar items and their options:<br />
|
45 |
<small><table class="el-filterbar-table">
|
46 |
+
<tr><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></tr>
|
47 |
+
<tr><td rowspan="4">years</td><td rowspan="4">Show a list of all available years. Additional there are some special entries available (see item options).</td>
|
48 |
+
<td>show_all</td><td>true | false</td><td>true</td><td>Add an entry to show all events.</td></tr>
|
49 |
+
<tr><td>show_upcoming</td><td>true | false</td><td>true</td><td>Add an entry to show all upcoming events.</td></tr>
|
50 |
+
<tr><td>show_past</td><td>true | false</td><td>false</td><td>Add an entry to show events in the past.</td></tr>
|
51 |
+
<tr><td>years_order</td><td>desc | asc</td><td>desc</td><td>Set descending or ascending order of year entries.</td></tr>
|
52 |
+
<tr><td rowspan="5">months</td><td rowspan="5">Show a list of all available months.</td>
|
53 |
+
<td>show_all</td><td>true | false</td><td>false</td><td>Add an entry to show all events.</td></tr>
|
54 |
+
<tr><td>show_upcoming</td><td>true | false</td><td>false</td><td>Add an entry to show all upcoming events.</td></tr>
|
55 |
+
<tr><td>show_past</td><td>true | false</td><td>false</td><td>Add an entry to show events in the past.</td></tr>
|
56 |
+
<tr><td>months_order</td><td>desc | asc</td><td>desc</td><td>Set descending or ascending order of month entries.</td></tr>
|
57 |
+
<tr><td>date_format</td><td><a href="http://php.net/manual/en/function.date.php">php date-formats</a></td><td>Y-m</td><td>Set the displayed date format of the month entries.</td></tr>
|
58 |
<tr><td>daterange</td><td>With this item you can display the special entries "all", "upcoming" and "past". You can use all or only some of the available values and you can specify their order.</td><td>item_order</td><td>all | upcoming | past</td><td>all&upcoming&past</td><td>Specifies the displayed values and their order. The items must be seperated by "&".</td></tr>
|
59 |
<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>
|
60 |
<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>
|
61 |
</table></small>
|
62 |
Find below an overview of the available filterbar display options:<br />
|
63 |
<small><table class="el-filterbar-table">
|
64 |
+
<tr><th class="el-filterbar-doption">display option</th><th class="el-filterbar-desc3">description</th><th class="el-filterbar-for">available for</th></tr>
|
65 |
<tr><td>hlist</td><td>"hlist" shows a horizonal list seperated by "|" with a link to each item</td><td>years, months, daterange, cats</td></tr>
|
66 |
<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, months, daterange, cats</td></tr>
|
67 |
<tr><td>link</td><td>"link" shows a simple link which can be clicked.</td><td>reset</td></tr>
|
76 |
'show_starttime' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
77 |
'desc' => __('This attribute specifies if the starttime is displayed in the event list.<br />
|
78 |
Choose "false" to always hide and "true" to always show the starttime.<br />
|
79 |
+
With "event_list_only" the starttime is only visible in the event list and with "single_event_only" only for a single event','event-list')),
|
80 |
|
81 |
'show_location' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
82 |
'desc' => __('This attribute specifies if the location is displayed in the event list.<br />
|
83 |
Choose "false" to always hide and "true" to always show the location.<br />
|
84 |
+
With "event_list_only" the location is only visible in the event list and with "single_event_only" only for a single event','event-list')),
|
85 |
|
86 |
'show_cat' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
87 |
'desc' => __('This attribute specifies if the categories are displayed in the event list.<br />
|
88 |
Choose "false" to always hide and "true" to always show the category.<br />
|
89 |
+
With "event_list_only" the categories are only visible in the event list and with "single_event_only" only for a single event','event-list')),
|
90 |
|
91 |
'show_details' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
92 |
'desc' => __('This attribute specifies if the details are displayed in the event list.<br />
|
93 |
Choose "false" to always hide and "true" to always show the details.<br />
|
94 |
+
With "event_list_only" the details are only visible in the event list and with "single_event_only" only for a single event','event-list')),
|
95 |
|
96 |
'details_length' => array('val' => 'number',
|
97 |
'desc' => __('This attribute specifies if the details should be truncate to the given number of characters in the event list.<br />
|
98 |
With the standard value 0 the full details are displayed.<br />
|
99 |
+
This attribute has no influence if only a single event is shown.','event-list')),
|
100 |
|
101 |
'link_to_event' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
102 |
'desc' => __('This attribute specifies if a link to the single event should be added onto the event name in the event list.<br />
|
103 |
Choose "false" to never add and "true" to always add the link.<br />
|
104 |
+
With "event_list_only" the link is only added in the event list and with "single_event_only" only for a single event','event-list')),
|
105 |
|
106 |
'add_feed_link' => array('val' => 'false<br />true<br />event_list_only<br />single_event_only',
|
107 |
'desc' => __('This attribute specifies if a rss feed link should be added.<br />
|
108 |
You have to enable the feed in the eventlist settings to make this attribute workable.<br />
|
109 |
On that page you can also find some settings to modify the output.<br />
|
110 |
Choose "false" to never add and "true" to always add the link.<br />
|
111 |
+
With "event_list_only" the link is only added in the event list and with "single_event_only" only for a single event','event-list')),
|
112 |
// Invisible attributes ('hidden' = true): This attributes are required for the widget but will not be listed in the attributes table on the admin info page
|
113 |
'title_length' => array('val' => 'number',
|
114 |
'hidden' => true,
|
115 |
'desc' => __('This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />
|
116 |
With the standard value 0 the full details are displayed.<br />
|
117 |
+
This attribute has no influence if only a single event is shown.','event-list')),
|
118 |
|
119 |
'location_length' => array('val' => 'number',
|
120 |
'hidden' => true,
|
121 |
'desc' => __('This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />
|
122 |
With the standard value 0 the full details are displayed.<br />
|
123 |
+
This attribute has no influence if only a single event is shown.','event-list')),
|
124 |
|
125 |
'url_to_page' => array('val' => 'url',
|
126 |
'hidden' => true,
|
127 |
'desc' => __('This attribute specifies that the link should follow the given url.<br />
|
128 |
The standard is to leave this attribute empty, then the url will be calculated automatically from the actual page or post url.<br />
|
129 |
+
This is o.k. for the normal use of the shortcode. This attribute is normally only required for the event-list widget.','event-list')),
|
130 |
|
131 |
'sc_id_for_url' => array('val' => 'number',
|
132 |
'hidden' => true,
|
133 |
'desc' => __('This attribute the specifies shortcode id of the used shortcode on the page specified with "url_to_page" attribute.<br />
|
134 |
+
The empty standard value is o.k. for the normal use. This attribute is normally only required for the event-list widget.','event-list')),
|
135 |
);
|
136 |
?>
|
includes/widget.php
CHANGED
@@ -17,12 +17,12 @@ class EL_Widget extends WP_Widget {
|
|
17 |
parent::__construct(
|
18 |
'event_list_widget', // Base ID
|
19 |
'Event List', // Name
|
20 |
-
array('description' => __('With this widget a list of upcoming events can be displayed.','
|
21 |
);
|
22 |
|
23 |
// define all available items
|
24 |
$this->items = array(
|
25 |
-
'title' => array('std_value' => __('Upcoming events','
|
26 |
'cat_filter' => array('std_value' => 'all'),
|
27 |
'num_events' => array('std_value' => '3'),
|
28 |
'title_length' => array('std_value' => '0'),
|
@@ -35,7 +35,7 @@ class EL_Widget extends WP_Widget {
|
|
35 |
'sc_id_for_url' => array('std_value' => '1'),
|
36 |
'link_to_event' => array('std_value' => 'false'),
|
37 |
'link_to_page' => array('std_value' => 'false'),
|
38 |
-
'link_to_page_caption' => array('std_value' => __('show events page','
|
39 |
);
|
40 |
|
41 |
add_action('admin_init', array(&$this, 'load_widget_items_helptexts'), 2);
|
17 |
parent::__construct(
|
18 |
'event_list_widget', // Base ID
|
19 |
'Event List', // Name
|
20 |
+
array('description' => __('With this widget a list of upcoming events can be displayed.','event-list')) // Args
|
21 |
);
|
22 |
|
23 |
// define all available items
|
24 |
$this->items = array(
|
25 |
+
'title' => array('std_value' => __('Upcoming events','event-list').':'),
|
26 |
'cat_filter' => array('std_value' => 'all'),
|
27 |
'num_events' => array('std_value' => '3'),
|
28 |
'title_length' => array('std_value' => '0'),
|
35 |
'sc_id_for_url' => array('std_value' => '1'),
|
36 |
'link_to_event' => array('std_value' => 'false'),
|
37 |
'link_to_page' => array('std_value' => 'false'),
|
38 |
+
'link_to_page_caption' => array('std_value' => __('show events page','event-list')),
|
39 |
);
|
40 |
|
41 |
add_action('admin_init', array(&$this, 'load_widget_items_helptexts'), 2);
|
includes/widget_helptexts.php
CHANGED
@@ -5,100 +5,100 @@ if(!defined('WPINC')) {
|
|
5 |
|
6 |
$widget_items_helptexts = array(
|
7 |
'title' => array('type' => 'text',
|
8 |
-
'caption' => __('Title','
|
9 |
'caption_after' => null,
|
10 |
-
'tooltip' => __('This option defines the displayed title for the widget.','
|
11 |
'form_style' => null,
|
12 |
'form_width' => null),
|
13 |
|
14 |
'cat_filter' => array('type' => 'text',
|
15 |
-
'caption' => __('Category Filter','
|
16 |
'caption_after' => null,
|
17 |
-
'tooltip' => __('This option defines the categories of which events are shown. The standard is all or an empty string to show all events. Specify a category slug or a list of category slugs to only show events of the specified categories. See description of the shortcode attribute cat_filter for detailed info about all possibilities.','
|
18 |
'form_style' => 'margin:0 0 0.8em 0',
|
19 |
'form_width' => null),
|
20 |
|
21 |
'num_events' => array('type' => 'text',
|
22 |
-
'caption' => __('Number of listed events','
|
23 |
'caption_after' => null,
|
24 |
-
'tooltip' => __('The number of upcoming events to display','
|
25 |
'form_style' => '',
|
26 |
'form_width' => 30),
|
27 |
|
28 |
'title_length' => array('type' => 'text',
|
29 |
-
'caption' => __('Truncate event title to','
|
30 |
-
'caption_after' => __('characters','
|
31 |
-
'tooltip' => __('This option defines the number of displayed characters for the event title. Set this value to 0 to view the full title.','
|
32 |
'form_style' => null,
|
33 |
'form_width' => 30),
|
34 |
|
35 |
'show_starttime' => array('type' => 'checkbox',
|
36 |
-
'caption' => __('Show event starttime','
|
37 |
'caption_after' => null,
|
38 |
-
'tooltip' => __('This option defines if the event start time will be displayed.','
|
39 |
'form_style' => null,
|
40 |
'form_width' => null),
|
41 |
|
42 |
'show_location' => array('type' => 'checkbox',
|
43 |
-
'caption' => __('Show event location','
|
44 |
'caption_after' => null,
|
45 |
-
'tooltip' => __('This option defines if the event location will be displayed.','
|
46 |
'form_style' => 'margin:0 0 0.2em 0',
|
47 |
'form_width' => null),
|
48 |
|
49 |
'location_length' => array('type' => 'text',
|
50 |
-
'caption' => __('Truncate location to','
|
51 |
-
'caption_after' => __('characters','
|
52 |
-
'tooltip' => __('If the event location is diplayed this option defines the number of displayed characters. Set this value to 0 to view the full location.','
|
53 |
'form_style' => 'margin:0 0 0.6em 0.9em',
|
54 |
'form_width' => 30),
|
55 |
|
56 |
'show_details' => array('type' => 'checkbox',
|
57 |
-
'caption' => __('Show event details','
|
58 |
'caption_after' => null,
|
59 |
-
'tooltip' => __('This option defines if the event details will be displayed.','
|
60 |
'form_style' => 'margin:0 0 0.2em 0',
|
61 |
'form_width' => null),
|
62 |
|
63 |
'details_length' => array('type' => 'text',
|
64 |
-
'caption' => __('Truncate details to','
|
65 |
-
'caption_after' => __('characters','
|
66 |
-
'tooltip' => __('If the event details are diplayed this option defines the number of diplayed characters. Set this value to 0 to view the full details.','
|
67 |
'form_style' => 'margin:0 0 0.6em 0.9em',
|
68 |
'form_width' => 30),
|
69 |
|
70 |
'url_to_page' => array('type' => 'text',
|
71 |
-
'caption' => __('URL to the linked Event List page','
|
72 |
'caption_after' => null,
|
73 |
-
'tooltip' => __('This option defines the url to the linked Event List page. This option is required if you want to use one of the options below.','
|
74 |
'form_style' => 'margin:0 0 0.4em 0',
|
75 |
'form_width' => null),
|
76 |
|
77 |
'sc_id_for_url' => array('type' => 'text',
|
78 |
-
'caption' => __('Shortcode ID on linked page','
|
79 |
'caption_after' => null,
|
80 |
-
'tooltip' => __('This option defines the shortcode-id for the Event List on the linked page. Normally the standard value 1 is correct, you only have to change it if you use multiple event-list shortcodes on the linked page.','
|
81 |
'form_style' => null,
|
82 |
'form_width' => 30),
|
83 |
|
84 |
'link_to_event' => array('type' => 'checkbox',
|
85 |
-
'caption' => __('Add links to the single events','
|
86 |
'caption_after' => null,
|
87 |
-
'tooltip' => __('With this option you can add a link to the single event page for every displayed event. You have to specify the url to the page and the shortcode id option if you want to use it.','
|
88 |
'form_style' => 'margin-left:0.8em',
|
89 |
'form_width' => null),
|
90 |
|
91 |
'link_to_page' => array('type' => 'checkbox',
|
92 |
-
'caption' => __('Add a link to the Event List page','
|
93 |
'caption_after' => null,
|
94 |
-
'tooltip' => __('With this option you can add a link to the event-list page below the diplayed events. You have to specify the url to page option if you want to use it.','
|
95 |
'form_style' => 'margin:0 0 0.2em 0.8em',
|
96 |
'form_width' => null),
|
97 |
|
98 |
'link_to_page_caption' => array('type' => 'text',
|
99 |
-
'caption' => __('Caption for the link','
|
100 |
'caption_after' => null,
|
101 |
-
'tooltip' => __('This option defines the text for the link to the Event List page if the approriate option is selected.','
|
102 |
'form_style' => 'margin:0 0 1em 2.5em',
|
103 |
'form_width' => null),
|
104 |
);
|
5 |
|
6 |
$widget_items_helptexts = array(
|
7 |
'title' => array('type' => 'text',
|
8 |
+
'caption' => __('Title','event-list'),
|
9 |
'caption_after' => null,
|
10 |
+
'tooltip' => __('This option defines the displayed title for the widget.','event-list'),
|
11 |
'form_style' => null,
|
12 |
'form_width' => null),
|
13 |
|
14 |
'cat_filter' => array('type' => 'text',
|
15 |
+
'caption' => __('Category Filter','event-list').':',
|
16 |
'caption_after' => null,
|
17 |
+
'tooltip' => __('This option defines the categories of which events are shown. The standard is all or an empty string to show all events. Specify a category slug or a list of category slugs to only show events of the specified categories. See description of the shortcode attribute cat_filter for detailed info about all possibilities.','event-list'),
|
18 |
'form_style' => 'margin:0 0 0.8em 0',
|
19 |
'form_width' => null),
|
20 |
|
21 |
'num_events' => array('type' => 'text',
|
22 |
+
'caption' => __('Number of listed events','event-list').':',
|
23 |
'caption_after' => null,
|
24 |
+
'tooltip' => __('The number of upcoming events to display','event-list'),
|
25 |
'form_style' => '',
|
26 |
'form_width' => 30),
|
27 |
|
28 |
'title_length' => array('type' => 'text',
|
29 |
+
'caption' => __('Truncate event title to','event-list'),
|
30 |
+
'caption_after' => __('characters','event-list'),
|
31 |
+
'tooltip' => __('This option defines the number of displayed characters for the event title. Set this value to 0 to view the full title.','event-list'),
|
32 |
'form_style' => null,
|
33 |
'form_width' => 30),
|
34 |
|
35 |
'show_starttime' => array('type' => 'checkbox',
|
36 |
+
'caption' => __('Show event starttime','event-list'),
|
37 |
'caption_after' => null,
|
38 |
+
'tooltip' => __('This option defines if the event start time will be displayed.','event-list'),
|
39 |
'form_style' => null,
|
40 |
'form_width' => null),
|
41 |
|
42 |
'show_location' => array('type' => 'checkbox',
|
43 |
+
'caption' => __('Show event location','event-list'),
|
44 |
'caption_after' => null,
|
45 |
+
'tooltip' => __('This option defines if the event location will be displayed.','event-list'),
|
46 |
'form_style' => 'margin:0 0 0.2em 0',
|
47 |
'form_width' => null),
|
48 |
|
49 |
'location_length' => array('type' => 'text',
|
50 |
+
'caption' => __('Truncate location to','event-list'),
|
51 |
+
'caption_after' => __('characters','event-list'),
|
52 |
+
'tooltip' => __('If the event location is diplayed this option defines the number of displayed characters. Set this value to 0 to view the full location.','event-list'),
|
53 |
'form_style' => 'margin:0 0 0.6em 0.9em',
|
54 |
'form_width' => 30),
|
55 |
|
56 |
'show_details' => array('type' => 'checkbox',
|
57 |
+
'caption' => __('Show event details','event-list'),
|
58 |
'caption_after' => null,
|
59 |
+
'tooltip' => __('This option defines if the event details will be displayed.','event-list'),
|
60 |
'form_style' => 'margin:0 0 0.2em 0',
|
61 |
'form_width' => null),
|
62 |
|
63 |
'details_length' => array('type' => 'text',
|
64 |
+
'caption' => __('Truncate details to','event-list'),
|
65 |
+
'caption_after' => __('characters','event-list'),
|
66 |
+
'tooltip' => __('If the event details are diplayed this option defines the number of diplayed characters. Set this value to 0 to view the full details.','event-list'),
|
67 |
'form_style' => 'margin:0 0 0.6em 0.9em',
|
68 |
'form_width' => 30),
|
69 |
|
70 |
'url_to_page' => array('type' => 'text',
|
71 |
+
'caption' => __('URL to the linked Event List page','event-list').':',
|
72 |
'caption_after' => null,
|
73 |
+
'tooltip' => __('This option defines the url to the linked Event List page. This option is required if you want to use one of the options below.','event-list'),
|
74 |
'form_style' => 'margin:0 0 0.4em 0',
|
75 |
'form_width' => null),
|
76 |
|
77 |
'sc_id_for_url' => array('type' => 'text',
|
78 |
+
'caption' => __('Shortcode ID on linked page','event-list').':',
|
79 |
'caption_after' => null,
|
80 |
+
'tooltip' => __('This option defines the shortcode-id for the Event List on the linked page. Normally the standard value 1 is correct, you only have to change it if you use multiple event-list shortcodes on the linked page.','event-list'),
|
81 |
'form_style' => null,
|
82 |
'form_width' => 30),
|
83 |
|
84 |
'link_to_event' => array('type' => 'checkbox',
|
85 |
+
'caption' => __('Add links to the single events','event-list'),
|
86 |
'caption_after' => null,
|
87 |
+
'tooltip' => __('With this option you can add a link to the single event page for every displayed event. You have to specify the url to the page and the shortcode id option if you want to use it.','event-list'),
|
88 |
'form_style' => 'margin-left:0.8em',
|
89 |
'form_width' => null),
|
90 |
|
91 |
'link_to_page' => array('type' => 'checkbox',
|
92 |
+
'caption' => __('Add a link to the Event List page','event-list'),
|
93 |
'caption_after' => null,
|
94 |
+
'tooltip' => __('With this option you can add a link to the event-list page below the diplayed events. You have to specify the url to page option if you want to use it.','event-list'),
|
95 |
'form_style' => 'margin:0 0 0.2em 0.8em',
|
96 |
'form_width' => null),
|
97 |
|
98 |
'link_to_page_caption' => array('type' => 'text',
|
99 |
+
'caption' => __('Caption for the link','event-list').':',
|
100 |
'caption_after' => null,
|
101 |
+
'tooltip' => __('This option defines the text for the link to the Event List page if the approriate option is selected.','event-list'),
|
102 |
'form_style' => 'margin:0 0 1em 2.5em',
|
103 |
'form_width' => null),
|
104 |
);
|
languages/event-list-de_DE.mo
ADDED
Binary file
|
languages/{eventlist-de_DE.po → event-list-de_DE.po}
RENAMED
@@ -1,11 +1,10 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: wp-eventlist\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: Michael Burtscher <mike@mbnet.at>\n"
|
7 |
-
"Language-Team: \n"
|
8 |
-
"Language: de_DE\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,6 +12,7 @@ msgstr ""
|
|
13 |
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
|
|
16 |
"X-Poedit-SearchPath-0: /home/zeus/mike/workspace/wp-eventlist\n"
|
17 |
|
18 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/widget.php:20
|
@@ -108,7 +108,7 @@ msgid ""
|
|
108 |
"only for a single event"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
112 |
msgid ""
|
113 |
"This attribute specifies if the starttime is displayed in the event list."
|
114 |
"<br />\n"
|
@@ -119,7 +119,7 @@ msgid ""
|
|
119 |
"only for a single event"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
123 |
msgid ""
|
124 |
"This attribute specifies if the location is displayed in the event list.<br /"
|
125 |
">\n"
|
@@ -130,7 +130,7 @@ msgid ""
|
|
130 |
"only for a single event"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
134 |
msgid ""
|
135 |
"This attribute specifies if the categories are displayed in the event list."
|
136 |
"<br />\n"
|
@@ -141,7 +141,7 @@ msgid ""
|
|
141 |
"only for a single event"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
145 |
msgid ""
|
146 |
"This attribute specifies if the details are displayed in the event list.<br /"
|
147 |
">\n"
|
@@ -152,7 +152,7 @@ msgid ""
|
|
152 |
"only for a single event"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
156 |
msgid ""
|
157 |
"This attribute specifies if the details should be truncate to the given "
|
158 |
"number of characters in the event list.<br />\n"
|
@@ -162,7 +162,7 @@ msgid ""
|
|
162 |
"influence if only a single event is shown."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
166 |
msgid ""
|
167 |
"This attribute specifies if a link to the single event should be added onto "
|
168 |
"the event name in the event list.<br />\n"
|
@@ -173,7 +173,7 @@ msgid ""
|
|
173 |
"a single event"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
177 |
msgid ""
|
178 |
"This attribute specifies if a rss feed link should be added.<br />\n"
|
179 |
"\t You have to enable the feed in "
|
@@ -187,8 +187,8 @@ msgid ""
|
|
187 |
"a single event"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
191 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
192 |
msgid ""
|
193 |
"This attribute specifies if the title should be truncate to the given number "
|
194 |
"of characters in the event list.<br />\n"
|
@@ -198,7 +198,7 @@ msgid ""
|
|
198 |
"influence if only a single event is shown."
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
202 |
msgid ""
|
203 |
"This attribute specifies that the link should follow the given url.<br />\n"
|
204 |
"\t The standard is to leave this "
|
@@ -209,7 +209,7 @@ msgid ""
|
|
209 |
"list widget."
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
213 |
msgid ""
|
214 |
"This attribute the specifies shortcode id of the used shortcode on the page "
|
215 |
"specified with \"url_to_page\" attribute.<br />\n"
|
@@ -515,9 +515,10 @@ msgstr ""
|
|
515 |
|
516 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/options_helptexts.php:65
|
517 |
msgid ""
|
518 |
-
"This options sets the feed name. The standard value is \"
|
|
|
519 |
"\t This name will be used "
|
520 |
-
"in the feed url (e.g. <code>domain.com/?feed=
|
521 |
"<code>domain.com/feed/eventlist</code> for an installation with permalinks"
|
522 |
msgstr ""
|
523 |
|
@@ -673,23 +674,23 @@ msgstr ""
|
|
673 |
msgid "\"past\" specifies a time rage from the past to the previous day."
|
674 |
msgstr ""
|
675 |
|
676 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
|
|
|
|
|
|
|
|
677 |
msgid "Show all dates"
|
678 |
msgstr "Zeige alle Datumsbereiche"
|
679 |
|
680 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
681 |
-
msgid "
|
682 |
msgstr "Zeige alle Kategorien"
|
683 |
|
684 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
685 |
-
msgid "All"
|
686 |
-
msgstr "Alle"
|
687 |
-
|
688 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:307
|
689 |
msgid "Upcoming"
|
690 |
msgstr "Anstehend"
|
691 |
|
692 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
693 |
msgid "Past"
|
694 |
msgstr "Beendet"
|
695 |
|
@@ -963,9 +964,9 @@ msgid "Goto Category Settings"
|
|
963 |
msgstr ""
|
964 |
|
965 |
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/admin-new.php:220
|
966 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
967 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
968 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
969 |
msgid "Y/m/d"
|
970 |
msgstr ""
|
971 |
|
@@ -981,12 +982,12 @@ msgstr "Veröffentlicht"
|
|
981 |
msgid "Filter"
|
982 |
msgstr "Auswahl einschränken"
|
983 |
|
984 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
985 |
#, php-format
|
986 |
msgid "%s ago"
|
987 |
msgstr "vor %s"
|
988 |
|
989 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
990 |
msgid "Y/m/d g:i:s A"
|
991 |
msgstr ""
|
992 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: wp-eventlist\n"
|
4 |
+
"POT-Creation-Date: 2015-02-01 19:16+0100\n"
|
5 |
+
"PO-Revision-Date: 2015-02-01 19:18+0100\n"
|
6 |
"Last-Translator: Michael Burtscher <mike@mbnet.at>\n"
|
7 |
+
"Language-Team: Michael Burtscher\n"
|
|
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"Language: de\n"
|
16 |
"X-Poedit-SearchPath-0: /home/zeus/mike/workspace/wp-eventlist\n"
|
17 |
|
18 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/widget.php:20
|
108 |
"only for a single event"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:77
|
112 |
msgid ""
|
113 |
"This attribute specifies if the starttime is displayed in the event list."
|
114 |
"<br />\n"
|
119 |
"only for a single event"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:82
|
123 |
msgid ""
|
124 |
"This attribute specifies if the location is displayed in the event list.<br /"
|
125 |
">\n"
|
130 |
"only for a single event"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:87
|
134 |
msgid ""
|
135 |
"This attribute specifies if the categories are displayed in the event list."
|
136 |
"<br />\n"
|
141 |
"only for a single event"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:92
|
145 |
msgid ""
|
146 |
"This attribute specifies if the details are displayed in the event list.<br /"
|
147 |
">\n"
|
152 |
"only for a single event"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:97
|
156 |
msgid ""
|
157 |
"This attribute specifies if the details should be truncate to the given "
|
158 |
"number of characters in the event list.<br />\n"
|
162 |
"influence if only a single event is shown."
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:102
|
166 |
msgid ""
|
167 |
"This attribute specifies if a link to the single event should be added onto "
|
168 |
"the event name in the event list.<br />\n"
|
173 |
"a single event"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:107
|
177 |
msgid ""
|
178 |
"This attribute specifies if a rss feed link should be added.<br />\n"
|
179 |
"\t You have to enable the feed in "
|
187 |
"a single event"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:115
|
191 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:121
|
192 |
msgid ""
|
193 |
"This attribute specifies if the title should be truncate to the given number "
|
194 |
"of characters in the event list.<br />\n"
|
198 |
"influence if only a single event is shown."
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:127
|
202 |
msgid ""
|
203 |
"This attribute specifies that the link should follow the given url.<br />\n"
|
204 |
"\t The standard is to leave this "
|
209 |
"list widget."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:133
|
213 |
msgid ""
|
214 |
"This attribute the specifies shortcode id of the used shortcode on the page "
|
215 |
"specified with \"url_to_page\" attribute.<br />\n"
|
515 |
|
516 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/options_helptexts.php:65
|
517 |
msgid ""
|
518 |
+
"This options sets the feed name. The standard value is \"event-list\".<br /"
|
519 |
+
">\n"
|
520 |
"\t This name will be used "
|
521 |
+
"in the feed url (e.g. <code>domain.com/?feed=event-list</code> or "
|
522 |
"<code>domain.com/feed/eventlist</code> for an installation with permalinks"
|
523 |
msgstr ""
|
524 |
|
674 |
msgid "\"past\" specifies a time rage from the past to the previous day."
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:282
|
678 |
+
msgid "All"
|
679 |
+
msgstr "Alle"
|
680 |
+
|
681 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:285
|
682 |
msgid "Show all dates"
|
683 |
msgstr "Zeige alle Datumsbereiche"
|
684 |
|
685 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:285
|
686 |
+
msgid "Show all categories"
|
687 |
msgstr "Zeige alle Kategorien"
|
688 |
|
689 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:291
|
|
|
|
|
|
|
|
|
690 |
msgid "Upcoming"
|
691 |
msgstr "Anstehend"
|
692 |
|
693 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:295
|
694 |
msgid "Past"
|
695 |
msgstr "Beendet"
|
696 |
|
964 |
msgstr ""
|
965 |
|
966 |
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/admin-new.php:220
|
967 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:272
|
968 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:275
|
969 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:299
|
970 |
msgid "Y/m/d"
|
971 |
msgstr ""
|
972 |
|
982 |
msgid "Filter"
|
983 |
msgstr "Auswahl einschränken"
|
984 |
|
985 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:296
|
986 |
#, php-format
|
987 |
msgid "%s ago"
|
988 |
msgstr "vor %s"
|
989 |
|
990 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:301
|
991 |
msgid "Y/m/d g:i:s A"
|
992 |
msgstr ""
|
993 |
|
languages/{eventlist.pot → event-list.pot}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
# This is the translation template file for Event List.
|
2 |
-
# Copyright (C)
|
3 |
# This file is distributed under the same license as the plugin.
|
4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5 |
#
|
@@ -8,7 +8,7 @@ msgid ""
|
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: PACKAGE VERSION\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
-
"POT-Creation-Date:
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -78,49 +78,49 @@ msgid ""
|
|
78 |
"\t With \"event_list_only\" the filterbar is only visible in the event list and with \"single_event_only\" only for a single event"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
82 |
msgid ""
|
83 |
"This attribute specifies if the starttime is displayed in the event list.<br />\n"
|
84 |
"\t Choose \"false\" to always hide and \"true\" to always show the starttime.<br />\n"
|
85 |
"\t With \"event_list_only\" the starttime is only visible in the event list and with \"single_event_only\" only for a single event"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
89 |
msgid ""
|
90 |
"This attribute specifies if the location is displayed in the event list.<br />\n"
|
91 |
"\t Choose \"false\" to always hide and \"true\" to always show the location.<br />\n"
|
92 |
"\t With \"event_list_only\" the location is only visible in the event list and with \"single_event_only\" only for a single event"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
96 |
msgid ""
|
97 |
"This attribute specifies if the categories are displayed in the event list.<br />\n"
|
98 |
"\t Choose \"false\" to always hide and \"true\" to always show the category.<br />\n"
|
99 |
"\t With \"event_list_only\" the categories are only visible in the event list and with \"single_event_only\" only for a single event"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
103 |
msgid ""
|
104 |
"This attribute specifies if the details are displayed in the event list.<br />\n"
|
105 |
"\t Choose \"false\" to always hide and \"true\" to always show the details.<br />\n"
|
106 |
"\t With \"event_list_only\" the details are only visible in the event list and with \"single_event_only\" only for a single event"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
110 |
msgid ""
|
111 |
"This attribute specifies if the details should be truncate to the given number of characters in the event list.<br />\n"
|
112 |
"\t With the standard value 0 the full details are displayed.<br />\n"
|
113 |
"\t This attribute has no influence if only a single event is shown."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
117 |
msgid ""
|
118 |
"This attribute specifies if a link to the single event should be added onto the event name in the event list.<br />\n"
|
119 |
"\t Choose \"false\" to never add and \"true\" to always add the link.<br />\n"
|
120 |
"\t With \"event_list_only\" the link is only added in the event list and with \"single_event_only\" only for a single event"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
124 |
msgid ""
|
125 |
"This attribute specifies if a rss feed link should be added.<br />\n"
|
126 |
"\t You have to enable the feed in the eventlist settings to make this attribute workable.<br />\n"
|
@@ -129,22 +129,22 @@ msgid ""
|
|
129 |
"\t With \"event_list_only\" the link is only added in the event list and with \"single_event_only\" only for a single event"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
133 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
134 |
msgid ""
|
135 |
"This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />\n"
|
136 |
"\t With the standard value 0 the full details are displayed.<br />\n"
|
137 |
"\t This attribute has no influence if only a single event is shown."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
141 |
msgid ""
|
142 |
"This attribute specifies that the link should follow the given url.<br />\n"
|
143 |
"\t The standard is to leave this attribute empty, then the url will be calculated automatically from the actual page or post url.<br />\n"
|
144 |
"\t This is o.k. for the normal use of the shortcode. This attribute is normally only required for the event-list widget."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:
|
148 |
msgid ""
|
149 |
"This attribute the specifies shortcode id of the used shortcode on the page specified with \"url_to_page\" attribute.<br />\n"
|
150 |
"\t The empty standard value is o.k. for the normal use. This attribute is normally only required for the event-list widget."
|
@@ -371,8 +371,8 @@ msgstr ""
|
|
371 |
|
372 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/options_helptexts.php:65
|
373 |
msgid ""
|
374 |
-
"This options sets the feed name. The standard value is \"
|
375 |
-
"\t This name will be used in the feed url (e.g. <code>domain.com/?feed=
|
376 |
msgstr ""
|
377 |
|
378 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/options_helptexts.php:70
|
@@ -491,23 +491,23 @@ msgstr ""
|
|
491 |
msgid "\"past\" specifies a time rage from the past to the previous day."
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
495 |
-
msgid "
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
499 |
-
msgid "
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
503 |
-
msgid "
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
507 |
msgid "Upcoming"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:
|
511 |
msgid "Past"
|
512 |
msgstr ""
|
513 |
|
@@ -741,9 +741,9 @@ msgid "Goto Category Settings"
|
|
741 |
msgstr ""
|
742 |
|
743 |
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/admin-new.php:220
|
744 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
745 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
746 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
747 |
msgid "Y/m/d"
|
748 |
msgstr ""
|
749 |
|
@@ -759,12 +759,12 @@ msgstr ""
|
|
759 |
msgid "Filter"
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
763 |
#, php-format
|
764 |
msgid "%s ago"
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:
|
768 |
msgid "Y/m/d g:i:s A"
|
769 |
msgstr ""
|
770 |
|
1 |
# This is the translation template file for Event List.
|
2 |
+
# Copyright (C) 2015 Michael Burtscher
|
3 |
# This file is distributed under the same license as the plugin.
|
4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5 |
#
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: PACKAGE VERSION\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
+
"POT-Creation-Date: 2015-02-01 19:10+0100\n"
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
78 |
"\t With \"event_list_only\" the filterbar is only visible in the event list and with \"single_event_only\" only for a single event"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:77
|
82 |
msgid ""
|
83 |
"This attribute specifies if the starttime is displayed in the event list.<br />\n"
|
84 |
"\t Choose \"false\" to always hide and \"true\" to always show the starttime.<br />\n"
|
85 |
"\t With \"event_list_only\" the starttime is only visible in the event list and with \"single_event_only\" only for a single event"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:82
|
89 |
msgid ""
|
90 |
"This attribute specifies if the location is displayed in the event list.<br />\n"
|
91 |
"\t Choose \"false\" to always hide and \"true\" to always show the location.<br />\n"
|
92 |
"\t With \"event_list_only\" the location is only visible in the event list and with \"single_event_only\" only for a single event"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:87
|
96 |
msgid ""
|
97 |
"This attribute specifies if the categories are displayed in the event list.<br />\n"
|
98 |
"\t Choose \"false\" to always hide and \"true\" to always show the category.<br />\n"
|
99 |
"\t With \"event_list_only\" the categories are only visible in the event list and with \"single_event_only\" only for a single event"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:92
|
103 |
msgid ""
|
104 |
"This attribute specifies if the details are displayed in the event list.<br />\n"
|
105 |
"\t Choose \"false\" to always hide and \"true\" to always show the details.<br />\n"
|
106 |
"\t With \"event_list_only\" the details are only visible in the event list and with \"single_event_only\" only for a single event"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:97
|
110 |
msgid ""
|
111 |
"This attribute specifies if the details should be truncate to the given number of characters in the event list.<br />\n"
|
112 |
"\t With the standard value 0 the full details are displayed.<br />\n"
|
113 |
"\t This attribute has no influence if only a single event is shown."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:102
|
117 |
msgid ""
|
118 |
"This attribute specifies if a link to the single event should be added onto the event name in the event list.<br />\n"
|
119 |
"\t Choose \"false\" to never add and \"true\" to always add the link.<br />\n"
|
120 |
"\t With \"event_list_only\" the link is only added in the event list and with \"single_event_only\" only for a single event"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:107
|
124 |
msgid ""
|
125 |
"This attribute specifies if a rss feed link should be added.<br />\n"
|
126 |
"\t You have to enable the feed in the eventlist settings to make this attribute workable.<br />\n"
|
129 |
"\t With \"event_list_only\" the link is only added in the event list and with \"single_event_only\" only for a single event"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:115
|
133 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:121
|
134 |
msgid ""
|
135 |
"This attribute specifies if the title should be truncate to the given number of characters in the event list.<br />\n"
|
136 |
"\t With the standard value 0 the full details are displayed.<br />\n"
|
137 |
"\t This attribute has no influence if only a single event is shown."
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:127
|
141 |
msgid ""
|
142 |
"This attribute specifies that the link should follow the given url.<br />\n"
|
143 |
"\t The standard is to leave this attribute empty, then the url will be calculated automatically from the actual page or post url.<br />\n"
|
144 |
"\t This is o.k. for the normal use of the shortcode. This attribute is normally only required for the event-list widget."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/sc_event-list_helptexts.php:133
|
148 |
msgid ""
|
149 |
"This attribute the specifies shortcode id of the used shortcode on the page specified with \"url_to_page\" attribute.<br />\n"
|
150 |
"\t The empty standard value is o.k. for the normal use. This attribute is normally only required for the event-list widget."
|
371 |
|
372 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/options_helptexts.php:65
|
373 |
msgid ""
|
374 |
+
"This options sets the feed name. The standard value is \"event-list\".<br />\n"
|
375 |
+
"\t This name will be used in the feed url (e.g. <code>domain.com/?feed=event-list</code> or <code>domain.com/feed/eventlist</code> for an installation with permalinks"
|
376 |
msgstr ""
|
377 |
|
378 |
#: /home/zeus/mike/workspace/wp-eventlist/includes/options_helptexts.php:70
|
491 |
msgid "\"past\" specifies a time rage from the past to the previous day."
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:282
|
495 |
+
msgid "All"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:285
|
499 |
+
msgid "Show all dates"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:285
|
503 |
+
msgid "Show all categories"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:291
|
507 |
msgid "Upcoming"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: /home/zeus/mike/workspace/wp-eventlist/includes/filterbar.php:295
|
511 |
msgid "Past"
|
512 |
msgstr ""
|
513 |
|
741 |
msgstr ""
|
742 |
|
743 |
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/admin-new.php:220
|
744 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:272
|
745 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:275
|
746 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:299
|
747 |
msgid "Y/m/d"
|
748 |
msgstr ""
|
749 |
|
759 |
msgid "Filter"
|
760 |
msgstr ""
|
761 |
|
762 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:296
|
763 |
#, php-format
|
764 |
msgid "%s ago"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: /home/zeus/mike/workspace/wp-eventlist/admin/includes/event_table.php:301
|
768 |
msgid "Y/m/d g:i:s A"
|
769 |
msgstr ""
|
770 |
|
languages/eventlist-de_DE.mo
DELETED
Binary file
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: event, events, list, listview, calendar, schedule, shortcode, page, category, categories, filter, admin, attribute, widget, sidebar, feed, rss
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 0.7.
|
8 |
Plugin URI: http://wordpress.org/extend/plugins/event-list
|
9 |
Licence: GPLv2
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -72,6 +72,14 @@ Another possibility would be to call the wordpress function "do_shortcode()".
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
= 0.7.0 (2014-12-22) =
|
76 |
* initial multilanguage support
|
77 |
* German translation (not complete yet)
|
@@ -158,37 +166,31 @@ Additionally the url parameter has changed. So if you are using existing links t
|
|
158 |
Also existing widgets must be updated after plugin upgrade. Please visit the widget admin page and press save for all evenlist wigets.
|
159 |
|
160 |
= 0.5.2 (2013-11-09) =
|
161 |
-
|
162 |
* added number of events in Right Now dashboard widget
|
163 |
* fixed some css issues
|
164 |
|
165 |
= 0.5.1 (2013-10-27) =
|
166 |
-
|
167 |
* added site name in eventlist feed name (similar to standard feed captions)
|
168 |
* fixed not working feed link in header
|
169 |
* fixed problem with new widget options after upgrade
|
170 |
* fixed not working permalink for the eventlist feed
|
171 |
|
172 |
= 0.5.0 (2013-10-26) =
|
173 |
-
|
174 |
* added event feed with a lot of options
|
175 |
* added widget option for cat filter
|
176 |
|
177 |
= 0.4.5 (2013-08-05) =
|
178 |
-
|
179 |
* added capability to sync the event categories with the post categories (manually or automatically)
|
180 |
* fixed problem with empty category list
|
181 |
* fixed link to category page in new event page
|
182 |
* fixed indention in in category parent combo box
|
183 |
|
184 |
= 0.4.4 (2013-07-20) =
|
185 |
-
|
186 |
* added support for sub-categories
|
187 |
* moved category administration to seperate page
|
188 |
* improved category sorting
|
189 |
|
190 |
= 0.4.3 (2013-07-05) =
|
191 |
-
|
192 |
* added possibility to edit existing categories
|
193 |
* added tooptip texts for the widget option
|
194 |
* changed css classes to differ between event-list-view and single-event-view
|
@@ -198,12 +200,10 @@ Also existing widgets must be updated after plugin upgrade. Please visit the wid
|
|
198 |
* code improvements and cleanup in admin pages
|
199 |
|
200 |
= 0.4.2 (2013-06-09) =
|
201 |
-
|
202 |
* fixed links urls to events in eventlist-widget
|
203 |
* added option to show date only once per day
|
204 |
|
205 |
= 0.4.1 (2013-05-31) =
|
206 |
-
|
207 |
* fixed deleting of categories
|
208 |
* fixed url to calendar icon in new/edit event form
|
209 |
* fixed date format localization in new/edit event form
|
@@ -212,7 +212,6 @@ Also existing widgets must be updated after plugin upgrade. Please visit the wid
|
|
212 |
* small security improvements
|
213 |
|
214 |
= 0.4.0 (2013-05-04) =
|
215 |
-
|
216 |
* added category support
|
217 |
* added settings page
|
218 |
* small changes in add/edit event admin page
|
@@ -223,7 +222,6 @@ Also existing widgets must be updated after plugin upgrade. Please visit the wid
|
|
223 |
* small fixes in widget code
|
224 |
|
225 |
= 0.3.4 (2013-03-16) =
|
226 |
-
|
227 |
* fixed deleting of events
|
228 |
* removed link to not available settings page in about page
|
229 |
* changed parameter values from numbers to a more significant wording
|
@@ -231,19 +229,16 @@ Also existing widgets must be updated after plugin upgrade. Please visit the wid
|
|
231 |
* added shortcode attribute details_length to truncate details
|
232 |
|
233 |
= 0.3.3 (2013-03-01) =
|
234 |
-
|
235 |
* fixed event creation/modification problem with php versions < 5.3
|
236 |
* improved truncate of details in admin event table
|
237 |
|
238 |
= 0.3.2 (2013-02-24) =
|
239 |
-
|
240 |
* removed empty settings page (will be added again when settings are available)
|
241 |
* fixed view of details in admin event table
|
242 |
* fixed adding or modifying events with alternative date formats
|
243 |
* only set time format in output if a known time format was entered
|
244 |
|
245 |
= 0.3.1 (2013-01-03) =
|
246 |
-
|
247 |
* added widget option "show_location"
|
248 |
* fixed wrong url for single event page link
|
249 |
* fixed issue with different shortcodes on one page or post
|
@@ -253,7 +248,6 @@ Also existing widgets must be updated after plugin upgrade. Please visit the wid
|
|
253 |
|
254 |
|
255 |
= 0.3.0 (2012-12-31) =
|
256 |
-
|
257 |
* added a widget to show upcoming events in a sidebar
|
258 |
* added some shortcode attributes to modify the output
|
259 |
* internal code changes
|
@@ -261,20 +255,17 @@ Also existing widgets must be updated after plugin upgrade. Please visit the wid
|
|
261 |
* updated help texts on admin about page
|
262 |
|
263 |
= 0.2.2 (2012-11-18) =
|
264 |
-
|
265 |
* localization of date and time on the frontpage
|
266 |
* changed and localized date and time view in the admin event list table
|
267 |
* localization of date in the new event form
|
268 |
|
269 |
= 0.2.1 (2012-10-26) =
|
270 |
-
|
271 |
* changed field order and align in new/edit event form
|
272 |
* added datepicker for start and end date in new/edit event form
|
273 |
* improved multiday event selection in new/edit event form
|
274 |
* small changes in event table on admin page
|
275 |
|
276 |
= 0.2.0 (2012-09-29) =
|
277 |
-
|
278 |
* adapted menu names to wordpress standard (similar to posts and pages)
|
279 |
* adapted event list table admin page to wordpress standard layout
|
280 |
* used wordpress included table view for admin event table
|
@@ -283,12 +274,10 @@ Also existing widgets must be updated after plugin upgrade. Please visit the wid
|
|
283 |
* added status messages for added, modified and deleted events on admin page
|
284 |
|
285 |
= 0.1.1 (2012-09-24) =
|
286 |
-
|
287 |
* fixed an issue with additional quotes after adding or editing an event
|
288 |
* fixed saving of wrong date when adding a new event
|
289 |
* fixed sorting of events when more events are at the same day
|
290 |
* added validation of data before saving to database
|
291 |
|
292 |
= 0.1.0 (2012-09-08) =
|
293 |
-
|
294 |
* Initial release
|
4 |
Tags: event, events, list, listview, calendar, schedule, shortcode, page, category, categories, filter, admin, attribute, widget, sidebar, feed, rss
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 0.7.1
|
8 |
Plugin URI: http://wordpress.org/extend/plugins/event-list
|
9 |
Licence: GPLv2
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 0.7.1 (2015-02-01) =
|
76 |
+
* added options for month filterbar item
|
77 |
+
* only show years, months and cats with events in filterbar (acc. to available events and date/cat filter
|
78 |
+
* fixed event-list feed
|
79 |
+
* changed textdomain for translations to event-list
|
80 |
+
* some small code and html fixes
|
81 |
+
* some code improvements
|
82 |
+
|
83 |
= 0.7.0 (2014-12-22) =
|
84 |
* initial multilanguage support
|
85 |
* German translation (not complete yet)
|
166 |
Also existing widgets must be updated after plugin upgrade. Please visit the widget admin page and press save for all evenlist wigets.
|
167 |
|
168 |
= 0.5.2 (2013-11-09) =
|
|
|
169 |
* added number of events in Right Now dashboard widget
|
170 |
* fixed some css issues
|
171 |
|
172 |
= 0.5.1 (2013-10-27) =
|
|
|
173 |
* added site name in eventlist feed name (similar to standard feed captions)
|
174 |
* fixed not working feed link in header
|
175 |
* fixed problem with new widget options after upgrade
|
176 |
* fixed not working permalink for the eventlist feed
|
177 |
|
178 |
= 0.5.0 (2013-10-26) =
|
|
|
179 |
* added event feed with a lot of options
|
180 |
* added widget option for cat filter
|
181 |
|
182 |
= 0.4.5 (2013-08-05) =
|
|
|
183 |
* added capability to sync the event categories with the post categories (manually or automatically)
|
184 |
* fixed problem with empty category list
|
185 |
* fixed link to category page in new event page
|
186 |
* fixed indention in in category parent combo box
|
187 |
|
188 |
= 0.4.4 (2013-07-20) =
|
|
|
189 |
* added support for sub-categories
|
190 |
* moved category administration to seperate page
|
191 |
* improved category sorting
|
192 |
|
193 |
= 0.4.3 (2013-07-05) =
|
|
|
194 |
* added possibility to edit existing categories
|
195 |
* added tooptip texts for the widget option
|
196 |
* changed css classes to differ between event-list-view and single-event-view
|
200 |
* code improvements and cleanup in admin pages
|
201 |
|
202 |
= 0.4.2 (2013-06-09) =
|
|
|
203 |
* fixed links urls to events in eventlist-widget
|
204 |
* added option to show date only once per day
|
205 |
|
206 |
= 0.4.1 (2013-05-31) =
|
|
|
207 |
* fixed deleting of categories
|
208 |
* fixed url to calendar icon in new/edit event form
|
209 |
* fixed date format localization in new/edit event form
|
212 |
* small security improvements
|
213 |
|
214 |
= 0.4.0 (2013-05-04) =
|
|
|
215 |
* added category support
|
216 |
* added settings page
|
217 |
* small changes in add/edit event admin page
|
222 |
* small fixes in widget code
|
223 |
|
224 |
= 0.3.4 (2013-03-16) =
|
|
|
225 |
* fixed deleting of events
|
226 |
* removed link to not available settings page in about page
|
227 |
* changed parameter values from numbers to a more significant wording
|
229 |
* added shortcode attribute details_length to truncate details
|
230 |
|
231 |
= 0.3.3 (2013-03-01) =
|
|
|
232 |
* fixed event creation/modification problem with php versions < 5.3
|
233 |
* improved truncate of details in admin event table
|
234 |
|
235 |
= 0.3.2 (2013-02-24) =
|
|
|
236 |
* removed empty settings page (will be added again when settings are available)
|
237 |
* fixed view of details in admin event table
|
238 |
* fixed adding or modifying events with alternative date formats
|
239 |
* only set time format in output if a known time format was entered
|
240 |
|
241 |
= 0.3.1 (2013-01-03) =
|
|
|
242 |
* added widget option "show_location"
|
243 |
* fixed wrong url for single event page link
|
244 |
* fixed issue with different shortcodes on one page or post
|
248 |
|
249 |
|
250 |
= 0.3.0 (2012-12-31) =
|
|
|
251 |
* added a widget to show upcoming events in a sidebar
|
252 |
* added some shortcode attributes to modify the output
|
253 |
* internal code changes
|
255 |
* updated help texts on admin about page
|
256 |
|
257 |
= 0.2.2 (2012-11-18) =
|
|
|
258 |
* localization of date and time on the frontpage
|
259 |
* changed and localized date and time view in the admin event list table
|
260 |
* localization of date in the new event form
|
261 |
|
262 |
= 0.2.1 (2012-10-26) =
|
|
|
263 |
* changed field order and align in new/edit event form
|
264 |
* added datepicker for start and end date in new/edit event form
|
265 |
* improved multiday event selection in new/edit event form
|
266 |
* small changes in event table on admin page
|
267 |
|
268 |
= 0.2.0 (2012-09-29) =
|
|
|
269 |
* adapted menu names to wordpress standard (similar to posts and pages)
|
270 |
* adapted event list table admin page to wordpress standard layout
|
271 |
* used wordpress included table view for admin event table
|
274 |
* added status messages for added, modified and deleted events on admin page
|
275 |
|
276 |
= 0.1.1 (2012-09-24) =
|
|
|
277 |
* fixed an issue with additional quotes after adding or editing an event
|
278 |
* fixed saving of wrong date when adding a new event
|
279 |
* fixed sorting of events when more events are at the same day
|
280 |
* added validation of data before saving to database
|
281 |
|
282 |
= 0.1.0 (2012-09-08) =
|
|
|
283 |
* Initial release
|