==================================================================================================================== Mod Title: Guest User Language Bar Mod Version: 2.1 Mod Author: Robert Chapin, http://www.miqrogroove.com/forums/ (miqrogroove) Mod Description: Adds a Language List to the Index for Guest Users of your XMB Forum Mod Compatibility: XMB 1.9.11 Mod Install Note: Before adding this mod to your forum, you should back up all files related to this mod. Mod License Note: This mod is released under the GPL v3 License. A copy is provided with this software. ===================================================================================================================== STEP 1 - EDIT index.php Find near line 33 loadtemplates( Add code below 'index_guestlangbar', Find near line 85 eval('$header = "'.template('header').'";'); Add code below // Guest User Language Bar Hack if(X_GUEST){ $langlinks = array(); $query = loadPhrases(array('language', 'iso639')); foreach($query as $key=>$row) { if ($key != $langfile) $langlinks[$row['language']] = " | {$row['language']}"; } ksort($langlinks); $langlinks = implode("\n", $langlinks); eval('$header .= "'.template('index_guestlangbar').'";'); unset($langlinks, $query, $key, $row); } STEP 2 - EDIT functions.inc.php Find near line 124 if (X_SCRIPT != 'upgrade.php') { if (!loadLang($SETTINGS['langfile'])) { require_once(ROOT.'include/translation.inc.php'); langPanic(); } } REPLACE with code below if (X_SCRIPT != 'upgrade.php') { // Guest User Language Bar Hack $usedefault = TRUE; $pagelang = postedVar('pagelang', '', FALSE, TRUE, FALSE, 'g'); $xmbguestlang = postedVar('xmbguestlang', '', FALSE, TRUE, FALSE, 'c'); if ($pagelang == '') { $pagelang = $xmbguestlang; } if ($pagelang != '') { if (loadLang($pagelang)) { $usedefault = FALSE; if ($xmbguestlang != $pagelang) { global $onlinetime, $cookiepath, $cookiedomain; put_cookie("xmbguestlang", $pagelang, ($onlinetime + (86400*365)), $cookiepath, $cookiedomain); } } } unset($pagelang, $xmbguestlang); if ($usedefault) { if (!loadLang($SETTINGS['langfile'])) { require_once(ROOT.'include/translation.inc.php'); langPanic(); } } } STEP 3 - NEW TEMPLATE Go to Admin Panel -> Templates Next to the New button type in: index_guestlangbar Click the New button then paste this
$langlinks |