Parašė Gugiss· 2008 Lie. 13 21:07:28
#1
Iškilo tokia problemikė... Jeigu saite įjungiu dvi intro paneles jos tarsi būna kaip viena :D hm... jei paspaudi vienoj pvz license tai ir kitoj atsiverčia license... ir t.t. Gal žinosit problemos sprendimą. Kad neapsunkinčiau dar labiau jūsų čia intro_panel parsisiuntimas:
http://phpfusion.lt/infusions/mo...wnload=147
Čia intro_panel.php:
<?php
// Basic info and path to locale set and relevant locale file
if (file_exists(INFUSIONS."intro_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."intro_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."intro_panel/locale/English.php";
}
// We want to use these files, the javascript and the stylesheet
include INFUSIONS."intro_panel/tabs.js";
include INFUSIONS."intro_panel/stylesheet.css";
// Link to the stylesheet of relevant theme used
echo "<link rel='stylesheet' href='".THEME."styles.css' type='text/css'>";
// Opening table, locale text for title above our tabs
opentable ($locale['ip_000']);
// Panel titles: keep them short, id are necessary for javascript, copy a row and modify ID for more tabs.
// Table cell alignment and other attributes may also be customized.
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0' ><tr><td align='center'>
<span class='welcome_button' id='button_welcome' onclick=\"return SetBoxText('welcome');\">".$locale['ip_001']."</span>
<span class='welcome_button' id='button_license' onclick=\"return SetBoxText('license');\">".$locale['ip_002']."</span>
<span class='welcome_button' id='button_version' onclick=\"return SetBoxText('version');\">".$locale['ip_003']."</span>
<span class='welcome_button' id='button_copyright' onclick=\"return SetBoxText('copyright');\">".$locale['ip_004']."</span>
</td></tr><tr><td><div id='box_text' style='overflow: auto; border: 1px solid #bababa; padding: 5px'> </div>";
//End of panel titles table
//Content of panels, formatted in locale file, FORMATTED IN LOCALE FILE...
echo "<div class='welcome_box' id='layer_welcome'>".$locale['ip_010']."</div>";
echo "<div class='welcome_box' id='layer_license'>".$locale['ip_020']."</div>";
echo "<div class='welcome_box' id='layer_version'>".$locale['ip_030']."</div>";
echo "<div class='welcome_box' id='layer_copyright'>".$locale['ip_040']."</div>";
//Indicating which panel to be default visible
echo "</td></tr></table></div><script language=\"Javascript\"> SetBoxText('welcome');</script>";
// End of table
closetable();
?>
O čia tabs.js:
<script language="Javascript">
/*Do not alter but for hex value of color*/
function SetBoxText($show) {
var X = document.getElementById("box_text");
var Y = document.getElementById("layer_" + $show);
X.innerHTML = Y.innerHTML;
/*TAB ONE*/
$hide = "welcome";
if ($show == "welcome") $hide = "license";
with (document.getElementById("button_" + $hide).style) {
backgroundColor = "#DFDFDF";
color = "black";
}
/*TAB TWO*/
$hide = "license";
if ($show == "license") $hide = "version";
with (document.getElementById("button_" + $hide).style) {
backgroundColor = "#DFDFDF";
color = "black";
}
/*TAB THREE*/
$hide = "version";
if ($show == "version") $hide = "copyright";
with (document.getElementById("button_" + $hide).style) {
backgroundColor = "#DFDFDF";
color = "black";
}
/*TAB FOUR*/
$hide = "copyright";
if ($show == "copyright") $hide = "welcome";
with (document.getElementById("button_" + $hide).style) {
backgroundColor = "#DFDFDF";
color = "black";
}
/*Do not alter but hex value for color or backgroundColor, this will be displayed in the title of the active tab*/
with (document.getElementById("button_" + $show).style) {
backgroundColor = "#EFEFEF";
color = "#1867ca";
}
/* More tabs come here if You want*/
return true;
}
</script>
Redagavo Gugiss· 2008 Lie. 13 21:07:34