[Openupload-svn-update] SF.net SVN: openupload:[28] trunk
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-10-16 18:56:15
|
Revision: 28
http://openupload.svn.sourceforge.net/openupload/?rev=28&view=rev
Author: tsdogs
Date: 2008-10-16 18:56:05 +0000 (Thu, 16 Oct 2008)
Log Message:
-----------
Add the language selection on main template.
Modified Paths:
--------------
trunk/lib/main.inc.php
trunk/templates/default/index.tpl
trunk/www/templates/default/main.css
Modified: trunk/lib/main.inc.php
===================================================================
--- trunk/lib/main.inc.php 2008-10-16 18:45:05 UTC (rev 27)
+++ trunk/lib/main.inc.php 2008-10-16 18:56:05 UTC (rev 28)
@@ -60,6 +60,13 @@
$this->langs = $this->db->loadTable('langs','','','id');
+ /* check if it was forced */
+ if (isset($_GET['lang'])) {
+ $user = $this->user->userInfo();
+ $user['lang']=$_GET['lang'];
+ $this->user->setUserInfo($user);
+ }
+
/* configure the language */
if ($this->user->userInfo('lang')=='') {
$lang = $this->getBrowserLang();
Modified: trunk/templates/default/index.tpl
===================================================================
--- trunk/templates/default/index.tpl 2008-10-16 18:45:05 UTC (rev 27)
+++ trunk/templates/default/index.tpl 2008-10-16 18:56:05 UTC (rev 28)
@@ -7,6 +7,13 @@
<!-- header -->
<div id="header">
<div id="logo"><img src="{$page.template}/img/openupload.jpg" border="0"></div>
+<div id="langs">
+<ul>
+{foreach from=$langs item=l name=c}
+<li {if $smarty.foreach.c.last} style="border: 0px"{/if}><a href="{$script}?lang={$l.id}">{$l.name}</a></li>
+{/foreach}
+</ul>
+</div>
<div id="userinfo">
{$user.name}
</div>
Modified: trunk/www/templates/default/main.css
===================================================================
--- trunk/www/templates/default/main.css 2008-10-16 18:45:05 UTC (rev 27)
+++ trunk/www/templates/default/main.css 2008-10-16 18:56:05 UTC (rev 28)
@@ -7,12 +7,31 @@
float:left;
}
#userinfo {
+ clear: right;
float: right;
height: 20px;
vertical-align: bottom;
- margin-top: 60px;
+ margin-top: 40px;
margin-right: 20px;
}
+#langs {
+ float: right;
+ height: 20px;
+ vertical-align: top;
+ margin-top: 0px;
+ margin-right: 20px;
+}
+#langs ul {
+ list-style:none;
+ margin: 0;
+ padding: 0;
+}
+#langs li {
+ display: inline;
+ padding-right: 8px;
+ padding-left: 8px;
+ border-right: 1px solid #000000;
+}
#title {
background-color: #3161cf;
color: #ffffff;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|