
Re: Discussion Limun's Demo Project
The problem with what Limun is trying to do is that the styles demo was never meant to be loaded more than once. And WHY? he feels he needs to separate the styles into groups is beyond me, when the thing itself denotes who the author is for each style.
I played with this array and it doesn't switch because it needs to be in a separate file like styles_index.php for it to even have a chance to work?
$mode_array = array(
'MG',
'fk',
'u'
);
$mode = (!empty($_GET['mode']) ? $_GET['mode'] : (!empty($_POST['mode']) ? $_POST['mode'] : false));
$mode = (in_array($mode, $mode_array) ? $mode : 'MG');
switch($mode)
{
case 'MG':
$page_title = 'MG Styles';
include('styles_array_mg.' . PHP_EXT);
break;
case 'fk':
$page_title = 'FK Styles';
include('styles_array_fk.' . PHP_EXT);
break;
case 'u':
$page_title = 'User Styles';
include('styles_array_user.' . PHP_EXT);
break;
default:
$page_title = 'Icy Styles';
}
But it would need to call styles_mg.php which in turn would call style_array_mg.php - and you are back to where you started from, because you can't separate the iframe from the "styles_*.php" files without re-programming the whole shebang.
And for what logical reason other than to simply group who did what?
Correction:
Yes one could possibly separate the iframe and include it at the bottom of "styles_index.php" so that the "mode's" would only call the data that the iframe uses - - Or copy all three pages to one page with only one iframe at the bottom and create functions out of the three pages and then use case
MG() - case fk() functions to call the relevant script or something like that.
And this is not something I intend to try or be involved in because I would take the easy way out and create a
MG "demo" forum, an FK "demo" forum and a User "demo" forum.
OT: I use a laptop with a wireless keyboard and mouse - maybe you should try that.