mo.notono.us

Tuesday, January 13, 2009

MOSS: Add Incoming Links to a Wiki Page with jQuery

Sharepoint’s wiki implementation is rudimentary, but still useful.  One of the corners cut in the implementation is that incoming links are on a separate page – you have to click the Incoming Links link (and wait for the screen to refresh) to see them.  It’d be much more user-friendly to show these links on the same page as the content.

Turns out with jQuery this is a fairly trivial exercise,  at least for a single Wiki page*:  Simply add a Content Editor Web part to the page and copy the following code into the Source Editor.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  //get the url for the incoming links page
  u = $("a[id$=WikiIncomingLinks_LinkText]")[0].href;

  //create a target container and load it with the incoming links
  //filtered to show the links list only
  l = $("<div id='incomingLinks' style='border-top: solid 1px  silver'>").load(u + " .ms-formareaframe");

  //append the new container to the wiki content
  $(".ms-wikicontent").append(l);
});

</script>

It may be noted that the above code could even be combined into one single chain – I prefer the above for readability and debugging purposes.  Also not sure if I need to dispose of the local variables – this is a POC more than anything else.

Adding script through a CEW part

The incoming links are now on the page, right below the content:

Incoming Links directly on the Wiki Page

A more thorough implementation might position the links in a box in the upper left corner, and simultaneously removing the “Incoming Links” link.

*I haven’t quite thought out how to inject this throughout a wiki.  Any suggestions?

Labels: , , , , , ,

Friday, May 18, 2007

Ain't that Purty

This morning my boss forwarded an email I'd sent him to our client.  My email was essentially just a spreadsheet that my boss had sent me earlier for review, where I had simply changed the page layout, set print margins, repeated headers across pages, etc.  All the stuff that seem almost silly to waste time on when what you really only care about is the content.  In other words I had made it purty.

And so I said as much in my email.  "Here it is, all purty in print."

And my boss forwarded the email, unedited.

No harm done I guess, but I am wondering if our client's India-born-and-raised PM will know what on earth "purty" is all about.  So I decided to make sure Purty was defined in the Wikipedia, in case he decided to look it up there.

It is now: http://en.wikipedia.org/wiki/Purty 

I love Wikis.

Technorati tags: ,

Labels: ,

Tuesday, March 27, 2007

Links for 2007-03-26 [del.icio.us]


Sent using Rmail R|mail.

Labels: ,

Friday, March 09, 2007

Links for 2007-03-08 [del.icio.us]


Sent using Rmail R|mail.

Labels: ,

Saturday, January 20, 2007

Links for 2007-01-19 [del.icio.us]


Sent using R|mail.

Labels: ,

Friday, September 22, 2006

Links for 2006-09-21 [del.icio.us]


Sent using R|mail.

Labels: ,

Tuesday, November 29, 2005

Wanted: Ajax based WYSIWYG Wiki/Blog engine

I want an Ajax based, WYSIWYG powered Wiki/blog, with tags, rss and search, and since we're already ajax - an in-page chat for any logged-on users. Come on, MS (Telligent), Google, Yahoo! Can't you get this done?

Labels: ,

Tuesday, September 21, 2004

Google Translation

The Google Translation program is pretty neat - it's like (almost) like a wiki in that it lets users perform the translations. I went in and translated a few Google Toolbar resource strings from English to Norwegian - Nynorsk and brought that from 14% to 16%...

Like I said, Pretty neat, but like with all wikis, what's to stop someone deliberately messing with this?

Labels: