GNU social plugin (for look/feel), theme, template
357
plugins/GNUsocialTemplatePlugin.php
Executable file
|
@ -0,0 +1,357 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Plugin to render old skool templates
|
||||||
|
*
|
||||||
|
* Captures rendered parts from the output buffer, passes them through a template file: tpl/index.html
|
||||||
|
* Adds an API method at index.php/template/update which lets you overwrite the template file
|
||||||
|
* Requires username/password and a single POST parameter called "template"
|
||||||
|
* The method is disabled unless the user is #1, the first user of the system
|
||||||
|
*
|
||||||
|
* @category Plugin
|
||||||
|
* @package StatusNet
|
||||||
|
* @author Brian Hendrickson <brian@megapump.com>
|
||||||
|
* @copyright 2009 Megapump, Inc.
|
||||||
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
|
* @link http://megapump.com/
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('STATUSNET')) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
define('TEMPLATEPLUGIN_VERSION', '0.1');
|
||||||
|
|
||||||
|
class TemplatePlugin extends Plugin {
|
||||||
|
|
||||||
|
var $blocks = array();
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
// capture the RouterInitialized event
|
||||||
|
// and connect a new API method
|
||||||
|
// for updating the template
|
||||||
|
function onRouterInitialized( $m ) {
|
||||||
|
$m->connect( 'template/update', array(
|
||||||
|
'action' => 'template',
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// <%styles%>
|
||||||
|
// <%scripts%>
|
||||||
|
// <%search%>
|
||||||
|
// <%feeds%>
|
||||||
|
// <%description%>
|
||||||
|
// <%head%>
|
||||||
|
function onStartShowHead( &$act ) {
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
$act->extraHead();
|
||||||
|
$this->blocks['head'] = $act->xw->flush();
|
||||||
|
$act->showStylesheets();
|
||||||
|
$this->blocks['styles'] = $act->xw->flush();
|
||||||
|
$act->showScripts();
|
||||||
|
$this->blocks['scripts'] = $act->xw->flush();
|
||||||
|
$act->showFeeds();
|
||||||
|
$this->blocks['feeds'] = $act->xw->flush();
|
||||||
|
$act->showOpenSearch();
|
||||||
|
$this->blocks['search'] = $act->xw->flush();
|
||||||
|
$act->showDescription();
|
||||||
|
$this->blocks['description'] = $act->xw->flush();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <%bodytext%>
|
||||||
|
function onStartShowContentBlock( &$act ) {
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function onEndShowContentBlock( &$act ) {
|
||||||
|
$this->blocks['bodytext'] = $act->xw->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
// <%localnav%>
|
||||||
|
function onStartShowLocalNavBlock( &$act ) {
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function onEndShowLocalNavBlock( &$act ) {
|
||||||
|
$this->blocks['localnav'] = $act->xw->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
// <%export%>
|
||||||
|
function onStartShowExportData( &$act ) {
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function onEndShowExportData( &$act ) {
|
||||||
|
$this->blocks['export'] = $act->xw->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
// <%subscriptions%>
|
||||||
|
// <%subscribers%>
|
||||||
|
// <%groups%>
|
||||||
|
// <%statistics%>
|
||||||
|
// <%cloud%>
|
||||||
|
// <%groupmembers%>
|
||||||
|
// <%groupstatistics%>
|
||||||
|
// <%groupcloud%>
|
||||||
|
// <%popular%>
|
||||||
|
// <%groupsbyposts%>
|
||||||
|
// <%featuredusers%>
|
||||||
|
// <%groupsbymembers%>
|
||||||
|
function onStartShowSections( &$act ) {
|
||||||
|
global $action;
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
switch ($action) {
|
||||||
|
case "showstream":
|
||||||
|
$act->showSubscriptions();
|
||||||
|
$this->blocks['subscriptions'] = $act->xw->flush();
|
||||||
|
$act->showSubscribers();
|
||||||
|
$this->blocks['subscribers'] = $act->xw->flush();
|
||||||
|
$act->showGroups();
|
||||||
|
$this->blocks['groups'] = $act->xw->flush();
|
||||||
|
$act->showStatistics();
|
||||||
|
$this->blocks['statistics'] = $act->xw->flush();
|
||||||
|
$cloud = new PersonalTagCloudSection($act, $act->user);
|
||||||
|
$cloud->show();
|
||||||
|
$this->blocks['cloud'] = $act->xw->flush();
|
||||||
|
break;
|
||||||
|
case "showgroup":
|
||||||
|
$act->showMembers();
|
||||||
|
$this->blocks['groupmembers'] = $act->xw->flush();
|
||||||
|
$act->showStatistics();
|
||||||
|
$this->blocks['groupstatistics'] = $act->xw->flush();
|
||||||
|
$cloud = new GroupTagCloudSection($act, $act->group);
|
||||||
|
$cloud->show();
|
||||||
|
$this->blocks['groupcloud'] = $act->xw->flush();
|
||||||
|
break;
|
||||||
|
case "public":
|
||||||
|
$pop = new PopularNoticeSection($act);
|
||||||
|
$pop->show();
|
||||||
|
$this->blocks['popular'] = $act->xw->flush();
|
||||||
|
$gbp = new GroupsByPostsSection($act);
|
||||||
|
$gbp->show();
|
||||||
|
$this->blocks['groupsbyposts'] = $act->xw->flush();
|
||||||
|
$feat = new FeaturedUsersSection($act);
|
||||||
|
$feat->show();
|
||||||
|
$this->blocks['featuredusers'] = $act->xw->flush();
|
||||||
|
break;
|
||||||
|
case "groups":
|
||||||
|
$gbp = new GroupsByPostsSection($act);
|
||||||
|
$gbp->show();
|
||||||
|
$this->blocks['groupsbyposts'] = $act->xw->flush();
|
||||||
|
$gbm = new GroupsByMembersSection($act);
|
||||||
|
$gbm->show();
|
||||||
|
$this->blocks['groupsbymembers'] = $act->xw->flush();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <%logo%>
|
||||||
|
// <%nav%>
|
||||||
|
// <%notice%>
|
||||||
|
// <%noticeform%>
|
||||||
|
function onStartShowHeader( &$act ) {
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
$act->showLogo();
|
||||||
|
$this->blocks['logo'] = $act->xw->flush();
|
||||||
|
$act->showPrimaryNav();
|
||||||
|
$this->blocks['nav'] = $act->xw->flush();
|
||||||
|
$act->showSiteNotice();
|
||||||
|
$this->blocks['notice'] = $act->xw->flush();
|
||||||
|
if (common_logged_in()) {
|
||||||
|
$act->showNoticeForm();
|
||||||
|
} else {
|
||||||
|
$act->showAnonymousMessage();
|
||||||
|
}
|
||||||
|
$this->blocks['noticeform'] = $act->xw->flush();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <%secondarynav%>
|
||||||
|
// <%licenses%>
|
||||||
|
function onStartShowFooter( &$act ) {
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
$act->showSecondaryNav();
|
||||||
|
$this->blocks['secondarynav'] = $act->xw->flush();
|
||||||
|
$act->showLicenses();
|
||||||
|
$this->blocks['licenses'] = $act->xw->flush();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// capture the EndHTML event
|
||||||
|
// and include the template
|
||||||
|
function onEndEndHTML($act) {
|
||||||
|
|
||||||
|
global $action, $tags;
|
||||||
|
|
||||||
|
// set the action and title values
|
||||||
|
$vars = array(
|
||||||
|
'action'=>$action,
|
||||||
|
'title'=>$act->title(). " - ". common_config('site', 'name')
|
||||||
|
);
|
||||||
|
|
||||||
|
// use the PHP template
|
||||||
|
// unless statusnet config:
|
||||||
|
// $config['template']['mode'] = 'html';
|
||||||
|
if (!(common_config('template', 'mode') == 'html')) {
|
||||||
|
$tpl_file = $this->templateFolder() . '/social.php';
|
||||||
|
$tags = array_merge($vars,$this->blocks);
|
||||||
|
include $tpl_file;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl_file = $this->templateFolder() . '/index.html';
|
||||||
|
|
||||||
|
// read the static template
|
||||||
|
$output = file_get_contents( $tpl_file );
|
||||||
|
|
||||||
|
$tags = array();
|
||||||
|
|
||||||
|
// get a list of the <%tags%> in the template
|
||||||
|
$pattern='/<%([a-z]+)%>/';
|
||||||
|
|
||||||
|
if ( 1 <= preg_match_all( $pattern, $output, $found ))
|
||||||
|
$tags[] = $found;
|
||||||
|
|
||||||
|
// for each found tag, set its value from the rendered blocks
|
||||||
|
foreach( $tags[0][1] as $pos=>$tag ) {
|
||||||
|
if (isset($this->blocks[$tag]))
|
||||||
|
$vars[$tag] = $this->blocks[$tag];
|
||||||
|
|
||||||
|
// didn't find a block for the tag
|
||||||
|
elseif (!isset($vars[$tag]))
|
||||||
|
$vars[$tag] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// replace the tags in the template
|
||||||
|
foreach( $vars as $key=>$val )
|
||||||
|
$output = str_replace( '<%'.$key.'%>', $val, $output );
|
||||||
|
|
||||||
|
echo $output;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
function templateFolder() {
|
||||||
|
return 'tpl';
|
||||||
|
}
|
||||||
|
|
||||||
|
// catching the StartShowHTML event to halt the rendering
|
||||||
|
function onStartShowHTML( &$act ) {
|
||||||
|
$this->clear_xmlWriter($act);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// clear the xmlWriter
|
||||||
|
function clear_xmlWriter( &$act ) {
|
||||||
|
$act->xw->openMemory();
|
||||||
|
$act->xw->setIndent(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action for updating the template remotely
|
||||||
|
*
|
||||||
|
* "template/update" -- a POST method that requires a single
|
||||||
|
* parameter "template", containing the new template code
|
||||||
|
*
|
||||||
|
* @category Plugin
|
||||||
|
* @package StatusNet
|
||||||
|
* @author Brian Hendrickson <brian@megapump.com>
|
||||||
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
|
* @link http://megapump.com/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
class TemplateAction extends Action
|
||||||
|
{
|
||||||
|
|
||||||
|
function prepare($args) {
|
||||||
|
parent::prepare($args);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handle($args) {
|
||||||
|
|
||||||
|
parent::handle($args);
|
||||||
|
|
||||||
|
if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||||
|
|
||||||
|
// not authenticated, show login form
|
||||||
|
header('WWW-Authenticate: Basic realm="StatusNet API"');
|
||||||
|
|
||||||
|
// cancelled the browser login form
|
||||||
|
$this->clientError(_('Authentication error!'), $code = 401);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$nick = $_SERVER['PHP_AUTH_USER'];
|
||||||
|
$pass = $_SERVER['PHP_AUTH_PW'];
|
||||||
|
|
||||||
|
// check username and password
|
||||||
|
$user = common_check_user($nick,$pass);
|
||||||
|
|
||||||
|
if ($user) {
|
||||||
|
|
||||||
|
// verify that user is admin
|
||||||
|
if (!($user->id == 1))
|
||||||
|
$this->clientError(_('Only User #1 can update the template.'), $code = 401);
|
||||||
|
|
||||||
|
// open the old template
|
||||||
|
$tpl_file = $this->templateFolder() . '/index.html';
|
||||||
|
$fp = fopen( $tpl_file, 'w+' );
|
||||||
|
|
||||||
|
// overwrite with the new template
|
||||||
|
fwrite($fp, $this->arg('template'));
|
||||||
|
fclose($fp);
|
||||||
|
|
||||||
|
header('HTTP/1.1 200 OK');
|
||||||
|
header('Content-type: text/plain');
|
||||||
|
print "Template Updated!";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// bad username and password
|
||||||
|
$this->clientError(_('Authentication error!'), $code = 401);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function onPluginVersion(&$versions)
|
||||||
|
{
|
||||||
|
$versions[] = array('name' => 'Template',
|
||||||
|
'version' => TEMPLATEPLUGIN_VERSION,
|
||||||
|
'author' => 'Brian Hendrickson',
|
||||||
|
'homepage' => 'http://status.net/wiki/Plugin:Template',
|
||||||
|
'rawdescription' =>
|
||||||
|
_m('Use an HTML template for Web output.'));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function for retrieving a statusnet display section
|
||||||
|
*
|
||||||
|
* requires one parameter, the name of the section
|
||||||
|
* section names are listed in the comments of the TemplatePlugin class
|
||||||
|
*
|
||||||
|
* @category Plugin
|
||||||
|
* @package StatusNet
|
||||||
|
* @author Brian Hendrickson <brian@megapump.com>
|
||||||
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
|
* @link http://megapump.com/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
function section($tagname) {
|
||||||
|
global $tags;
|
||||||
|
if (isset($tags[$tagname]))
|
||||||
|
return $tags[$tagname];
|
||||||
|
}
|
||||||
|
|
BIN
theme/gnusocial/bg.png
Normal file
After Width: | Height: | Size: 189 B |
13
theme/gnusocial/combo.css
Normal file
13
theme/gnusocial/css/display.css
Normal file
7
theme/gnusocial/debug.css
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#hd { background-color: orange !important; }
|
||||||
|
|
||||||
|
#bd { background-color: red !important; }
|
||||||
|
|
||||||
|
#ft { background-color: lime !important; }
|
||||||
|
|
||||||
|
#yui-main { background-color: yellow !important; }
|
BIN
theme/gnusocial/default-avatar-mini.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
theme/gnusocial/default-avatar-profile.png
Executable file
After Width: | Height: | Size: 9.0 KiB |
BIN
theme/gnusocial/default-avatar-stream.png
Executable file
After Width: | Height: | Size: 3.7 KiB |
BIN
theme/gnusocial/images/icons/icon_atom.png
Executable file
After Width: | Height: | Size: 820 B |
BIN
theme/gnusocial/images/icons/icon_disfavourite.gif
Executable file
After Width: | Height: | Size: 701 B |
BIN
theme/gnusocial/images/icons/icon_favourite.gif
Executable file
After Width: | Height: | Size: 397 B |
BIN
theme/gnusocial/images/icons/icon_foaf.gif
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
theme/gnusocial/images/icons/icon_processing.gif
Executable file
After Width: | Height: | Size: 673 B |
BIN
theme/gnusocial/images/icons/icon_reply.gif
Executable file
After Width: | Height: | Size: 336 B |
BIN
theme/gnusocial/images/icons/icon_rss.png
Executable file
After Width: | Height: | Size: 777 B |
BIN
theme/gnusocial/images/icons/icon_trash.gif
Executable file
After Width: | Height: | Size: 148 B |
BIN
theme/gnusocial/images/icons/icon_vcard.gif
Executable file
After Width: | Height: | Size: 331 B |
BIN
theme/gnusocial/images/icons/twotone/green/arrow-left.gif
Executable file
After Width: | Height: | Size: 73 B |
BIN
theme/gnusocial/images/icons/twotone/green/arrow-right.gif
Executable file
After Width: | Height: | Size: 74 B |
BIN
theme/gnusocial/images/icons/twotone/green/edit.gif
Executable file
After Width: | Height: | Size: 75 B |
BIN
theme/gnusocial/images/icons/twotone/green/mail.gif
Executable file
After Width: | Height: | Size: 82 B |
BIN
theme/gnusocial/images/icons/twotone/green/news.gif
Executable file
After Width: | Height: | Size: 76 B |
BIN
theme/gnusocial/images/icons/twotone/green/quote.gif
Executable file
After Width: | Height: | Size: 79 B |
BIN
theme/gnusocial/images/icons/twotone/green/shield.gif
Executable file
After Width: | Height: | Size: 85 B |
BIN
theme/gnusocial/images/illustrations/illu_arrow-up-01.gif
Executable file
After Width: | Height: | Size: 68 B |
BIN
theme/gnusocial/images/illustrations/illu_clouds-01.gif
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
theme/gnusocial/images/illustrations/illu_jcrop.gif
Executable file
After Width: | Height: | Size: 329 B |
BIN
theme/gnusocial/images/illustrations/illu_progress_loading-01.gif
Executable file
After Width: | Height: | Size: 5.7 KiB |
BIN
theme/gnusocial/images/illustrations/illu_unicorn-01.png
Executable file
After Width: | Height: | Size: 5.6 KiB |
213
theme/gnusocial/index.html
Normal file
|
@ -0,0 +1,213 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<head>
|
||||||
|
<title>Public timeline - Lorraine Lee — GNU social</title>
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/theme/gnusocial/combo.css" type="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
#custom-doc { width:76.23em;*width:74.39em;min-width:991px; margin:auto; text-align:left; }
|
||||||
|
|
||||||
|
html, body{padding: 0; margin: 0;}
|
||||||
|
|
||||||
|
body {background-image: url(/theme/gnusocial/bg.png); background-repeat: repeat-x;}
|
||||||
|
|
||||||
|
#hd h1 {margin: 0; line-height: 48px; font-size: 30px; font-weight: bold;}
|
||||||
|
|
||||||
|
#hd h1 a{color: #111; text-decoration: none;}
|
||||||
|
|
||||||
|
#hd dt {display: none;}
|
||||||
|
|
||||||
|
#hd ul {padding: 0; margin: 0; line-height: 48px; position: absolute; top: 0; right: 10px; }
|
||||||
|
|
||||||
|
#hd li {display: inline; list-style: none; margin-left: 12px;}
|
||||||
|
|
||||||
|
#hd {height: 48px; position: relative;}
|
||||||
|
|
||||||
|
#bd {margin-top: 12px;}
|
||||||
|
|
||||||
|
#ft {font-size: 10px; text-align: right; margin-top: 12px}
|
||||||
|
|
||||||
|
form {margin: 0 auto; width: 70%;}
|
||||||
|
|
||||||
|
table {width: 100%;}
|
||||||
|
|
||||||
|
tr, td{border: 0;}
|
||||||
|
|
||||||
|
.update-text{ font-size: 12px; font-weight: bold;}
|
||||||
|
|
||||||
|
.update-icon{ text-align: center;}
|
||||||
|
|
||||||
|
#stream li{list-style: none; position: relative; margin-top: 12px; }
|
||||||
|
|
||||||
|
#stream dl {position: absolute; top: 0; left: 50px;}
|
||||||
|
|
||||||
|
#stream dd {color: #333; font-size: 80%; padding: 0; margin: 0; margin-top: 6px;}
|
||||||
|
|
||||||
|
|
||||||
|
#social {border-left: 1px solid #999; border-right: 1px solid #999; padding-left: 10px;}
|
||||||
|
|
||||||
|
#sidebar ul{margin: 0; padding: 0;}
|
||||||
|
|
||||||
|
#sidebar li {list-style: none;}
|
||||||
|
|
||||||
|
#sidebar li a{display: block; width: 180px; padding: 4px;}
|
||||||
|
|
||||||
|
#sidebar li a:hover {background-color: #ececec;}
|
||||||
|
|
||||||
|
.selected {background-color: cyan; width: 180px;}
|
||||||
|
|
||||||
|
#right-nav {background-color: #ececec;}
|
||||||
|
|
||||||
|
#right-nav div {padding: 10px;}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body id="public">
|
||||||
|
<div id="custom-doc" class="yui-t2">
|
||||||
|
<div id="hd">
|
||||||
|
<h1>GNU social</h1>
|
||||||
|
|
||||||
|
<dl id="site_nav_global_primary">
|
||||||
|
<dt>Primary site navigation</dt>
|
||||||
|
<dd>
|
||||||
|
<ul class="nav">
|
||||||
|
<li id="nav_login">
|
||||||
|
<a href="http://lorrainelee.co.uk/main/login" title="Login to the site">Login</a>
|
||||||
|
</li>
|
||||||
|
<li id="nav_help">
|
||||||
|
<a href="http://lorrainelee.co.uk/doc/help" title="Help me!">Help</a>
|
||||||
|
</li>
|
||||||
|
<li id="nav_search">
|
||||||
|
<a href="http://lorrainelee.co.uk/search/people" title="Search for people or text">Search</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div id="bd">
|
||||||
|
|
||||||
|
<div id="yui-main">
|
||||||
|
|
||||||
|
<div class="yui-b">
|
||||||
|
|
||||||
|
<div class="yui-gc">
|
||||||
|
|
||||||
|
<div class="yui-u first">
|
||||||
|
|
||||||
|
<dl id="site_notice" class="system_notice">
|
||||||
|
<dt>Site notice</dt>
|
||||||
|
<dd>Powered by <a href="http://www.gnu.org/software/social/">GNU social</a></dd>
|
||||||
|
</dl>
|
||||||
|
<div id="anon_notice"><p>This is Lorraine Lee, a <a href="http://en.wikipedia.org/wiki/Micro-blogging">micro-blogging</a> service based on the Free Software <a href="http://status.net/">StatusNet</a> tool.</p>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<h1>Public timeline</h1>
|
||||||
|
<div id="content_inner">
|
||||||
|
<div id="notices_primary">
|
||||||
|
<h2>Notices</h2>
|
||||||
|
<ol class="notices xoxo">
|
||||||
|
<li class="hentry notice" id="notice-5">
|
||||||
|
<div class="entry-title">
|
||||||
|
<span class="vcard author">
|
||||||
|
<a href="http://lorrainelee.co.uk/lorraine" class="url" title="Lorraine Lee (lorraine)">
|
||||||
|
<img src="http://lorrainelee.co.uk/avatar/3-48-20100722212232.jpeg" class="avatar photo" width="48" height="48" alt="Lorraine Lee"/>
|
||||||
|
<span class="nickname fn">lorraine</span></a>
|
||||||
|
</span>
|
||||||
|
<p class="entry-content">im going to brush my teeth</p>
|
||||||
|
</div>
|
||||||
|
<div class="entry-content">
|
||||||
|
<a rel="bookmark" class="timestamp" href="http://lorrainelee.co.uk/notice/5">
|
||||||
|
<abbr class="published" title="2010-07-22T21:41:40+00:00">about 5 hours ago</abbr>
|
||||||
|
</a>
|
||||||
|
<span class="source">from <span class="device">web</span>
|
||||||
|
</span>
|
||||||
|
<span class="location">at <a href="http://www.geonames.org/2651292" rel="external"><abbr class="geo" title="50.7500000;-3.7500000">County of Devon, England, United Kingdom of Great Britain and Northern Ireland</abbr></a></span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="hentry notice" id="notice-2">
|
||||||
|
<div class="entry-title">
|
||||||
|
<span class="vcard author">
|
||||||
|
<a href="http://lorrainelee.co.uk/lorraine" class="url" title="Lorraine Lee (lorraine)">
|
||||||
|
<img src="http://lorrainelee.co.uk/avatar/3-48-20100722212232.jpeg" class="avatar photo" width="48" height="48" alt="Lorraine Lee"/>
|
||||||
|
<span class="nickname fn">lorraine</span></a>
|
||||||
|
</span>
|
||||||
|
<p class="entry-content">nothing im fine thank you</p>
|
||||||
|
</div>
|
||||||
|
<div class="entry-content">
|
||||||
|
<a rel="bookmark" class="timestamp" href="http://lorrainelee.co.uk/notice/2">
|
||||||
|
<abbr class="published" title="2010-07-22T21:38:18+00:00">about 5 hours ago</abbr>
|
||||||
|
</a>
|
||||||
|
<span class="source">from <span class="device">web</span>
|
||||||
|
</span>
|
||||||
|
<span class="location">at <a href="http://www.geonames.org/2651292" rel="external"><abbr class="geo" title="50.7500000;-3.7500000">County of Devon, England, United Kingdom of Great Britain and Northern Ireland</abbr></a></span>
|
||||||
|
<a href="http://lorrainelee.co.uk/conversation/2#notice-2" class="response">in context</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="yui-u" id="right-nav">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="aside_primary" class="aside">
|
||||||
|
<div id="featured_users" class="section">
|
||||||
|
<h2>Featured users</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="yui-b" id="sidebar">
|
||||||
|
<dl id="site_nav_local_views">
|
||||||
|
<dt>Local views</dt>
|
||||||
|
<dd>
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="current" id="nav_timeline_public">
|
||||||
|
<a href="http://lorrainelee.co.uk/" title="Public timeline">Public</a>
|
||||||
|
</li>
|
||||||
|
<li id="nav_groups">
|
||||||
|
<a href="http://lorrainelee.co.uk/group" title="User groups">Groups</a>
|
||||||
|
</li>
|
||||||
|
<li id="nav_recent-tags">
|
||||||
|
<a href="http://lorrainelee.co.uk/tags" title="Recent tags">Recent tags</a>
|
||||||
|
</li>
|
||||||
|
<li id="nav_timeline_favorited">
|
||||||
|
<a href="http://lorrainelee.co.uk/favorited" title="Popular notices">Popular</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="ft">
|
||||||
|
|
||||||
|
<dl id="licenses">
|
||||||
|
<dt id="site_statusnet_license">StatusNet software licence</dt>
|
||||||
|
<dd><p><strong>Lorraine Lee</strong> is a microblogging service brought to you by <a href="http://www.gnu.org/s/social/">GNU social</a>. It runs the <a href="http://status.net/">StatusNet</a> microblogging software, version 0.9.3, available under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">GNU Affero General Public Licence</a>.</p>
|
||||||
|
</dd>
|
||||||
|
<dt id="site_content_license">Site content license</dt>
|
||||||
|
<dd id="site_content_license_cc">
|
||||||
|
<p>
|
||||||
|
<img id="license_cc" src="http://i.creativecommons.org/l/by/3.0/80x15.png" alt="Creative Commons Attribution 3.0" width="80" height="15"/>
|
||||||
|
All Lorraine Lee content and data are available under the <a class="license" rel="external license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> licence.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
theme/gnusocial/logo.png
Executable file
After Width: | Height: | Size: 9.9 KiB |
273
theme/gnusocial/social.css
Executable file
|
@ -0,0 +1,273 @@
|
||||||
|
@imp2ort url('./debug.css');
|
||||||
|
|
||||||
|
/* stuff we want to hide..... */
|
||||||
|
|
||||||
|
legend,.entry-content .source, .entry-content .location, .entry-content .response, #anon_notice, #notices_primary h2, #site_nav_local_views dt, #ft dt{ display: none !important; }
|
||||||
|
|
||||||
|
dl, dd { margin: 0 !important; padding: 0 !important;}
|
||||||
|
|
||||||
|
#yui-main { margin-bottom: 0 !important; padding-bottom: 0 !important;}
|
||||||
|
|
||||||
|
.notices { margin: 0; padding: 0; }
|
||||||
|
.notices li { list-style: none; }
|
||||||
|
|
||||||
|
#ft { padding-top: 12px;}
|
||||||
|
|
||||||
|
#custom-doc { width:76.23em;*width:74.39em;min-width:991px; margin:auto; text-align:left; }
|
||||||
|
|
||||||
|
#yui-main { background-color: white; position: relative; }
|
||||||
|
|
||||||
|
#sidebar *, #right-nav * { background: none !important; border: none !important; }
|
||||||
|
|
||||||
|
html, body{padding: 0; margin: 0;}
|
||||||
|
|
||||||
|
body {background-image: url(/theme/gnusocial/bg.png) !important; background-repeat: repeat-x !important; background-color: white;}
|
||||||
|
|
||||||
|
#hd h1 {margin: 0; line-height: 40px; font-size: 24px; font-weight: bold;}
|
||||||
|
|
||||||
|
#hd h1 a{color: #111; text-decoration: none;}
|
||||||
|
|
||||||
|
#hd dt {display: none;}
|
||||||
|
|
||||||
|
#hd ul {padding: 0; margin: 0; line-height: 48px; position: absolute; top: 0; right: 10px; }
|
||||||
|
|
||||||
|
#hd li {display: inline; list-style: none; margin-left: 12px;}
|
||||||
|
|
||||||
|
#hd {height: 40px; position: relative;}
|
||||||
|
|
||||||
|
|
||||||
|
form {margin: 0 auto; width: 70%;}
|
||||||
|
|
||||||
|
table {width: 100%;}
|
||||||
|
|
||||||
|
tr, td{border: 0;}
|
||||||
|
|
||||||
|
.update-text{ font-size: 12px; font-weight: bold;}
|
||||||
|
|
||||||
|
.update-icon{ text-align: center;}
|
||||||
|
|
||||||
|
#stream li{list-style: none; position: relative; margin-top: 12px; }
|
||||||
|
|
||||||
|
#stream dl {position: absolute; top: 0; left: 50px;}
|
||||||
|
|
||||||
|
#stream dd {color: #333; font-size: 80%; padding: 0; margin: 0; margin-top: 6px;}
|
||||||
|
|
||||||
|
|
||||||
|
#social {border-left: 1px solid #999; border-right: 1px solid #999; padding-left: 10px;}
|
||||||
|
|
||||||
|
#sidebar ul{margin: 0; padding: 0;}
|
||||||
|
|
||||||
|
#sidebar li {list-style: none;}
|
||||||
|
|
||||||
|
#sidebar li a{display: block; width: 180px; padding: 4px;}
|
||||||
|
|
||||||
|
#sidebar li a:hover {background-color: #ececec;}
|
||||||
|
|
||||||
|
.selected {background-color: cyan; width: 180px;}
|
||||||
|
|
||||||
|
#right-nav {background-color: #ececec;}
|
||||||
|
|
||||||
|
#right-nav div {padding: 10px;}
|
||||||
|
|
||||||
|
.form_notice { position: relative; top: 0; left: 0; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
form label.submit {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings {
|
||||||
|
clear:both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings fieldset {
|
||||||
|
margin-bottom:29px;
|
||||||
|
}
|
||||||
|
.form_settings input.remove {
|
||||||
|
margin-left:11px;
|
||||||
|
}
|
||||||
|
.form_settings .form_data li {
|
||||||
|
width:100%;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
.form_settings .form_data label {
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
.form_settings .form_data textarea,
|
||||||
|
.form_settings .form_data select,
|
||||||
|
.form_settings .form_data input {
|
||||||
|
margin-left:11px;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
.form_settings .form_data textarea {
|
||||||
|
width:325px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings .form_data input.submit {
|
||||||
|
margin-left:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings label {
|
||||||
|
margin-top:2px;
|
||||||
|
width:143px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_actions label {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
.form_guide {
|
||||||
|
font-style:italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings #settings_autosubscribe label {
|
||||||
|
display:inline;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#form_settings_profile legend,
|
||||||
|
#form_login legend,
|
||||||
|
#form_register legend,
|
||||||
|
#form_password legend,
|
||||||
|
#form_settings_avatar legend,
|
||||||
|
#newgroup legend,
|
||||||
|
#editgroup legend,
|
||||||
|
#form_tag_user legend,
|
||||||
|
#form_remote_subscribe legend,
|
||||||
|
#form_openid_login legend,
|
||||||
|
#form_search legend,
|
||||||
|
#form_invite legend,
|
||||||
|
#form_notice_delete legend,
|
||||||
|
#form_password_recover legend,
|
||||||
|
#form_password_change legend {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings .form_data p.form_guide {
|
||||||
|
clear:both;
|
||||||
|
margin-left:155px;
|
||||||
|
margin-bottom:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings p {
|
||||||
|
margin-bottom:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings input.checkbox {
|
||||||
|
margin-top:0;
|
||||||
|
margin-left:0;
|
||||||
|
}
|
||||||
|
.form_settings label.checkbox {
|
||||||
|
font-weight:normal;
|
||||||
|
margin-top:0;
|
||||||
|
margin-right:0;
|
||||||
|
margin-left:11px;
|
||||||
|
float:left;
|
||||||
|
width:90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#form_login p.form_guide,
|
||||||
|
#form_register #settings_rememberme p.form_guide,
|
||||||
|
#form_openid_login #settings_rememberme p.form_guide,
|
||||||
|
#settings_twitter_remove p.form_guide,
|
||||||
|
#form_search ul.form_data #q {
|
||||||
|
margin-left:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form_settings .form_note {
|
||||||
|
border-radius:4px;
|
||||||
|
-moz-border-radius:4px;
|
||||||
|
-webkit-border-radius:4px;
|
||||||
|
padding:0 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.form_settings input.form_action-primary {
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.form_settings input.form_action-secondary {
|
||||||
|
margin-left:29px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#form_search .submit {
|
||||||
|
margin-left:11px;
|
||||||
|
}
|
||||||
|
caption {
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
legend {
|
||||||
|
font-weight:bold;
|
||||||
|
font-size:1.3em;
|
||||||
|
}
|
||||||
|
input, textarea, select, option {
|
||||||
|
padding:4px;
|
||||||
|
font-family:sans-serif;
|
||||||
|
font-size:1em;
|
||||||
|
}
|
||||||
|
input, textarea, select {
|
||||||
|
border-width:2px;
|
||||||
|
border-style: solid;
|
||||||
|
border-radius:4px;
|
||||||
|
-moz-border-radius:4px;
|
||||||
|
-webkit-border-radius:4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.submit {
|
||||||
|
font-weight:bold;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
option {
|
||||||
|
padding-bottom:0;
|
||||||
|
}
|
||||||
|
fieldset {
|
||||||
|
padding:0;
|
||||||
|
border:0;
|
||||||
|
}
|
||||||
|
form ul li {
|
||||||
|
list-style-type:none;
|
||||||
|
margin:0 0 18px 0;
|
||||||
|
}
|
||||||
|
form label {
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
input.checkbox {
|
||||||
|
position:relative;
|
||||||
|
top:2px;
|
||||||
|
left:0;
|
||||||
|
border:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error,
|
||||||
|
.success {
|
||||||
|
padding:4px 7px;
|
||||||
|
border-radius:4px;
|
||||||
|
-moz-border-radius:4px;
|
||||||
|
-webkit-border-radius:4px;
|
||||||
|
margin-bottom:18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#all .notice, #public .notice { padding-bottom: 12px;}
|
||||||
|
|
||||||
|
#all .notice .entry-title, #public .notice .entry-title { position: relative;}
|
||||||
|
|
||||||
|
#all .notice .entry-title .entry-content, #public .notice .entry-title .entry-content { position: absolute; top: 25px; left: 55px; }
|
||||||
|
|
||||||
|
#all .notice .entry-content .timestamp, #public .notice .entry-content .timestamp { color: #666; margin-left: 55px; font-size: 80%; text-decoration: none !important; }
|
||||||
|
|
||||||
|
abbr { border: 0px !important; }
|
||||||
|
|
||||||
|
#all .entry-title .author .nickname, #public .entry-title .author .nickname { position: absolute; top: 0; left: 55px; font-weight: bold; }
|
||||||
|
|
||||||
|
#showstream #i { position: absolute; top: 0; left: 0; background-color: white; z-index: 100; width: 185px; }
|
||||||
|
|
||||||
|
|
||||||
|
.notice-options, .form_favor .submit, .form_repeat .submit { background-color: white; border: 0; display: none !important; }
|
||||||
|
|
||||||
|
#form_notice { margin-top: 10px;}
|
||||||
|
|
||||||
|
|
||||||
|
label { display: none !important; }
|
76
tpl/social.php
Executable file
|
@ -0,0 +1,76 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<head>
|
||||||
|
<title><?php echo section('title'); ?> — GNU social</title>
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/theme/gnusocial/combo.css" type="text/css">
|
||||||
|
<link rel="stylesheet" href="/theme/gnusocial/social.css" type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php echo section('scripts'); ?>
|
||||||
|
<?php echo section('search'); ?>
|
||||||
|
<?php echo section('feeds'); ?>
|
||||||
|
<?php echo section('description'); ?>
|
||||||
|
<?php echo section('head'); ?>
|
||||||
|
</head>
|
||||||
|
<body id="<?php echo section('action'); ?>">
|
||||||
|
<div id="custom-doc" class="yui-t2">
|
||||||
|
<div id="hd">
|
||||||
|
<h1><a href="/">GNU social</a></h1>
|
||||||
|
|
||||||
|
<?php echo section('nav'); ?>
|
||||||
|
</div>
|
||||||
|
<div id="bd">
|
||||||
|
|
||||||
|
<div id="yui-main">
|
||||||
|
|
||||||
|
<div class="yui-b" id="social">
|
||||||
|
|
||||||
|
<div class="yui-gc">
|
||||||
|
|
||||||
|
<div class="yui-u first">
|
||||||
|
|
||||||
|
<?php echo section('noticeform'); ?>
|
||||||
|
<?php echo section('bodytext'); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="yui-u" id="right-nav">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="aside_primary" class="aside">
|
||||||
|
<?php echo section('subscriptions'); ?>
|
||||||
|
<?php echo section('subscribers'); ?>
|
||||||
|
<?php echo section('groups'); ?>
|
||||||
|
<?php echo section('cloud'); ?>
|
||||||
|
<?php echo section('popular'); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="yui-b" id="sidebar">
|
||||||
|
<?php echo section('localnav'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="ft">
|
||||||
|
|
||||||
|
<p>This is GNU social.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|