forked from GNUsocial/gnu-social
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
This commit is contained in:
commit
da532bae91
@ -82,3 +82,9 @@ StartNoticeSave: before inserting a notice (good place for content filters)
|
|||||||
EndNoticeSave: after inserting a notice and related code
|
EndNoticeSave: after inserting a notice and related code
|
||||||
- $notice: notice that was saved (with ID and URI)
|
- $notice: notice that was saved (with ID and URI)
|
||||||
|
|
||||||
|
StartShowLocalNavBlock: Showing the local nav menu
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndShowLocalNavBlock: At the end of the local nav menu
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
65
doc-src/badge
Normal file
65
doc-src/badge
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
Install the %%site.name%% badge on you blog or web site to show the latest updates
|
||||||
|
from you and your friends!
|
||||||
|
|
||||||
|
<MTMarkdownOptions output='raw'>
|
||||||
|
<script type="text/javascript" src="http://identi.ca/js/identica-badge.js">
|
||||||
|
{
|
||||||
|
"user":"kentbrew",
|
||||||
|
"server":"identi.ca",
|
||||||
|
"headerText":" and friends"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</MTMarkdownOptions>
|
||||||
|
|
||||||
|
Things to try
|
||||||
|
--------------
|
||||||
|
|
||||||
|
* Click an avatar and the badge will refresh with that user's timeline
|
||||||
|
* Click a nickname to open a user's profile in your browser
|
||||||
|
* Click a notice's timestamp to view the notice in your browser
|
||||||
|
* @-replies and #tags are live links
|
||||||
|
|
||||||
|
## Installation instructions
|
||||||
|
|
||||||
|
Copy and paste the following JavaScript into an HTML page where
|
||||||
|
you want the badge to show up. Substitute your own ID in the user
|
||||||
|
parameter.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<script type="text/javascript" src="http://identi.ca/js/identica-badge.js">
|
||||||
|
{
|
||||||
|
"user":"kentbrew",
|
||||||
|
"server":"identi.ca",
|
||||||
|
"headerText":" and friends"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Valid parameters for the badge:
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
* user : defaults to 7000 (@kentbrew)
|
||||||
|
* headerText : defaults to empty
|
||||||
|
* height : defaults to 350px
|
||||||
|
* width : defaults to 300px
|
||||||
|
* background : defaults to #193441. If you set evenBackground, oddBackground,
|
||||||
|
and headerBackground, you won't see it at all.
|
||||||
|
* border : defaults to 1px solid black
|
||||||
|
* userColor : defaults to whatever link color is set to on your page
|
||||||
|
* headerBackground : defaults to transparent
|
||||||
|
* headerColor : defaults to white
|
||||||
|
* evenBackground : defaults to #fff
|
||||||
|
* oddBackground : defaults to #eee
|
||||||
|
* thumbnailBorder : 1px solid black
|
||||||
|
* thumbnailSize : defaults to 24px
|
||||||
|
* padding : defaults to 3px
|
||||||
|
* server : defaults to identi.ca
|
||||||
|
|
||||||
|
Licence
|
||||||
|
-------
|
||||||
|
|
||||||
|
Identi.ca badge by [Kent Brewster](http://kentbrewster.com/identica-badge/).
|
||||||
|
Licenced under [CC-BY-SA-3](http://kentbrewster.com/rights-and-permissions/).
|
@ -1,4 +1,5 @@
|
|||||||
// identica badge -- updated to work with the native API, 12-4-2008
|
// identica badge -- updated to work with the native API, 12-4-2008
|
||||||
|
// Modified to point to Identi.ca, 2-20-2009 by Zach
|
||||||
// copyright Kent Brewster 2008
|
// copyright Kent Brewster 2008
|
||||||
// see http://kentbrewster.com/identica-badge for info
|
// see http://kentbrewster.com/identica-badge for info
|
||||||
( function() {
|
( function() {
|
||||||
@ -127,7 +128,7 @@
|
|||||||
var a = document.createElement('A');
|
var a = document.createElement('A');
|
||||||
a.innerHTML = 'get this';
|
a.innerHTML = 'get this';
|
||||||
a.target = '_blank';
|
a.target = '_blank';
|
||||||
a.href = 'http://kentbrewster.com/identica-badge';
|
a.href = 'http://identica/doc/badge';
|
||||||
$.s.f.appendChild(a);
|
$.s.f.appendChild(a);
|
||||||
$.s.appendChild($.s.f);
|
$.s.appendChild($.s.f);
|
||||||
$.f.getUser();
|
$.f.getUser();
|
||||||
|
@ -474,7 +474,10 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
function showCore()
|
function showCore()
|
||||||
{
|
{
|
||||||
$this->elementStart('div', array('id' => 'core'));
|
$this->elementStart('div', array('id' => 'core'));
|
||||||
$this->showLocalNavBlock();
|
if (Event::handle('StartShowLocalNavBlock', array($this))) {
|
||||||
|
$this->showLocalNavBlock();
|
||||||
|
Event::handle('EndShowLocalNavBlock', array($this));
|
||||||
|
}
|
||||||
if (Event::handle('StartShowContentBlock', array($this))) {
|
if (Event::handle('StartShowContentBlock', array($this))) {
|
||||||
$this->showContentBlock();
|
$this->showContentBlock();
|
||||||
Event::handle('EndShowContentBlock', array($this));
|
Event::handle('EndShowContentBlock', array($this));
|
||||||
@ -657,6 +660,8 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
_('Source'));
|
_('Source'));
|
||||||
$this->menuItem(common_local_url('doc', array('title' => 'contact')),
|
$this->menuItem(common_local_url('doc', array('title' => 'contact')),
|
||||||
_('Contact'));
|
_('Contact'));
|
||||||
|
$this->menuItem(common_local_url('doc', array('title' => 'badge')),
|
||||||
|
_('Badge'));
|
||||||
Event::handle('EndSecondaryNav', array($this));
|
Event::handle('EndSecondaryNav', array($this));
|
||||||
}
|
}
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
|
@ -228,20 +228,31 @@ class Router
|
|||||||
|
|
||||||
// direct messages
|
// direct messages
|
||||||
|
|
||||||
$m->connect('api/direct_messages/:method',
|
foreach (array('xml', 'json') as $e) {
|
||||||
array('action' => 'api',
|
$m->connect('api/direct_messages/new.'.$e,
|
||||||
'apiaction' => 'direct_messages'),
|
array('action' => 'api',
|
||||||
array('method' => '(sent|new)(\.(xml|json|atom|rss))?'));
|
'apiaction' => 'direct_messages',
|
||||||
|
'method' => 'create.'.$e));
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (array('xml', 'json', 'rss', 'atom') as $e) {
|
||||||
|
$m->connect('api/direct_messages.'.$e,
|
||||||
|
array('action' => 'api',
|
||||||
|
'apiaction' => 'direct_messages',
|
||||||
|
'method' => 'direct_messages.'.$e));
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (array('xml', 'json', 'rss', 'atom') as $e) {
|
||||||
|
$m->connect('api/direct_message/sent.'.$e,
|
||||||
|
array('action' => 'api',
|
||||||
|
'apiaction' => 'direct_messages',
|
||||||
|
'method' => 'sent.'.$e));
|
||||||
|
}
|
||||||
|
|
||||||
$m->connect('api/direct_messages/destroy/:argument',
|
$m->connect('api/direct_messages/destroy/:argument',
|
||||||
array('action' => 'api',
|
array('action' => 'api',
|
||||||
'apiaction' => 'direct_messages'));
|
'apiaction' => 'direct_messages'));
|
||||||
|
|
||||||
$m->connect('api/:method',
|
|
||||||
array('action' => 'api',
|
|
||||||
'apiaction' => 'direct_messages'),
|
|
||||||
array('method' => 'direct_messages(\.(xml|json|atom|rss))?'));
|
|
||||||
|
|
||||||
// friendships
|
// friendships
|
||||||
|
|
||||||
$m->connect('api/friendships/:method/:argument',
|
$m->connect('api/friendships/:method/:argument',
|
||||||
@ -271,10 +282,12 @@ class Router
|
|||||||
'apiaction' => 'favorites',
|
'apiaction' => 'favorites',
|
||||||
'method' => 'favorites'));
|
'method' => 'favorites'));
|
||||||
|
|
||||||
$m->connect('api/:method',
|
foreach (array('xml', 'json', 'rss', 'atom') as $e) {
|
||||||
array('action' => 'api',
|
$m->connect('api/favorites.'.$e,
|
||||||
'apiaction' => 'favorites'),
|
array('action' => 'api',
|
||||||
array('method' => 'favorites(\.(xml|json|rss|atom))?'));
|
'apiaction' => 'favorites',
|
||||||
|
'method' => 'favorites.'.$e));
|
||||||
|
}
|
||||||
|
|
||||||
// notifications
|
// notifications
|
||||||
|
|
||||||
@ -347,7 +360,16 @@ class Router
|
|||||||
|
|
||||||
function map($path)
|
function map($path)
|
||||||
{
|
{
|
||||||
return $this->m->match($path);
|
try {
|
||||||
|
$match = $this->m->match($path);
|
||||||
|
} catch (Net_URL_Mapper_InvalidException $e) {
|
||||||
|
common_log(LOG_ERR, "Problem getting route for $path - " .
|
||||||
|
$e->getMessage());
|
||||||
|
$cac = new ClientErrorAction("Page not found.", 404);
|
||||||
|
$cac->showPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $match;
|
||||||
}
|
}
|
||||||
|
|
||||||
function build($action, $args=null, $params=null, $fragment=null)
|
function build($action, $args=null, $params=null, $fragment=null)
|
||||||
|
@ -61,7 +61,8 @@ function standard_map()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$docs = array('about', 'faq', 'contact', 'im', 'openid', 'openmublog', 'privacy', 'source');
|
$docs = array('about', 'faq', 'contact', 'im', 'openid', 'openmublog',
|
||||||
|
'privacy', 'source', 'badge');
|
||||||
|
|
||||||
foreach($docs as $title) {
|
foreach($docs as $title) {
|
||||||
$standard_map_urls .= url(
|
$standard_map_urls .= url(
|
||||||
|
@ -900,7 +900,7 @@ left:0;
|
|||||||
left:29px;
|
left:29px;
|
||||||
}
|
}
|
||||||
.notice-options .notice_delete {
|
.notice-options .notice_delete {
|
||||||
left:76px;
|
right:0;
|
||||||
}
|
}
|
||||||
.notice-options .notice_reply dt {
|
.notice-options .notice_reply dt {
|
||||||
display:none;
|
display:none;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user