diff --git a/bmlt-meeting-list.php b/bmlt-meeting-list.php index 85788c2..845df67 100644 --- a/bmlt-meeting-list.php +++ b/bmlt-meeting-list.php @@ -5,10 +5,11 @@ Description: Maintains and generates a PDF Meeting List from BMLT. Author: bmlt-enabled Author URI: https://bmlt.app -Version: 2.0.0 +Version: 2.1.0 */ /* Disallow direct access to the plugin file */ use Mpdf\Mpdf; +use function DeepCopy\deep_copy; error_reporting(1); if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) { die('Sorry, but you cannot access this page directly.'); @@ -22,9 +23,11 @@ class Bread { var $mpdf = ''; var $meeting_count = 0; var $formats_used = ''; - var $formats_by_key = ''; + var $formats_by_key = array(); var $formats_spanish = ''; var $formats_all = ''; + var $translate = array(); + var $services = ''; var $meeting_fields = array ( 'id_bigint', 'service_body_bigint', @@ -124,7 +127,7 @@ function __construct() { $current_settings = isset($holder['current-meeting-list']) ? intval($holder['current-meeting-list']) : 1; $this->getMLOptions($current_settings); $this->lang = $this->get_bmlt_server_lang(); - + $this->load_translations(); if (isset($holder['current-meeting-list']) && !is_admin()) { $this->bmlt_meeting_list(); } else if (is_admin()) { @@ -307,194 +310,20 @@ function my_theme_add_editor_styles() { add_editor_style( plugin_dir_url(__FILE__) . "css/editor-style.css" ); } } - - function getday( $day, $abbreviate = false, $language = '') { - $data = ''; - if ( $day == 1 ) { - if ( $language == 'en' || $language == 'en' ) { - $data = ($abbreviate ? 'Sun' : "Sunday"); - } elseif ( $language == 'es' ) { - $data = ($abbreviate ? 'Dom' : "Domingo"); - } elseif ( $language == 'fr' ) { - $data = ($abbreviate ? 'Dim' : "Dimanche"); - } elseif ( $language == 'both_po' ) { - $data = ($abbreviate ? 'Sun / Dom' : "Sunday / Domingo"); - } elseif ( $language == 'po' ) { - $data = ($abbreviate ? 'Dom' : "Domingo"); - } elseif ( $language == 'both' ) { - $data = ($abbreviate ? 'Sun / Dom' : "Sunday / Domingo"); - } elseif ( $language == 'fr_en' ) { - $data = ($abbreviate ? 'Dim / Sun' : "Dimanche / Sunday"); - } elseif ( $language == 'se') { - $data = ($abbreviate ? "Sön" : "Söndag"); - } elseif ( $language == 'dk') { - $data = ($abbreviate ? "Sø" : "Søndag"); - } elseif ( $language == 'de' ) { - $data = ($abbreviate ? 'So.' : "Sonntag"); - } elseif ( $language == 'fa' ) { - $data = ($abbreviate ? '' : mb_convert_encoding ('یَکشَنبه', 'HTML-ENTITIES')); - } elseif ( $language == 'it') { - $data = ($abbreviate ? "Do" : "Domenica"); - } - } elseif ( $day == 2 ) { - if ( $language == 'en' || $language == 'en' ) { - $data = ($abbreviate ? 'Mon' : "Monday"); - } elseif ( $language == 'es' ) { - $data = ($abbreviate ? 'Lun' : "Lunes"); - } elseif ( $language == 'fr' ) { - $data = ($abbreviate ? 'Lun' : "Lundi"); - } elseif ( $language == 'both_po' ) { - $data = ($abbreviate ? 'Mon / Lun / Seg' : "Monday / Lunes / Segunda-feira"); - } elseif ( $language == 'po' ) { - $data = ($abbreviate ? 'Seq' : "Segunda-feira"); - } elseif ( $language == 'both' ) { - $data = ($abbreviate ? 'Mon / Lun' : "Monday / Lunes"); - } elseif ( $language == 'fr_en' ) { - $data = ($abbreviate ? 'Lun / Mon' : "Lundi / Monday"); - } elseif ( $language == 'se') { - $data = ($abbreviate ? "Mån" : "Måndag"); - } elseif ( $language == 'dk') { - $data = ($abbreviate ? "Ma" : "Mandag"); - } elseif ( $language == 'de' ) { - $data = ($abbreviate ? 'Mo.' : "Montag"); - } elseif ( $language == 'fa' ) { - $data = ($abbreviate ? '' : mb_convert_encoding ('دوشَنبه', 'HTML-ENTITIES')); - } elseif ( $language == 'it') { - $data = ($abbreviate ? "Lun" : "Lunedì"); - } - } elseif ( $day == 3 ) { - if ( $language == 'en' || $language == 'en' ) { - $data = ($abbreviate ? 'Tue' : "Tuesday"); - } elseif ( $language == 'es' ) { - $data = ($abbreviate ? 'Mar' : "Martes"); - } elseif ( $language == 'fr' ) { - $data = ($abbreviate ? 'Mar' : "Mardi"); - } elseif ( $language == 'both_po' ) { - $data = ($abbreviate ? 'Tue / Mar / Ter' : "Tuesday / Martes / Terça-feira"); - } elseif ( $language == 'po' ) { - $data = ($abbreviate ? 'Ter' : "Terça-feira"); - } elseif ( $language == 'both' ) { - $data = ($abbreviate ? 'Tue / Mar' : "Tuesday / Martes"); - } elseif ( $language == 'fr_en' ) { - $data = ($abbreviate ? 'Mar / Tues' : "Mardi / Tuesday"); - } elseif ( $language == 'se') { - $data = ($abbreviate ? "Tis" : "Tisdag"); - } elseif ( $language == 'dk') { - $data = ($abbreviate ? "Ti" : "Tirsdag"); - } elseif ( $language == 'de' ) { - $data = ($abbreviate ? 'Di.' : "Dienstag"); - } elseif ( $language == 'fa' ) { - $data = ($abbreviate ? '' : mb_convert_encoding('سه‌شنبه', 'HTML-ENTITIES')); - } elseif ( $language == 'it') { - $data = ($abbreviate ? "Mar" : "Martedì"); - } - } elseif ( $day == 4 ) { - if ( $language == 'en' || $language == 'en' ) { - $data = ($abbreviate ? 'Wed' : "Wednesday"); - } elseif ( $language == 'es' ) { - $data = ($abbreviate ? 'Mié' : "Miércoles"); - } elseif ( $language == 'fr' ) { - $data = ($abbreviate ? 'Mer' : "Mercredi"); - } elseif ( $language == 'both_po' ) { - $data = ($abbreviate ? 'Wed / Mié / Qua' : "Wednesday / Miércoles / Quarta-feira"); - } elseif ( $language == 'po' ) { - $data = ($abbreviate ? 'Qua' : "Quarta-feira"); - } elseif ( $language == 'both' ) { - $data = ($abbreviate ? 'Wed / Mié' : "Wednesday / Miércoles"); - } elseif ( $language == 'fr_en' ) { - $data = ($abbreviate ? 'Mer / Wed' : "Mercredi / Wednesday"); - } elseif ( $language == 'se') { - $data = ($abbreviate ? "Ons" : "Onsdag"); - } elseif ( $language == 'dk') { - $data = ($abbreviate ? "On" : "Onsdag"); - } elseif ( $language == 'de' ) { - $data = ($abbreviate ? 'Mi.' : "Mittwoch"); - } elseif ( $language == 'fa' ) { - $data = ($abbreviate ? '' : mb_convert_encoding('چهار شنبه', 'HTML-ENTITIES')); - } elseif ( $language == 'it') { - $data = ($abbreviate ? "Mer" : "Mercoledì"); - } - } elseif ( $day == 5 ) { - if ( $language == 'en' || $language == 'en' ) { - $data = ($abbreviate ? 'Thu' : "Thursday"); - } elseif ( $language == 'es' ) { - $data = ($abbreviate ? 'Jue' : "Jueves"); - } elseif ( $language == 'fr' ) { - $data = ($abbreviate ? 'Jeu' : "Jeudi"); - } elseif ( $language == 'both_po' ) { - $data = ($abbreviate ? 'Thu / Jue / Qui' : "Thursday / Jueves / Quinta-feira"); - } elseif ( $language == 'po' ) { - $data = ($abbreviate ? 'Qui' : "Quinta-feira"); - } elseif ( $language == 'both' ) { - $data = ($abbreviate ? 'Thu / Jue' : "Thursday / Jueves"); - } elseif ( $language == 'fr_en' ) { - $data = ($abbreviate ? 'Jeu / Thu' : "Jeudi / Thursday"); - } elseif ( $language == 'se') { - $data = ($abbreviate ? "Tors" : "Torsdag"); - } elseif ( $language == 'dk') { - $data = ($abbreviate ? "To" : "Torsdag"); - } elseif ( $language == 'de' ) { - $data = ($abbreviate ? 'Do.' : "Donnerstag"); - } elseif ( $language == 'fa' ) { - $data = ($abbreviate ? '' : mb_convert_encoding ('پَنج شَنبه', 'HTML-ENTITIES')); - } elseif ( $language == 'it') { - $data = ($abbreviate ? "Gio" : "Giovedì"); - } - } elseif ( $day == 6 ) { - if ( $language == 'en' || $language == 'en' ) { - $data = ($abbreviate ? 'Fri' : "Friday"); - } elseif ( $language == 'es' ) { - $data = ($abbreviate ? 'Vie' : "Viernes"); - } elseif ( $language == 'fr' ) { - $data = ($abbreviate ? 'Ven' : "Vendredi"); - } elseif ( $language == 'both_po' ) { - $data = ($abbreviate ? 'Fri / Vie / Sex' : "Friday / Viernes / Sexta-feira"); - } elseif ( $language == 'po' ) { - $data = ($abbreviate ? 'Sex' : "Sexta-feira"); - } elseif ( $language == 'both' ) { - $data = ($abbreviate ? 'Fri / Vie' : "Friday / Viernes"); - } elseif ( $language == 'fr_en' ) { - $data = ($abbreviate ? 'Ven / Fri' : "Vendredi / Friday"); - } elseif ( $language == 'se') { - $data = ($abbreviate ? "Fre" : "Fredag"); - } elseif ( $language == 'dk') { - $data = ($abbreviate ? "Fr" : "Fredag"); - } elseif ( $language == 'de' ) { - $data = ($abbreviate ? 'Fr.' : "Freitag"); - } elseif ( $language == 'fa' ) { - $data = ($abbreviate ? '' : mb_convert_encoding ('جُمعه', 'HTML-ENTITIES')); - } elseif ( $language == 'it') { - $data = ($abbreviate ? "Ven" : "Venerdì"); - } - } elseif ( $day == 7 ) { - if ( $language == 'en' || $language == 'en' ) { - $data = ($abbreviate ? 'Sat' : "Saturday"); - } elseif ( $language == 'es' ) { - $data = ($abbreviate ? 'Sáb' : "Sábado"); - } elseif ( $language == 'fr' ) { - $data = ($abbreviate ? 'Sam' : "Samedi"); - } elseif ( $language == 'both_po' ) { - $data = ($abbreviate ? 'Sat / Sáb' : "Saturday / Sábado"); - } elseif ( $language == 'po' ) { - $data = ($abbreviate ? 'Sáb' : "Sábado"); - } elseif ( $language == 'both' ) { - $data = ($abbreviate ? 'Sat / Sáb' : "Saturday / Sábado"); - } elseif ( $language == 'fr_en' ) { - $data = ($abbreviate ? 'Sam / Sat' : "Samedi / Saturday"); - } elseif ( $language == 'se') { - $data = ($abbreviate ? "Lör" : "Lördag"); - } elseif ( $language == 'dk') { - $data = ($abbreviate ? "Lø" : "Lørdag"); - } elseif ( $language == 'de' ) { - $data = ($abbreviate ? 'Sa.' : "Samstag"); - } elseif ( $language == 'fa' ) { - $data = ($abbreviate ? '' : mb_convert_encoding ('شَنبه', 'HTML-ENTITIES')); - } elseif ( $language == 'it') { - $data = ($abbreviate ? "Sab" : "Sabato"); - } + function load_translations() { + $files = scandir(dirname(__FILE__)."/lang"); + foreach ($files as $file) { + if (strpos($file,"translate_")!==0) continue; + include(dirname(__FILE__)."/lang/".$file); + $key = substr($file,10,-4); + $this->translate[$key] = $translate; } - - Return utf8_encode($data); + } + function getday( $day, $abbreviate = false, $language = 'en') { + $data = ''; + $key = "WEEKDAYS"; + if ($abbreviate) $key = "WKDYS"; + return utf8_encode($this->translate[$language][$key][$day]); } function authenticate_root_server() { @@ -601,6 +430,8 @@ function testRootServer($override_root_server = null) { $results = $results["serverVersion"]["readableString"]; return $results; } + // This is used from the AdminUI, not to generate the + // meeting list. function getUsedFormats() { if ( !isset($this->options['recurse_service_bodies']) ) {$this->options['recurse_service_bodies'] = 1;} $area_data = explode(',',$this->options['service_body_1']); @@ -634,32 +465,45 @@ function sortBySubkey(&$array, $subkey, $sortType = SORT_ASC) { } array_multisort($keys, $sortType, $array); } - + function upgrade_settings() { + if (!isset($this->options['cont_header_shown']) + && isset($this->options['page_height_fix'])) { + $fix = floatval($this->options['page_height_fix']); + // say, the height of 2 lines + $x = floatval($this->options['content_font_size']) * + floatval($this->options['content_line_height']) * 2.0 * 0.35; // pt to mm + if ($fix < $x) { + $this->options['cont_header_shown'] = true; + } else { + $this->options['cont_header_shown'] = false; + } + unset($this->options['page_height_fix']); + } + if ($this->options['weekday_language'] == 'both') { + $this->options['weekday_language'] = "en_es"; + } + if ($this->options['weekday_language'] == 'both_po') { + $this->options['weekday_language'] = "en_po"; + } + } function bmlt_meeting_list($atts = null, $content = null) { ini_set('max_execution_time', 600); // tomato server can take a long time to generate a schedule, override the server setting $area_data = explode(',',$this->options['service_body_1']); $area = $area_data[0]; - $this->options['service_body_1'] = $area; - $service_body_id = $area_data[1]; - $parent_body_id = $area_data[2]; - if ( !isset($this->options['recurse_service_bodies']) ) {$this->options['recurse_service_bodies'] = 1;} - if ( $this->options['recurse_service_bodies'] == 1 ) { - $services = '&recursive=1&services[]=' . $service_body_id; - $services_service_body_1 = '&recursive=1&services[]=' . $service_body_id; - } else { - $services = '&services[]='.$service_body_id; - $services_service_body_1 = '&services[]='.$service_body_id; - } - $services .= $this->addServiceBody('service_body_2'); - $services .= $this->addServiceBody('service_body_3'); - $services .= $this->addServiceBody('service_body_4'); - $services .= $this->addServiceBody('service_body_5'); + if (isset($_GET['custom_query'])) { $services = $_GET['custom_query']; - } elseif ( false === ( $this->options['custom_query'] == '' )) { + } elseif ( $this->options['custom_query'] !== '' ) { $services = $this->options['custom_query']; + } else { + $services = $this->addServiceBody('service_body_1'); + $services .= $this->addServiceBody('service_body_2'); + $services .= $this->addServiceBody('service_body_3'); + $services .= $this->addServiceBody('service_body_4'); + $services .= $this->addServiceBody('service_body_5'); } + $this->services = $services; if ( $this->options['root_server'] == '' ) { echo '

