示例#1
0
 public function writeMessage(DataContainer $dc)
 {
     //$banner->addBannerNewWindow($GLOBALS['TL_LANG']['CTE'][$module['type']][0], $GLOBALS['TL_LANG']['CTE'][$module['type']][1]);
     $banner = new ReadSpeaker\RS_Messages();
     Message::reset();
     $banner->addBannerReadSpeakerTop($GLOBALS['TL_LANG']['MOD']['readspeaker_settings'][0], $GLOBALS['TL_LANG']['MOD']['readspeaker_settings'][1]);
     $count_settings = ReadSpeaker\RsSettingsModel::countAll();
     if (!Contao\Input::get('act')) {
         if ($count_settings == 0) {
             Message::addRaw($GLOBALS['TL_LANG']['tl_rs_settings']['info']['min_one_config']);
         } else {
             if ($count_settings > 0) {
                 Message::addRaw($GLOBALS['TL_LANG']['tl_rs_settings']['info']['more_configs']);
             }
         }
     }
 }
示例#2
0
 public function writeMessage(DataContainer $dc)
 {
     Message::reset();
     if (TL_MODE == 'BE' && Input::get('act') && Input::get('act') == 'edit') {
         $banner = new ReadSpeaker\RS_Messages();
         $db = \Contao\Database::getInstance();
         $module = $db->prepare("SELECT * FROM tl_content WHERE id = ?")->execute($dc->id)->row();
         if ($module) {
             $rs_banner = false;
             $rs_doc_banner = false;
             $rs_ce_end_banner = false;
             switch ($module['type']) {
                 case 'rs_content_ce':
                     $rs_banner = true;
                     $rs_ce_end_banner = true;
                     break;
                 case 'rs_content_end':
                     $rs_banner = true;
                     break;
                 case 'rs_content_doc':
                     $rs_banner = true;
                     $rs_doc_banner = true;
                     break;
                 case 'rs_content_skip':
                     $rs_banner = true;
                     break;
                 case 'rs_content_read':
                     $rs_banner = true;
                     break;
                 default:
                     break;
             }
             if ($rs_banner) {
                 $banner->addBannerReadSpeakerTop($GLOBALS['TL_LANG']['CTE'][$module['type']][0], $GLOBALS['TL_LANG']['CTE'][$module['type']][1]);
                 if ($rs_ce_end_banner) {
                     $banner->addBannerNotForgetEndContentElement();
                 }
                 if ($rs_doc_banner) {
                     $banner->addBannerPossibleDocReaderFileTypes();
                 }
             }
         }
     }
 }
示例#3
0
 public function writeMessage($dc)
 {
     $banner = new ReadSpeaker\RS_Messages();
     Message::reset();
     $db = \Contao\Database::getInstance();
     $module = $db->prepare("SELECT * FROM tl_module WHERE id = ?")->execute($dc->id)->row();
     $rs_banner = false;
     switch ($module['type']) {
         case 'mod_rs':
             $rs_banner = true;
             break;
         case 'mod_rs_skip_from_here':
             $rs_banner = true;
             break;
         case 'mod_rs_read_from_here':
             $rs_banner = true;
             break;
         default:
             break;
     }
     if ($rs_banner) {
         $banner->addBannerReadSpeakerTop($GLOBALS['TL_LANG']['FMD'][$module['type']][0], $GLOBALS['TL_LANG']['FMD'][$module['type']][1]);
     }
 }