mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Add optional wysiwyg on events, utf-8 truncate on day names, other tweaks
This commit is contained in:
parent
a0a387d8b6
commit
53c87d08ae
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/admin_config.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-07-13 19:37:52 $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-09-04 21:09:46 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -61,6 +61,7 @@ if (isset($_POST['updatesettings'])) {
|
||||
$pref['eventpost_mailaddress'] = $_POST['eventpost_mailaddress'];
|
||||
$pref['eventpost_asubs'] = $_POST['eventpost_asubs'];
|
||||
$pref['eventpost_emaillog'] = $_POST['eventpost_emaillog'];
|
||||
$pref['eventpost_editmode'] = $_POST['eventpost_editmode'];
|
||||
save_prefs();
|
||||
$e107cache->clear('nq_event_cal'); // Clear cache as well, in case displays changed
|
||||
$message = EC_LAN_75; // "Calendar settings updated.";
|
||||
@ -908,6 +909,18 @@ $text .= "
|
||||
<td class='forumheader3'><input class='tbox' type='checkbox' name='eventpost_fivemins' value='1' ".($pref['eventpost_fivemins']==1?" checked='checked' ":"")." /> <span class='smalltext'><em>".EC_ADLAN_A139."</em></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='forumheader3'>".EC_ADLAN_A200."<br /></td>
|
||||
<td class='forumheader3'>
|
||||
<select name='eventpost_editmode' class='tbox'>
|
||||
<option value='0' ".($pref['eventpost_editmode']=='0'?" selected='selected' ":"")." >".EC_ADLAN_A201."</option>
|
||||
<option value='1' ".($pref['eventpost_editmode']=='1'?" selected='selected' ":"")." >".EC_ADLAN_A202."</option>
|
||||
<option value='2' ".($pref['eventpost_editmode']=='2'?" selected='selected' ":"")." >".EC_ADLAN_A203."</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='forumheader3'>".EC_ADLAN_A122."<br />
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_menu.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-07-13 19:37:52 $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-09-04 21:09:47 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -44,9 +44,9 @@ $cal_datearray = $ecal_class->cal_date;
|
||||
$cal_current_month = $cal_datearray['mon'];
|
||||
$cal_current_year = $cal_datearray['year'];
|
||||
$numberdays = date("t", $ecal_class->cal_timedate); // number of days in this month
|
||||
$cal_monthstart = mktime(0, 0, 0, $cal_current_month, 1, $cal_current_year); // Time stamp for first day of month
|
||||
$cal_monthstart = gmmktime(0, 0, 0, $cal_current_month, 1, $cal_current_year); // Time stamp for first day of month
|
||||
$cal_firstdayarray = getdate($cal_monthstart);
|
||||
$cal_monthend = mktime(0, 0, 0, $cal_current_month + 1, 1, $cal_current_year) -1; // Time stamp for last day of month
|
||||
$cal_monthend = gmmktime(0, 0, 0, $cal_current_month + 1, 1, $cal_current_year) -1; // Time stamp for last day of month
|
||||
//$cal_thismonth = $cal_datearray['mon'];
|
||||
$cal_thisday = $cal_datearray['mday']; // Today
|
||||
$cal_events = array();
|
||||
@ -110,7 +110,7 @@ for ($i = 0; $i < 7; $i++)
|
||||
$cal_day = $ecal_class->day_offset_string($i);
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_FRONT;
|
||||
// $cal_text .= substr($cal_day, 0, $pref['eventpost_lenday']);
|
||||
$cal_text .= substr($cal_day, 0, 1); // Unlikely to have room for more than 1 letter
|
||||
$cal_text .= $tp->text_truncate($cal_day, 1, ''); // Unlikely to have room for more than 1 letter
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_BACK;
|
||||
}
|
||||
$cal_text .= $CALENDAR_MENU_HEADER_END; // Close off header row, open first date row
|
||||
@ -137,7 +137,7 @@ for($cal_c = 1; $cal_c <= $numberdays; $cal_c++)
|
||||
$cal_event_count = 0;
|
||||
$title = "";
|
||||
if ($cal_thisday == $cal_c) $cal_css = 1;
|
||||
$cal_linkut = mktime(0 , 0 , 0 , $cal_current_month, $cal_c, $cal_current_year).".one"; // Always need "one"
|
||||
$cal_linkut = gmmktime(0 , 0 , 0 , $cal_current_month, $cal_c, $cal_current_year).".one"; // Always need "one"
|
||||
if (array_key_exists($cal_c, $cal_events))
|
||||
{ // There are events today
|
||||
$cal_event_icon = "calendar_menu/images/" . $cal_events[$cal_c]['0']; // Icon file could be NULL
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_shortcodes.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-07-13 19:37:52 $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2007-09-04 21:09:47 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -161,9 +161,9 @@ SC_BEGIN EC_SHOWEVENT_HEADING
|
||||
global $ev, $datearray, $c, $tp;
|
||||
$linkut = mktime(0 , 0 , 0 , $datearray['mon'], $c, $datearray['year']);
|
||||
$show_title = $tp->toHTML($ev['event_title'],FALSE,'TITLE'); // Remove entities in case need to truncate
|
||||
if(isset($ev['fulltopic']) && !$ev['fulltopic'] && (strlen($show_title) > 10))
|
||||
if(isset($ev['fulltopic']) && !$ev['fulltopic'])
|
||||
{
|
||||
$show_title = substr($show_title, 0, 10) . "...";
|
||||
$show_title = $tp->text_truncate($show_title, 10, "...");
|
||||
}
|
||||
if($ev['startofevent'])
|
||||
{
|
||||
@ -181,10 +181,10 @@ SC_END
|
||||
// CALENDAR CALENDAR - 'Big' calendar
|
||||
//------------------------------------------
|
||||
SC_BEGIN EC_CALENDAR_CALENDAR_HEADER_DAY
|
||||
global $day, $pref;
|
||||
global $day, $pref, $tp;
|
||||
if(isset($pref['eventpost_lenday']) && $pref['eventpost_lenday'])
|
||||
{
|
||||
return "<strong>".substr($day,0,$pref['eventpost_lenday'])."</strong>";
|
||||
return "<strong>".$tp->text_truncate($day,$pref['eventpost_lenday'],'')."</strong>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
31
e107_plugins/calendar_menu/e_bb.php
Normal file
31
e107_plugins/calendar_menu/e_bb.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| ©Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_bb.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2007-09-04 21:09:47 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
|
||||
BBCode template for calendar menu (pretend we're custom page)
|
||||
*/
|
||||
$BBCODE_TEMPLATE_CPAGE = "
|
||||
{BB_HELP=ec_event}<br />
|
||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
||||
{BB=bq}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
||||
{BB_PREIMAGEDIR=".e_IMAGE."newspost_images/}
|
||||
{BB=preimage}{BB=prefile}
|
||||
";
|
||||
|
||||
|
||||
|
||||
?>
|
@ -11,12 +11,10 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/event.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-07-13 19:37:52 $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-09-04 21:09:47 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
To do:
|
||||
1. Clear array variables after use - ev_list, tim_arr
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
require_once("../../class2.php");
|
||||
@ -58,6 +56,10 @@ $cal = new DHTML_Calendar(true);
|
||||
$cat_filter = intval(varset($_POST['event_cat_ids'],0));
|
||||
$mult_count = 0;
|
||||
|
||||
|
||||
$e_wysiwyg = $pref['eventpost_editmode'] == 2 ? 'ne_event' : '';
|
||||
|
||||
|
||||
// Array links db field names to internal variables
|
||||
$ev_fields = array(
|
||||
'event_id' => 'id',
|
||||
@ -600,15 +602,29 @@ if ($action == "ne" || $action == "ed")
|
||||
$text .= "</select>
|
||||
</td></tr>";
|
||||
|
||||
switch ($pref['eventpost_editmode'])
|
||||
{
|
||||
case 1 : $insertjs = "rows='15' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'";
|
||||
case 2 : $insertjs = "rows='25' ";
|
||||
default : $insertjs = "rows='15' ";
|
||||
}
|
||||
|
||||
$text .= "
|
||||
<tr><td class='forumheader3'>".EC_LAN_32." </td><td class='forumheader3'>
|
||||
<input class='tbox' type='text' name='ne_location' size='60' value='".(isset($ne_location) ? $ne_location : "")."' maxlength='200' style='width:95%' />
|
||||
</td></tr>
|
||||
|
||||
<tr><td class='forumheader3'>".EC_LAN_57." *</td><td class='forumheader3'>
|
||||
<textarea class='tbox' name='ne_event' cols='59' rows='8' style='width:95%'>".(isset($ne_event) ? $ne_event : "")."</textarea>
|
||||
</td></tr>";
|
||||
<textarea class='tbox' id='ne_event' name='ne_event' cols='59' style='width:95%' {$insertjs}>".(isset($ne_event) ? $ne_event : "")."</textarea>";
|
||||
if ($pref['eventpost_editmode'] == 1)
|
||||
{
|
||||
// Show help
|
||||
require_once(e_HANDLER."ren_help.php");
|
||||
$text .= "<br />".display_help("helpb", 'cpage');
|
||||
}
|
||||
|
||||
$text .= "</td></tr>";
|
||||
|
||||
// Only display for forum thread/link if required. No point if not wanted
|
||||
if (isset($pref['eventpost_forum']) && $pref['eventpost_forum'] == 1)
|
||||
{
|
||||
@ -657,7 +673,7 @@ if ($action == "ne" || $action == "ed")
|
||||
header("location:".e_PLUGIN."calendar_menu/event.php");
|
||||
exit;
|
||||
}
|
||||
} // End of "Enter New Event
|
||||
} // End of "Enter New Event"
|
||||
|
||||
|
||||
//-----------------------------------------------
|
||||
@ -851,6 +867,7 @@ $ns->tablerender($caption.(isset($cap_title) ? $cap_title : ""), $text2);
|
||||
// Claim back memory no longer required
|
||||
unset($ev_list);
|
||||
unset($text2);
|
||||
unset($tim_arr);
|
||||
|
||||
require_once(FOOTERF);
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/languages/English.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-07-13 19:37:52 $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-09-04 21:09:47 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -410,6 +410,12 @@ define('EC_ADLAN_A196', "Display/Print/PDF");
|
||||
define('EC_ADLAN_A197', "No class membership");
|
||||
define('EC_ADLAN_A198', "Invalid User");
|
||||
define('EC_ADLAN_A199', "Show 'recent' icon");
|
||||
define('EC_ADLAN_A200', "Editor for events");
|
||||
define('EC_ADLAN_A201', "BBCode (Standard)");
|
||||
define('EC_ADLAN_A202', "BBCode with help");
|
||||
define('EC_ADLAN_A203', "WYSIWYG");
|
||||
define('EC_ADLAN_A204', "");
|
||||
define('EC_ADLAN_A205', "");
|
||||
|
||||
// Notify
|
||||
define("NT_LAN_EC_1", "Event Calendar Events");
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/plugin.php,v $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2007-07-13 19:37:52 $
|
||||
| $Revision: 1.6 $
|
||||
| $Date: 2007-09-04 21:09:47 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
|
Loading…
x
Reference in New Issue
Block a user