function navLang($key, $show_key = false)
 {
     global $lang, $gpc, $scache;
     if ($this->docs == null) {
         $cache = $scache->load('wraps');
         $this->docs = $cache->get();
     }
     @(list($prefix, $suffix) = explode('->', $gpc->plain_str($key, false), 2));
     $prefix = strtolower($prefix);
     if ($prefix == 'lang' && $suffix != null) {
         return $lang->phrase($suffix) . iif($show_key, " [{$key}]");
     } elseif ($prefix == 'doc' && is_id($suffix) && isset($this->docs[$suffix]['titles'])) {
         $data = $this->docs[$suffix]['titles'];
         $lid = getDocLangID($data);
         return $data[$lid] . iif($show_key, " [{$key}]");
     } else {
         return $key;
     }
 }
Beispiel #2
0
         $loc = $lang->phrase('wwo_log_logout');
     } else {
         $loc = $lang->phrase('wwo_log_login');
     }
     break;
 case 'attachments':
     if ($row->wiw_action == 'thumbnail' || $row->wiw_action == 'attachment') {
         $loc = $lang->phrase('wwo_attachments_view');
     } else {
         $loc = $lang->phrase('wwo_attachments_write');
     }
     break;
 case 'docs':
     $id = $row->wiw_id;
     if ($my->p['docs'] == 1 && isset($wrap_cache[$id]) && GroupCheck($wrap_cache[$id]['groups'])) {
         $lid = getDocLangID($wrap_cache[$id]['titles']);
         $title = $wrap_cache[$id]['titles'][$lid];
         $loc = $lang->phrase('wwo_docs');
     } else {
         $loc = $lang->phrase('wwo_docs_fallback');
     }
     break;
 case 'showforum':
     $id = $row->wiw_id;
     if (!isset($cat_cache[$id]['name']) || ($cat_cache[$id]['opt'] == 'pw' && (!isset($my->pwfaccess[$id]) || $my->pwfaccess[$id] != $cat_cache[$id]['optvalue']) || $my->pb[$id]['forum'] == 0)) {
         $loc = $lang->phrase('wwo_showforum_fallback');
     } else {
         $title = $cat_cache[$id]['name'];
         $loc = $lang->phrase('wwo_showforum');
     }
     break;
Beispiel #3
0
     $info['date'] = $lang->phrase('docs_date_na');
 }
 if ($info['update'] > 0) {
     $info['update'] = str_date($lang->phrase('dformat1'), times($info['update']));
 } else {
     $info['update'] = $lang->phrase('docs_date_na');
 }
 ($code = $plugins->load('docs_prepare')) ? eval($code) : null;
 $type = doctypes();
 if (isset($type[$info['type']])) {
     $typedata = $type[$info['type']];
 } else {
     $typedata = array('title' => 'Fallback', 'template' => '', 'parser' => 1, 'inline' => 1, 'remote' => 0);
 }
 // Get the correct lid and merge data to one info array (compatibility)
 $lid = getDocLangID($data);
 $info = array_merge($info, $data[$lid]);
 $notice_box = '';
 if ($lid != $my->language) {
     // We don't use the correct language... Let's print a notice
     $notice = $lang->phrase('doc_wrong_language_shown');
     $notice_box = $tpl->parse("main/notice_box");
 }
 if ($typedata['inline'] == 0) {
     if ($typedata['remote'] == 0) {
         $info['content'] = DocCodeParser($info['content'], $typedata['parser']);
     } else {
         // Only for backward compatibility of templates
         $info['file'] = $info['content'];
     }
     $breadcrumb->Add($info['title']);