Opened 9 years ago

Closed 8 months ago

#5361 closed defect (wontfix)

[new version] script does not work well with multi-trac installations

Reported by: Justin Rovang Owned by:
Priority: normal Component: LoggedInScript
Severity: normal Keywords: login
Cc: Justin Rovang Trac Release: 0.11


If you have multiple instances installed under a single handler it won't pick up the extra path.

e.g.: (works fine) (doesn't pick up the dir correctly)

Below may be a slightly more flexible solution

 <head py:match="head" py:attrs="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('/');
        path = path.join('/');
       var user = $(this).text().split(' ').pop();
       var link = '<a href="' + path + '/wiki/' + user + '">' + user + '</a>';
       $(this).html('logged in as ' + link);
       return false;

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by Steffen Hoffmann

Keywords: login added
Summary: Script does not work well with multi-trac installations[new version] script does not work well with multi-trac installations

I just wanted to reflect in the title, that there is already a solution in here.

comment:2 Changed 3 years ago by Ryan J Ollos

Owner: Douglas Clifton deleted

comment:3 Changed 8 months ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.