\n"; } /** * Special Footer Shortcode for dynamic menuarea templates. * @shortcode {---FOOTER---} * @return string */ function sc_footer() { return "\n"; /* return ' ';*/ } /* function sc_news_summary() { $sc = e107::getScBatch('news'); $data = $sc->getScVar('news_item'); return "".e107::getParser()->toHTML($data['news_summary'],'BODY').""; }*/ function sc_bootstrap_branding() { $pref = e107::pref('theme', 'branding'); switch($pref) { case 'logo': return e107::getParser()->parseTemplate('{SITELOGO: h=30}',true); break; case 'sitenamelogo': return "".e107::getParser()->parseTemplate('{SITELOGO: h=30}',true)."".SITENAME; break; case 'sitename': default: return SITENAME; break; } } function sc_bootstrap_nav_align() { $pref = e107::pref('theme', 'nav_alignment'); if($pref == 'right') { return "navbar-right"; } else { return ""; } } function sc_bootstrap_usernav($parm=null) { $placement = e107::pref('theme', 'usernav_placement', 'top'); if($parm['placement'] != $placement) { return ''; } e107::includeLan(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php"); $tp = e107::getParser(); $login_menu_shortcodes = null; require(e_PLUGIN."login_menu/login_menu_shortcodes.php"); // don't use 'require_once'. $direction = vartrue($parm['dir']) == 'up' ? ' dropup' : ''; $userReg = defset('USER_REGISTRATION'); if(!USERID) // Logged Out. { $text = '
"; return e107::getParser()->parseTemplate($text, true, $login_menu_shortcodes); } // Logged in. //TODO Generic LANS. (not theme LANs) $userNameLabel = !empty($parm['username']) ? USERNAME : ''; $text = ' '; return e107::getParser()->parseTemplate($text,true,$login_menu_shortcodes); } /* * @example shortcode to render news. */ function sc_bootstrap_news_example($parm=null) { $news = e107::getObject('e_news_tree'); // get news class. $sc = e107::getScBatch('news'); // get news shortcodes. $tp = e107::getParser(); // get parser. $newsCategory = 1; // null, number or array(1,3,4); $opts = array( 'db_order' =>'n.news_sticky DESC, n.news_datestamp DESC', //default is n.news_datestamp DESC 'db_where' => "FIND_IN_SET(0, n.news_render_type)", // optional 'db_limit' => '6', // default is 10 ); // load active news items. ie. the correct userclass, start/end time etc. $data = $news->loadJoinActive($newsCategory, false, $opts)->toArray(); // false to utilize the built-in cache. $TEMPLATE = "{NEWS_TITLE} : {NEWS_CATEGORY_NAME}