The change is done in the core.system.php file. Specifically, inside the system_init() function. There is a call to the user_loggedin() function that I commented out and replaced with the lines of code shown below.
fp-includes/core/core.system.php
function system_init() {
...
//user_loggedin(); // comment this out and add the following 3 lines
if (user_loggedin() && isset($_GET['theme'])) {
$GLOBALS['fp_config']['general']['theme'] = $_GET['theme'];
}
...
}
My code checks for whether the user is logged in, because you don't want just any visitor switching the theme on the fly. It then looks for the 'theme' URL parameter and if that's set, it modifies the loaded FlatPress configuration to the new theme. Simple.
Note: Playing around with a live system is not ideal, a test system should be set up that addresses this issue directly. However, sometimes you do want to test a theme on the live system without rolling it out for everyone to see, in that case, this kind of modification is justified.
-i