Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
* '0.8.x' of git@gitorious.org:laconica/dev: Layout fix for IE6 theme dir, path configurable
This commit is contained in:
commit
e6559e3bea
13
README
13
README
@ -1039,9 +1039,16 @@ theme
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
server: Like avatars, you can speed up page loading by pointing the
|
server: Like avatars, you can speed up page loading by pointing the
|
||||||
theme file lookup to another server (virtual or real). The
|
theme file lookup to another server (virtual or real).
|
||||||
theme server's root path should map to the Laconica "theme"
|
Defaults to NULL, meaning to use the site server.
|
||||||
subdirectory. Defaults to NULL.
|
dir: Directory where theme files are stored. Used to determine
|
||||||
|
whether to show parts of a theme file. Defaults to the theme
|
||||||
|
subdirectory of the install directory.
|
||||||
|
path: Path part of theme URLs, before the theme name. Relative to the
|
||||||
|
theme server. It may make sense to change this path when upgrading,
|
||||||
|
(using version numbers as the path) to make sure that all files are
|
||||||
|
reloaded by caching clients or proxies. Defaults to null,
|
||||||
|
which means to use the site path + '/theme'.
|
||||||
|
|
||||||
xmpp
|
xmpp
|
||||||
----
|
----
|
||||||
|
@ -140,7 +140,9 @@ $config =
|
|||||||
'blacklist' => array(),
|
'blacklist' => array(),
|
||||||
'autosource' => array()),
|
'autosource' => array()),
|
||||||
'theme' =>
|
'theme' =>
|
||||||
array('server' => null),
|
array('server' => null,
|
||||||
|
'dir' => null,
|
||||||
|
'path'=> null),
|
||||||
'throttle' =>
|
'throttle' =>
|
||||||
array('enabled' => false, // whether to throttle edits; false by default
|
array('enabled' => false, // whether to throttle edits; false by default
|
||||||
'count' => 20, // number of allowed messages in timespan
|
'count' => 20, // number of allowed messages in timespan
|
||||||
|
@ -43,10 +43,14 @@ if (!defined('LACONICA')) {
|
|||||||
|
|
||||||
function theme_file($relative, $theme=null)
|
function theme_file($relative, $theme=null)
|
||||||
{
|
{
|
||||||
if (!$theme) {
|
if (empty($theme)) {
|
||||||
$theme = common_config('site', 'theme');
|
$theme = common_config('site', 'theme');
|
||||||
}
|
}
|
||||||
return INSTALLDIR.'/theme/'.$theme.'/'.$relative;
|
$dir = common_config('theme', 'dir');
|
||||||
|
if (empty($dir)) {
|
||||||
|
$dir = INSTALLDIR.'/theme';
|
||||||
|
}
|
||||||
|
return $dir.'/'.$theme.'/'.$relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,13 +64,31 @@ function theme_file($relative, $theme=null)
|
|||||||
|
|
||||||
function theme_path($relative, $theme=null)
|
function theme_path($relative, $theme=null)
|
||||||
{
|
{
|
||||||
if (!$theme) {
|
if (empty($theme)) {
|
||||||
$theme = common_config('site', 'theme');
|
$theme = common_config('site', 'theme');
|
||||||
}
|
}
|
||||||
$server = common_config('theme', 'server');
|
|
||||||
if ($server) {
|
$path = common_config('theme', 'path');
|
||||||
return 'http://'.$server.'/'.$theme.'/'.$relative;
|
|
||||||
} else {
|
if (empty($path)) {
|
||||||
return common_path('theme/'.$theme.'/'.$relative);
|
$path = common_config('site', 'path') . '/theme/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($path[strlen($path)-1] != '/') {
|
||||||
|
$path .= '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($path[0] != '/') {
|
||||||
|
$path = '/'.$path;
|
||||||
|
}
|
||||||
|
|
||||||
|
$server = common_config('theme', 'server');
|
||||||
|
|
||||||
|
if (empty($server)) {
|
||||||
|
$server = common_config('site', 'server');
|
||||||
|
}
|
||||||
|
|
||||||
|
// XXX: protocol
|
||||||
|
|
||||||
|
return 'http://'.$server.$path.$theme.'/'.$relative;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,12 @@ margin-left:7px;
|
|||||||
address .fn {
|
address .fn {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wrap {
|
||||||
|
width:1003px;
|
||||||
|
margin:0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
#content {
|
#content {
|
||||||
width:70%;
|
width:70%;
|
||||||
}
|
}
|
||||||
@ -26,5 +32,6 @@ margin-bottom:123px;
|
|||||||
width:20%;
|
width:20%;
|
||||||
}
|
}
|
||||||
.notice div.entry-content {
|
.notice div.entry-content {
|
||||||
width:63%;
|
width:50%;
|
||||||
|
margin-left:30px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user