×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    option

    $wgCapitalLinks = false

    activated means:
    allows to create pages starting with lowercase letters. The wiki will NOT automatically convert page names anymore. This allows pages like df to have their correct names, but it also means now, for example Template:Manpage and Template:manpage are not the same anymore. You have more freedom to pick page titles but you also have to watch out when creating your links. this caused a few broken links around the wiki that would need fixing


    Liste aller page titles[edit]

    (15:38:06) took: einmal als ganz plattes textfile zum wgetten und egreppen
    (15:38:13) took: und einmal ne seite wo man klicken kann
    (15:38:21) took: mach einfach zwei verschieden php datein
    (15:39:00) took: und verlink die auf http://s23.org/page_names.php
    (15:40:24) mutante: ack
    (15:42:50) mutante: /exec -o grep -i "torrent" /var/www/pagetitles.txt
    (15:42:54) mutante: BitTorrent
    (15:42:54) mutante: HowTo/Create_a_torrent_file
    (15:42:54) mutante: MakeTorrent
    (15:43:01) mutante: /exec -o grep "torrent" /var/www/pagetitles.txt
    (15:43:06) mutante: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
    (15:43:06) mutante: /bin/sh: -c: line 1: syntax error: unexpected end of file
    (15:43:13) mutante: oops
    (15:43:26) mutante: HowTo/Create_a_torrent_file
    

    Vorschlag[edit]

    wenn wir das alles per hand machen wollen brauchen wir auf jeden fall nen dutzend leute die uns helfen.

    wenn wir dann sowieso schonmal alle seiten quasi einmal anfassen dann sollten wir vielleicht dabei auch gleich die categorisierung überarbeiten...

    wie soll die genau sein? im mom ists ja oberchaotisch... also nix gegen chaos... aber ist das nich ein bischne ZUchaotisch?

    noch'n vorschlag[edit]

    Das geht nich das alles per hand zu erledigen. wir brauchen eine andere lösung die die seiten schnell wieder nutzbar macht!


    took: mutante: wir brauchen nen "plugin" oder "hack" fürs wiki das folgendes tut:
    took: spätestens wenn jmd auf nen link klickt der zu ner nich-existierenden seite führt zu dem es aber ein oder mehrere Seiten mit gleicher Buchstabenreihenfolge aber anderer grosskleinschreibung [oder evnt auch soagar fehlende/zusätzliche space's] gibt (besser schon in dem moment wo der broken-link zum ersten mal angezeigt wird bzw einmal durch aufruf eines suchscripts global starten) sollte eine AuswahlSeite erscheinen die alle vorhandenen passenden seiten anzeigt oder halt nen link zum normalen editieren der seite

    Oder die link-liste einfach auf der normalen edit seite unterbringen
    die ja dann erscheint
    einfach global IMMER auf JEDE edit seite sowas einbauen. Ein Script was nach ähnlichen dateinmane sucht. das wäre doch eine machbare lösung, oder?

    (01:28:15) mutante: ehmm 
    (01:28:30) mutante: if "wenn jemand klick"
    (01:28:47) mutante: sind ja erstmal nur html links
    (01:28:58) mutante: wie kriegst du das da mit, ausser du schaust in die apache logs
    (01:30:04) took: einfach global IMMER auf JEDE edit seite sowas einbauen. einscript was nach ähnlichen dateinmane sucht.
    (01:30:06) took: :-)
    (01:30:26) took: statt dem was ich vorher laut überlegt hab
    (01:31:55) mutante: ja,also an der Stelle wo es [[ ]] Links parsed
    (01:32:03) mutante: da muesste man was einfuegen koennen 
    (01:32:22) mutante: also in Parser.php ,,dem uebelsten ,groessten und undokumentiertesten Brocken von ganz Mediawiki
    (01:32:24) took: Mit sonnem Text: "Freundlicher Hinweis: Bitte beachten Sie, das es auch folgende sehr gleichlautende Seiten in unserem Wiki gibt: *df *dF *d f *Df"
    (01:32:34) mutante: wie selbst die developer sagen,wo man nicht mehr rangeht
    (01:32:42) mutante: gg
    (01:32:42) took: ;)
    (01:33:00) took: dann hätte man den vorteil das die links garnicht mehr rot wären
    (01:33:05) took: das wäre natülich auch was
    (01:33:08) took: geht aber auch ohne
    [...]
    (01:34:35) took: also ich könnt mir vorstellen - soweit ich das mediawiki system kapiert hab - das es wohl am ehesten realisierbar ist einfach auf der edit seite ein solches sript mir einzubinden
    

    HowTo[edit]

    cosmea: weil imho sollten wir versuchen (da wir das ja jetzt können), alle page names so korrekt wie möglich haben

    und das machen wir so:

    Wenn eine Seite mit Großschreibung vorne in wirklichkeit besser klein geschrieben sein sollte (wie dei Df oder Dd, dann moven wir die seite zu df bzw dd.

    Falls die Großschreibung sinnvoll sein sollte wie bei Einstein, dann richten wir einen redircet ein von einstein -> Einstein damit die alten link irgendwo in irgendwelchen seiten schonmal alle wieder funktionieren.

    Dann kann man zusätzlich noch alle Seiten durchschauen, ob zb jemand irgendwo [[Df|df]] sonstigen jetzt nich mehr benötigten quatsch geschrieben hat und das auf den aktuellen stand bringen

    Abkürzungen[edit]

    Beispiel: AsynchronousTransferMode wird zu Asynchrounous Transfer Mode gemovt, d.h. Kamele raus, aber alle drei Worte gross lassen, da es eine Abkuerzung ist.


    Warning: WikiCache[edit]

    da das wiki offensichtlich cachet kommt es nach moves oder einrichten von redirects fast immer zu sehr komischen effekten. abhilfe: auf der seite auf der etas anderes aussieht als es aussehen sollte einfach mal auf "edit" und dann auf "show preview" klicken. :)

    Broken Links[edit]

    6340 page_titles

    broken_links

    irssi search alias[edit]

    If you are on s23 and have irssi running, type this:

    /alias title /exec -o grep $0 /var/www/pagetitles.txt
    

    and now you should be able to use

    /title fnord 
    

    to search for page titles.

    All page titles[edit]

    URL[edit]

    http://s23.org/pagenames.php

    Variables[edit]

    You can append the following variables to this URL:

    q (stands for query) can be one of:
    
    q=all OR q=small OR q=big OR q=camel OR q=redir OR q=restr OR q=new OR q=short
    
     all = all pages
     small = only pages starting with small letters
     big = only pages starting with capital letters
     camel = tries to detect CamelCase pages
     redir = show only pages that are REDIRECTs
     restr = show only restricted pages (blocked pages)
     new = show only new pages
     short = show only short pages (<100 chars)
    
    d (stands for display) can be one of:
    
    d=plain OR d=br OR d=html OR d=verbose
    
     plain = totally plain
     br = seperated by <br /> tags.
     html = including clickable <a href.. links.
     verbose = shows a complete html table with a lot more information on pages including:
               redirect (0|1), 1 if is the page only a redirect
               new (0|1), 1 if the page is "new" (dont know how new is defined yet)
               counter, how many times has the page been accessed ("popular pages")
               length, length of the page in bytes (short pages are under <100 f.e.)
               touched, timestamp of last edit on this page ("lonely pages")
               revision, revision id of the current revision (no real use yet)
               restricted, blocked pages have a groupname, regular pages have a blank value
    
    s (stands for search) can be set to a search string:
    
    s=searchstring
    
    s is optional and limits the results further to only those titles matching the string.
    
    s is case sensitive. Wa != wa 
    
    If combined with q's other than =all, it will show ONLY the pages that match both filters.
    

    Variables are appended like in this example: http://s23.org/pagenames.php?d=br&q=all

    Simply opening http://s23.org/pagenames.php also defaults to d=br and q=all, though.

    Create your own URLs by combing values as you want them:

    Examples[edit]

    q=all&d=html All page titles with html link

    q=big&d=plain Only pages starting with capital letters in plain text

    q=camel&d=br CamelCase pages, <br /> seperated

    q=all&d=html&s=fnord All pages matching fnord as html

    q=camel&s=Wa&d=br Only CamelCase pages that contain 'Wa' (<br /> seperated)

    q=all&s=Wiki&d=verbose All pages that contain 'Wiki' (plus a lot more information)

    etc.. all combinations are possible.

    The easy way[edit]

    Here is a html form that makes it easier:

    http://s23.org/pagesearch.html


    Source code for page search[edit]

    pagesearch.html (frontend)[edit]

    This is a simple html form example, that can be found here, all it does is taking the variable values from the user and sending it to pagenames.php. You could also call that directly by attaching the variables to the URL (see variable names below), this is just to make it easier.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>Alternative page title search for Mediawiki</title>
    <meta name="author" content="mutante@s23.org" />
    </head>
    <body>
    <h3><a href="http://s23.org/wiki/">S23Wiki</a> page title search</h3>
    <form method="get" action="pagenames.php">
    <p>
    q=
    <input type="radio" name="q" value="all" />all
    <input type="radio" name="q" value="small" />small
    
    <input type="radio" name="q" value="big" />big
    <input type="radio" name="q" value="camel" />camel
    <input type="radio" name="q" value="redir" />redir
    <input type="radio" name="q" value="restr" />restr
    <input type="radio" name="q" value="new" />new
    <input type="radio" name="q" value="short" />short</p>
    <p>
    d=
    <input type="radio" name="d" value="plain" />plain
    <input type="radio" name="d" value="br" />br
    <input type="radio" name="d" value="html" />html
    <input type="radio" name="d" value="verbose" />verbose
    </p>
    <p>
    s=
    <input type="text" name="s" value=""></input> (optional)
    
    <input type="radio" name="t" value="case" checked="checked" />case
    <input type="radio" name="t" value="incase" />incase
    </p><p>
    <input type="submit" name="x" value="search" />
    </p>
    </form>
    <hr />
    
    <h4>q (query)</h4>
    <pre>
    q=all OR q=small OR q=big OR q=camel OR q=redir OR q=restr OR q=new OR q=short
    
     all = all pages
     small = only pages starting with small letters
     big = only pages starting with capital letters
     camel = tries to detect CamelCase pages
     redir = show only pages that are REDIRECTs
     restr = show only restricted pages (blocked pages)
     new = show only new pages
     short = show only short pages (<100 chars)
    <nowiki>
    </nowiki>

    d (display)


    d=plain|br|html|verbose

    plain = totally plain
    br = seperated by <br /> tags.
    html = including clickable a href.. links.
    verbose = shows a complete html table with a lot more information on pages including:
              redirect (0|1), 1 if is the page only a redirect
              new (0|1), 1 if the page is "new" (dont know how new is defined yet)
              counter, how many times has the page been accessed ("popular pages")
              length, length of the page in bytes (short pages are under 100 f.e.)
              touched, timestamp of last edit on this page ("lonely pages")
              revision, revision id of the current revision (no real use yet)
              restricted, blocked pages have a groupname, regular pages have a blank value
    

    s (search)

    <pre> s=searchstring

    s is optional and limits the results further to only those titles matching the string.

    s is case sensitive. Wa != wa

    If combined with q's other than =all, it will show ONLY the pages that match both filters. </pre>

    </body> </html>

    pagenames.php (backend)[edit]

    Takes variables from the input form and displays the result. If called directly it lists all pages by default.

    <?php
    $dbhost="localhost";
    $dbuser="wikiuser";
    $dbpass="";
    $dbname="wikidb";
    $wikibase="http://s23.org/wiki/";
    
    mysql_connect("$dbhost", "$dbuser", "$dbpass") or die(mysql_error());
    mysql_select_db("$dbname") or die(mysql_error());
    
    $s=mysql_real_escape_string($_GET['s']);
    
    $t=$_GET['t'];
    
    
    if (isset($_GET['q'])) {
    
    switch ($_GET['q']) {
    case "all":
    $query = "select * from page where page_title LIKE \"%$s%\" order by page_namespace,page_title";
    break;
    case "camel":
    $query = "select * from page where page_title REGEXP \".[a-z][A-Z][a-z].\" AND page_title LIKE \"%$s%\" AND page_is_redirect=0 order by page_namespace,page_title";
    break;
    case "small";
    $query ="select * from page where page_title REGEXP \"^[a-z].\" AND page_title LIKE \"%$s%\" order by page_namespace,page_title";
    break;
    case "big";
    $query ="select * from page where page_title REGEXP \"^[A-Z].\" AND page_title LIKE \"%$s%\" order by page_namespace,page_title";
    break;
    case "redir";
    $query ="select * from page where page_title LIKE \"%$s%\" AND page_is_redirect=1 order by page_namespace,page_title";
    break;
    case "restr";
    $query ="select * from page where page_title LIKE \"%$s%\" AND page_restrictions !=\"\" order by page_namespace,page_title";
    break;
    case "new";
    $query ="select * from page where page_title LIKE \"%$s%\" AND page_is_new !=0 order by page_namespace,page_title";
    break;
    case "short";
    $query ="select * from page where page_title LIKE \"%$s%\" AND page_len<10 order by page_namespace,page_title";
    break;
    
    default:
    $query = "select * from page where page_title LIKE \"%$s%\" order by page_namespace,page_title";
    }
    } else {
    $query = "select * from page where page_title LIKE \"%$s%\" order by page_namespace,page_title";
    }
    
    if ($_GET['d']=="verbose") {
    echo "<html><head></head><body><table border=\"1\"><tr><th>title</th><th>redirect?</th><th>new?</th><th>counter</th><th>length</th><th>touched</th><th>revision</th><th>restricted?</th></tr>";
    }
    
    
    $result = mysql_query("$query");
    
    while($row = mysql_fetch_array( $result )) {
    $pagename=$row['page_title'];
    $namespace=$row['page_namespace'];
    
    switch ($namespace) {
    case "-2":
    $namespace = "Media:";
    break;
    case "-1":
    $namespace = "Special:";
    break;
    case "0":
    $namespace = "";
    break;
    case "1":
    $namespace = "Talk:";
    break;
    case "2":
    $namespace = "User:";
    break;
    case "3":
    $namespace = "User_talk:";
    break;
    case "4":
    $namespace = "Meta:";
    break;
    case "5":
    $namespace = "Meta_talk:";
    break;
    case "6":
    $namespace = "Image:";
    break;
    case "7":
    $namespace = "Image_talk:";
    break;
    case "8":
    $namespace = "MediaWiki:";
    break;
    case "9":
    $namespace = "MediaWiki_talk:";
    break;
    case "10":
    $namespace = "Template:";
    break;
    case "11":
    $namespace = "Template_talk:";
    break;
    case "12":
    $namespace = "Help:";
    break;
    case "13":
    $namespace = "Help_talk:";
    break;
    case "14":
    $namespace = "Category:";
    break;
    case "15":
    $namespace = "Category_talk:";
    break;
    default:
    $namespace = "";
    }
    
    
    if (isset($_GET['d'])) {
    
    switch ($_GET['d']) {
    case "plain":
    echo $namespace.$pagename;
    break;
    case "br":
    echo $namespace.$pagename."<br />";
    break;
    case "html";
    echo "<a href=\"".$wikibase.$namespace.$pagename."\">".$namespace.$pagename."</a><br />";
    break;
    case "verbose";
    echo "<tr><td><a href=\"".$wikibase.$namespace.$pagename."\">".$namespace.$pagename."</a></td><td>".$row['page_is_redirect']."</td><td>".$row['page_is_new']."</td><td>".$row['page_counter']."</td><td>".$row['page_len']."</td><td>".$row['page_touched']."</td><td>".$row['page_latest']."</td><td> ".$row['page_restrictions']."</td></tr>";
    break;
    default:
    echo $namespace.$pagename."<br />";
    }
    } else {
    echo $namespace.$pagename."<br />";
    }
    }
    
    if ($_GET['d']=="verbose") {
    echo "</table></body></html>";
    }
    ?>
    

    X-Files - unklare Fälle[edit]

    • Bash or bash or even BASH ? Der Maxime folgend den Namen so zu wählen wie sich das Projekt selbst nennt, schaute ich auf [1] und fand verschiedene Schreibweisen. mutante 20:22, 29 March 2006 (CEST)
      • BaSh scheint sinnvoll zu sein(denn es heist ja "Bourne-Again Shell" wobei das Again ja wohl eigtnlich klein geschrieben werden müsste, oder?)... oder einfach so lassen wie es ist (also Bash?! --Took 11:21, 30 March 2006 (CEST)
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.