dir|^|Packages file|^|Packages/modification.php|^|1367|^|1054068842 \n
$error
\n"; } ?>file|^|Packages/modification.txt|^|496|^|1051055737 This mod adds a calendar setting to force a new event to be added into the default board. It also adds a "Post No Topic" option when selecting the board to post the event. Choosing this will create a Calendar Event but will not create a new topic for it. The two options can work together by choosing "Post No Topic" as the Default Board and "Force Post into Default Board" in the Admin Section. This will basically force all new Calendar Events to be created without creating a new topic. file|^|Packages/modification1.4.1.mod|^|5339|^|1051055737 english.lng $txt['calendar1'] = $txt['calforceboard1'] = "Force Post into Default Board"; $txt['calnoboard1'] = "Post No Topic"; german.lng $txt['calendar1'] $txt['calforceboard1'] = "Immer in das Standard Board posten"; $txt['calnoboard1'] = "Kein Thema posten"; Sources/ModSettings.php $calBoards[] = ""; if ($modSettings['allowCalNoBoard'] == 1) $calBoards[] = $txt[calnoboard1]; $cal_AllowSpan = ($modSettings['cal_allowspan'] == '1' ? ' checked' : ''); $cal_ForceDefaultBoard = ($modSettings['cal_ForceDefaultBoard'] == '1' ? ' checked' : ''); $txt[calforceboard1] $onoffArray['cal_AllowSpan'] = 'cal_allowspan'; $onoffArray['cal_ForceDefaultBoard'] = 'cal_ForceDefaultBoard'; Sources/Calendar.php return($events); $strSql = "Select cal.day,cal.title,cal.id_board,cal.id_topic,cal.id_member,cal.id "; $strSql .= "From {$db_prefix}calendar as cal "; $strSql .= "Where cal.month=$month And cal.year=$year And cal.id_board = 0"; if ($day != NULL) $strSql .= " And cal.day = $day"; $rs = mysql_query($strSql); while($row = mysql_fetch_assoc($rs)) { if ($bPowerUser || $row['id_member'] == $ID_MEMBER) $strOwner = "*"; else $strOwner = ""; // See if the user has access to the board this event was posted in. if ($cats[$row['id_cat']][0] == "" || $bPowerUser || in_array($settings[7],$cats[$row['id_cat']])) { if (!isset($events[$row['day']])) $events[$row['day']] = "$txt[calendar4] $strOwner$row[title]"; else $events[$row['day']] .= ", $strOwner$row[title]"; } } return($events); print ""; // Check to see if the default board should be forced if ($modSettings['cal_ForceDefaultBoard'] == 1 && $modSettings['cal_defaultboard'] != "") { $rs = mysql_query("select b.id_board,b.name,c.memberGroups,c.name From {$db_prefix}boards as b, {$db_prefix}categories as c Where b.id_cat = c.id_cat"); if ($txt[calnoboard1] == $modSettings['cal_defaultboard']) print "$txt[calnoboard1]"; else { while($row = mysql_fetch_array($rs)) { $groups = explode(",",$row[2]); if ($row[2] == "" || $bPowerUser || in_array($settings[7],$groups)) { $board = "$row[3] - $row[1]"; if ($board == $modSettings['cal_defaultboard']) print "$board"; } } } } else { print ""; } Sources/Post.php if (mysql_num_rows($request) == 0) fatal_error($txt['yse232'] ); if (($board==-1) and ($modSettings['allowCalNoBoard'] == 1)) { Post2(); } if (trim($subject)=='') if (($board==-1) and ($modSettings['allowCalNoBoard'] == 1)) { CalendarInsertEvent($board,$threadid,$evtitle,$ID_MEMBER,$month,$day,$year,$span); $yySetLocation = "$cgi;action=calendar"; redirectexit(); } Sources/Display.php if (CalendarCanPost()) if (CalendarCanPost() && ((($modSettings[cal_ForceDefaultBoard] == 1) && ($modSettings[cal_defaultboard] == "$cat - $boardname")) || ($modSettings[cal_ForceDefaultBoard] != 1))) file|^|Packages/uninstall.php|^|1157|^|1054068844 '; if ($myversion == '1.5+') { rename('Packages/modification1.5.x.mod', 'Packages/modification.mod'); unlink('Packages/modification1.4.1.mod'); } else { rename('Packages/modification1.4.1.mod', 'Packages/modification.mod'); unlink('Packages/modification1.5.x.mod'); } $rs = mysql_query("SELECT variable FROM {$db_prefix}settings WHERE variable = 'cal_ForceDefaultBoard'"); if (mysql_num_rows($rs) == 1) { $q1 = <<' . $error . ' '; } ?>file|^|Packages/uninstall.txt|^|58|^|1051055739 Trying to run uninstall files for calforceboard.mod.yp....file|^|Packages/modification1.5.x.mod|^|7054|^|1054068843 Force Calendar Board 1.0 (YabbSE 1.5.x) Jack.R.Abbit Jack.R.Abbit Jack.R.Abbit This mod adds a calendar setting to force a new event to be added into the default board. It also adds a "Post No Topic" option when selecting the board to post the event. Choosing this will create a Calendar Event but will not create a new topic for it. The two options can work together by choosing "Post No Topic" as the Default Board and "Force Post into Default Board" in the Admin Section. This will basically force all new Calendar Events to be created without creating a new topic. no english.lng $txt['calendar1'] $txt['calforceboard1'] = 'Force Post into Default Board'; $txt['calnoboard1'] = 'Post No Topic'; german.lng $txt['calendar1'] $txt['calforceboard1'] = 'Immer in das Standard Board posten'; $txt['calnoboard1'] = 'Kein Thema posten'; Sources/ModSettings.php $calBoards[] = ""; if ($modSettings['allowCalNoBoard'] == 1) $calBoards[] = $txt[calnoboard1]; $cal_AllowSpan = ($modSettings['cal_allowspan'] == '1' ? ' checked="checked"' : ''); $cal_ForceDefaultBoard = ($modSettings['cal_ForceDefaultBoard'] == '1' ? ' checked' : ''); ' . $cal_boardOptions . ' ' . $txt['calforceboard1'] . ' $onoffArray = array( 'cal_ForceDefaultBoard' => 'cal_ForceDefaultBoard', Sources/Calendar.php return($events); $strSql = "SELECT cal.day,cal.title,cal.id_board,cal.id_topic,cal.id_member,cal.id "; $strSql .= "FROM {$db_prefix}calendar AS cal "; $strSql .= "WHERE cal.month=$month AND cal.year=$year AND cal.id_board = 0"; if ($day != NULL) $strSql .= " AND cal.day = $day"; $rs = mysql_query($strSql) or database_error(__FILE__, __LINE__); while($row = mysql_fetch_assoc($rs)) { if ($bPowerUser || $row['id_member'] == $ID_MEMBER) $strOwner = '*'; else $strOwner = ''; // See if the user has access to the board this event was posted in. if ($cats[$row['id_cat']][0] == "" || $bPowerUser || in_array($settings[7], $cats[$row['id_cat']])) { if (!isset($events[$row['day']])) $events[$row['day']] = '' . $txt['calendar4'] . ' ' . $strOwner.$row['title']; else $events[$row['day']] .= ', ' . $strOwner.$row['title']; } } '; // Check to see if the default board should be forced if ($modSettings['cal_ForceDefaultBoard'] == 1 && $modSettings['cal_defaultboard'] != "") { $rs = mysql_query("SELECT b.ID_BOARD, b.name, c.memberGroups, c.name FROM {$db_prefix}boards AS b, {$db_prefix}categories AS c WHERE b.ID_CAT = c.ID_CAT;") or database_error(__FILE__, __LINE__); if ($txt['calnoboard1'] == $modSettings['cal_defaultboard']) echo '' . $txt['calnoboard1']; else { while($row = mysql_fetch_array($rs)) { $groups = explode(",",$row[2]); if ($row[2] == "" || $bPowerUser || in_array($settings[7],$groups)) { $board = "$row[3] - $row[1]"; if ($board == $modSettings['cal_defaultboard']) echo '' . $board; } } } } else { echo ''; } echo ' Sources/Post.php if (mysql_num_rows($request) == 0) fatal_error($txt['yse232']); if (($board == -1) && ($modSettings['allowCalNoBoard'] == 1)) { global $HTTP_POST_VARS; $HTTP_POST_VARS['sc'] = session_id(); Post2(); } if (trim($subject) == '') if (($board == -1) && ($modSettings['allowCalNoBoard'] == 1)) { CalendarInsertEvent($board, $threadid, $evtitle, $ID_MEMBER, $month, $day, $year, $span); $yySetLocation = "$cgi;action=calendar"; redirectexit(); } fatal_error($txt[90]); // don't allow a post if it's locked } if ($board != '-1') { // If poster is a Guest then evaluate the legality of name and email } Sources/Display.php if (CalendarCanPost()) if (CalendarCanPost() && ((($modSettings['cal_ForceDefaultBoard'] == 1) && ($modSettings['cal_defaultboard'] == "$cat - $boardname")) || ($modSettings['cal_ForceDefaultBoard'] != 1)))