2023-01-10, 09:14 AM
2023-01-10, 03:19 PM
Yes, Theme Selector is globally available.
Simply paste this variable into the Header Template at a position wherever you want:
{$theme_select}
[ETS]
Simply paste this variable into the Header Template at a position wherever you want:
{$theme_select}
[ETS]
2023-01-10, 03:29 PM
Not quite globally - it's defined after the header template is rendered. You'd need a plugin or a core file edit to make it available in the header.
2023-01-12, 03:30 PM
ExiTuS method not work...
so? Any solution?
Thanks
so? Any solution?
Thanks
2023-01-12, 03:36 PM
Quote:You'd need a plugin or a core file edit to make it available in the header.
2023-01-12, 11:39 PM
Sorry for my initial suggestion! I forgot to remember that I am using a tiny modification in global.php for years, that makes the theme/language selctor available in the header as well.
So Matt is right, it is possible to use the theme selector in the header with a simple core file change in global.php - without using a plug-in. It's not a big deal to achieve.
This example refers to the most recent version of 1.8.33:
Search for the code block in line 1022:
Simply move this code block a couple of lines up to line 950:
You can do the same with the language selector, to make the lang.select available in the header as well.
Sorry for initial confusing - I hope this solution will match your needs.
[ExiTuS]
So Matt is right, it is possible to use the theme selector in the header with a simple core file change in global.php - without using a plug-in. It's not a big deal to achieve.
This example refers to the most recent version of 1.8.33:
Search for the code block in line 1022:
// Are we showing the quick theme selection box?
$theme_select = $theme_options = '';
if($mybb->settings['showthemeselect'] != 0)
{
...
}
Simply move this code block a couple of lines up to line 950:
}
(LINE 950) // PASTE THIS CODE HERE
$jsTemplates = array();
foreach (array('modal', 'modal_button') as $template) {
eval('$jsTemplates["'.$template.'"] = "'.$templates->get($template, 1, 0).'";');
$jsTemplates[$template] = str_replace(array("\n","\r"), array("\\\n", ""), addslashes($jsTemplates[$template]));
}
You can do the same with the language selector, to make the lang.select available in the header as well.
Sorry for initial confusing - I hope this solution will match your needs.
[ExiTuS]
2023-01-13, 12:32 AM
Sorry man, but still not work...
damn, I'm a donkey in tech
where am i wrong?
now it doesn't even work the footer (test here https://www.pokemonhacking.it/index.php);
In attach my global.php, can you help me?
thanks
damn, I'm a donkey in tech
where am i wrong?
now it doesn't even work the footer (test here https://www.pokemonhacking.it/index.php);
In attach my global.php, can you help me?
thanks
2023-01-13, 01:38 AM
Your attached global.php doesn't show any changes - it's like the original.
Compare to my file attached that's working...
Remember:
This is global.php for latest version 1.8.33
Whenever a MyBB upgrade is available, check whether global.php needs changing again.
[ETS]
Compare to my file attached that's working...
Remember:
This is global.php for latest version 1.8.33
Whenever a MyBB upgrade is available, check whether global.php needs changing again.
[ETS]