bread Error: BMLT Server missing.

Please go to Settings -> bread and verify BMLT Server

'; exit; @@ -698,7 +542,9 @@ function bmlt_meeting_list($atts = null, $content = null) { if ( !isset($this->options['include_meeting_email']) ) {$this->options['include_meeting_email'] = 0;} if ( !isset($this->options['include_protection']) ) {$this->options['include_protection'] = 0;} if ( !isset($this->options['base_font']) ) {$this->options['base_font'] = 'dejavusanscondensed';} + if ( !isset($this->options['colorspace']) ) {$this->options['colorspace'] = 0;} if ( !isset($this->options['weekday_language']) ) {$this->options['weekday_language'] = 'en';} + if ( !isset($this->options['asm_language']) ) {$this->options['asm_language'] = '';} if ( !isset($this->options['weekday_start']) ) {$this->options['weekday_start'] = '1';} if ( !isset($this->options['include_asm']) ) {$this->options['include_asm'] = '0';} if ( !isset($this->options['asm_format_key']) ) {$this->options['asm_format_key'] = 'ASM';} @@ -713,7 +559,6 @@ function bmlt_meeting_list($atts = null, $content = null) { if ( !isset($this->options['extra_meetings']) ) {$this->options['extra_meetings'] = '';} if ( !isset($this->options['custom_query']) ) {$this->options['custom_query'] = '';} if ( !isset($this->options['used_format_1']) ) {$this->options['used_format_1'] = '';} - if ( !isset($this->options['used_format_2']) ) {$this->options['used_format_2'] = '';} if ( intval($this->options['cache_time']) > 0 && ! isset($_GET['nocache']) ) { $transient_key = 'bmlt_ml_'.md5($this->options['root_server'].$services); if ( false !== ( $content = get_transient( $transient_key ) ) ) { @@ -760,6 +605,7 @@ function bmlt_meeting_list($atts = null, $content = null) { $this->options['root_server'] = 'http://'.$this->options['root_server']; } } + $this->upgrade_settings(); // TODO: The page number is always 5 from botton...this should be adjustable if ( $this->options['page_fold'] == 'half') { if ( $this->options['page_size'] == 'letter' ) { @@ -848,25 +694,21 @@ function bmlt_meeting_list($atts = null, $content = null) { 'margin_bottom' => $this->options['margin_bottom'], 'margin_header' => $this->options['margin_header'], ]; - } + } + $mpdf_init_options['restrictColorSpace'] = $this->options['colorspace']; $mpdf_init_options = array_merge($mpdf_init_options, $page_type_settings); + ob_clean(); $this->mpdf = new mPDF($mpdf_init_options); $this->mpdf->setAutoBottomMargin = 'pad'; // TODO: Adding a page number really could just be an option or tag. if ( $this->options['page_fold'] == 'half' || $this->options['page_fold'] == 'full' ) { - $page_string = "Page"; - if ($this->options['weekday_language']=='de') { - $page_string = "Seite"; - } elseif ($this->options['weekday_language']=='it') { - $page_string = "Pagina"; - } //TODO: Other Languages - $this->mpdf->DefHTMLFooterByName('MyFooter','
'.$page_string.' {PAGENO}
'); + $page_string = $this->translate[$this->options['weekday_language']]['PAGE']; + $this->mpdf->DefHTMLFooterByName('MyFooter','
'.$page_string.' {PAGENO}
'); } $this->mpdf->simpleTables = false; $this->mpdf->useSubstitutions = false; - $blog = get_bloginfo( "name" ); $this->mpdf->mirrorMargins = false; $this->mpdf->list_indent_first_level = 1; // 1 or 0 - whether to indent the first level of a list // LOAD a stylesheet @@ -911,7 +753,8 @@ function bmlt_meeting_list($atts = null, $content = null) { 'margin_top' => $this->options['margin_top'], 'margin_bottom' => $this->options['margin_bottom'], 'margin_footer' => 0, - 'orientation' => 'P' + 'orientation' => 'P', + 'restrictColorSpace' => $this->options['colorspace'], ]); $this->mpdf_column->WriteHTML($html); @@ -938,7 +781,7 @@ function bmlt_meeting_list($atts = null, $content = null) { '
[new_column]
' => '', '

[new_column]

' => '', '[new_column]' => '', - '[page_break no_page_number]' => '', + '[page_break no_page_number]' => '', '[start_page_numbers]' => '', "[month_lower]" => date ( "F" ), "[month_upper]" => strtoupper( date ( "F" ) ), @@ -973,33 +816,7 @@ function bmlt_meeting_list($atts = null, $content = null) { $this->mpdf->SetWatermarkImage($this->options['watermark'],0.2,'F'); $this->mpdf->showWatermarkImage = true; } - // TODO: I'm pretty sure that we can live when we sort only by day and time. - // There rest is taken care of when we group under the headings. - if ( $this->options['meeting_sort'] == 'state' ) { - $sort_keys = 'location_province,location_municipality,weekday_tinyint,start_time,meeting_name'; - } elseif ( $this->options['meeting_sort'] == 'city' ) { - $sort_keys = 'location_municipality,weekday_tinyint,start_time,meeting_name'; - } elseif ( $this->options['meeting_sort'] == 'borough' ) { - $sort_keys = 'location_city_subsection,weekday_tinyint,start_time,meeting_name'; - } elseif ( $this->options['meeting_sort'] == 'county' ) { - $sort_keys = 'location_sub_province,weekday_tinyint,start_time,meeting_name'; - } elseif ( $this->options['meeting_sort'] == 'borough_county' ) { - $sort_keys = 'location_city_subsection,location_sub_province,weekday_tinyint,start_time,meeting_name'; - } elseif ( $this->options['meeting_sort'] == 'neighborhood_city' ) { - $sort_keys = 'location_neighborhood,location_municipality,weekday_tinyint,start_time,meeting_name'; - } elseif ( $this->options['meeting_sort'] == 'group' ) { - $sort_keys = 'meeting_name,weekday_tinyint,start_time'; - } elseif ( $this->options['meeting_sort'] == 'weekday_area' ) { - $sort_keys = 'weekday_tinyint,service_body_bigint,start_time'; - } elseif ( $this->options['meeting_sort'] == 'weekday_city' ) { - $sort_keys = 'weekday_tinyint,location_municipality,start_time'; - } elseif ( $this->options['meeting_sort'] == 'weekday_county' ) { - $sort_keys = 'weekday_tinyint,location_sub_province,location_municipality,start_time'; - } else { - $this->options['meeting_sort'] = 'day'; - $sort_keys = 'weekday_tinyint,start_time,meeting_name'; - } - // End of TODO. + $sort_keys = 'weekday_tinyint,start_time,meeting_name'; $get_used_formats = '&get_used_formats'; $data_field_option = "&data_field_key=$data_field_keys"; @@ -1007,12 +824,10 @@ function bmlt_meeting_list($atts = null, $content = null) { $data_field_option = ''; } - if ( $this->options['used_format_1'] == '' && $this->options['used_format_2'] == '' ) { + if ( $this->options['used_format_1'] == '' ) { $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetSearchResults$services&sort_keys=$sort_keys$data_field_option$get_used_formats"); } elseif ( $this->options['used_format_1'] != '' ) { $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetSearchResults$services&sort_keys=$sort_keys$data_field_option&get_used_formats&formats[]=".$this->options['used_format_1'] ); - } elseif ( $this->options['used_format_2'] != '' ) { - $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetSearchResults$services&sort_keys=$sort_keys$data_field_option&get_used_formats&formats[]=".$this->options['used_format_2'] ); } $result = json_decode(wp_remote_retrieve_body($results), true); @@ -1051,15 +866,26 @@ function bmlt_meeting_list($atts = null, $content = null) { echo '

No Meetings Found

Or

Internet or Server Problem

'.$this->options['root_server'].'

Please try again or contact your BMLT Administrator

