summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-02-20 17:17:20 -0800
committerZach Copley <zach@controlyourself.ca>2009-02-20 17:17:20 -0800
commit1fdb35bbf105fe462dcc663ea20b6aa56d654001 (patch)
tree00e3f7a52aa24f9c3364cd3a2582c18402a021d0
parent5e816d7be208fc24419288234559c78da7391c8b (diff)
New doc page for Identi.ca badge and minor updates to badge's js
-rw-r--r--doc-src/badge65
-rw-r--r--js/identica-badge.js3
-rw-r--r--lib/action.php2
-rwxr-xr-xscripts/sitemap.php3
4 files changed, 71 insertions, 2 deletions
diff --git a/doc-src/badge b/doc-src/badge
new file mode 100644
index 000000000..1c368eb69
--- /dev/null
+++ b/doc-src/badge
@@ -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>
+ &lt;script type=&quot;text/javascript&quot; src=&quot;http://identi.ca/js/identica-badge.js&quot;&gt;
+ {
+ &quot;user&quot;:&quot;kentbrew&quot;,
+ &quot;server&quot;:&quot;identi.ca&quot;,
+ &quot;headerText&quot;:&quot; and friends&quot;
+ }
+ &lt;/script&gt;
+
+</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/).
diff --git a/js/identica-badge.js b/js/identica-badge.js
index 5c586b5d6..869230b7a 100644
--- a/js/identica-badge.js
+++ b/js/identica-badge.js
@@ -1,4 +1,5 @@
// 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
// see http://kentbrewster.com/identica-badge for info
( function() {
@@ -127,7 +128,7 @@
var a = document.createElement('A');
a.innerHTML = 'get this';
a.target = '_blank';
- a.href = 'http://kentbrewster.com/identica-badge';
+ a.href = 'http://identica/doc/badge';
$.s.f.appendChild(a);
$.s.appendChild($.s.f);
$.f.getUser();
diff --git a/lib/action.php b/lib/action.php
index b1e700b67..0c4d0181d 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -657,6 +657,8 @@ class Action extends HTMLOutputter // lawsuit
_('Source'));
$this->menuItem(common_local_url('doc', array('title' => 'contact')),
_('Contact'));
+ $this->menuItem(common_local_url('doc', array('title' => 'badge')),
+ _('Badge'));
Event::handle('EndSecondaryNav', array($this));
}
$this->elementEnd('ul');
diff --git a/scripts/sitemap.php b/scripts/sitemap.php
index 51a9bbd75..39eb859bb 100755
--- a/scripts/sitemap.php
+++ b/scripts/sitemap.php
@@ -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) {
$standard_map_urls .= url(