[Home]WikiPatches/AutoUserName

UseModWiki | WikiPatches | RecentChanges | Preferences

Adds a markup tag $$$ that shows the Current UserName? and links to UserName? Page

Code Add the following to CommonMarkup (above the Meatball <tt> entry)

    my $id = &GetParam("username", "");
    s/\$\$\$/$id/g; # $$$ - dynamic UserName? variable

Uses

When one lands up at the HomePage if this markup tag is placed, one could go directly to one's HomePage.

Ajiva_Rts


The above code works fine except for systems where users are allowed to have spaces in their names. This code takes fixes that. Add the following to CommonMarkup (above the Meatball <tt> entry):

    my $id = &GetParam("username", "");
    my $myname = $id;
    $id =~ s/ /_/g;
    my $id = &ScriptLink($id, $myname);
    s/\$\$\$/$id/g; # $$$ - dynamic UserName? variable

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited September 28, 2007 11:52 am by MarkusLude (diff)
Search: