📄 theme.php
字号:
$icons .= ">".$custom_title."</a> |*";}
else { $icons .= "\n <a href=\"w2g_modules.php?name=".$title."\"";
if ($htm=="1" AND $accesskey<10) { $icons .= " accesskey=\"".$accesskey."\""; }
$icons .= ">".doimage("".$w2g_url."/themes/".$theme."/images/icon_".$title.".png", $custom_title, $iconwidth)."</a>*"; }
}
$modcount = $num_modules;
$icon = explode("*",$icons);
$rows = ($modcount / $ncol);
$nrows = explode(".",$rows);
if ($nrows[1]>0) {$nrows[0]+=1;}
$numrows = $nrows[0];
$modlogoheight = (24/300)*$usergfxpref;
echo "\n </div>"
."\n\n <div id=\"menu\">"
."\n ".doimage("".$w2g_url."/themes/".$theme."/images/w2g_Menu.png", "Menu:", $usergfxpref)."<br/>";
for ($i=0;$i<=$modcount; $i++)
{ echo $icon[$i]; }
echo "\n </div>\n";
}
}
else {
/********************************************************************************/
/* WML THEME FUNCTIONS */
/********************************************************************************/
function themeheader() // Custom THEME Header
{
global $theme, $w2g_logo, $htm, $nukeurl, $sitename, $page, $modulename, $moduletitle;
$template = "themes/".$theme."/wml/header.tpl";
$chk_template = implode("", file($template));
$chk_template = addslashes($chk_template);
$chk_template = "\$tmp=\"".$chk_template."\";";
eval($chk_template);
print $tmp;
echo "\n";
}
function themefooter() // Custom THEME Footer
{
global $theme, $w2g_menu, $nukeurl;
doMenu();
echo "\n";
$template = "themes/".$theme."/wml/footer.tpl";
$chk_template = implode("", file($template));
$chk_template = addslashes($chk_template);
$chk_template = "\$tmp=\"".$chk_template."\";";
eval($chk_template);
print $tmp;
if ($usergfxpref!=="0") { echo "<p align=\"center\"><a href=\"http://www.validome.org/get/".$w2g_url."\"><img src=\"themes/Wap-2-Go/wml/valid_wml_1_1.gif\" alt=\"Valid WML\"></img></a></p>"; }
else { echo "<p align=\"center\"><a href=\"http://www.validome.org/get/".$w2g_url."\">Valid WML</a></p>"; }
echo "\n";
}
function doPageTitle($page) // Custom Page Title
{
global $moduletitle, $modulename, $theme, $w2gfurl, $usergfxpref;
$page = "<a href=\"w2g_modules.php?name=".$moduletitle."\" title=\"".$modulename."\">".doimage("".$w2gfurl."/themes/".$theme."/images/w2g_".$moduletitle.".png", $modulename, $usergfxpref)."</a>";
echo "<p align=\"center\"><b>".$page."</b></p>";
echo "\n";
}
function Title($title)
{
echo "<p align=\"center\"><b>".$title."</b></p>";
}
function OpenModule()
{
}
function CloseModule()
{
}
function OpenTable() // Open a Block for Module or Section Content
{
}
function CloseTable() // Close the Block at end of Content
{
}
function doBlock($title, $content) // Displays Provided Information in template layout
{
global $theme;
$template = "themes/".$theme."/wml/block.tpl";
$chk_template = implode("", file($template));
$chk_template = addslashes($chk_template);
$chk_template = "\$tmp=\"".$chk_template."\";";
eval($chk_template);
print $tmp;
}
function doLeftBlock($title, $content) // Displays Provided Information in template layout
{
global $theme;
$template = "themes/".$theme."/wml/leftblock.tpl";
$chk_template = implode("", file($template));
$chk_template = addslashes($chk_template);
$chk_template = "\$tmp=\"".$chk_template."\";";
eval($chk_template);
print $tmp;
}
function doStory ($title,$content,$author) // Displays Provided Story Information in template layout
{
global $theme;
$template = "themes/".$theme."/wml/story.tpl";
$chk_template = implode("", file($template));
$chk_template = addslashes($chk_template);
$chk_template = "\$tmp=\"".$chk_template."\";";
eval($chk_template);
print $tmp;
}
function doReview($title,$content,$score,$author,$hits) // Displays Provided Review in template layout
{
global $theme;
$template = "themes/".$theme."/wml/review.tpl";
$chk_template = implode("", file($template));
$chk_template = addslashes($chk_template);
$chk_template = "\$tmp=\"".$chk_template."\";";
eval($chk_template);
print $tmp;
}
function doMenu() // Display the Site Menu
{
global $theme, $usergfxpref, $thumb, $imgtype, $num_modules, $module, $nukeurl, $w2g_url;
// Determine Number of Columns depending on the screen width...
if($usergfxpref<=50)
{ $ncol = 2;
$talign = "CC";}
else if($usergfxpref<=100)
{ $ncol = 2;
$talign = "CC";}
else if ($usergfxpref<200)
{ $ncol = 3;
$talign = "CCC";}
else { $ncol = 4;
$talign = "CCCC";}
// Calculate Icon Widths from Screen Width and Number of Columns
$iconx = ($usergfxpref-(2*$ncol))/$ncol;
$iconx = explode(".",$iconx);
$iconwidth = $iconx[0];
if ($usergfxpref=="0") {$icons = "|";} else { $icons = ""; }
// Detects Installed Modules and Makes Accessible to the User if Active
$thumbicon = "&x=".$iconwidth."&t=".$imgtype."&f=0";
$thumb = "".$nukeurl."/mobile/includes/w2g_thumbs.php?src=";
for ($i=0;$i<=$num_modules-1;$i++) {
list ($title,$custom_title) = explode(",", $module[$i]);
if ($usergfxpref=="0") { $icons .= " <a href=\"w2g_modules.php?name=".$title."\">".$custom_title."</a> |*"; }
else { $icons .= " <a href=\"w2g_modules.php?name=".$title."\">".doimage("".$w2g_url."/themes/".$theme."/images/icon_".$title.".png", $custom_title, $iconwidth)."</a>*"; }
}
$modcount = $num_modules;
$icon = explode("*",$icons);
$rows = ($modcount / $ncol);
$nrows = explode(".",$rows);
if ($nrows[1]>0) {$nrows[0]+=1;}
$numrows = $nrows[0];
echo "\n";
OpenTable();
echo "\n";
echo "<p align=\"center\">";
if ($usergfxpref) { echo doimage("".$w2g_url."/themes/".$theme."/images/w2g_Menu.png", ""._MENU."", $usergfxpref)."<br/>"; }
for ($i=0;$i<=$modcount; $i++)
{ echo $icon[$i]; }
echo "</p>";
echo "\n";
CloseTable();
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -