Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kur įterpti kalbos keitimo kodą?

Parašė Nesąmonė.· 2010 Rugs. 25 19:09:49
#1

Koks kodas kalbos pasirinkimo? Tarkim turiu locale susimetęs daug kalbų, ir noriu, kad žmogus atėjęs į webą galėtų pasikeisti pagal save kalbą. Arba įterpkit kodą, nes pats nelabai žinau, kur įdėti jį, noriu, kad kalbos keitimas būtų maždaug prie laikrodžio.

<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
/*--------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion v6 - Content Management System   |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2007 |
| web: <a href='http://www.php-fusion.co.uk' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk</span></a>            |
| email: <a href="mailto:nick@php-fusion.co.uk"><span style="color:005C5B">nick@php-fusion.co.uk</span></a>                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
/*--------------------------------------------+
|  Webmaster Files Theme for <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion v6.x  |
|  Modified by:http://www.webmaster-files.com |
|---------------------------------------------|
| author: <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Themes © 2007             |
| web: <a href='http://phpfusion-themes.com' target='_blank'><span style='color:005C5B'>http://phpfusion-themes.com</span></a>            |
| email: <a href="mailto:webmaster@phpfusion-themes.com"><span style="color:005C5B">webmaster@phpfusion-themes.com</span></a>       |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
 
// theme settings
$body_text = "#555555";
$body_bg = "#FEFEFE";
$theme_width = "100%";
$theme_width_l = "170";
$theme_width_r = "170";
 
// Right Panels off in Forum Mode
//$theme_panels_exclude = array("/forum/");
 
 
 
function render_header($header_content) {
 
global $theme_width,$settings;
 
    echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='body-border'>
<tr><td><table cellpadding='0' cellspacing='0' width='100%'><tr>
<td><table cellpadding='0' cellspacing='0' width='100%'><tr>
<td><div align='right' id='clockbar'><div class='clockbarcolor'>
<div id='Clock'></div><script type='text/javascript'>
        <!--
        var DayNam = new Array(
        'Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
        var MnthNam = new Array(
        'January','February','March','April','May','June','July','August','September','October','November','December');
        //-->
</script>
<script type='text/javascript' src='".THEME."/clock/clock.js'></script></div></div>
<div align='right' id='pageheader'>
<table style='WIDTH: 100%; height:50px;' cellSpacing='0' cellPadding='0' border='0'><tr>
<td style='WIDTH: 45%'><a href='".BASEDIR."login.php'><img alt='".$settings[sitename]."' src='".THEME."images/logo.gif' border='0' width='400' height='74'></a>
</td></tr>
</table>
</div>
<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>
<td class='subheader'>".showsublinks(" - ","subheader-text")."</td>
<td class='subheader' style='vertical-align:middlie;' align='right'>
<form action='".BASEDIR."search.php?stype=f' method='post'>
<table cellSpacing='0' width='100%' cellPadding='0' border='0'><tr>
<td align='right'><b>Search</b>&nbsp;&nbsp;<input type='text' class='input' name='stext' value='Search Forums'  onBlur=\"if(this.value=='') this.value='Search Forums';\" onFocus=\"if(this.value=='Search Forums') this.value='';\">
&nbsp;<input name='option' class='submit' type='submit' value='Search'>
</td></tr>
</table>
</form>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}
 
function render_footer($license=false) {
 
global $theme_width,$settings,$locale;
 
    echo "</tr>\n</table>
<table cellpadding='0' cellspacing='0' width='100%'><tr>
<td align='center' class='footer'>";
    if (!$license) { echo showcopyright()."<br><br>\n"; } echo showcounter()."<br><br><b></b></a>";
    echo "</td></tr>
</table>
</td></tr>
</table>\n";
}
 
function render_news($subject, $news, $info) {
$subject = strip_tags($subject);
 
    echo "<table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>
<td class='tableHeadingBG'><div class='tableHeading'>$subject</div>
</td></tr>
<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>$news</td></tr>
<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>
<table cellSpacing='0' cellPadding='0' border='0'><tr>
<td align='center'>";
    echo openform("N",$info['news_id']).newsposter($info," &middot;").newsopts($info," &middot;").closeform("N",$info['news_id']);
    echo "</td>
</tr>
</table>
</td></tr>
</table>\n";
}
 
function render_article($subject, $article, $info) {
 
    echo "<table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>
<td class='tableHeadingBG'><div class='tableHeading'>$subject</div></td></tr>
<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>
</tr>
<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>
<table cellSpacing='0' cellPadding='0' border='0'><tr><td align='center'>";
    echo openform("A",$info['article_id']).articleposter($info," &middot;").articleopts($info," &middot;").closeform("A",$info['article_id']);
    echo "</td>
</tr>
</table>
</td></tr>
</table>\n";
}
 
function opentable($title) {
 
    echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>
<td class='tableHeadingBG'>
<div class='tableHeading'>$title</div></td>
</tr>
<tr><td class='td-cell1' vAlign='top'>";
}
 
function closetable() {
 
    echo "</td></tr>
</table>\n";
}
 
function openside($title) {
 
    echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>
<td class='tableHeadingBG'>
<div class='tableHeading'>$title</div></td>
</tr>
<tr><td class='td-cell1' vAlign='top'>";
}
 
function closeside() {
 
    echo "</td></tr>
</table>\n";
    tablebreak();
}
 
function opensidex($title,$state="on") {
 
$boxname = str_replace(" ", "", $title);
 
    echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>
<td class='tableHeadingBG'>
<div class='tableHeading'>$title</div></td>
<td align='right' class='tableHeadingBG'>".panelbutton($state,$boxname)."</td>
</tr>
<tr><td class='td-cell1' vAlign='top' colspan='2'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
 
function closesidex() {
 
    echo "</div></td></tr>
</table>\n";
    tablebreak();
}
 
function tablebreak() {
 
    echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
    echo "<tr>\n<td height='5'></td>\n</tr>\n</table>\n";
}
?>

Parašė snaige12· 2010 Rugs. 25 19:09:54
#2

ten kur tu nori kad butu keitimo panele, gali i sona mest

Parašė Nesąmonė.· 2010 Rugs. 25 21:09:36
#3

Man reikia būtent į headerį... :) Reikia, kad būtų kuo mažiau panelių..