wiki:LoggedInScript

Version 1 (modified by dwclifton, 6 years ago) (diff)

New hack LoggedInScript, created by dwclifton

Make logged in as [user] link to homepage

Description

Will fill this in

Bugs/Feature Requests

Existing bugs and feature requests for LoggedInScript are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out LoggedInScript from here using Subversion, or browse the source with Trac.

Example

<html xmlns="http://www.w3.org/1999/xhtml"

xmlns:py="http://genshi.edgewall.org/" py:strip="">

<head py:match="head" py:attrs="select('@*')">

${select('*')} <script type="text/javascript">

jQuery(document).ready(function($) {

$('#metanav li.first:contains("logged in as")').each(function() {

var path = $('#mainnav li.first a').attr('href').split('/')[1]; var user = $(this).text().split(' ').pop(); var link = '<a href="/' + path + '/wiki/' + user + '">' + user + '</a>'; $(this).html('logged in as ' + link); return false;

});

});

</script>

</head>

</html>

Recent Changes

[5048] by dwclifton on 2008-12-22 23:11:12
New hack LoggedInScript, created by dwclifton

Author/Contributors

Author: dwclifton
Contributors: