From 02821454bcacdf1b0f11349a63e6c814651dfe79 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 18 Jun 2013 15:39:31 +0000 Subject: [PATCH] Use CSS git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8817 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- configurator.php | 5 +++-- lib/AccessLog.php | 6 ++---- lib/BlockParser.php | 4 +--- lib/HtmlParser.php | 4 ++-- lib/PageList.php | 6 +++--- lib/PagePerm.php | 6 +++--- lib/plugin/AnalyseAccessLogSql.php | 6 ++---- lib/plugin/Calendar.php | 8 ++------ lib/plugin/DebugAuthInfo.php | 12 +++--------- lib/plugin/DebugBackendInfo.php | 16 ++++------------ lib/plugin/EditMetaData.php | 4 +--- lib/plugin/LdapSearch.php | 2 +- lib/plugin/ModeratedPage.php | 4 +--- lib/plugin/PhotoAlbum.php | 19 ++++++++----------- lib/plugin/PreferenceApp.php | 2 +- lib/plugin/PrevNext.php | 4 ++-- lib/plugin/RecentReferrers.php | 5 +---- lib/plugin/SemanticSearchAdvanced.php | 2 +- lib/plugin/UpLoad.php | 2 +- lib/plugin/WantedPagesOld.php | 5 +---- themes/Crao/crao.css | 12 ++++++++++++ themes/Crao/templates/navbar.tmpl | 4 ++-- themes/Crao/templates/top.tmpl | 4 ++-- themes/Hawaiian/Hawaiian.css | 12 ++++++++++++ themes/MacOSX/MacOSX.css | 12 ++++++++++++ themes/MacOSX/images/index.php | 2 +- themes/MonoBook/main.css | 12 ++++++++++++ themes/Portland/portland.css | 12 ++++++++++++ themes/Portland/templates/body.tmpl | 4 ++-- themes/Portland/templates/debug.tmpl | 2 +- themes/Portland/templates/editpage.tmpl | 7 +++---- themes/Portland/templates/navbar.tmpl | 6 ++---- themes/Sidebar/sidebar.css | 12 ++++++++++++ themes/Sidebar/templates/debug.tmpl | 2 +- themes/SpaceWiki/SpaceWiki.css | 12 ++++++++++++ themes/Wordpress/Wordpress.css | 12 ++++++++++++ themes/Wordpress/templates/editpage.tmpl | 5 ++--- themes/blog/Kubrick.css | 12 ++++++++++++ themes/blog/templates/actionbar.tmpl | 4 ++-- themes/default/phpwiki.css | 12 ++++++++++++ themes/default/templates/actionbar.tmpl | 8 ++++---- themes/default/templates/addcomment.tmpl | 2 +- themes/default/templates/debug.tmpl | 2 +- themes/default/templates/editpage.tmpl | 11 +++++------ themes/default/templates/forumadd.tmpl | 6 +++--- themes/default/templates/login.tmpl | 8 ++++---- themes/default/templates/online.tmpl | 4 ++-- themes/default/templates/pagelink.tmpl | 2 +- themes/fusionforge/templates/editpage.tmpl | 6 +++--- themes/shamino_com/shamino_com.css | 12 ++++++++++++ themes/smaller/templates/actionbar.tmpl | 6 +++--- themes/wikilens/templates/body.tmpl | 2 +- 52 files changed, 221 insertions(+), 130 deletions(-) diff --git a/configurator.php b/configurator.php index 04b794703..69559cbde 100644 --- a/configurator.php +++ b/configurator.php @@ -1866,7 +1866,7 @@ class unchangeable_variable global $tdwidth; $i = "

" . $title . "

\n " . nl2p($this->_get_description()) . "\n"; // $i .= "Not editable.
\n
" . $this->default_value."
"; - return '' . "\n" . $i . "\n" + return '' . "\n" . $i . "\n" . ' '; } } @@ -2495,7 +2495,8 @@ class part { $id = preg_replace("/\W/", "", $this->config_item_name); $group_name = preg_replace("/\W/", "", $title); - $i = "\n\n"; + $i = ''."\n"; + $i .= ''."\n"; $i .= "

" . $title . "

\n " . nl2p($this->_get_description()) . "\n"; $i .= "

Hide options.

"; return $i . "\n"; diff --git a/lib/AccessLog.php b/lib/AccessLog.php index 07381a400..08435abf8 100644 --- a/lib/AccessLog.php +++ b/lib/AccessLog.php @@ -656,10 +656,8 @@ class Request_AccessLog_SQL // otherwise the headers will not be ready $tbody = $this->_getQueryResults($query, $dbi); - return HTML::table(array('border' => 1, - 'cellspacing' => 1, - 'cellpadding' => 1), - HTML::caption(HTML::h1(HTML::br(), $this->_getCaption($args))), + return HTML::table(array('border' => 1), + HTML::caption($this->_getCaption($args)), HTML::thead($this->_theadrow), $tbody); } diff --git a/lib/BlockParser.php b/lib/BlockParser.php index 204883996..f375ac64a 100644 --- a/lib/BlockParser.php +++ b/lib/BlockParser.php @@ -851,9 +851,7 @@ class Block_table_dl extends Block_dl $defs[$key]->setWidth($ncols); return HTML::table(array('class' => 'wiki-dl-table', - 'border' => 1, - 'cellspacing' => 0, - 'cellpadding' => 6), + 'border' => 1), $defs); } } diff --git a/lib/HtmlParser.php b/lib/HtmlParser.php index 1ee1517f7..6de2f4fa7 100644 --- a/lib/HtmlParser.php +++ b/lib/HtmlParser.php @@ -379,7 +379,7 @@ class HtmlParser_PhpWiki2 if (!$alignment and preg_match("/float(right|left)/i", $css_class, $m)) ; $alignment = $m[1]; if ($alignment) { - $attrs[] = "align=$alignment"; + $attrs[] = "class=align-$alignment"; $this->log(" Image is contained within a DIV that specifies $alignment alignment"); $this->log(" Adding '$alignment' to [Image] markup attributes"); } else { @@ -389,7 +389,7 @@ class HtmlParser_PhpWiki2 $this->log(" Image is not contained within a DIV"); } if ($alignment) - $attrs[] = "align=$alignment"; + $attrs[] = "class=align-$alignment"; // // Check if we need to request a thumbnail of this // image; it's needed if the specified width attribute diff --git a/lib/PageList.php b/lib/PageList.php index 3f434ed98..c0c6412a1 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -1650,7 +1650,7 @@ class PageList $this->_options['limit']); if ($tokens) { $paging = Template("pagelink", $tokens); - $out->pushContent(HTML::table(array('width' => '100%'), $paging)); + $out->pushContent(HTML::table(array('class' => 'fullwidth'), $paging)); } } @@ -1669,7 +1669,7 @@ class PageList $length += 1; } $width = sprintf("%d", 100 / $this->_options['cols']) . '%'; - $cols = HTML::tr(array('valign' => 'top')); + $cols = HTML::tr(array('class' => 'top')); for ($i = $offset; $i < $offset + $count; $i += $length) { $this->_saveOptions(array('cols' => 0, 'paging' => 'none')); $this->_pages = array_slice($this->_pages, $i, $length); @@ -1761,7 +1761,7 @@ class PageList } $out->pushContent($list); if ($do_paging and $tokens) { - $out->pushContent(HTML::table(array('width' => '100%'), $paging)); + $out->pushContent(HTML::table(array('class' => 'fullwidth'), $paging)); } return $out; } diff --git a/lib/PagePerm.php b/lib/PagePerm.php index d2ce62ca2..fb061762e 100644 --- a/lib/PagePerm.php +++ b/lib/PagePerm.php @@ -578,7 +578,7 @@ class PagePermission $td->pushContent(HTML::tr(HTML::td(array('align' => 'right'), $group), HTML::td($bool ? '[X]' : '[ ]'))); } - $table->pushContent(HTML::tr(array('valign' => 'top'), + $table->pushContent(HTML::tr(array('class' => 'top'), HTML::td($access), HTML::td($td))); } if ($type == 'default') @@ -639,7 +639,7 @@ class PagePermission $addbutton->setAttr('checked', 'checked'); $newperm->setAttr('checked', 'checked'); $table->pushContent( - HTML::tr(array('valign' => 'top'), + HTML::tr(array('class' => 'top'), HTML::td(HTML::strong($access . ":")), HTML::td($newgroup), HTML::td($nbsp, $newperm), @@ -686,7 +686,7 @@ class PagePermission } if (!empty($groups)) $table->pushContent( - HTML::tr(array('valign' => 'top'), + HTML::tr(array('class' => 'top'), HTML::td(array('align' => 'right'), _("add ")), HTML::td($newgroup), HTML::td(array('align' => 'center'), $nbsp, $newperm), diff --git a/lib/plugin/AnalyseAccessLogSql.php b/lib/plugin/AnalyseAccessLogSql.php index e7460809a..14c3ff59a 100644 --- a/lib/plugin/AnalyseAccessLogSql.php +++ b/lib/plugin/AnalyseAccessLogSql.php @@ -291,10 +291,8 @@ class WikiPlugin_AnalyseAccessLogSql // otherwise the headers will not be ready $tbody = $this->getQueryResults($query, $dbi); - return HTML::table(array('border' => 1, - 'cellspacing' => 1, - 'cellpadding' => 1), - HTML::caption(HTML::h1(HTML::br(), $this->getCaption($args))), + return HTML::table(array('border' => 1), + HTML::caption($this->getCaption($args)), HTML::thead($this->_theadrow), $tbody); } diff --git a/lib/plugin/Calendar.php b/lib/plugin/Calendar.php index 5fe9d6089..95b0bab04 100644 --- a/lib/plugin/Calendar.php +++ b/lib/plugin/Calendar.php @@ -101,9 +101,7 @@ class WikiPlugin_Calendar return HTML::tr(HTML::td(array('colspan' => $args['display_weeknum'] ? 8 : 7, 'align' => 'center'), - HTML::table(array('width' => '100%', - 'class' => 'cal-header'), - $row))); + HTML::table(array('class' => 'cal-header fullwidth'), $row))); } private function __daynames($start_wday) @@ -189,9 +187,7 @@ class WikiPlugin_Calendar 1, // mday (1-31) $args['year']); - $cal = HTML::table(array('cellspacing' => 0, - 'cellpadding' => 2, - 'class' => 'cal'), + $cal = HTML::table(array('class' => 'cal'), HTML::thead( $this->__header($request->getArg('pagename'), $time), diff --git a/lib/plugin/DebugAuthInfo.php b/lib/plugin/DebugAuthInfo.php index 4e68bf07c..baa2d0477 100644 --- a/lib/plugin/DebugAuthInfo.php +++ b/lib/plugin/DebugAuthInfo.php @@ -57,9 +57,7 @@ class WikiPlugin_DebugAuthInfo } $html = HTML(HTML::h3(fmt("General Auth Settings"))); - $table = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0)); + $table = HTML::table(array('border' => 1)); $table->pushContent($this->show_hash("AUTH DEFINES", $this->buildConstHash( array("ENABLE_USER_NEW", "ALLOW_ANON_USER", @@ -95,9 +93,7 @@ class WikiPlugin_DebugAuthInfo if (!$user) { $html->pushContent(HTML::p(fmt("No userid"))); } else { - $table = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0)); + $table = HTML::table(array('border' => 1)); //$table->pushContent(HTML::tr(HTML::td(array('colspan' => 2)))); $userdata = obj2hash($user, array('_dbi', '_request', 'password', 'passwd')); if (isa($user, "_FilePassUser")) { @@ -149,9 +145,7 @@ class WikiPlugin_DebugAuthInfo if ($depth > 3) $val = $heading; elseif ($heading == "Object of wikidb_sql") $val = $heading; elseif (substr($heading, 0, 13) == "Object of db_") $val = $heading; elseif (!isset($seen[$heading])) { //if (empty($seen[$heading])) $seen[$heading] = 1; - $val = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0), + $val = HTML::table(array('border' => 1), $this->show_hash($heading, obj2hash($val), $depth + 1)); } else { $val = $heading; diff --git a/lib/plugin/DebugBackendInfo.php b/lib/plugin/DebugBackendInfo.php index 1eccbddd7..bab09790b 100644 --- a/lib/plugin/DebugBackendInfo.php +++ b/lib/plugin/DebugBackendInfo.php @@ -52,9 +52,7 @@ class WikiPlugin_DebugBackendInfo $html = HTML(HTML::h3(fmt("Querying backend directly for “%s”", $page))); - $table = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0)); + $table = HTML::table(array('border' => 1)); $pagedata = $backend->get_pagedata($page); if (!$pagedata) { // FIXME: invalid HTML @@ -129,16 +127,12 @@ class WikiPlugin_DebugBackendInfo // how to indent this table? $val = unserialize($val); $this->_fixupData($val, $fullkey); - $data[$key] = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0), + $data[$key] = HTML::table(array('border' => 1), $this->_showhash(false, $val, $fullkey)); } elseif (is_array($val)) { // how to indent this table? $this->_fixupData($val, $fullkey); - $data[$key] = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0), + $data[$key] = HTML::table(array('border' => 1), $this->_showhash(false, $val, $fullkey)); } elseif (is_object($val)) { // how to indent this table? @@ -146,9 +140,7 @@ class WikiPlugin_DebugBackendInfo print_r($val); $val = HTML::pre(ob_get_contents()); ob_end_clean(); - $data[$key] = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0), + $data[$key] = HTML::table(array('border' => 1), $this->_showhash(false, $val, $fullkey)); } elseif ($key and $key == '%content') { if ($val === true) diff --git a/lib/plugin/EditMetaData.php b/lib/plugin/EditMetaData.php index dd66952b1..576899c4d 100644 --- a/lib/plugin/EditMetaData.php +++ b/lib/plugin/EditMetaData.php @@ -125,9 +125,7 @@ class WikiPlugin_EditMetaData $html->pushContent(HTML::p(fmt("No metadata for %s", $page))); $table = HTML(); } else { - $table = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0)); + $table = HTML::table(array('border' => 1)); $this->_fixupData($pagemeta); $table->pushContent($this->_showhash("MetaData('$page')", $pagemeta)); } diff --git a/lib/plugin/LdapSearch.php b/lib/plugin/LdapSearch.php index e9d05bdf6..29ddef89f 100644 --- a/lib/plugin/LdapSearch.php +++ b/lib/plugin/LdapSearch.php @@ -196,7 +196,7 @@ class WikiPlugin_LdapSearch } $html->pushContent($row); } - return HTML::table(array('cellpadding' => 1, 'cellspacing' => 1, 'border' => 1), $html); + return HTML::table(array('border' => 1), $html); } } diff --git a/lib/plugin/ModeratedPage.php b/lib/plugin/ModeratedPage.php index 5ccb77271..0efb7975f 100644 --- a/lib/plugin/ModeratedPage.php +++ b/lib/plugin/ModeratedPage.php @@ -374,9 +374,7 @@ class WikiPlugin_ModeratedPage $loader = new WikiPluginLoader(); $BackendInfo = $loader->getPlugin("DebugBackendInfo"); - $table = HTML::table(array('border' => 1, - 'cellpadding' => 2, - 'cellspacing' => 0)); + $table = HTML::table(array('border' => 1)); $content = $table; $diff = ''; if ($moderation['args']['action'] == 'edit') { diff --git a/lib/plugin/PhotoAlbum.php b/lib/plugin/PhotoAlbum.php index 9f0eee17d..d236b6775 100644 --- a/lib/plugin/PhotoAlbum.php +++ b/lib/plugin/PhotoAlbum.php @@ -303,9 +303,8 @@ display_slides();")); } // cell operations - $cell = array('align' => "center", - 'valign' => "top", - 'class' => 'photoalbum cell', + $cell = array( + 'class' => 'photoalbum cell align-center top', 'bgcolor' => "$color"); if ($cellwidth != 'auto') { if ($cellwidth == 'equal') { @@ -366,8 +365,8 @@ display_slides();")); if ($mode == 'tiles') { $row->pushContent( HTML::td($cell, - HTML::div(array('valign' => 'top'), $url_image), - HTML::div(array('valign' => 'bottom'), + HTML::div(array('class' => 'top'), $url_image), + HTML::div(array('class' => 'bottom'), HTML::div(array('class' => 'boldsmall'), ($url_text)), HTML::br(), @@ -380,12 +379,12 @@ display_slides();")); } elseif ($mode == 'list') { $desc = ($showdesc != 'none') ? $value["desc"] : ''; $row->pushContent( - HTML::td(array("valign" => "top", + HTML::td(array("class" => "top", "nowrap" => 0, "bgcolor" => $color), HTML::div(array('class' => 'boldsmall'), ($url_text)))); $row->pushContent( - HTML::td(array("valign" => "top", + HTML::td(array("class" => "top", "nowrap" => 0, "bgcolor" => $color), HTML::div(array('class' => 'gensmall'), @@ -396,7 +395,7 @@ display_slides();")); if ($desc != '') $row->pushContent( - HTML::td(array("valign" => "top", + HTML::td(array("class" => "top", "nowrap" => 0, "bgcolor" => $color), HTML::div(array('class' => 'gensmall'), $desc))); @@ -493,9 +492,7 @@ display_slides();")); } //create main table - $table_attributes = array("border" => 0, - "cellpadding" => 5, - "cellspacing" => 2, + $table_attributes = array( "class" => "photoalbum", "width" => $tablewidth ? $tablewidth : "100%"); diff --git a/lib/plugin/PreferenceApp.php b/lib/plugin/PreferenceApp.php index 46620cef4..f2f847b28 100644 --- a/lib/plugin/PreferenceApp.php +++ b/lib/plugin/PreferenceApp.php @@ -177,7 +177,7 @@ class WikiPlugin_PreferenceApp } } - $table = HTML::table(array('cellpadding' => '5', 'cellspacing' => '1', 'border' => '0')); + $table = HTML::table(); $tr = HTML::tr(); $td = HTML::td(array('bgcolor' => '#FFFFFF')); $td->pushContent(" "); diff --git a/lib/plugin/PrevNext.php b/lib/plugin/PrevNext.php index 2275b98a2..8cdd707e0 100644 --- a/lib/plugin/PrevNext.php +++ b/lib/plugin/PrevNext.php @@ -77,10 +77,10 @@ class WikiPlugin_PrevNext $sep = $WikiTheme->getButtonSeparator(); if ($align == 'center') { $tr = HTML::tr(); - $links = HTML::table(array('cellpadding' => 0, 'cellspacing' => 0, 'width' => '100%'), $tr); + $links = HTML::table(array('class' => 'fullwidth'), $tr); } elseif ($align == 'right') { $td = HTML::td(array('align' => $align)); - $links = HTML::table(array('cellpadding' => 0, 'cellspacing' => 0, 'width' => '100%'), HTML::tr($td)); + $links = HTML::table(array('class' => 'fullwidth'), HTML::tr($td)); } else { $links = HTML(); } diff --git a/lib/plugin/RecentReferrers.php b/lib/plugin/RecentReferrers.php index c2b523973..2047b1b16 100644 --- a/lib/plugin/RecentReferrers.php +++ b/lib/plugin/RecentReferrers.php @@ -51,10 +51,7 @@ class WikiPlugin_RecentReferrers extends WikiPlugin return HTML::div(array('class' => "error"), "Error: no ACCESS_LOG"); } $args = $this->getArgs($argstr, $request); - $table = HTML::table(array('cellpadding' => 1, - 'cellspacing' => 2, - 'border' => 0, - 'class' => 'pagelist')); + $table = HTML::table(array('class' => 'pagelist')); if (!$args['noheader'] and !empty($args['caption'])) $table->pushContent(HTML::caption(array('align' => 'top'), $args['caption'])); $limit = $args['limit']; diff --git a/lib/plugin/SemanticSearchAdvanced.php b/lib/plugin/SemanticSearchAdvanced.php index d5d538909..69598ccaf 100644 --- a/lib/plugin/SemanticSearchAdvanced.php +++ b/lib/plugin/SemanticSearchAdvanced.php @@ -113,7 +113,7 @@ class WikiPlugin_SemanticSearchAdvanced $reldef, $hiddenfield, HiddenInputs(array('attribute' => '')), $instructions, HTML::br(), - HTML::table(array('border' => '0', 'width' => '100%'), + HTML::table(array('class' => 'fullwidth'), HTML::tr(HTML::td(_("Page Name")._(': '), $pagefilter), HTML::td(array('align' => 'right'), $help)), diff --git a/lib/plugin/UpLoad.php b/lib/plugin/UpLoad.php index cf87ee0c8..a72d6704c 100644 --- a/lib/plugin/UpLoad.php +++ b/lib/plugin/UpLoad.php @@ -290,7 +290,7 @@ ws[cfh]"); fwrite($log_handle, "\n" . "$userfile_name" - . "$file_size kB" + . "$file_size kB" . "  " . $WikiTheme->formatDate(time()) . "" . "  " . $user->getId() . ""); fclose($log_handle); diff --git a/lib/plugin/WantedPagesOld.php b/lib/plugin/WantedPagesOld.php index 6943466e6..cbfbcffea 100644 --- a/lib/plugin/WantedPagesOld.php +++ b/lib/plugin/WantedPagesOld.php @@ -151,10 +151,7 @@ class WikiPlugin_WantedPagesOld { if (count($this->pagelist) > 0) { - $table = HTML::table(array('cellpadding' => 0, - 'cellspacing' => 1, - 'border' => 0, - 'class' => 'pagelist')); + $table = HTML::table(array('class' => 'pagelist')); if ($caption) $table->pushContent(HTML::caption(array('align' => 'top'), $caption)); diff --git a/themes/Crao/crao.css b/themes/Crao/crao.css index 71a1282bd..c63d9da39 100644 --- a/themes/Crao/crao.css +++ b/themes/Crao/crao.css @@ -100,6 +100,18 @@ p { vertical-align: top; } +.bottom { + vertical-align: bottom; +} + +.middle { + vertical-align: middle; +} + +.baseline { + vertical-align: baseline; +} + .nowrap { white-space: nowrap; } diff --git a/themes/Crao/templates/navbar.tmpl b/themes/Crao/templates/navbar.tmpl index b3be8d1a5..9dd5a6d07 100644 --- a/themes/Crao/templates/navbar.tmpl +++ b/themes/Crao/templates/navbar.tmpl @@ -6,8 +6,8 @@ " />