Commit ae60d3b1 authored by root's avatar root Committed by lechuck
Browse files

Import weekly-schedule 2.3.1

parent f1c5b764
......@@ -26,6 +26,12 @@ You can see a demonstration of the output of the plugin using a single schedule
== Changelog ==
= 2.3.1 =
* Fix check when you change time division to only check items under current schedule for conflicts
= 2.3 =
* Increase size of day name field from 12 to 64 characters
= 2.2.5 =
* Add option to specify the link target (window) where links will be opened. Was previously hard-coded to new window.
......
......@@ -7,19 +7,25 @@
color: #FFFFFF;
}
.ws-schedule table {
width: 96%;
table-layout: fixed;
}
.ws-schedule .verticalcolumn {
.ws-schedule .verticalcolumn1 {
float: left;
width: 80px;
width: 100px;
}
.ws-schedule .verticalcolumn2 {
float: left;
width: 50px;
}
.ws-schedule table.verticalheader {
width: 100px;
}
.ws-schedule table.vertical {
.ws-schedule table.vertical1 {
width: 100px;
}
.ws-schedule table.vertical2 {
width: 50px;
}
.ws-schedule th.rowheader {
width: 30px;
height: 50px;
......@@ -29,6 +35,11 @@
text-align: center;
vertical-align: middle;
}
.ws-schedule tr th {
padding: 0px !important;
}
.ws-schedule tr.topheader {
height: 30px;
}
......
......@@ -2,7 +2,7 @@
/*Plugin Name: Weekly Schedule
Plugin URI: http://yannickcorner.nayanna.biz/wordpress-plugins/
Description: A plugin used to create a page with a list of TV shows
Version: 2.2.5
Version: 2.3.1
Author: Yannick Lefebvre
Author URI: http://yannickcorner.nayanna.biz
Copyright 2010 Yannick Lefebvre (email : ylefebvre@gmail.com)
......@@ -137,8 +137,8 @@ function ws_install() {
$genoptions['version'] = "2.0";
update_option('WeeklyScheduleGeneral', $genoptions);
}
}
}
}
$options = get_option('WS_PP1');
......@@ -173,6 +173,13 @@ function ws_install() {
update_option("WeeklyScheduleGeneral", $genoptions);
}
elseif ($genoptions['version'] == "2.0")
{
$genoptions['version'] = "2.3";
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wsdays` CHANGE `name` `name` VARCHAR( 64 ) " . $charset_collate . " NOT NULL");
update_option("WeeklyScheduleGeneral", $genoptions);
}
}
register_activation_hook(WS_FILE, 'ws_install');
......@@ -279,12 +286,14 @@ if ( ! class_exists( 'WS_Admin' ) ) {
if (!current_user_can('manage_options')) die(__('You cannot edit the Weekly Schedule for WordPress options.'));
check_admin_referer('wspp-config');
if ($_POST['timedivision'] != $options['timedivision'] && $_POST['timedivision'] == "3.0")
{
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25");
$itemshalfhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.5");
$itemshour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 1.0");
$itemstwohour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 2.0");
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25 and scheduleid = " . $schedule);
$itemshalfhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.5 and scheduleid = " . $schedule);
$itemshour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 1.0 and scheduleid = " . $schedule);
$itemstwohour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 2.0 and scheduleid = " . $schedule);
if ($itemsquarterhour)
{
......@@ -311,9 +320,9 @@ if ( ! class_exists( 'WS_Admin' ) ) {
}
elseif ($_POST['timedivision'] != $options['timedivision'] && $_POST['timedivision'] == "2.0")
{
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25");
$itemshalfhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.5");
$itemshour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 1.0");
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25 and scheduleid = " . $schedule);
$itemshalfhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.5 and scheduleid = " . $schedule);
$itemshour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 1.0 and scheduleid = " . $schedule);
if ($itemsquarterhour)
{
......@@ -335,8 +344,8 @@ if ( ! class_exists( 'WS_Admin' ) ) {
}
elseif ($_POST['timedivision'] != $options['timedivision'] && $_POST['timedivision'] == "1.0")
{
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25");
$itemshalfhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.5");
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25 and scheduleid = " . $schedule);
$itemshalfhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.5 and scheduleid = " . $schedule);
if ($itemsquarterhour)
{
......@@ -353,7 +362,7 @@ if ( ! class_exists( 'WS_Admin' ) ) {
}
elseif ($_POST['timedivision'] != $options['timedivision'] && $_POST['timedivision'] == "0.5")
{
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25");
$itemsquarterhour = $wpdb->get_results("SELECT * from " . $wpdb->prefix . "wsitems WHERE MOD(duration, 1) = 0.25 and scheduleid = " . $schedule);
if ($itemsquarterhour)
{
......@@ -725,18 +734,31 @@ if ( ! class_exists( 'WS_Admin' ) ) {
<legend class="tooltip" title='These apply to all schedules' style='padding: 0 5px 0 5px;'><strong>General Settings <span style="border:0;padding-left: 15px;" class="submit"><input type="submit" name="submitgen" value="Update General Settings &raquo;" /></span></strong></legend>
<table>
<tr>
<td style='width:200px'>Stylesheet File Name</td>
<td><input type="text" id="stylesheet" name="stylesheet" size="40" value="<?php echo $genoptions['stylesheet']; ?>"/></td>
<td style='padding-left: 10px;padding-right:10px'>Number of Schedules</td>
<td><input type="text" id="numberschedules" name="numberschedules" size="5" value="<?php if ($genoptions['numberschedules'] == '') echo '2'; echo $genoptions['numberschedules']; ?>"/></td>
</tr>
<tr>
<td style="padding-left: 10px;padding-right:10px">Debug Mode</td>
<td><input type="checkbox" id="debugmode" name="debugmode" <?php if ($genoptions['debugmode']) echo ' checked="checked" '; ?>/></td>
</tr>
<tr>
<td colspan="2">Additional pages to load styles and scripts (Comma-Separated List of Page IDs)</td>
<td colspan="2"><input type='text' name='includestylescript' style='width: 200px' value='<?php echo $genoptions['includestylescript']; ?>' /></td>
<td style='padding: 8px; vertical-align: top'>
<table>
<tr>
<td style='width:200px'>Stylesheet File Name</td>
<td><input type="text" id="stylesheet" name="stylesheet" size="40" value="<?php echo $genoptions['stylesheet']; ?>"/></td>
</tr>
<tr>
<td>Number of Schedules</td>
<td><input type="text" id="numberschedules" name="numberschedules" size="5" value="<?php if ($genoptions['numberschedules'] == '') echo '2'; echo $genoptions['numberschedules']; ?>"/></td>
</tr>
<tr>
<td style="padding-left: 10px;padding-right:10px">Debug Mode</td>
<td><input type="checkbox" id="debugmode" name="debugmode" <?php if ($genoptions['debugmode']) echo ' checked="checked" '; ?>/></td>
</tr>
<tr>
<td colspan="2">Additional pages to style (Comma-Separated List of Page IDs)</td>
</tr>
<tr>
<td colspan="2"><input type='text' name='includestylescript' style='width: 200px' value='<?php echo $genoptions['includestylescript']; ?>' /></td>
</tr>
</table>
</td>
<td style='padding: 8px; vertical-align: top; border: #cccccc 1px solid;'>
<div><h3>ThemeFuse Original WP Themes</h3>If you are looking to buy an original WP theme, take a look at <a href="https://www.e-junkie.com/ecom/gb.php?cl=136641&c=ib&aff=153522" target="ejejcsingle">ThemeFuse</a><br />They have a nice 1-click installer, great support and good-looking themes.</div><div style='text-align: center; padding-top: 10px'><a href="https://www.e-junkie.com/ecom/gb.php?cl=136641&c=ib&aff=153522" target="ejejcsingle"><img src='http://themefuse.com/wp-content/themes/themefuse/images/campaigns/themefuse.jpg' /></a></div>
</td>
</tr>
</table>
</fieldset>
......@@ -1537,9 +1559,9 @@ function ws_library($scheduleid = 1, $starttime = 19, $endtime = 22, $timedivisi
if ($layout == 'vertical')
{
$output .= "<div class='verticalcolumn'>\n";
$output .= "<table class='vertical'>\n";
$output .= "<tr class='vertrow'>";
$output .= "<div class='verticalcolumn" . $day->rows. "'>\n";
$output .= "<table class='vertical" . $day->rows . "'>\n";
$output .= "<tr class='vertrow" . $day->rows. "'>";
}
elseif ($layout == 'horizontal' || $layout == '')
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment