Changeset 5361


Ignore:
Timestamp:
06/19/09 08:19:45 (3 years ago)
Author:
szabgab
Message:

add more channels
parse the incoming request and fill the nickname fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/padre.perlide.org/irc.html

    r5347 r5361  
    1313 <ul class="navigation"> 
    1414    <li><a href="/">Home</a></li> 
     15    <li><a href="developers.html">Developers</a></li> 
    1516    <li><a href="/trac/">Trac</a></li> 
    1617    <li><a href="http://blogs.padre.perlide.org/" title="Blogs related to Padre">Blogs</a></li> 
     
    2021<script type="text/javascript"> 
    2122var channels = { 
    22    general: {title:"General Perl Help",   host:"irc.freenode.net", channel:"perl"}, 
    23    win32:   {title:"Win32 specific",      host:"irc.perl.org",     channel:"win32"}, 
    24    padre:   {title:"Padre, the Perl IDE", host:"irc.perl.org",     channel:"padre"}, 
     23   general:      {title:"General Perl Help",      host:"irc.freenode.net", channel:"perl"}, 
     24   win32:        {title:"Win32 specific",         host:"irc.perl.org",     channel:"win32"}, 
     25   padre:        {title:"Padre, the Perl IDE",    host:"irc.perl.org",     channel:"padre"}, 
     26   catalyst:     {title:"Catalyst",               host:"irc.perl.org",     channel:"catalyst"}, 
     27   dbix_class:   {title:"DBIx::Class",            host:"irc.perl.org",     channel:"dbix-class"}, 
     28   email:        {title:"Perl Email Project",     host:"irc.perl.org",     channel:"email"}, 
     29   parrot:       {title:"Parrot",                 host:"irc.perl.org",     channel:"parrot"}, 
     30   perl_qa:      {title:"Perl Quality Assurance", host:"irc.perl.org",     channel:"perl-qa"}, 
     31   perlfr:       {title:"Perl in French",         host:"irc.perl.org",     channel:"perlfr"}, 
     32   poe:          {title:"POE",                    host:"irc.perl.org",     channel:"poe"},    
     33   rt:           {title:"POE",                    host:"irc.perl.org",     channel:"rt"}, 
     34   perl_help:    {title:"Perl Help",              host:"irc.perl.org",     channel:"perl-help"}, 
     35   wxperl:       {title:"Perl Help",              host:"irc.perl.org",     channel:"wxperl"}, 
     36   perl6:        {title:"Perl 6 development",     host:"irc.freenode.net", channel:"perl6"}, 
    2537}; 
    2638 
     
    3345} 
    3446 
     47function get_values() { 
     48    // getting the parameters from the URL 
     49    var loc = window.location.toString().indexOf('?'); 
     50    if (loc > 0) { 
     51        var val = window.location.toString().substr(loc + 1); 
     52        //alert(val); 
     53        var pairs = val.split("&"); 
     54//alert(pairs); 
     55//alert(pairs.length); 
     56        var data = Array; 
     57        for (var i = 0; i < pairs.length; i++) { 
     58        var pair = pairs[i].split("="); 
     59//      alert(pair[0] + " = " + pair[1]); 
     60        data[pair[0]] = pair[1]; 
     61        } 
     62        return data; 
     63    } else { 
     64        return; 
     65    } 
     66} 
     67 
    3568</script> 
    36  
     69<p> 
     70Please select a nick name and click on one of the links. 
     71</p> 
    3772<form name="n"> 
    38 <input name="nickname" value=""> 
     73Nickname: <input name="nickname" value=""> 
    3974</form> 
    4075 
     
    4883   have drop-down box with list of channels ? 
    4984   show the localized channels first ? 
    50    better random nick generator    
     85   better random nick generator 
     86    
     87   if all the necessary in 
     88    
    5189--> 
    5290 
    5391<table> 
    5492<script type="text/javascript"> 
    55 var nick = Math.floor(Math.random()*10000); 
    56 document.forms.n.nickname.value = nick; 
     93 
     94var values = get_values(); 
     95if (values["nickname"]) { 
     96    document.forms.n.nickname.value = values["nickname"]; 
     97} else { 
     98    var nick = Math.floor(Math.random()*10000); 
     99    document.forms.n.nickname.value = nick; 
     100} 
    57101 
    58102for (var i in channels) { 
Note: See TracChangeset for help on using the changeset viewer.