I see, so it is per-user skinnable. Those links you gave use cookies. If that's acceptable, then I offer the following solution (only tried on Mozilla). It sets a cookie, then uses a Server-side includes to choose which skin to display. The sample CGI script uses CGI.pm. It's not the best solution I guess, but it's somewhat amusing at least. :)

ssi-cookie.html

<HTML> <BODY> <A HREF="/cgi-bin/skin-cookie.pl">Skin this</A><BR> <!--#if expr="${HTTP_COOKIE} = /skin\=wacky/"--> wacky <!--#elif expr="${HTTP_COOKIE} = /skin\=goth/"--> goth <!--#else --> minimal <!--#endif --> </BODY> </HTML>

/cgi-bin/skin-cookie.pl

#!/usr/local/bin/perl -Tw # set 'skin' cookie then redirect where we came from use strict; use CGI; use vars qw($q $cookie $location $status @skin_names); $q = new CGI; @skin_names = qw(minimal wacky goth); main(); sub main { if (defined $q->param('skin')) { # user selected a skin my $skin_param = $q->param('skin'); for my $valid_skin (@skin_names) { if ($skin_param eq $valid_skin) { skin_cookie_page($skin_param); } } # fall through if invalid } pick_skin_page(); } sub get_old_url { return $q->param('old_url') || $q->referer() || 'http://perlmonks.org/'; } sub skin_cookie_page { my $skin_param = shift; my $cookie = $q->cookie( -name => 'skin', -value => $skin_param, -expires => '+30d', ); print $q->header(-cookie => $cookie, -status => '302 Moved', -location => get_old_url()); exit; } sub pick_skin_page { print $q->header(), $q->start_html(), # you'll want to skin this too, natural +ly :) $q->start_form(), 'Choose your skin: ', $q->popup_menu(-name => 'skin', '-values' => \@skin_names) +, $q->submit('skin'), $q->hidden('old_url' => get_old_url()), $q->end_form(), $q->end_html(); exit; }


In reply to Re: Re: Re: Alternatives to PerlTransHandler? by kwoff
in thread Alternatives to PerlTransHandler? by SamQi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.