|
From: <dac...@us...> - 2007-09-05 05:46:10
|
Revision: 56
http://thevr.svn.sourceforge.net/thevr/?rev=56&view=rev
Author: dachebodt
Date: 2007-09-04 22:46:11 -0700 (Tue, 04 Sep 2007)
Log Message:
-----------
Some more bug fixes for block management and layout
Modified Paths:
--------------
mods/cms/trunk/modules/blocks/acp_blocks.php
mods/cms/trunk/modules/forums/cms_forums.php
mods/cms/trunk/styles/prosilver/template/layout.html
Modified: mods/cms/trunk/modules/blocks/acp_blocks.php
===================================================================
--- mods/cms/trunk/modules/blocks/acp_blocks.php 2007-09-04 17:58:18 UTC (rev 55)
+++ mods/cms/trunk/modules/blocks/acp_blocks.php 2007-09-05 05:46:11 UTC (rev 56)
@@ -90,21 +90,29 @@
$weight = ($max_weight) ? ($max_weight + 1) : 0;
if($bid)
{
- $sql = 'SELECT position, weight
+ $sql = 'SELECT style, position, weight
FROM ' . BLOCKS_TABLE . "
WHERE bid = $bid";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if($row['position'] != $position)
+ $p = $row['position'];
+ $w = $row['weight'];
+ $s = $row['style'];
+
+ if($p != $position)
{
- $sql = 'UPDATE ' . BLOCKS_TABLE . ' SET weight = (weight - 1) WHERE weight > ' . $row['weight'];
+ $sql = 'UPDATE ' . BLOCKS_TABLE . "
+ SET weight = (weight - 1)
+ WHERE weight > $w
+ AND position = $p
+ AND style = $s";
$db->sql_query($sql);
}
else
{
- $weight = $row['weight'];
+ $weight = $w;
}
}
@@ -230,18 +238,23 @@
case 'up':
case 'down':
- $sql = 'SELECT module, weight, style
+ $sql = 'SELECT module, position, weight, style
FROM ' . BLOCKS_TABLE . "
WHERE bid = $bid";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
+ $style = $row['style'];
+ $position = $row['position'];
+ $weight = $row['weight'];
$nweight = ($action == 'up') ? ($row['weight'] - 1) : ($row['weight'] + 1);
+
$sql = 'UPDATE ' . BLOCKS_TABLE . "
- SET weight = '" . $row['weight'] . "'
+ SET weight = '$weight'
WHERE weight = $nweight
- AND style = " . $row['style'];
+ AND position = $position
+ AND style = $style";
$db->sql_query($sql);
$sql = 'UPDATE ' . BLOCKS_TABLE . "
Modified: mods/cms/trunk/modules/forums/cms_forums.php
===================================================================
--- mods/cms/trunk/modules/forums/cms_forums.php 2007-09-04 17:58:18 UTC (rev 55)
+++ mods/cms/trunk/modules/forums/cms_forums.php 2007-09-05 05:46:11 UTC (rev 56)
@@ -2,7 +2,7 @@
/**
*
* @package cms
-* @version $Id: gui_forums.php,v 1.41 2007/01/24 11:28:50 acydburn Exp $
+* @version $Id: cms_forums.php,v 1.41 2007/01/24 11:28:50 acydburn Exp $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -83,8 +83,15 @@
break;
}
- $template->alter_block_array('navlinks', array('FORUM_NAME' => $user->lang['FORUMS']), array('FORUM_NAME' => strtoupper($mode)), 'change');
+ if($mode != 'forum')
+ {
+ $u_other = append_sid("{$phpbb_root_path}index.$phpEx", "i=$id&mode=$mode");
+ $u_forum = append_sid("{$phpbb_root_path}index.$phpEx", "i=$id&mode=forum");
+ $template->alter_block_array('navlinks', array('FORUM_NAME' => $user->lang['FORUMS']), array('FORUM_NAME' => strtoupper($mode)), 'change');
+ $template->alter_block_array('navlinks', array('U_VIEW_FORUM' => $u_forum), array('U_VIEW_FORUM' => $u_other), 'change');
+ }
+
$this->page_title = 'FORUMS';
$module_block['TITLE'] = '';
$module_block['CONTENT'] = $template->assign_display('body');
Modified: mods/cms/trunk/styles/prosilver/template/layout.html
===================================================================
--- mods/cms/trunk/styles/prosilver/template/layout.html 2007-09-04 17:58:18 UTC (rev 55)
+++ mods/cms/trunk/styles/prosilver/template/layout.html 2007-09-05 05:46:11 UTC (rev 56)
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF .right -->
+<!-- IF .left -->
<div class="left-box" style="width:20%;margin-right:.5%">
@@ -34,7 +34,7 @@
</div>
<!-- ENDIF -->
-<div class="left-box" style="width:<!-- IF .right and .left -->59%<!-- ELSEIF .left || .right -->79.4%<!-- ELSE -->100%<!-- ENDIF -->">
+<div class="left-box" style="width:<!-- IF .right and .left -->59%<!-- ELSEIF .left or .right -->79.4%<!-- ELSE -->100%<!-- ENDIF -->">
<!-- BEGIN top -->
<div class="panel<!-- IF top.CLASS --> {top.CLASS}<!-- ENDIF -->">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|