LinuxBasics.org

The community that helps people to run Linux

rss
Table of Contents

Make Playground Usable Without Login

Create a namespace for the Playground so that all files go under that

Make the playground into its own namespace under wiki namespace by creating a start page.

Create Edit button for those not logged in at Playground

There was then the problem of no ‘edit’ on the side since they would not be logged in and couldn’t see it. Code was inserted in the file includes/after-content.html to make an Edit button appear when someone is in the Playground.

Keep edits from the Playground from going out to RSS and notification email

Add the section for keeping the playground out of changelog. The part above is the original script to show where this part was placed. This is in inc/common.php. This keeps it from going out to the RSS feed as well.

/**
 * Add's an entry to the changelog
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function addLogEntry($date,$id,$summary=""){
  global $conf;
  $id     = cleanID($id);//FIXME not needed anymore?

/**Trying to keep playground out of changelog**/

 if(preg_match ("/playground/","$id")){
  return;
  }

/**end of playground section **/

To avoid the mail notification an addition is made in the same file, inc/common.php. It is shown here with the author’s code for sending out notification above it in order to show where it goes.

/**
 * Sends a notify mail to the wikiadmin when a page was
 * changed
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function notify($id,$rev="",$summary=""){
  global $lang;
  global $conf;

/**don't notify if playground **/

 if(preg_match ("/playground/","$id")){
  return;
  }

/**end of playground section **/


Copyright (c) by the authors.
Prior to editing, authors agreed to license their contributions by the terms of the GPL.
See our licensing page for details.


Linux® is a registered trademark of Linus Torvalds.


 
  making/playnologin.txt · Last modified: 2008/07/20 21:08

LinuxBasics.org

Start Linux-Course Tutorials Linux Links Security Blog Forum E-mail List Search Online Chat

Site-Info

Help Get in Touch Making of LBo

Wiki-Control

Powered by

Linux Apache DokuWiki Mailman RUTE ht://Dig