'; exit; } - $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetFormats&lang_enum=".$this->options['weekday_language']); + $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetFormats&lang_enum=".$this->getSingleLanguage($this->options['weekday_language'])); $this->formats_all = json_decode(wp_remote_retrieve_body($results), true); + if ($this->options['asm_language']=='') { + $this->options['asm_language'] = $this->options['weekday_language']; + } + if (strlen($this->options['asm_format_key'])>0 && + $this->options['weekday_language'] != $this->options['asm_language']) { + $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetFormats&lang_enum=".$this->getSingleLanguage($this->options['asm_language'])); + $formats_all = json_decode(wp_remote_retrieve_body($results), true); + $this->sortBySubkey($formats_all, 'key_string'); + $this->formats_by_key[$this->options['asm_language']] = array(); + foreach($formats_all as $thisFormat) { + $this->formats_by_key[$this->options['asm_language']][$thisFormat['key_string']] = $thisFormat; + } + } if ( strpos($this->options['custom_section_content'].$this->options['front_page_content'].$this->options['last_page_content'], '[format_codes_used_basic_es') !== false ) { - if ( $this->options['used_format_1'] == '' && $this->options['used_format_2'] == '' ) { + if ( $this->options['used_format_1'] == '' ) { $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetSearchResults$services&sort_keys=time$get_used_formats&lang_enum=es" ); - } elseif ( $this->options['used_format_1'] != '' ) { + } else { $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetSearchResults$services&sort_keys=time&get_used_formats&lang_enum=es&formats[]=".$this->options['used_format_1'] ); - } elseif ( $this->options['used_format_2'] != '' ) { - $results = $this->get_configured_root_server_request("client_interface/json/?switcher=GetSearchResults$services&sort_keys=time&get_used_formats&lang_enum=es&formats[]=".$this->options['used_format_2'] ); } $result_es = json_decode(wp_remote_retrieve_body($results), true); $this->formats_spanish = $result_es['formats']; @@ -1078,12 +904,12 @@ function bmlt_meeting_list($atts = null, $content = null) { $this->sortBySubkey($this->formats_used, 'key_string'); $this->sortBySubkey($this->formats_all, 'key_string'); - $this->formats_by_key = array(); + $this->formats_by_key[$this->options['weekday_language']] = array(); foreach($this->formats_all as $thisFormat) { - $this->formats_by_key[$thisFormat['key_string']] = $thisFormat; + $this->formats_by_key[$this->options['weekday_language']][$thisFormat['key_string']] = $thisFormat; } - $this->uniqueFormat($this->formats_used, 'key_string'); - $this->uniqueFormat($this->formats_all, 'key_string'); + //$this->uniqueFormat($this->formats_used, 'key_string'); + //$this->uniqueFormat($this->formats_all, 'key_string'); $this->meeting_count = count($result_meetings); $unique_heading = array(); @@ -1151,17 +977,7 @@ function bmlt_meeting_list($atts = null, $content = null) { if ( $this->options['header_bold'] == 1 ) { $header_style .= 'font-weight: bold;'; } - if ( $this->options['weekday_language'] === 'fr' ) { - $cont = '(suite)'; - } else if ( $this->options['weekday_language'] == 'de') { - $cont = '(weiter)'; - } else if ( $this->options['weekday_language'] === 'se' || $this->options['weekday_language'] === 'dk' ) { - $cont = '(forts)'; - } else if ( $this->options['weekday_language'] == 'it') { - $cont = '(continua)'; - } else { - $cont = '(cont)'; - } + $cont = '('.$this->translate[$this->options['weekday_language']]['CONT'].')'; if ( $this->options['page_fold'] == 'half' || $this->options['page_fold'] == 'full') { $this->write_front_page(); @@ -1188,6 +1004,7 @@ function bmlt_meeting_list($atts = null, $content = null) { $header_string = ''; $current_major = ''; $current_weekday = 0; + $test_pages = deep_copy($this->mpdf); foreach ($unique_heading as $this_heading) { if ( $this->options['meeting_sort'] === 'weekday_area' || $this->options['meeting_sort'] === 'weekday_city' || $this->options['meeting_sort'] === 'weekday_county' ) { $area_data = explode(',',$this_heading); @@ -1203,8 +1020,7 @@ function bmlt_meeting_list($atts = null, $content = null) { if ($this->options['meeting_sort'] === 'state') { $header_string = $area_data[1].', '.$area_data[0]; $newMajorHeading = true; - } - elseif ( $area_data[0] !== $current_major ) { + } elseif ( $area_data[0] !== $current_major ) { $current_major = $area_data[0]; $header_string = $area_data[0]; $newMajorHeading = true; @@ -1216,6 +1032,7 @@ function bmlt_meeting_list($atts = null, $content = null) { foreach ($headerMeetings[$this_heading] as $meeting_value) { $area_name = $this->get_area_name($meeting_value); $header = ''; + $has_major_header = false; if ( $groupByLevels == 2 ) { if ( $newMajorHeading === true ) { $xtraMargin = ''; @@ -1224,8 +1041,7 @@ function bmlt_meeting_list($atts = null, $content = null) { } $header .= '
'.$header_string."
"; $newMajorHeading = false; - } elseif ( utf8_encode($this->mpdf->y) == $this->options['margin_top'] ) { - $header .= "
".$header_string." " . $cont . "
"; + $has_major_header = true; } if ($newVal && $this->options['sub_header_shown']==1) { $header .= "

".$subheader."

"; @@ -1237,48 +1053,31 @@ function bmlt_meeting_list($atts = null, $content = null) { } if ( $newVal ) { $header .= "
".$header_string."
"; - } elseif ( $newCol ) { - $header .= "
".$header_string." " . $cont . "
"; + $has_major_header = true; } } - $first_meeting = false; - $newVal = false; - $newCol = false; if ($this->options['suppress_heading']==1) { $header = ''; } - $data = $header . $this->write_single_meeting($meeting_value, $this->options['meeting_template_content'], $analysedTemplate, $area_name); + $data = $header . $this->write_single_meeting($meeting_value, + $this->options['meeting_template_content'], $analysedTemplate, + $area_name, $this->options['weekday_language']); $data = mb_convert_encoding($data, 'HTML-ENTITIES'); $data = utf8_encode($data); - $this->mpdf->WriteHTML($data); - $ph = intval($this->options['margin_bottom']) + intval($this->options['margin_top']) + $this->mpdf->y + -intval($this->options['page_height_fix']); - - $ph_footer_fix_top = 0; - $ph_footer_fix_bot = 0; - - if (intval($this->options['margin_bottom']) < 5) { - $ph_footer_fix_bot = 5 - intval($this->options['margin_bottom']); - } - - if (intval($this->options['margin_top']) < 5) { - $ph_footer_fix_top = isset($this->options['top']) ? 5 - intval($this->options['top']) : 5; - } - - $DAY_HEADER_HEIGHT = 5; - $PH_FOOTER_MM = $DAY_HEADER_HEIGHT + $ph_footer_fix_top + $ph_footer_fix_bot; - - if ( strpos($this->options['front_page_content'], 'sethtmlpagefooter') !== false ) { - $ph += $PH_FOOTER_MM; - } - - if ( $ph + $PH_FOOTER_MM >= $this->mpdf->h ) { - $newCol = true; - if ( $this->options['page_fold'] === 'half' || $this->options['page_fold'] === 'full' ) { - $this->mpdf->WriteHTML(""); - } else { - $this->mpdf->WriteHTML(""); + $this->writeBreak($test_pages); + $y_startpos = $test_pages->y; + $test_pages->WriteHTML($data); + $y_diff = $test_pages->y - $y_startpos; + if ($y_diff >= $this->mpdf->h - ($this->mpdf->y + $this->mpdf->bMargin + 5) - $this->mpdf->kwt_height) { + $this->writeBreak($this->mpdf); + if (!$has_major_header && $this->options['cont_header_shown']) { + $header = "
".$header_string." " . $cont . "
"; + $data = $header.$data; } } + $this->mpdf->WriteHTML($data); + $first_meeting = false; + $newVal = false; } } @@ -1304,7 +1103,8 @@ function bmlt_meeting_list($atts = null, $content = null) { 'margin_top' => 0, 'margin_bottom' => 0, 'margin_footer' => 0, - 'orientation' => 'L' + 'orientation' => 'L', + 'restrictColorSpace' => $this->options['colorspace'], ]; $ps = $this->options['page_size']; if ($ps=='ledger') { @@ -1345,7 +1145,8 @@ function bmlt_meeting_list($atts = null, $content = null) { 'margin_top' => 0, 'margin_bottom' => 0, 'margin_footer' => 6, - 'orientation' => $this->options['page_orientation'] + 'orientation' => $this->options['page_orientation'], + 'restrictColorSpace' => $this->options['colorspace'], ]; $mpdfOptions['format'] = $this->options['page_size']."-".$this->options['page_orientation']; $this->mpdftmp=new mPDF($mpdfOptions); @@ -1379,7 +1180,8 @@ function bmlt_meeting_list($atts = null, $content = null) { 'margin_bottom' => 0, 'margin_footer' => 6, 'format' => $this->options['page_size'].'-L', - 'orientation' => 'L' + 'orientation' => 'L', + 'restrictColorSpace' => $this->options['colorspace'], ]; $this->mpdftmp=new mPDF($mpdfOptions); //$this->mpdftmp->SetImportUse(); @@ -1419,6 +1221,13 @@ function bmlt_meeting_list($atts = null, $content = null) { $this->mpdf->Output($FilePath,'I'); exit; } + function writeBreak($mpdf) { + if ( $this->options['page_fold'] === 'half' || $this->options['page_fold'] === 'full' ) { + $mpdf->WriteHTML(""); + } else { + $mpdf->WriteHTML(""); + } + } function addColumnSeparators($oh) { if ( $this->options['column_line'] == 1 ) { $this->mpdftmp->WriteHTML(' @@ -1512,11 +1321,21 @@ function analyseTemplate($template) { if ($item[0]=='text') continue; if ($item[0]=='style') continue; if ($item[0]=='family') continue; + if ($item[0]=='vertical') continue; + if ($item[0]=='color') continue; + if ($item[1]>0 && $template[$item[1]-1]=='[' + && $template[$item[1]+strlen($item[0])]==']') { + $item[0] = '['.$item[0].']'; + $item[1] = $item[1] - 1; + $item[2] = true; + } else { + $item[2] = false; + } $ret[] = $item; } return $ret; } - function write_single_meeting($meeting_value, $template, $analysedTemplate, $area_name) { + function write_single_meeting($meeting_value, $template, $analysedTemplate, $area_name, $lang) { $duration = explode(':', $meeting_value['duration_time']); $minutes = intval($duration[0])*60 + intval($duration[1]) + intval($duration[2]); $meeting_value['duration_m'] = $minutes; @@ -1542,7 +1361,7 @@ function write_single_meeting($meeting_value, $template, $analysedTemplate, $are $addtime = '+ ' . $minutes . ' minutes'; $end_time = date ($time_format,strtotime($meeting_value['start_time'] . ' ' . $addtime)); $meeting_value['start_time'] = date($time_format,strtotime($meeting_value['start_time'])); - if ($this->options['weekday_language']=='fa') { + if ($lang=='fa') { $meeting_value['start_time'] = $this->toPersianNum($end_time).$space.'-'.$space.$this->toPersianNum($meeting_value['start_time']); } else { $meeting_value['start_time'] = $meeting_value['start_time'].$space.'-'.$space.$end_time; @@ -1571,12 +1390,12 @@ function write_single_meeting($meeting_value, $template, $analysedTemplate, $are $meeting_value['start_time'] = $start_time.$space.'-'.$space.$end_time; } - $meeting_value['day_abbr'] = $this->getday($meeting_value['weekday_tinyint'], true, $this->options['weekday_language']); - $meeting_value['day'] = $this->getday($meeting_value['weekday_tinyint'], false, $this->options['weekday_language']); + $meeting_value['day_abbr'] = $this->getday($meeting_value['weekday_tinyint'], true, $lang); + $meeting_value['day'] = $this->getday($meeting_value['weekday_tinyint'], false, $lang); $meeting_value['area_name'] = $area_name; $meeting_value['area_i'] = substr($area_name, 0, 1); // Extensions. - $meeting_value = apply_filters("Bread_Enrich_Meeting_Data", $meeting_value, $this->formats_by_key); + $meeting_value = apply_filters("Bread_Enrich_Meeting_Data", $meeting_value, $this->formats_by_key[$lang]); $data = $template; $namedValues = array(); foreach($meeting_value as $field=>$notUsed) { @@ -1586,8 +1405,12 @@ function write_single_meeting($meeting_value, $template, $analysedTemplate, $are $namedValues[$syn] = $namedValues[$field]; } foreach ($analysedTemplate as $item) { - if (isset($namedValues[$item[0]])) { - $data = substr_replace($data,$namedValues[$item[0]],$item[1],strlen($item[0])); + $name = $item[0]; + if ($item[2]) { + $name = substr($name,1,strlen($name)-2); + } + if (isset($namedValues[$name])) { + $data = substr_replace($data,$namedValues[$name],$item[1],strlen($item[0])); } } $search_strings = array(); @@ -1684,6 +1507,20 @@ function write_custom_section() { $this->options['custom_section_content'] = mb_convert_encoding($this->options['custom_section_content'], 'HTML-ENTITIES'); $this->mpdf->WriteHTML(utf8_encode(wpautop(stripslashes($this->options['custom_section_content'])))); } + function locale_month_replacement($data, $case, $sym) { + $strpos = strpos($data, "[month_$case_"); + if ( $strpos !== false ) { + $locLang = substr($data,$strpos+13,2); + if (!isset($this->translate[$locLang])) { + $locLang = 'en'; + } + setlocale( LC_TIME, $this->translate[$locLang]['LOCALE'] ); + $month = ucfirst(utf8_encode(strftime($sym))); + setlocale(LC_TIME,NULL); + return substr_replace($data,$month,$strpos,16); + } + return $data; + } function standard_shortcode_replacement(&$data, $page) { $search_strings = array(); $replacements = array(); @@ -1694,56 +1531,13 @@ function standard_shortcode_replacement(&$data, $page) { $search_strings[] = '[meeting_count]'; $replacements[] = $this->meeting_count; - - if ( strpos($this->options[$page.'_content'], '[month_lower_fr') !== false ) { - setlocale( LC_TIME, 'fr_FR' ); - $month = ucfirst(utf8_encode(strftime("%B"))); - setlocale(LC_TIME,NULL); - $this->options[$page.'_content'] = str_replace("[month_lower_fr]", $month, $this->options[$page.'_content']); - } - if ( strpos($this->options[$page.'_content'], '[month_upper_fr') !== false ) { - setlocale( LC_TIME, 'fr_FR' ); - $month = utf8_encode(strftime("%^B")); - setlocale(LC_TIME,NULL);; - $this->options[$page.'_content'] = str_replace("[month_upper_fr]", $month, $this->options[$page.'_content']); - } - - if ( strpos($this->options[$page.'_content'], '[month_lower_es') !== false ) { - setlocale( LC_TIME, 'es_ES' ); - $month = ucfirst(utf8_encode(strftime("%B"))); - setlocale(LC_TIME,NULL); - $this->options[$page.'_content'] = str_replace("[month_lower_es]", $month, $this->options[$page.'_content']); - } - - if ( strpos($this->options[$page.'_content'], '[month_upper_es') !== false ) { - setlocale( LC_TIME, 'es_ES' ); - $month = utf8_encode(strftime("%^B")); - setlocale(LC_TIME,NULL); - $this->options[$page.'_content'] = str_replace("[month_upper_es]", $month, $this->options[$page.'_content']); - } - if ( strpos($this->options[$page.'_content'], '[month_lower_de') !== false ) { - setlocale( LC_TIME, 'de_DE' ); - $month = ucfirst(utf8_encode(strftime("%B"))); - setlocale(LC_TIME,NULL); - $this->options[$page.'_content'] = str_replace("[month_lower_de]", $month, $this->options[$page.'_content']); - } - - if ( strpos($this->options[$page.'_content'], '[month_upper_de') !== false ) { - setlocale( LC_TIME, "de_DE.utf8" ); - $month = utf8_encode(strftime("%B")); - setlocale(LC_TIME,NULL); - $this->options[$page.'_content'] = str_replace("[month_upper_de]", $month, $this->options[$page.'_content']); - } - if ( strpos($this->options[$page.'_content'], '[month_lower_fa]') !== false ) { - setlocale( LC_TIME, 'fa_IR' ); - $month = mb_convert_encoding (strftime("%B"), 'HTML-ENTITIES'); - setlocale(LC_TIME,NULL); - $this->options[$page.'_content'] = str_replace("[month_lower_fa]", $month, $this->options[$page.'_content']); - } + $data = $this->options[$page.'_content']; + $data = $this->locale_month_replacement($data, 'lower', "%B"); + $data = $this->locale_month_replacement($data, 'upper', "%^B"); $data = str_replace($search_strings,$replacements,$data); $this->replace_format_shortcodes($data, $page); $data = str_replace("[date]", strtoupper( date ( "F Y" ) ), $data); - if (strpos($data,'[service_meetings]') || strpos($data,'[additional_meetings]')) { + if ($this->asm_required($data)) { $str = $this->write_service_meetings($this->options[$page.'_font_size'], $this->options[$page.'_line_height'] ); $data = str_replace('

[service_meetings]

', $str, $data); $data = str_replace('[service_meetings]', $str, $data); @@ -1787,7 +1581,9 @@ function write_formats($formats, $page) { $data .= ""; return $data; } - + function asm_required($data) { + return strpos($data,'[service_meetings]') || strpos($data,'[additional_meetings]'); + } function write_detailed_formats($formats, $page) { if ( $formats == null ) { return ''; } $this->mpdf->WriteHTML('td{font-size: '.$this->options[$page.'_font_size']."pt;line-height:".$this->options[$page.'_line_height'].';}',1); @@ -1820,7 +1616,7 @@ function get_field($obj,$field) { function write_service_meetings($font_size, $line_height) { if ( $this->service_meeting_result == null ) { // Why not add a query string that limits to meetings having the desired format???? - $asm_query = "client_interface/json/?switcher=GetSearchResults$services_service_body_1&sort_keys=$this->options['asm_sort_order']"; + $asm_query = "client_interface/json/?switcher=GetSearchResults$this->services&sort_keys=$this->options['asm_sort_order']"; // I'm not sure we need this, but for now we need to emulate the old behavior if ($this->options['asm_format_key']==='ASM') { $asm_query .= "&advanced_published=0"; @@ -1854,7 +1650,8 @@ function write_service_meetings($font_size, $line_height) { $area_name = $this->get_area_name($meeting_value); if ($template != '') { $template = str_replace(" ", " ", $template); - $data .= $this->write_single_meeting($value, $template, $this->analyseTemplate($template), $area_name); + $data .= $this->write_single_meeting($value, $template, $this->analyseTemplate($template), + $area_name, $this->options['asm_language']); continue; } $display_string = ''.$value['meeting_name'].''; @@ -1982,8 +1779,7 @@ function admin_options_page() { $this->options['header_uppercase'] = intval($_POST['header_uppercase']); $this->options['header_bold'] = intval($_POST['header_bold']); $this->options['sub_header_shown'] = intval($_POST['sub_header_shown']); - $this->options['page_height_fix'] = intval($_POST['page_height_fix']); - $this->options['column_gap'] = intval($_POST['column_gap']); + $this->options['cont_header_shown'] = intval($_POST['cont_header_shown']); $this->options['column_gap'] = intval($_POST['column_gap']); $this->options['margin_right'] = intval($_POST['margin_right']); $this->options['margin_left'] = intval($_POST['margin_left']); $this->options['margin_bottom'] = intval($_POST['margin_bottom']); @@ -2018,6 +1814,7 @@ function admin_options_page() { $this->options['extra_meetings_enabled'] = isset($_POST['extra_meetings_enabled']) ? intval($_POST['extra_meetings_enabled']) : 0; $this->options['include_protection'] = boolval($_POST['include_protection']); $this->options['weekday_language'] = sanitize_text_field($_POST['weekday_language']); + $this->options['asm_language'] = sanitize_text_field($_POST['asm_language']); $this->options['weekday_start'] = sanitize_text_field($_POST['weekday_start']); $this->options['include_asm'] = boolval($_POST['include_asm']); $this->options['asm_format_key'] = sanitize_text_field($_POST['asm_format_key']); @@ -2026,6 +1823,7 @@ function admin_options_page() { $this->options['bmlt_login_id'] = sanitize_text_field($_POST['bmlt_login_id']); $this->options['bmlt_login_password'] = sanitize_text_field($_POST['bmlt_login_password']); $this->options['base_font'] = sanitize_text_field($_POST['base_font']); + $this->options['colorspace'] = sanitize_text_field($_POST['colorspace']); $this->options['protection_password'] = sanitize_text_field($_POST['protection_password']); $this->options['time_clock'] = sanitize_text_field($_POST['time_clock']); $this->options['time_option'] = intval($_POST['time_option']); @@ -2146,6 +1944,9 @@ function admin_options_page() { options['front_page_line_height']) || strlen(trim($this->options['front_page_line_height'])) == 0 ) { - $this->options['front_page_line_height'] = '1.0'; - } - if ( !isset($this->options['front_page_font_size']) || strlen(trim($this->options['front_page_font_size'])) == 0 ) { - $this->options['front_page_font_size'] = '10'; - } - if ( !isset($this->options['last_page_font_size']) || strlen(trim($this->options['last_page_font_size'])) == 0 ) { - $this->options['last_page_font_size'] = '10'; - } - if ( !isset($this->options['content_font_size']) || strlen(trim($this->options['content_font_size'])) == 0 ) { - $this->options['content_font_size'] = '9'; - } - if ( !isset($this->options['header_font_size']) || strlen(trim($this->options['header_font_size'])) == 0 ) { - $this->options['header_font_size'] = $this->options['content_font_size']; - } - if ( !isset($this->options['pageheader_fontsize']) || strlen(trim($this->options['pageheader_fontsize'])) == 0 ) { - $this->options['pageheader_fontsize'] = $this->options['header_font_size']; - } - if ( !isset($this->options['suppress_heading']) || strlen(trim($this->options['suppress_heading'])) == 0 ) { - $this->options['suppress_heading'] = 0; - } - if ( !isset($this->options['header_text_color']) || strlen(trim($this->options['header_text_color'])) == 0 ) { - $this->options['header_text_color'] = '#ffffff'; - } - if ( !isset($this->options['header_background_color']) || strlen(trim($this->options['header_background_color'])) == 0 ) { - $this->options['header_background_color'] = '#000000'; - } - if ( !isset($this->options['pageheader_textcolor']) || strlen(trim($this->options['pageheader_textcolor'])) == 0 ) { - $this->options['pageheader_textcolor'] = '#000000'; - } - if ( !isset($this->options['pageheader_backgroundcolor']) || strlen(trim($this->options['pageheader_backgroundcolor'])) == 0 ) { - $this->options['pageheader_backgroundcolor'] = '#ffffff'; - } - if ( !isset($this->options['header_uppercase']) || strlen(trim($this->options['header_uppercase'])) == 0 ) { - $this->options['header_uppercase'] = '0'; - } - if ( !isset($this->options['header_bold']) || strlen(trim($this->options['header_bold'])) == 0 ) { - $this->options['header_bold'] = '1'; - } - if ( !isset($this->options['sub_header_shown']) || strlen(trim($this->options['sub_header_shown'])) == 0 ) { - $this->options['sub_header_shown'] = '0'; - } - if ( !isset($this->options['margin_top']) || strlen(trim($this->options['margin_top'])) == 0 ) { - $this->options['margin_top'] = 3; - } - if ( !isset($this->options['margin_bottom']) || strlen(trim($this->options['margin_bottom'])) == 0 ) { - $this->options['margin_bottom'] = 3; - } - if ( !isset($this->options['margin_left']) || strlen(trim($this->options['margin_left'])) == 0 ) { - $this->options['margin_left'] = 3; - } - if ( !isset($this->options['margin_right']) || strlen(trim($this->options['margin_right'])) == 0 ) { - $this->options['margin_right'] = 3; - } - if ( !isset($this->options['page_height_fix']) || strlen(trim($this->options['page_height_fix'])) == 0 ) { - $this->options['page_height_fix'] = 0; - } - if ( !isset($this->options['column_gap']) || strlen(trim($this->options['column_gap'])) == 0 ) { - $this->options['column_gap'] = "5"; - } - if ( !isset($this->options['content_line_height']) || strlen(trim($this->options['content_line_height'])) == 0 ) { - $this->options['content_line_height'] = '1.0'; - } - if ( !isset($this->options['last_page_line_height']) || strlen(trim($this->options['last_page_line_height'])) == 0 ) { - $this->options['last_page_line_height'] = '1.0'; - } - if ( !isset($this->options['page_size']) || strlen(trim($this->options['page_size'])) == 0 ) { - $this->options['page_size'] = 'legal'; - } - if ( !isset($this->options['page_orientation']) || strlen(trim($this->options['page_orientation'])) == 0 ) { - $this->options['page_orientation'] = 'L'; - } - if ( !isset($this->options['page_fold']) || strlen(trim($this->options['page_fold'])) == 0 ) { - $this->options['page_fold'] = 'quad'; - } - if ( !isset($this->options['meeting_sort']) || strlen(trim($this->options['meeting_sort'])) == 0 ) { - $this->options['meeting_sort'] = 'day'; - } - if ( !isset($this->options['booklet_pages']) ) { - $this->options['booklet_pages'] = false; - } - if ( !isset($this->options['borough_suffix']) ) { - $this->options['borough_suffix'] = 'Borough'; - } - if ( !isset($this->options['county_suffix']) ) { - $this->options['county_suffix'] = 'County'; - } - if ( !isset($this->options['neighborhood_suffix']) ) { - $this->options['neighborhood_suffix'] = 'Neighborhood'; - } - if ( !isset($this->options['city_suffix']) ) { - $this->options['city_suffix'] = 'City'; - } - if ( !isset($this->options['meeting_template_content']) || strlen(trim($this->options['meeting_template_content'])) == 0 ) { - $this->options['meeting_template_content'] = ''; - } - if ( !isset($this->options['asm_template_content']) || strlen(trim($this->options['asm_template_content'])) == 0 ) { - $this->options['asm_template_content'] = ''; - } - if ( !isset($this->options['column_line']) || strlen(trim($this->options['column_line'])) == 0 ) { - $this->options['column_line'] = 0; - } - if ( !isset($this->options['col_color']) || strlen(trim($this->options['col_color'])) == 0 ) { - $this->options['col_color'] = '#bfbfbf'; - } - if ( !isset($this->options['custom_section_content']) || strlen(trim($this->options['custom_section_content'])) == 0 ) { - $this->options['custom_section_content'] = ''; - } - if ( !isset($this->options['custom_section_line_height']) || strlen(trim($this->options['custom_section_line_height'])) == 0 ) { - $this->options['custom_section_line_height'] = '1'; - } - if ( !isset($this->options['custom_section_font_size']) || strlen(trim($this->options['custom_section_font_size'])) == 0 ) { - $this->options['custom_section_font_size'] = '9'; - } - if ( !isset($this->options['pagenumbering_font_size']) || strlen(trim($this->options['pagenumbering_font_size'])) == 0 ) { - $this->options['pagenumbering_font_size'] = '9'; - } - if ( !isset($this->options['used_format_1']) || strlen(trim($this->options['used_format_1'])) == 0 ) { - $this->options['used_format_1'] = ''; - } - if ( !isset($this->options['used_format_2']) || strlen(trim($this->options['used_format_2'])) == 0 ) { - $this->options['used_format_2'] = ''; - } - if ( !isset($this->options['include_meeting_email']) || strlen(trim($this->options['include_meeting_email'])) == 0 ) { - $this->options['include_meeting_email'] = 0; - } - if ( !isset($this->options['base_font']) || strlen(trim($this->options['base_font'])) == 0 ) { - $this->options['base_font'] = 'dejavusanscondensed'; - } - if ( !isset($this->options['recurse_service_bodies']) || strlen(trim($this->options['recurse_service_bodies'])) == 0) { - $this->options['recurse_service_bodies'] = 1; - } - if ( !isset($this->options['retrieve_all_fields']) || strlen(trim($this->options['retrieve_all_fields'])) == 0) { - $this->options['retrieve_all_fields'] = 0; - } - if ( !isset($this->options['extra_meetings_enabled']) || strlen(trim($this->options['extra_meetings_enabled'])) == 0) { - $this->options['extra_meetings_enabled'] = 0; - } - if ( !isset($this->options['include_protection']) || strlen(trim($this->options['include_protection'])) == 0 ) { - $this->options['include_protection'] = 0; - } - if ( !isset($this->options['weekday_language']) || strlen(trim($this->options['weekday_language'])) == 0 ) { - $this->options['weekday_language'] = 'en'; - } - if ( !isset($this->options['weekday_start']) || strlen(trim($this->options['weekday_start'])) == 0 ) { - $this->options['weekday_start'] = '1'; - } - if ( !isset($this->options['include_asm']) || strlen(trim($this->options['include_asm'])) == 0 ) { - $this->options['include_asm'] = '0'; - } - if ( !isset($this->options['asm_format_key']) || strlen(trim($this->options['asm_format_key'])) == 0 ) { - $this->options['asm_format_key'] = 'ASM'; - } - if ( !isset($this->options['asm_sort_order']) || strlen(trim($this->options['asm_sort_order'])) == 0 ) { - $this->options['asm_sort_order'] = 'name'; - } - if ( !isset($this->options['bmlt_login_id']) || strlen(trim($this->options['bmlt_login_id'])) == 0 ) { - $this->options['bmlt_login_id'] = ''; + function fillUnsetOption($option, $default) { + if ( !isset($this->options[$option]) || strlen(trim($this->options[$option])) == 0 ) { + $this->options[$option] = $default; } - if ( !isset($this->options['bmlt_login_password']) || strlen(trim($this->options['bmlt_login_password'])) == 0 ) { - $this->options['bmlt_login_password'] = ''; - } - if ( !isset($this->options['protection_password']) || strlen(trim($this->options['protection_password'])) == 0 ) { - $this->options['protection_password'] = ''; - } - if ( !isset($this->options['custom_query']) || strlen(trim($this->options['custom_query'])) == 0 ) { - $this->options['custom_query'] = ''; + } + function fillUnsetStringOption($option, $default) { + if ( !isset($this->options[$option]) ) { + $this->options[$option] = $default; } - if ( !isset($this->options['cache_time']) || strlen(trim($this->options['cache_time'])) == 0 ) { - $this->options['cache_time'] = 0; - } - if ( !isset($this->options['extra_meetings']) || $this->options['extra_meetings'] == '' || count($this->options['extra_meetings']) == 0 ) { - $this->options['extra_meetings'] = ''; - } else { + } + function fillUnsetOptions() { + $this->fillUnsetOption('front_page_line_height', '1.0'); + $this->fillUnsetOption('front_page_font_size', '10'); + $this->fillUnsetOption('last_page_font_size', '10'); + $this->fillUnsetOption('content_font_size', '9'); + $this->fillUnsetOption('header_font_size', $this->options['content_font_size']); + $this->fillUnsetOption('pageheader_fontsize', $this->options['header_font_size']); + $this->fillUnsetOption('suppress_heading', 0); + $this->fillUnsetOption('header_text_color', '#ffffff'); + $this->fillUnsetOption('header_background_color', '#000000'); + $this->fillUnsetOption('pageheader_textcolor', '#000000'); + $this->fillUnsetOption('pageheader_backgroundcolor', '#ffffff'); + $this->fillUnsetOption('header_uppercase', '0'); + $this->fillUnsetOption('header_bold', '1'); + $this->fillUnsetOption('sub_header_shown', '0'); + $this->fillUnsetOption('margin_top', 3); + $this->fillUnsetOption('margin_bottom', 3); + $this->fillUnsetOption('margin_left', 3); + $this->fillUnsetOption('margin_right', 3); + $this->fillUnsetOption('column_gap', "5"); + $this->fillUnsetOption('content_line_height', '1.0'); + $this->fillUnsetOption('last_page_line_height', '1.0'); + $this->fillUnsetOption('page_size', 'legal'); + $this->fillUnsetOption('page_orientation', 'L'); + $this->fillUnsetOption('page_fold', 'quad'); + $this->fillUnsetOption('meeting_sort', 'day'); + $this->fillUnsetStringOption('booklet_pages', false); + $this->fillUnsetStringOption('borough_suffix', 'Borough'); + $this->fillUnsetStringOption('county_suffix', 'County'); + $this->fillUnsetStringOption('neighborhood_suffix', 'Neighborhood'); + $this->fillUnsetStringOption('city_suffix', 'City'); + $this->fillUnsetStringOption('meeting_template_content',''); + $this->fillUnsetStringOption('asm_template_content',''); + $this->fillUnsetOption('column_line', 0); + $this->fillUnsetOption('col_color', '#bfbfbf'); + $this->fillUnsetStringOption('custom_section_content', ''); + $this->fillUnsetOption('custom_section_line_height', '1'); + $this->fillUnsetOption('custom_section_font_size', '9'); + $this->fillUnsetOption('pagenumbering_font_size', '9'); + $this->fillUnsetStringOption('used_format_1', ''); + $this->fillUnsetOption('include_meeting_email', 0); + $this->fillUnsetOption('base_font', 'dejavusanscondensed'); + $this->fillUnsetOption('colorspace', 0); + $this->fillUnsetOption('recurse_service_bodies', 1); + $this->fillUnsetOption('retrieve_all_fields', 0); + $this->fillUnsetOption('extra_meetings_enabled', 0); + $this->fillUnsetOption('include_protection', 0); + $this->fillUnsetOption('weekday_language', 'en'); + $this->fillUnsetStringOption('asm_language', ''); // same as main language + $this->fillUnsetOption('weekday_start', '1'); + $this->fillUnsetOption('include_asm', '0'); + $this->fillUnsetOption('asm_format_key', 'ASM'); + $this->fillUnsetOption('asm_sort_order', 'name'); + $this->fillUnsetStringOption('bmlt_login_id', ''); + $this->fillUnsetStringOption('bmlt_login_password', ''); + $this->fillUnsetStringOption('protection_password', ''); + $this->fillUnsetStringOption('custom_query',''); + $this->fillUnsetOption('cache_time', 0); + $this->fillUnsetStringOption('extra_meetings', ''); + if (strlen($this->options[extra_meetings])>0) { $this->options['extra_meetings_enabled'] = 1; + }else{ + $this->options['extra_meetings_enabled'] = 0; } if ( !isset($this->options['asm_logged_in']) ) { if (strlen ($this->options['bmlt_login_password']) > 0 && strlen ($this->options['bmlt_login_password']) > 0) { @@ -2432,11 +2130,11 @@ function pwsix_process_settings_export() { if( ! current_user_can( 'manage_bread' ) ) // TODO: Is this necessary? Why not let the user make a copy return; - $blogname = str_replace(" - ", " ", get_option('blogname')); + $blogname = str_replace(" - ", " ", get_option('blogname').'-'.$this->allSettings[$this->loaded_setting]); $blogname = str_replace(" ", "-", $blogname); $date = date("m-d-Y"); $blogname = trim(preg_replace('/[^a-z0-9]+/', '-', strtolower($blogname)), '-'); - $json_name = $blogname."-meeting-list-settings-".$date.".json"; // Naming the filename will be generated. + $json_name = $blogname.$date.".json"; // Naming the filename will be generated. $settings = get_option( $this->optionsName ); foreach ($settings as $key => $value) { @@ -2580,6 +2278,7 @@ function getMLOptions($current_setting) { } $this->options = $theOptions; $this->fillUnsetOptions(); + $this->upgrade_settings(); $this->authors_safe = $theOptions['authors']; $this->loaded_setting = $current_setting; } @@ -2609,19 +2308,6 @@ function save_admin_options(){ update_option($this->optionsName, $this->options); return; } - - public function uniqueFormat(&$array_of_formats, $subkey) { - $lastFormat = ""; - for ( $i = 0; $i < count( $array_of_formats ); $i++ ) { - if ( strtoupper($lastFormat) == strtoupper($array_of_formats[$i][$subkey]) ) { - array_splice($array_of_formats, $i, 1); - $i--; - } else { - $lastFormat = $array_of_formats[$i][$subkey]; - } - } - } - public function getLatestRootVersion() { $results = $this->get("https://api.github.com/repos/bmlt-enabled/bmlt-root-server/releases/latest"); $httpcode = wp_remote_retrieve_response_code( $results ); @@ -2638,5 +2324,4 @@ public function getLatestRootVersion() { //instantiate the class if (class_exists("Bread")) { $BMLTMeetinglist_instance = new Bread(); -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/composer.json b/composer.json index 58f482c..1731508 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,10 @@ { "type": "git", "url": "https://github.com/mpdf/mpdf" + }, + { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy" } ], "require": { diff --git a/composer.lock b/composer.lock index 7ddc73e..d6fc313 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2ac4b49bb34d290ac490bbd36c3deaf7", + "content-hash": "8a64634ef088784292ca6a383147a1a8", "packages": [ { "name": "mpdf/mpdf", @@ -88,17 +88,11 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.1", + "version": "1.9.3", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", - "shasum": "" + "url": "https://github.com/myclabs/DeepCopy", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" }, "require": { "php": "^7.1" @@ -120,7 +114,12 @@ "src/DeepCopy/deep_copy.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "DeepCopy\\": "fixtures/", + "DeepCopyTest\\": "tests/DeepCopyTest/" + } + }, "license": [ "MIT" ], @@ -132,7 +131,7 @@ "object", "object graph" ], - "time": "2019-04-07T13:18:21+00:00" + "time": "2019-08-09T12:45:53+00:00" }, { "name": "paragonie/random_compat", diff --git a/includes/booklet_settings.json b/includes/booklet_settings.json index cad55ed..8e501b3 100644 --- a/includes/booklet_settings.json +++ b/includes/booklet_settings.json @@ -1 +1 @@ -{"root_server":"","service_body_1":"","service_body_2":"Not Used","service_body_3":"Not Used","header_font_size":9.5,"area_service_meetings":null,"helplines":null,"helplines_line_height":null,"front_page_content":"

NARCOTICS ANONYMOUS<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

[service_body_1]<\/span><\/strong><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

MEETING LIST<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

\"NALogo\"<\/a>\u00a0<\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

\u00a0<\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

[date]<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

To The Newcomer\u00a0<\/strong><\/span><\/p>\r\n

This meeting list is dedicated to you and is produced to help you find meetings throughout the\u00a0<\/span><\/span>[service_body_1]. The information in this book was as accurate as possible at the time of printing. Sometimes groups have to move or change their time. If you go to a listed meeting and it is not there, go to another meeting. If you can, please call our office at: (555) 555-5555, so that we can correct our meeting list for future printings. At Narcotics Anonymous, YOU are the most important person.<\/span>\u00a0<\/span><\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

We Do Recover\u00a0<\/strong><\/span><\/p>\r\n

\u00a0\u201cWhen at the end of the road we find that we can no longer function as a human being, either with or without drugs, we all face the same dilemma. What is there to do? There seems to be this alternative: Either to go on as best we can to the bitter ends - Jails, Institution, or Death - or find a new way to live. In years gone by, very few addicts had this last choice. Those who are addicted today are more fortunate. For the first time in man\\'s entire history, a simple way has been proving itself in the lives of many addicts. It is a simple spiritual, (not religious) program known as NARCOTICS ANONYMOUS.\u201d<\/span><\/p>\r\n

[page_break][start_page_numbers]<\/p>\r\n\r\n\r\n\r\n
THE TWELVE STEPS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

1.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We admitted that we were powerless over our addiction, that our lives had become unmanageable.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

2.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We came to believe that a Power greater than ourselves could restore us to sanity.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

3.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made a decision to turn our will and our lives over to the care of God as we understood Him.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

4.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made a searching and fearless moral inventory of ourselves.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

5.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We admitted to God, to ourselves, and to another human being the exact nature of our wrongs.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

6.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We were entirely ready to have God remove all these defects of character.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

7.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We humbly asked Him to remove our shortcomings.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

8.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made a list of all persons we had harmed and became willing to make amends to them all.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

9.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made direct amends to such people wherever possible, except when to do so would injure them or others.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

10.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We continued to take personal inventory and when we were wrong promptly admitted it.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

11.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

We sought through prayer and meditation to improve our conscious contact with God as we understood Him, praying only for knowledge of His will for us and the power to carry that out.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

12.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

Having had a spiritual awakening as a result of these steps, we tried to carry this message to addicts, and to practice these principles in all our affairs. \u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

 <\/p>\r\n

[page_break]<\/p>\r\n\r\n\r\n\r\n
Meeting Format Legend<\/span><\/strong><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[format_codes_used_basic]<\/p>\r\n

 <\/p>\r\n\r\n\r\n\r\n
Helplines<\/span><\/strong><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

Service Body 1<\/p>\r\n<\/td>\r\n

Number 1<\/td>\r\n<\/tr>\r\n
\r\n

Service Body 2<\/p>\r\n<\/td>\r\n

Number 2<\/td>\r\n<\/tr>\r\n
\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n

\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[page_break]<\/p>","front_line_height":"1.4","area_service_meetings_line_height":null,"content_font_size":9,"content_line_height":1.2,"front_page_font_size":11.4,"service_body_4":"Not Used","service_body_5":"Not Used","page_layout":null,"last_page_content":"

[page_break]<\/p>\r\n\r\n\r\n\r\n
THE TWELVE TRADITIONS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

1.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Our common welfare should come first; personal recovery depends on NA unity.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

2.<\/span><\/p>\r\n<\/td>\r\n

\r\n

For our group purpose there is but one ultimate authority\u2014 a loving God as He may express Himself in our group conscience. Our leaders are but trusted servants; they do not govern.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

3.<\/span><\/p>\r\n<\/td>\r\n

\r\n

The only requirement for membership is a desire to stop using.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

4.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Each group should be autonomous except in matters affecting other groups or NA as a whole.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

5.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Each group has but one primary purpose\u2014to carry the message to the addict who still suffers.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

6.<\/span><\/p>\r\n<\/td>\r\n

\r\n

An NA group ought never endorse, finance, or lend the NA name to any related facility or outside enterprise, lest problems of money, property, or prestige divert us from our primary purpose.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

7.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Every NA group ought to be fully self-supporting, declining outside contributions.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

8.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Narcotics Anonymous should remain forever nonprofessional, but our service centers may employ special workers.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

9.<\/span><\/p>\r\n<\/td>\r\n

\r\n

NA, as such, ought never be organized, but we may create service boards or committees directly responsible to those they serve.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

10.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Narcotics Anonymous has no opinion on outside issues; hence the NA name ought never be drawn into public controversy.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

11.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

Our public relations policy is based on attraction rather than promotion; we need always maintain personal anonymity at the level of press, radio, and films.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

12.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

Anonymity is the spiritual foundation of all our Traditions, ever reminding us to place principles before personalities.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[page_break]<\/p>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
Name<\/span><\/strong><\/td>\r\nPhone Number<\/span><\/strong><\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>","front_page_line_height":"1.1","last_page_line_height":1.2,"time_option":1,"remove_space":true,"helplines_font_size":null,"format_codes":null,"format_codes_font_size":null,"format_codes_line_height":null,"page_size":"5inch","page_fold":"half","meeting_sort":"city","cache_time":0,"show_status":null,"use_custom_section":null,"custom_section_content":"","custom_section_line_height":1,"page_orientation":"L","area_service_meetings_font_size":null,"which_format_codes":null,"custom_section_font_size":9,"include_meeting_email":false,"bmlt_login_id":"","bmlt_login_password":"","last_page_font_size":12,"column_line":false,"used_format_1":"","page_height":"250","column_gap":5,"margin_right":5,"margin_left":5,"margin_bottom":5,"margin_top":5,"meeting_template_content":"
day_abbr<\/strong><\/span><\/span> time<\/strong><\/span><\/span> group<\/strong>, location, info, street, city, state, zip (formats)\u00A0comments<\/em><\/span><\/div>","col_color":"#bfbfbf","time_clock":"12","header_text_color":"#ffffff","header_background_color":"#000000","header_uppercase":1,"header_bold":1,"logo_copied":"done","weekday_language":"en","include_asm":false,"sub_header_shown":1,"page_height_fix":0,"borough_suffix":"Borough","county_suffix":"County","neighborhood_suffix":"Neighborhood","city_suffix":"City","pagenumbering_font_size":9,"recurse_service_bodies":1,"extra_meetings_enabled":0,"include_protection":false,"base_font":"dejavusanscondensed","protection_password":"","custom_query":"","extra_meetings":""} \ No newline at end of file +{"root_server":"","service_body_1":"","service_body_2":"Not Used","service_body_3":"Not Used","header_font_size":9.5,"area_service_meetings":null,"helplines":null,"helplines_line_height":null,"front_page_content":"

NARCOTICS ANONYMOUS<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

[service_body_1]<\/span><\/strong><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

MEETING LIST<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

\"NALogo\"<\/a>\u00a0<\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

\u00a0<\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

[date]<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

To The Newcomer\u00a0<\/strong><\/span><\/p>\r\n

This meeting list is dedicated to you and is produced to help you find meetings throughout the\u00a0<\/span><\/span>[service_body_1]. The information in this book was as accurate as possible at the time of printing. Sometimes groups have to move or change their time. If you go to a listed meeting and it is not there, go to another meeting. If you can, please call our office at: (555) 555-5555, so that we can correct our meeting list for future printings. At Narcotics Anonymous, YOU are the most important person.<\/span>\u00a0<\/span><\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

We Do Recover\u00a0<\/strong><\/span><\/p>\r\n

\u00a0\u201cWhen at the end of the road we find that we can no longer function as a human being, either with or without drugs, we all face the same dilemma. What is there to do? There seems to be this alternative: Either to go on as best we can to the bitter ends - Jails, Institution, or Death - or find a new way to live. In years gone by, very few addicts had this last choice. Those who are addicted today are more fortunate. For the first time in man\\'s entire history, a simple way has been proving itself in the lives of many addicts. It is a simple spiritual, (not religious) program known as NARCOTICS ANONYMOUS.\u201d<\/span><\/p>\r\n

[page_break][start_page_numbers]<\/p>\r\n\r\n\r\n\r\n
THE TWELVE STEPS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

1.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We admitted that we were powerless over our addiction, that our lives had become unmanageable.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

2.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We came to believe that a Power greater than ourselves could restore us to sanity.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

3.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made a decision to turn our will and our lives over to the care of God as we understood Him.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

4.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made a searching and fearless moral inventory of ourselves.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

5.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We admitted to God, to ourselves, and to another human being the exact nature of our wrongs.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

6.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We were entirely ready to have God remove all these defects of character.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

7.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We humbly asked Him to remove our shortcomings.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

8.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made a list of all persons we had harmed and became willing to make amends to them all.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

9.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We made direct amends to such people wherever possible, except when to do so would injure them or others.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

10.<\/span><\/p>\r\n<\/td>\r\n

\r\n

We continued to take personal inventory and when we were wrong promptly admitted it.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

11.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

We sought through prayer and meditation to improve our conscious contact with God as we understood Him, praying only for knowledge of His will for us and the power to carry that out.\u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

12.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

Having had a spiritual awakening as a result of these steps, we tried to carry this message to addicts, and to practice these principles in all our affairs. \u00a0<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

 <\/p>\r\n

[page_break]<\/p>\r\n\r\n\r\n\r\n
Meeting Format Legend<\/span><\/strong><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[format_codes_used_basic]<\/p>\r\n

 <\/p>\r\n\r\n\r\n\r\n
Helplines<\/span><\/strong><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

Service Body 1<\/p>\r\n<\/td>\r\n

Number 1<\/td>\r\n<\/tr>\r\n
\r\n

Service Body 2<\/p>\r\n<\/td>\r\n

Number 2<\/td>\r\n<\/tr>\r\n
\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n

\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[page_break]<\/p>","front_line_height":"1.4","area_service_meetings_line_height":null,"content_font_size":9,"content_line_height":1.2,"front_page_font_size":11.4,"service_body_4":"Not Used","service_body_5":"Not Used","page_layout":null,"last_page_content":"

[page_break]<\/p>\r\n\r\n\r\n\r\n
THE TWELVE TRADITIONS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

1.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Our common welfare should come first; personal recovery depends on NA unity.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

2.<\/span><\/p>\r\n<\/td>\r\n

\r\n

For our group purpose there is but one ultimate authority\u2014 a loving God as He may express Himself in our group conscience. Our leaders are but trusted servants; they do not govern.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

3.<\/span><\/p>\r\n<\/td>\r\n

\r\n

The only requirement for membership is a desire to stop using.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

4.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Each group should be autonomous except in matters affecting other groups or NA as a whole.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

5.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Each group has but one primary purpose\u2014to carry the message to the addict who still suffers.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

6.<\/span><\/p>\r\n<\/td>\r\n

\r\n

An NA group ought never endorse, finance, or lend the NA name to any related facility or outside enterprise, lest problems of money, property, or prestige divert us from our primary purpose.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

7.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Every NA group ought to be fully self-supporting, declining outside contributions.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

8.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Narcotics Anonymous should remain forever nonprofessional, but our service centers may employ special workers.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

9.<\/span><\/p>\r\n<\/td>\r\n

\r\n

NA, as such, ought never be organized, but we may create service boards or committees directly responsible to those they serve.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

10.<\/span><\/p>\r\n<\/td>\r\n

\r\n

Narcotics Anonymous has no opinion on outside issues; hence the NA name ought never be drawn into public controversy.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

11.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

Our public relations policy is based on attraction rather than promotion; we need always maintain personal anonymity at the level of press, radio, and films.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

12.\u00a0<\/span><\/p>\r\n<\/td>\r\n

\r\n

Anonymity is the spiritual foundation of all our Traditions, ever reminding us to place principles before personalities.<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[page_break]<\/p>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
Name<\/span><\/strong><\/td>\r\nPhone Number<\/span><\/strong><\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>","front_page_line_height":"1.1","last_page_line_height":1.2,"time_option":1,"remove_space":true,"helplines_font_size":null,"format_codes":null,"format_codes_font_size":null,"format_codes_line_height":null,"page_size":"5inch","page_fold":"half","meeting_sort":"city","cache_time":0,"show_status":null,"use_custom_section":null,"custom_section_content":"","custom_section_line_height":1,"page_orientation":"L","area_service_meetings_font_size":null,"which_format_codes":null,"custom_section_font_size":9,"include_meeting_email":false,"bmlt_login_id":"","bmlt_login_password":"","last_page_font_size":12,"column_line":false,"used_format_1":"","column_gap":5,"margin_right":5,"margin_left":5,"margin_bottom":5,"margin_top":5,"meeting_template_content":"
day_abbr<\/strong><\/span><\/span> time<\/strong><\/span><\/span> group<\/strong>, location, info, street, city, state, zip (formats)\u00A0comments<\/em><\/span><\/div>","col_color":"#bfbfbf","time_clock":"12","header_text_color":"#ffffff","header_background_color":"#000000","header_uppercase":1,"header_bold":1,"logo_copied":"done","weekday_language":"en","include_asm":false,"sub_header_shown":1,"borough_suffix":"Borough","county_suffix":"County","neighborhood_suffix":"Neighborhood","city_suffix":"City","pagenumbering_font_size":9,"recurse_service_bodies":1,"extra_meetings_enabled":0,"include_protection":false,"base_font":"dejavusanscondensed","protection_password":"","custom_query":"","extra_meetings":""} \ No newline at end of file diff --git a/includes/four_column_settings.json b/includes/four_column_settings.json index fb597d2..cc8fe6f 100644 --- a/includes/four_column_settings.json +++ b/includes/four_column_settings.json @@ -1 +1 @@ -{"root_server":"","service_body_1":"","service_body_2":"Not Used","service_body_3":"Not Used","service_body_4":"Not Used","service_body_5":"Not Used","area_service_meetings":null,"helplines":null,"helplines_line_height":null,"helplines_font_size":null,"format_codes":null,"format_codes_font_size":"9","format_codes_line_height":"1.0","front_page_content":"

\u00a0\"NALogo-1\"<\/p>\r\n

 <\/p>\r\n

[area]<\/b><\/span><\/p>\r\n

NARCOTICS ANONYMOUS<\/strong><\/span><\/p>\r\n

MEETING LIST<\/strong><\/span><\/p>\r\n

\u00a0<\/p>\r\n

[date]<\/b><\/span><\/p>\r\n

 <\/p>\r\n

24 HOUR HELPLINE<\/b><\/span><\/p>\r\n

NUMBER
<\/span><\/p>\r\n

\u00a0<\/span><\/p>\r\n

\u00a0<\/p>\r\n

www.na.org<\/b><\/span><\/p>\r\n

\u00a0<\/p>\r\n

SUGGESTIONS FOR EVERYONE<\/span><\/strong><\/p>\r\n

DON\\'T USE no matter what<\/span><\/strong><\/p>\r\n

Ask your Higher Power to keep you clean<\/span><\/strong><\/p>\r\n

Come early and stay late<\/span><\/strong><\/p>\r\n

Get a home group<\/span><\/strong><\/p>\r\n

Go to 90 meetings in 90 days<\/span><\/strong><\/p>\r\n

Read NA literature daily<\/span><\/strong><\/p>\r\n

Get and use a sponsor<\/span><\/strong><\/p>\r\n

Use the PHONE<\/span><\/strong><\/p>\r\n

KEEP COMING BACK. IT WORKS<\/span><\/strong><\/p>\r\n

 <\/p>\r\n

Meetings Weekly:\u00a0[meeting_count]<\/p>","front_page_line_height":"1.4","last_page_content":"","last_page_line_height":1.2,"area_service_meetings_line_height":"1.0","content_font_size":7,"page_layout":null,"time_option":1,"remove_space":true,"content_line_height":1.2,"page_size":"legal","page_fold":"quad","meeting_sort":"day","cache_time":0,page_orientation":"L","show_status":null,"use_custom_section":null,"custom_section_content":"

[new_column]<\/p>\r\n\r\n\r\n\r\n
MEETING FORMAT LEGEND<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[format_codes_used_basic]<\/p>\r\n

 <\/p>\r\n\r\n\r\n\r\n
SERVICE MEETINGS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[service_meetings]<\/p>\r\n

[new_column]<\/p>\r\n\r\n\r\n\r\n
NARCOTICS ANONYMOUS HELPLINES<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

Service Body 1<\/p>\r\n<\/td>\r\n

\r\n

Number 1<\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

Service Body 2<\/p>\r\n<\/td>\r\n

\r\n

Number 2<\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[new_column]<\/div>\r\n\r\n\r\n\r\n
PHONE NUMBERS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

\u00a0<\/p>\r\n

The Narcotics Anonymous Message:<\/strong><\/span><\/p>\r\n

\u00a0<\/p>\r\n

\u201cThat an addict, any addict, can stop using drugs, lose the desire to use\u00a0and find a new way to live.\\\"<\/span><\/p>","custom_section_line_height":1,"which_format_codes":"used","area_service_meetings_font_size":"10","custom_section_font_size":8,"front_page_font_size":10,"include_meeting_email":false,"bmlt_login_id":"","bmlt_login_password":"","last_page_font_size":10,"column_line":false,"used_format_1":"","page_height":"195","column_gap":5,"margin_right":2,"margin_left":2,"margin_bottom":2,"margin_top":2,"meeting_template_content":"

time<\/strong><\/span> group<\/strong>, location, info, street,\u00A0city, state,\u00A0zip\u00A0(formats)\u00A0comments<\/em><\/div>","col_color":"#bfbfbf","time_clock":"12","header_font_size":7.5,"header_text_color":"#ffffff","header_background_color":"#000000","header_uppercase":1,"header_bold":1,"weekday_language":"en","include_asm":false,"logo_copied":"done","sub_header_shown":1,"page_height_fix":0,"borough_suffix":"Borough","county_suffix":"County","neighborhood_suffix":"Neighborhood","city_suffix":"City","pagenumbering_font_size":9,"recurse_service_bodies":1,"extra_meetings_enabled":0,"include_protection":false,"base_font":"dejavusanscondensed","protection_password":"","custom_query":"","extra_meetings":["none"]} \ No newline at end of file +{"root_server":"","service_body_1":"","service_body_2":"Not Used","service_body_3":"Not Used","service_body_4":"Not Used","service_body_5":"Not Used","area_service_meetings":null,"helplines":null,"helplines_line_height":null,"helplines_font_size":null,"format_codes":null,"format_codes_font_size":"9","format_codes_line_height":"1.0","front_page_content":"

\u00a0\"NALogo-1\"<\/p>\r\n

 <\/p>\r\n

[area]<\/b><\/span><\/p>\r\n

NARCOTICS ANONYMOUS<\/strong><\/span><\/p>\r\n

MEETING LIST<\/strong><\/span><\/p>\r\n

\u00a0<\/p>\r\n

[date]<\/b><\/span><\/p>\r\n

 <\/p>\r\n

24 HOUR HELPLINE<\/b><\/span><\/p>\r\n

NUMBER
<\/span><\/p>\r\n

\u00a0<\/span><\/p>\r\n

\u00a0<\/p>\r\n

www.na.org<\/b><\/span><\/p>\r\n

\u00a0<\/p>\r\n

SUGGESTIONS FOR EVERYONE<\/span><\/strong><\/p>\r\n

DON\\'T USE no matter what<\/span><\/strong><\/p>\r\n

Ask your Higher Power to keep you clean<\/span><\/strong><\/p>\r\n

Come early and stay late<\/span><\/strong><\/p>\r\n

Get a home group<\/span><\/strong><\/p>\r\n

Go to 90 meetings in 90 days<\/span><\/strong><\/p>\r\n

Read NA literature daily<\/span><\/strong><\/p>\r\n

Get and use a sponsor<\/span><\/strong><\/p>\r\n

Use the PHONE<\/span><\/strong><\/p>\r\n

KEEP COMING BACK. IT WORKS<\/span><\/strong><\/p>\r\n

 <\/p>\r\n

Meetings Weekly:\u00a0[meeting_count]<\/p>","front_page_line_height":"1.4","last_page_content":"","last_page_line_height":1.2,"area_service_meetings_line_height":"1.0","content_font_size":7,"page_layout":null,"time_option":1,"remove_space":true,"content_line_height":1.2,"page_size":"legal","page_fold":"quad","meeting_sort":"day","cache_time":0,"page_orientation":"L","show_status":null,"use_custom_section":null,"custom_section_content":"

[new_column]<\/p>\r\n\r\n\r\n\r\n
MEETING FORMAT LEGEND<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[format_codes_used_basic]<\/p>\r\n

 <\/p>\r\n\r\n\r\n\r\n
SERVICE MEETINGS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[service_meetings]<\/p>\r\n

[new_column]<\/p>\r\n\r\n\r\n\r\n
NARCOTICS ANONYMOUS HELPLINES<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

Service Body 1<\/p>\r\n<\/td>\r\n

\r\n

Number 1<\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

Service Body 2<\/p>\r\n<\/td>\r\n

\r\n

Number 2<\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n

\r\n

 <\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[new_column]<\/div>\r\n\r\n\r\n\r\n
PHONE NUMBERS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

\u00a0<\/p>\r\n

The Narcotics Anonymous Message:<\/strong><\/span><\/p>\r\n

\u00a0<\/p>\r\n

\u201cThat an addict, any addict, can stop using drugs, lose the desire to use\u00a0and find a new way to live.\\\"<\/span><\/p>","custom_section_line_height":1,"which_format_codes":"used","area_service_meetings_font_size":"10","custom_section_font_size":8,"front_page_font_size":10,"include_meeting_email":false,"bmlt_login_id":"","bmlt_login_password":"","last_page_font_size":10,"column_line":false,"used_format_1":"","column_gap":5,"margin_right":2,"margin_left":2,"margin_bottom":2,"margin_top":2,"meeting_template_content":"

time<\/strong><\/span> group<\/strong>, location, info, street,\u00A0city, state,\u00A0zip\u00A0(formats)\u00A0comments<\/em><\/div>","col_color":"#bfbfbf","time_clock":"12","header_font_size":7.5,"header_text_color":"#ffffff","header_background_color":"#000000","header_uppercase":1,"header_bold":1,"weekday_language":"en","include_asm":false,"logo_copied":"done","sub_header_shown":1,"borough_suffix":"Borough","county_suffix":"County","neighborhood_suffix":"Neighborhood","city_suffix":"City","pagenumbering_font_size":9,"recurse_service_bodies":1,"extra_meetings_enabled":0,"include_protection":false,"base_font":"dejavusanscondensed","protection_password":"","custom_query":"","extra_meetings":["none"]} \ No newline at end of file diff --git a/includes/three_column_settings.json b/includes/three_column_settings.json index 5384168..a998b5b 100644 --- a/includes/three_column_settings.json +++ b/includes/three_column_settings.json @@ -1 +1 @@ -{"root_server":"","service_body_1":"","service_body_2":"Not Used","service_body_3":"Not Used","header_font_size":6.5,"area_service_meetings":null,"front_page_content":"

\u00a0<\/p>\r\n

\"default_nalogo\"<\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

[service_body_1]<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

MEETING LIST<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

[date]<\/strong>\u00a0<\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

24 HOUR HELPLINE<\/b><\/span><\/p>\r\n

NUMBER
<\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/strong><\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

https:\/\/na.org<\/b><\/p>\r\n

 <\/p>\r\n

SUGGESTIONS FOR EVERYONE<\/strong><\/span><\/p>\r\n

DON\\'T USE no matter what<\/strong><\/p>\r\n

Ask your Higher Power to keep you clean<\/strong><\/p>\r\n

Come early and stay late<\/strong><\/p>\r\n

Get a home group<\/strong><\/p>\r\n

Go to 90 meetings in 90 days<\/strong><\/p>\r\n

Read NA literature daily<\/strong><\/p>\r\n

Get and use a sponsor<\/strong><\/p>\r\n

Use the PHONE<\/strong><\/p>\r\n

KEEP COMING BACK. IT WORKS<\/strong><\/span><\/p>\r\n

\u00a0<\/p>\r\n

Meetings Weekly:\u00a0[meeting_count]<\/p>","front_line_height":"1.0","area_service_meetings_line_height":null,"content_font_size":6,"content_line_height":1.2,"front_page_font_size":10,"last_page_content":"","front_page_line_height":"1.0","last_page_line_height":1,"page_layout":null,"service_body_4":"Not Used","service_body_5":"Not Used","time_option":1,"remove_space":true,"helplines_font_size":null,"format_codes":null,"format_codes_font_size":null,"format_codes_line_height":null,"page_size":"letter","page_fold":"tri","meeting_sort":"day","cache_time":0,"page_orientation":"L","show_status":null,"use_custom_section":null,"custom_section_content":"

[new_column]<\/p>\r\n\r\n\r\n\r\n
MEETING FORMAT LEGEND<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[format_codes_used_basic]<\/p>\r\n

 <\/p>\r\n\r\n\r\n\r\n
HELPLINES<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
Area 1<\/td>\r\nNumber 1<\/td>\r\n<\/tr>\r\n
Area 2<\/td>\r\nNumber 2<\/td>\r\n<\/tr>\r\n
<\/td>\r\n<\/td>\r\n<\/tr>\r\n
<\/td>\r\n<\/td>\r\n<\/tr>\r\n
<\/td>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

 <\/p>\r\n\r\n\r\n\r\n
SERVICE MEETINGS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[service_meetings]<\/p>\r\n

[new_column]<\/p>\r\n\r\n\r\n\r\n
PHONE NUMBERS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

\u00a0<\/span><\/strong><\/p>\r\n

What is our message?<\/span><\/span><\/strong><\/p>\r\n

 <\/p>\r\n

The message is that an addict, <\/span><\/strong><\/p>\r\n

any addict,\u00a0<\/span><\/strong>can stop using drugs,<\/span><\/strong><\/p>\r\n

\u00a0<\/span><\/strong>lose the desire to use,<\/span><\/strong><\/p>\r\n

and find a new way to live.<\/span><\/strong><\/p>\r\n

Our message is hope<\/span><\/strong><\/p>\r\n

and the promise of freedom.\u00a0<\/span><\/strong><\/p>\r\n

\u00a0<\/p>\r\n

Basic Text<\/span>, page 65<\/span><\/em><\/p>\r\n

[new_column]<\/p>","custom_section_line_height":1,"area_service_meetings_font_size":null,"which_format_codes":null,"custom_section_font_size":6.5,"include_meeting_email":false,"bmlt_login_id":"","bmlt_login_password":"","last_page_font_size":10,"column_line":false,"used_format_1":"","used_format_2":null,"time_clock":"12","page_height":"200","column_gap":6,"margin_right":2,"margin_left":2,"margin_bottom":2,"margin_top":2,"meeting_template_content":"

time<\/strong><\/span><\/span> \u00A0<\/span> hrsHR<\/strong><\/span><\/span> \u00A0<\/span>group<\/strong>, location,\u00A0info,\u00A0street, city, state, zip (formats)<\/strong>\u00A0comments<\/em><\/div>","col_color":"#274fae","header_text_color":"#ffffff","header_background_color":"#000000","header_uppercase":1,"header_bold":1,"include_asm":false,"weekday_language":"both","sub_header_shown":1,"page_height_fix":0,"borough_suffix":"Borough","county_suffix":"County","neighborhood_suffix":"Neighborhood","city_suffix":"City","pagenumbering_font_size":9,"recurse_service_bodies":1,"extra_meetings_enabled":0,"include_protection":false,"base_font":"dejavusanscondensed","protection_password":"","custom_query":"","extra_meetings":["none"]} +{"root_server":"","service_body_1":"","service_body_2":"Not Used","service_body_3":"Not Used","header_font_size":6.5,"area_service_meetings":null,"front_page_content":"

\u00a0<\/p>\r\n

\"default_nalogo\"<\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

[service_body_1]<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

MEETING LIST<\/strong><\/span><\/p>\r\n

 <\/p>\r\n

[date]<\/strong>\u00a0<\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

24 HOUR HELPLINE<\/b><\/span><\/p>\r\n

NUMBER
<\/span><\/p>\r\n

 <\/p>\r\n

 <\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/strong><\/p>\r\n

\u00a0<\/p>\r\n

\u00a0<\/p>\r\n

https:\/\/na.org<\/b><\/p>\r\n

 <\/p>\r\n

SUGGESTIONS FOR EVERYONE<\/strong><\/span><\/p>\r\n

DON\\'T USE no matter what<\/strong><\/p>\r\n

Ask your Higher Power to keep you clean<\/strong><\/p>\r\n

Come early and stay late<\/strong><\/p>\r\n

Get a home group<\/strong><\/p>\r\n

Go to 90 meetings in 90 days<\/strong><\/p>\r\n

Read NA literature daily<\/strong><\/p>\r\n

Get and use a sponsor<\/strong><\/p>\r\n

Use the PHONE<\/strong><\/p>\r\n

KEEP COMING BACK. IT WORKS<\/strong><\/span><\/p>\r\n

\u00a0<\/p>\r\n

Meetings Weekly:\u00a0[meeting_count]<\/p>","front_line_height":"1.0","area_service_meetings_line_height":null,"content_font_size":6,"content_line_height":1.2,"front_page_font_size":10,"last_page_content":"","front_page_line_height":"1.0","last_page_line_height":1,"page_layout":null,"service_body_4":"Not Used","service_body_5":"Not Used","time_option":1,"remove_space":true,"helplines_font_size":null,"format_codes":null,"format_codes_font_size":null,"format_codes_line_height":null,"page_size":"letter","page_fold":"tri","meeting_sort":"day","cache_time":0,"page_orientation":"L","show_status":null,"use_custom_section":null,"custom_section_content":"

[new_column]<\/p>\r\n\r\n\r\n\r\n
MEETING FORMAT LEGEND<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[format_codes_used_basic]<\/p>\r\n

 <\/p>\r\n\r\n\r\n\r\n
HELPLINES<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
Area 1<\/td>\r\nNumber 1<\/td>\r\n<\/tr>\r\n
Area 2<\/td>\r\nNumber 2<\/td>\r\n<\/tr>\r\n
<\/td>\r\n<\/td>\r\n<\/tr>\r\n
<\/td>\r\n<\/td>\r\n<\/tr>\r\n
<\/td>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

 <\/p>\r\n\r\n\r\n\r\n
SERVICE MEETINGS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

[service_meetings]<\/p>\r\n

[new_column]<\/p>\r\n\r\n\r\n\r\n + +
PHONE NUMBERS<\/span><\/strong><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n + + + + +
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n
\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n

\u00a0<\/span><\/strong><\/p>\r\n

What is our message?<\/span><\/span><\/strong><\/p>\r\n

 <\/p>\r\n

The message is that an addict, <\/span><\/strong><\/p>\r\n

any addict,\u00a0<\/span><\/strong>can stop using drugs,<\/span><\/strong><\/p>\r\n

\u00a0<\/span><\/strong>lose the desire to use,<\/span><\/strong><\/p>\r\n

and find a new way to live.<\/span><\/strong><\/p>\r\n

Our message is hope<\/span><\/strong><\/p>\r\n

and the promise of freedom.\u00a0<\/span><\/strong><\/p>\r\n

\u00a0<\/p>\r\n

Basic Text<\/span>, page 65<\/span><\/em><\/p>\r\n

[new_column]<\/p>","custom_section_line_height":1,"area_service_meetings_font_size":null,"which_format_codes":null,"custom_section_font_size":6.5,"include_meeting_email":false,"bmlt_login_id":"","bmlt_login_password":"","last_page_font_size":10,"column_line":false,"used_format_1":"","time_clock":"12","column_gap":6,"margin_right":2,"margin_left":2,"margin_bottom":2,"margin_top":2,"meeting_template_content":"

time<\/strong><\/span><\/span> \u00A0<\/span> hrsHR<\/strong><\/span><\/span> \u00A0<\/span>group<\/strong>, location,\u00A0info,\u00A0street, city, state, zip (formats)<\/strong>\u00A0comments<\/em><\/div>","col_color":"#274fae","header_text_color":"#ffffff","header_background_color":"#000000","header_uppercase":1,"header_bold":1,"include_asm":false,"weekday_language":"both","sub_header_shown":1,"borough_suffix":"Borough","county_suffix":"County","neighborhood_suffix":"Neighborhood","city_suffix":"City","pagenumbering_font_size":9,"recurse_service_bodies":1,"extra_meetings_enabled":0,"include_protection":false,"base_font":"dejavusanscondensed","protection_password":"","custom_query":"","extra_meetings":["none"]} diff --git a/js/bmlt_meeting_list.js b/js/bmlt_meeting_list.js index 43aeb88..b4e1f33 100644 --- a/js/bmlt_meeting_list.js +++ b/js/bmlt_meeting_list.js @@ -401,6 +401,14 @@ var $ml = jQuery.noConflict $ml('.neighborhood_by_suffix').show(); $ml('.city_by_suffix').show(); } + if (meeting_sort_val == 'weekday_area' + || meeting_sort_val == 'weekday_city' + || meeting_sort_val == 'weekday_county' + || meeting_sort_val == 'state') { + $ml('.show_subheader').show(); + } else { + $ml('.show_subheader').hide(); + } $ml("#suppress_heading").click(function() { var val = $ml("#suppress_heading:checked").val(); if (val == 1) { @@ -432,6 +440,14 @@ var $ml = jQuery.noConflict $ml('.neighborhood_by_suffix').show(); $ml('.city_by_suffix').show(); } + if (meeting_sort_val == 'weekday_area' + || meeting_sort_val == 'weekday_city' + || meeting_sort_val == 'weekday_county' + || meeting_sort_val == 'state') { + $ml('.show_subheader').show(); + } else { + $ml('.show_subheader').hide(); + } }); var time_clock_val = $ml('input[name=time_clock]:checked').val(); if (time_clock_val == '24') { @@ -558,8 +574,6 @@ var $ml = jQuery.noConflict $ml("#meeting-list-tabs ul li:eq(6)").show(); $ml('#meeting-list-tabs').tabs('disable', 5); $ml('#meeting-list-tabs').tabs('enable', 6); - $ml('input[name=page_height]').val(['']); - $ml('#pageheightdiv').hide(); $ml('#columngapdiv').hide(); $ml('#columnseparatordiv').hide(); $ml("#half-fold").css({ diff --git a/lang/translate_de.php b/lang/translate_de.php new file mode 100644 index 0000000..70f772c --- /dev/null +++ b/lang/translate_de.php @@ -0,0 +1,9 @@ + "German", + "LOCALE" => "de_DE", + "WEEKDAYS" => array( 'ERROR', 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ), + "WKDYS" => array( 'ERR', 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ), + "PAGE" => "Seite", + "CONT" => "weiter" +); diff --git a/lang/translate_dk.php b/lang/translate_dk.php new file mode 100644 index 0000000..8e7725b --- /dev/null +++ b/lang/translate_dk.php @@ -0,0 +1,9 @@ + "Danish", + "LOCALE" => "da_DK", + "WEEKDAYS" => array( 'ERROR', "Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag" ), + "WKDYS" => array( 'ERR', "Søndag", "Ma", "Ti", "On", "To", "Fr", "Lø" ), + "PAGE" => "Side", + "CONT" => "forts" +); diff --git a/lang/translate_en.php b/lang/translate_en.php new file mode 100644 index 0000000..d298488 --- /dev/null +++ b/lang/translate_en.php @@ -0,0 +1,9 @@ + "English", + "LOCALE" => "en_US", + "WEEKDAYS" => array( 'ERROR', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ), + "WKDYS" => array( 'ERR', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ), + "PAGE" => "Page", + "CONT" => "cont" +); diff --git a/lang/translate_en_es.php b/lang/translate_en_es.php new file mode 100644 index 0000000..a371f47 --- /dev/null +++ b/lang/translate_en_es.php @@ -0,0 +1,8 @@ + "English/Spanish", + "WEEKDAYS" => array( 'ERROR', "Sunday / Domingo", "Monday / Lunes", "Tuesday / Martes", "Wednesday / Miércoles", "Thursday / Jueves", "Friday / Viernes", "Saturday / Sábado" ), + "WKDYS" => array( 'ERR', 'Sun / Dom', 'Mon / Lun', 'Tue / Mar', 'Wed / Mié', 'Thu / Jue', 'Fri / Vie', 'Sat / Sáb' ), + "PAGE" => "Page", + "CONT" => "cont" +); diff --git a/lang/translate_en_po.php b/lang/translate_en_po.php new file mode 100644 index 0000000..108b606 --- /dev/null +++ b/lang/translate_en_po.php @@ -0,0 +1,8 @@ + "English/Portugese", + "WEEKDAYS" => array( 'ERROR', "Sunday / Domingo", "Monday / Lunes / Segunda-feira", "Tuesday / Martes / Terça-feira", "Wednesday / Miércoles / Quarta-feira", "Thursday / Jueves / Quinta-feira", "Friday / Viernes / Sexta-feira", "Saturday / Sábado" ), + "WKDYS" => array( 'ERR', 'Sun / Dom', 'Mon / Lun / Seg', 'Tue / Mar / Ter', 'Wed / Mié / Qua', 'Thu / Jue / Qui', 'Fri / Vie / Sex', 'Sat / Sáb' ), + "PAGE" => "Page", + "CONT" => "cont" +); diff --git a/lang/translate_es.php b/lang/translate_es.php new file mode 100644 index 0000000..a9c1674 --- /dev/null +++ b/lang/translate_es.php @@ -0,0 +1,9 @@ + "Spanish", + "LOCALE" => "es_ES", + "WEEKDAYS" => array( 'ERROR', "Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado" ), + "WKDYS" => array( 'ERR', 'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb' ), + "PAGE" => "Página", + "CONT" => "cont" +); diff --git a/lang/translate_fa.php b/lang/translate_fa.php new file mode 100644 index 0000000..02219de --- /dev/null +++ b/lang/translate_fa.php @@ -0,0 +1,16 @@ + "Farsi", + "LOCALE" => "fa_IR", + "WEEKDAYS" => array( 'ERROR', + mb_convert_encoding ('یَکشَنبه', 'HTML-ENTITIES'), + mb_convert_encoding ('دوشَنبه', 'HTML-ENTITIES'), + mb_convert_encoding ('سه‌شنبه', 'HTML-ENTITIES'), + mb_convert_encoding ('چهار شنبه', 'HTML-ENTITIES'), + mb_convert_encoding ('پَنج شَنبه', 'HTML-ENTITIES'), + mb_convert_encoding ('جُمعه', 'HTML-ENTITIES'), + mb_convert_encoding ('شَنبه', 'HTML-ENTITIES')), + "WKDYS" => array( 'ERR', 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ), + "PAGE" => "Seite", + "CONT" => "Weiter" +); diff --git a/lang/translate_fr.php b/lang/translate_fr.php new file mode 100644 index 0000000..e10d6a8 --- /dev/null +++ b/lang/translate_fr.php @@ -0,0 +1,9 @@ + "French", + "LOCALE" => "fr_FR", + "WEEKDAYS" => array( 'ERROR', "Dimanche", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ), + "WKDYS" => array( 'ERR', 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ), + "PAGE" => "Page", + "CONT" => "suite" +); diff --git a/lang/translate_fr_en.php b/lang/translate_fr_en.php new file mode 100644 index 0000000..b8b5b8d --- /dev/null +++ b/lang/translate_fr_en.php @@ -0,0 +1,8 @@ + "French/English", + "WEEKDAYS" => array( 'ERROR', "Dimanche / Sunday", "Lundi / Monday", "Mardi / Tuesday", "Mercredi / Wednesday", "Jeudi / Thursday", "Vendredi / Friday", "Samedi / Saturday" ), + "WKDYS" => array( 'ERR', 'Dim / Sun', 'Lun / Mon', 'Mar / Tues', 'Mer / Wed', 'Jeu / Thu', 'Ven / Fri', 'Sam / Sat' ), + "PAGE" => "Page", + "CONT" => "suite" +); diff --git a/lang/translate_it.php b/lang/translate_it.php new file mode 100644 index 0000000..0c5f5f3 --- /dev/null +++ b/lang/translate_it.php @@ -0,0 +1,9 @@ + "Italian", + "LOCALE" => "it_IT", + "WEEKDAYS" => array( 'ERROR', "Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato" ), + "WKDYS" => array( 'ERR', "Do", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab" ), + "PAGE" => "Pagina", + "CONT" => "continua" +); diff --git a/lang/translate_po.php b/lang/translate_po.php new file mode 100644 index 0000000..d7c566a --- /dev/null +++ b/lang/translate_po.php @@ -0,0 +1,9 @@ + "Portugese", + "LOCALE" => "pt_PT", + "WEEKDAYS" => array( 'ERROR', "Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado" ), + "WKDYS" => array( 'ERR', 'Dom', 'Seq', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb' ), + "PAGE" => "Seite", + "CONT" => "Weiter" +); diff --git a/lang/translate_se.php b/lang/translate_se.php new file mode 100644 index 0000000..fb61165 --- /dev/null +++ b/lang/translate_se.php @@ -0,0 +1,9 @@ + "Swedish", + "LOCALE" => "sv_SE", + "WEEKDAYS" => array( 'ERROR', "Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag" ), + "WKDYS" => array( 'ERR', "Sön", "Mån", "Tis", "Ons", "Tors", "Fre", "Lör" ), + "PAGE" => "Side", + "CONT" => "forts" +); diff --git a/partials/_layout_setup.php b/partials/_layout_setup.php index 556cb45..4366ca9 100644 --- a/partials/_layout_setup.php +++ b/partials/_layout_setup.php @@ -133,6 +133,19 @@
+ + +

diff --git a/partials/_meetings_setup.php b/partials/_meetings_setup.php index d24f235..3c45df0 100644 --- a/partials/_meetings_setup.php +++ b/partials/_meetings_setup.php @@ -44,8 +44,8 @@
options['header_bold'] == '1' ? 'checked' : '') ?>> - - options['sub_header_shown'] == '1' ? 'checked' : '') ?>>options['cont_header_shown'] == '1' ? 'checked' : '') ?>>

@@ -99,30 +99,21 @@

- "English", - "fr" => "French", - "po" => "Portuguese", - "both" => "English/Spanish", - "both_po" => "English/Spanish/Portuguese", - "fr_en" => "French/English", - "se" => "Swedish", - "dk" => "Danish", - "de" => "German", - "fa" => "Farsi", - "it" => "Italian" - ]; - ?> +
+

+ + options['sub_header_shown'] == '1' ? 'checked' : '') ?>> +

+
   Line Height:    - Page Height Adjust will add or remove space at the bottom of the meeting list.

-

1. Decrease value if a Group Header is missing at the top of the meeting list (-5, -10, etc).

-

2. increase value when using a small meeting font to fit more meetings (+5, +10, etc).

- '; - ?> - Page Height Adjust: -

-
Decrease Page Height Adjust if MEETING GROUP HEADER is missing.
Avoid using tables which will greatly slow down the generation time. Use CSS instead to get table-like effects if need be.

- - @@ -339,6 +321,24 @@

+ + +

The additional list may include fields that might be used for say "service meetings". To access these fields you must login with an service body administrator account.
diff --git a/readme.txt b/readme.txt index f899fa9..6377974 100644 --- a/readme.txt +++ b/readme.txt @@ -54,6 +54,16 @@ Follow all these steps, keep in mind that once you start using bread, it's not g == Changelog == += 2.1.0 = +* Bread now automatically calculates how many meetings fit in a column or on a page. + This eliminates the need to guess an appropriate value for Page-Height-adjustment + and also makes a more efficient use of the space. +* Support for languages has been refactored to make adding new languages easier. + Simply add a file in the appropriate directory. +* Shortcodes in the meeting template can be set off with square brackets ({}). +* Additional List can be in a different language from the main list. +* User can restrict the colorspace to Greyscale, RGB or CMYK. + = 2.0.0 = * Support for multiple configurations. * Access to configure is now controlled with a custom capability called `manage_bread`. This is automatically added to the `Administrator` role.