Just who is GmBowen?

My name is Mike Bowen and I'm a professor of science education at Mount Saint Vincent University in Halifax, Nova Scotia, Canada.

My research interests involve developing "authentic" science environments for grade 6 to 12 students so that they may participate in science activities & communities which parallel those engaged in by "real" scientists. In my view, it only makes sense to learn about a subject in all of its dimensions...including the generative aspects and the interactive & participatory contexts in which those aspects arise. In the past several years I have been re-working wikkawiki to accomplish that....to such an extent that it is now it's a wikka-fork because the code-base has been changed so radically.

Previously I've worked in classrooms & schools with kids engaging with them in projects which paralleled those of the sort done by scientists (the "authenticity" of those projects arising from the "fuzzy" nature of the questions and methods by the students, the social interactions necessary to develop those, and the socio-rhetorical nature in which resulting knowledge claims arose). However, projects of this sort are often sustained only as long as there were university persons in the school supporting the work. As soon as the support structures left, the activities ceased. My interest in web tools arose from recognition that many of the features of science communities which lead to sustained and prolonged involvement could be provided to students in schools through a well-designed web environment. Thus, the tools I'm working on draw on studies from the discipline known as 'sociology of science' to consider the different ways in which scientists communicate. In addition to this, because my audience is kids, there are various security features that must be considered (including the distinction between "delete" and "hide").

I have two goals overall. One is to develop an enhanced on-line publication and project site so that students can work on (hopefully collaborative) projects and publish their results on-line (when this project is finally active you'll be able to see it at "The Canadian Electronic Journal of High School Science & Technology"). The other facet of the project is to provide a single on-line environment that contains many of the project features found at The Journal, but which can be implemented on a smaller scale -- in a single class, school or school board. It is this latter facet which drives much of the recent wikka development I've been doing and which I hope will encourage collaborative and long-term projects in schools (both of which have been found to have substantial learning outcomes over "typical" classroom approaches). Wikka offers the advantage that you can start to use it in a very simple fashion and then, as your interests or needs evolve, more of the tools (both from the base wikka distribution and the tools I've been working on) can be incorporated into a student project.
The wikka "fork" (now called clikkawiki) will be available at www.clikkawiki.com as soon as I figure out how to modify the install package to include all of the database and page changes) derives considerably from THIS great wikkawiki and all the work done by all of you!! and has the following features (I released earlier versions of many of the tools here....then the core changed so much that the tools wouldn't work in this wiki any more)...

In the end, it combines the "best" parts of wiki's (unstructured writing environment) with the "best" parts of forums/blogs/threads etc, and the best parts of social networking environments....and empowers the individual user to be able to create their own content whether structured or unstructured. It is fully intended to help a classroom teacher generate an constructivist learning environment.

Although the tools I've developed are often less full-featured than those in standalone versions of the tools, they offer a few distinct advantages for kids working on school projects. Firstly, the student doesn't have to carry/move files or documents around. Secondly, students are able to use the same tools at school, in the library, at a friends place, or at home. The work they do is not subject to the vagaries of the platform they are on. Thirdly, they can collaboratively work on projects in ways not possible with traditional tools available to them. Fourthly, and this is really interesting in a learning sense, they afford participation by students not part of the project group....even from other schools & grades....something which rarely happens in schools. That the teacher can monitor projects as they are ongoing is also different than what often happens. And heck, even parents can drop in.

Overall, I chose wakka/wikka because it seemed to be the wiki with the most flexibility for doing the sorts of things I was interested in. When I started 3 years ago I didn't even know what PHP was....I'd used basic and fortran in bits in the far past and I knew HTML. Things have progressed since then, and I owe much to Mark Kasper, Andrew Somerville, Chris Spurr and Colin Madore each of whom helped program various parts of tools & to the people who work with this wikki (JW, Nils, DarTar, Jason, etc) who have both provided examples of code & input on what I've been doing that have helped me develop the scripts I've been working on. Although I know that they often despair at my seeming inability to follow conventions (or, at least cluelessness about them), I'm grateful for their support and help. Thanks folks.

A final thought....I release any and all scripts that I work on as GPL/open-source because I work for a public institution. I'm paid by the public to think about these issues, do this sort of code/script development work, and the code is released to the public because they've paid for it. If, however, you use any of the stuff I've worked on in any academic projects I'd appreciate you letting me know....and I might even be of use participating with the project so don't hesitate to ask. If you use it elsewhere I'd like to know too (an ego thing eh?)...but my bosses care less about those uses.

Issues I'm interested in
In general I'm interested in socio-cultural insights into learning....I view learning as a collaborative and distributed social activity not an individual one. This perspective flies in the face of much of the traditional individualistic cognitive views that permeate Western culture. It is easy to see how that is related to my interest in the wiki community. With respect to this wiki, I think one of the issues that needs exploring is those I discussed at the VirtualWikiFarm page. Overall, how one manages and deals with the community one is part of (communities really) is an issue with any wiki (or community for that matter). In the "real world, as communities become larger and larger people separate off into sub-groups and identify with the membership of the sub groups. Developing sub-groups isn't possible in this wiki and I think that this is an issue overall. Ultimately, I think any wiki will need the ability for a participant to identify a sub-group of which they are a member....at least implicitly identify a sub-group of which they are a member....and restrict the pages/areas that they commonly have access to to those sub-groups as a way of managing the size of the group they interact with. Note that the sub-group isn't one where all members are together, but just one defined as an individual.....think of it as overlapping circles in a Venn diagram with each member of "your" group having outside participations in other groups as well (just like in real life). An idea for future development....

Interesting Pages: SysInfo, WikkaBetaFeatures, ACLsWithUserGroups, UserRegistration, redirect script (with registration password for admin purposes), WikkaCSS (to make flexible floating box width), to embed images completely in a webpage use base64img.php at http://php.holtsmark.no/base64img/, FLV streaming players (for demo movies) here, Image browser, simple edit actions for wackowiki (modifiable for here) here, an action to prune older pages from the history is at PageAdminPrune.

{{rss url="http://wikka.jsnx.com/WikkaBlog2/revisions.xml"}}

Participation in Wikka Development


One of our first modifications was completed by my programming guy (Mark Kasper) in June '04 and was a modification of the pageindex.php code that has now been modified and incorporated into wikka as part of the release [Mod041fPageIndexByLetter] .....it should make the wiki's more useable for high-use sites because it provides a letter index for pageindex.php. It can either be used as usual, {{pageindex}}, or using a parameter indicating which letter you would like to see a listing for (for example, {{pageindex start="a"}}...or whatever letter you wish to show a listing for). If you enter a letter that there is not yet a listing for, then it defaults to "all".

Graphic Oriented Mods

I have a modified file-upload utility (just for graphic images)......The "upload" script is a mod of one of the ones at wakka or wikka (can't remember which)..... This script only allows 10 uploaded files with the users prefix in the upload directory (although you can change that easily), and checks the wikka_users database to see (a) how many files are allowed in total and (b) what number the user is at.

The changes in the wikka_users table are adding these two fields....
+-----------------------------------------------------------------------------------------------------------+
| wikka_users                                                                                               |
+-----------------------------------------------------------------------------------------------------------+
+-----------------+------------------+------+-----+-------------------------------------------------+-------+
| Field           | Type             | Null | Key | Default                                         | Extra |
+-----------------+------------------+------+-----+-------------------------------------------------+-------+
+ images_allowed  + smallint(4)      +      +     + 30                                              +       +
+ images_uploaded + int(6)           +      + PRI + 0                                               +       +
+-----------------+------------------+------+-----+-------------------------------------------------+-------+


The current max allowed image upload is "30"...set at the database level. When the images are uploaded to the directory the username is concatonated to the front of the filename. Admin has access to an image approval system (the first version of which was based on OTF Gallery) that allows you to preview and "approve" each image and will then copy the files to a directory that exists for each individual user and strip the user name from the front of the file. If you're interested in the gallery software for wikka let me know....you'd be on your own for modifying it to only show files with the username prefix cuz my php skills aren't good enough to do those changes.

<?php
$dst = '../../../approvalgallery/userdeletegallery/';
if(empty($owner)){ $username = $this->GetUserName();} else {$username = $owner;}
if(empty($owner)){ $username2 = $this->GetUserName();} else {$username2 = $owner;}
$username = strtolower($username);
$fl = substr($username,0,1);
$homelink = $this->config["base_url"].$this->MiniHref($method, $tag);

$imgstr = "graphicsgallery/".$fl."/".$username."/";
$tmbstr = "thumbnailgallery/".$fl."/".$username."/";

if(!empty($_REQUEST[action])){
            $file = $_REQUEST['file'];
            chdir($imgstr);
            unlink($file);
            chdir("../../../");
            chdir($tmbstr);
            unlink($file);
            chdir("../../../");
        }
///     if(!empty($_REQUEST[image])){
//          $file = $_REQUEST['file'];
//          echo "<div align=left><img src=".$imgstr.$file."></div>";
//      }

    $dir = opendir($imgstr);
echo "<b>$username2's Image Files: </b>";
    while ($file = readdir($dir)) {
        if ($file != '.' && $file != '..') {
                        $num++;
                 if ($this->HasAccess('write')) {
//              if ($this->IsAdmin()) {
                        $delete_link = "<a href=\"$homelink&action=delete&amp;file=$file&tmbnail=\" onmouseover=\"this.T_WIDTH=130;this.T_BGCOLOR='#FF3300';this.T_FONTCOLOR='#000000';this.T_FONTWEIGHT='bold';return escape('Delete this image file')\">x</a>";
//                      $delete_link = "<a href=\"".$this->href('files.xml',$this->GetPageTag(),'action=delete&amp;file='.urlencode($file))."\">x</a>";


                    } else {
                        $delete_link = "";
                }
// <a href='$homelink&image=show&file=$file' onmouseover=\"return escape('<img src='$imgstr'.'$file'>')\">{$file}</a>
                        print  "

                                        <tr>
                                          <td valign='top' align='center'>
                                                &nbsp;
                                                {$delete_link}
                                                 {$file}
                                                &nbsp;
                                          </td>
                                        </tr>

                                "
;
        }
    }
   - closedir($dir);

// below added by GMB
echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"./actions/wz_tooltip.js\"></script>";

        // print n/a if no files currently exist
        if (!$num)  print "<tr><td>&nbsp;</td><td colspan='3' align='center'><font color='gray' size='-1'><i>You have no image files yet!</i></font></td></tr>";
        else  print "<tr><td>&nbsp;</td></tr>";
?>


The action uses a javascript tool (in the actions directory on my system) that allows a "hover" window in bright red that shows that the "x" is to delete the files. The wz_tooltip.js allows "better" tooltips (in this case, more visible) & is available at http://www.walterzorn.com/tooltip/tooltip_e.htm as a free download.

Another recently developed graphic-oriented action I've developed for wikka is BannerMaker which allows the placement of coloured banners on pages.

"Erase History" Actions

When I'm developing pages I find I generate lots of "history" that I don't care to remain in the database. Or, as is sometimes the case, sometimes some of the actions I'm developing cause the "history" feature to crap out. Rather than just erasing the rows manually, I thought it might be easier to do it from a simple menu. Another way this is useful for me is that I might have users who write "inappropriate" information in the wiki (racist, sexist etc) and I'd like to be able to easily expunge the record for this (I know, I know, this is anti-wiki....but things are different when you're working at a publicly funded institution and providing a site for kids to use). One action automatically erases history every time the page loads (for the "flakey" actions I've developed that cause the history feature to blow up (the task manager we're working on, for instance)). The other code (see GmBowenAdminPageControlTool now) is to support an administrator being able to delete the history of a page by clicking on a button.

auto erasing of history.....has the potential to be a security risk. The admin should probably name the file something obscure, place it in the actions directory, and then enter the file name into the showpagecode.php and pagecode.php actions (so that the filename is not displayed when those actions are used).

<?
// code developed by GMBowen to allow automatically erasing the history of a given page
$thispage=$this->GetPageTag();
$sql = "DELETE FROM ".$this->config["table_prefix"]."pages WHERE tag='$thispage' AND latest='N'";
mysql_query($sql) or die("Unable to process query: " . mysql_error());
?>


ANOTHER approach is to have an Erase History feature included as part of the footer code (for Admins only)....(moved to GmBowenAdminPageControlTool and extended in functionality to include "page hiding" and page erasing)

Calendar Action

A useful little action is found at GmBowenCalendar....it's a calendar that you can embed in a wikipage....

Modified Mypages action --> menu

Much of what we do is designed to help students work collaboratively in teams. I modified the mypages action into one that students can use as a simple menu....which I've called mypagesmenu.php .... basically it just lists the pages you own horizontally (although you can designate not having a title AND specify a menu list for a specific user....for us the latter will allow a listing of pages owned by different members all on the same project by just listing the action multiple times with different owners). It's not anything that the DarTar's & Jason's and JavaWoman's of the world couldn't do....but nine months ago I couldn't have done it myself & so I'm posting it for the more "casual" wikka user that I used to be (and, the DT's etc are welcome to do any fixes that they see necessary {grin}). -- Mike

<?php /*dotmg modifications : contact m.randimbisoa@dotmg.net*/ ?>
<?php
//  modification by GMBowen of actions/mypages.php written by Carlo Zottmann for wakkawiki
// parameter title="no" or title="off"; can list pages for a specific person by using parameter owner="username"
$title = strtolower($title);
$username = $this->UserName();
if ($owner != '')
{
  $username=$owner;
}
if ($user = $this->GetUser())
{
    if ($title != 'off' && $title !='no')
    {
    print("<strong>Pages owned by $username:</strong>\n");
    }
    $my_pages_count = 0;

    if ($pages = $this->LoadAllPages())
    {
        foreach ($pages as $page)
        {
            //#dotmg [1 line modified]: added [0-9]+$ to regular expression
            if ($username == $page["owner"] && !preg_match("/^Comment[0-9]+$/", $page["tag"]))
            {
                print("[".$this->Link($page["tag"])."]"."\n");
               
                $my_pages_count++;
            }
        }
       
        if ($my_pages_count == 0)
        {
            print("<em>$username does not own any pages.</em>");
        }
    }
    else
    {
        print("<em>No pages found.</em>");
    }
}
else
{
    print("<em>You're not logged in, thus the list of your pages couldn't be retrieved.</em>");
}

?>

Language Translation

Hmmm....neat. I found that you can include two small actions that allow you to have your page translated using alta vista's SYSTRAN service. You can just include both in your actions directory. Kinda inelegant, but better than paying for your own translation service.

translateenglish.php
<hr>
<table>
<tr><strong><font size="-2">English Translation</font></strong></tr>
<tr><script language="JavaScript1.2" src="http://www.altavista.com/static/scripts/translate_engl.js"></script></tr>
<tr><font size="-2">Note that translation sometimes works better if you right-click the flag and open the translation in a new window.</font></tr>
</table>


translatefrench.php
<hr>
<table>
<tr><strong><font size="-2">Traduction Française</font></strong></tr>
<tr><script language="JavaScript1.2" src="http://www.altavista.com/static/scripts/translate_french.js"></script></tr>
<tr><font size="-2">Notez que la traduction semble mieux fonctionner si vous faites un clic droit sur le drapeau et ouvrez la traduction dans une nouvelle fenêtre.</font></tr>
</table>

(I used the translation tool to translate into the French in the second one. If it's incorrect, please feel free to fix it)
Um, okay, weird. This works fine on my version of wikka 1.0.2, but not at all on 1.1.5.3 ....anybody have any sense as to why?? I'd appreciate any insights. On further investigation, even if I go to http://babelfish.altavista.com/ and enter http://131.202.10.204/helpwiki/wikka.php?wakka=HomePage it won't translate the page, whereas if I enter http://wikka.jsnx.com/HomePage (which are both the same version of Wikka) it will translate that page. Since my using the feature that allows Jason to have the "shortform" of the web address is not an option for me (as far as I know...although I'm happy to be corrected on this), is there any solution?? [I chatted with the people at SYSTRAN who provide the engine and they say there's no reason that they know of that it shouldn't work]

Okay, hey, it works using a different "engine" for translation (google). I've put the following code into my footer.php file (and associated images in the images directory in the wiki root) and everything works just peachy. (it goes after line 44 after </div> and before <div class="smallprint">)

<?
// Added by GMB to provide language translation
echo "<a href='"."http://translate.google.com/translate?u=".$this->GetConfigValue("base_url").$this->MiniHref($method, $tag)."&show_comments=1&langpair=en%7Cfr&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"."' title=\"Translate Page to French from English.\"><IMG SRC=\"./images/frflag.gif\" BORDER=0></a>";
echo "<a href='"."http://translate.google.com/translate?u=".$this->GetConfigValue("base_url").$this->MiniHref($method, $tag)."&show_comments=1&langpair=fr%7Cen&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"."' title=\"Translate Page to English from French.\"><IMG SRC=\"./images/gb.png\" BORDER=0></a>";
?>


(Thanks to FlashChatWikifor evidence this was possible)

Show Code


Sometimes I want to know how the page creator did something in wikka code (like, how does Jason make the HomePage here so that there's that wizard lined up parallel with the text)...but the page isn't "open" for editing so I can't (logic being, that if users wanted to know they could note that in the comments and the page author could add the action eh). So, I hacked together this little action (it's kinda at the starting phase) so that it was possible for me to drop it in at the end of a page and let the reader see how the coding was done (my site is for kids remember....so "by example" will be better for many of them than a "how to" sheet....see what I mean at http://131.202.10.204/wiki/wakka.php?wakka=ExampleHomePage ). Another version (farther down) is available as a link so that the page code is visible (it requires the showpagecode.php handler code to be in the handler directory).

place showpagecode.php in the actions directory
<?php
// if there is any code you want to be ignored by this action
$ignorecode = Array ('/{{simpleshowcode}}/i', '/{{showpagecode}}/i');
$changeto = ' ';
?>
<TABLE BORDER=1 WIDTH="90%">
   <TR>
          <TD>
             <P>The wiki code which generated this page...</P>
          </TD>
   </TR>
   <TR>
          <TD BGCOLOR="#FFFFCC">
             <P>
<?php
$thisbody = preg_replace($ignorecode, $changeto, $this->page["body"]);
print(nl2br(htmlspecialchars($thisbody, ENT_QUOTES))); ?>
</P>
          </TD>
   </TR>
</TABLE>


(thanks to Jason who showed me a much much simpler way of accessing the body code....I gotta learn more about the functions etc in wikka)

Mike, the idea is intriguing: I proposed something in this direction in this draft for fetching online Wikka Documentation.
Basically, if a rawcontent method (identical to the current raw method, but with header and footer stripped) is available, you can get the source of the page by simply appending "/rawcontent" to the pagename (much as you append "/edit" to edit the page). -- DarTar
Ah, I see what your suggestion is now...and I can see for you guys how that would suit your purposes. From my perspective tho', that might need an ACLS feature then because there are some pages I'll code that I won't want them to see the code for....like, for instance, whatever I've called the action to automatically erase the history (see above).....I don't actually want them to know the name of that file because I don't want them being able to erase their own history....I've subsequently solved this (see below) by having the "action" call for that file removed from the code being displayed through a simple modification of Jason's ShowPageCodeHandler -- Mike

JsnX says: It's interesting to me above you say that "like, how does Jason make the HomePage here so that there's that wizard lined up parallel with the text". It's interesting because Hendrik Mans used to have a hotscripts.com voting dropdown on the Wakka homepage and I used to wonder how he did it. I never did find out how he did it....

So, I'm adding an handler to the standard Wikka distribution that does what you are looking for. See Mod042fShowPageCodeHandler :) -- JsnX (thanks Jason)

I've modified Jason's modification to ignore a couple of files...and to add a return link and a bit of a title (so it works more transparently with the action described below...).....now called showcode.php and placed in the handlers directory
<?php
if ($this->HasAccess("read") && $this->page) {
        // display raw page, slightly formatted for viewing
// if there is any code you want to be ignored by this action
$ignorecode = Array ('/{{nameoffiletoerasehistory}}/i', '/{{showpagecode}}/i');
$changeto = ' ';
$thisbody = preg_replace($ignorecode, $changeto, $this->page["body"]);
Echo "<strong>This is the wiki code that generated the original page....</strong></p>";
print(nl2br(htmlspecialchars($thisbody, ENT_QUOTES)));  
}
?>
<? $site_base = $this->GetConfigValue("base_url").$this->GetPageTag();?>
<P><small>[</small><A HREF="<? echo $site_base; ?>"><small><strong>Return To Original Page</strong></small></A><small>]</small></P>


And I wrote a small action (to go in the actions directory) that can be placed on a page to provide a link to call the code output (which I've called showpagecode.php)....
<? $site_base = $this->GetConfigValue("base_url").$this->GetPageTag();?>
<P><small>[</small><A HREF="<? echo $site_base."/showpagecode"; ?>"><small>ShowCode</small></A><small>]</small></P>

As per my remarks on WikkaDevelopment, I think a "search comments" feature needs to be returned to wikka. Until a formal re-working of this, I present the following solution.....
This code was used to replace the code in textsearch.php and provides a separate listing for the pages and the comments (in two different columns)...
<?php echo $this->FormOpen("", "", "GET") ?>
        <td>Search for:&nbsp;</td>
        <td><input name="phrase" size="35" value="<?php echo htmlspecialchars($_REQUEST["phrase"]) ?>" class="searchbox" /> <input type="submit" value="Search" class="btn" /></td>
<?php echo $this->FormClose();
?>
<table border="0" cellpadding="5" cellspacing="0" width="100%"><tr><td valign="top">
<?php
if ($phrase = $_REQUEST["phrase"])
{
    print("<br />");
    $results = $this->FullTextSearch($phrase);
    if ($results)
    {
        print("<strong>Search results for pages containing \"$phrase\":</strong><br /><br />\n");
        foreach ($results as $i => $page)
        {
            print(($i+1).". ".$this->Link($page["tag"])."<br />\n");
        }
        print("<BR>Not sure which page to choose?<BR>Try the <a href=\"".$this->href("", "TextSearchExpanded", "phrase=$phrase")."\">Expanded Text Search</a> which shows surrounding text.");
    }
    else
    {
        print("No pages contained the word(s) \"$phrase\". :-(");
    }
}

?>
</td><td valign="top"><img src="/icons/blank.png" alt=" " width="10" height="1"></td><td valign="top">
<?php
if ($phrase = $_REQUEST["phrase"])
{
    print("<br />");
    $results = $this->CommentTextSearch($phrase);
    if ($results)
    {
        print("<strong>Search results for comments containing \"$phrase\":</strong><br /><br />\n");
        foreach ($results as $i => $page_tag)
        {
$link = "<a href=".$this->GetConfigValue("base_url").$page_tag["page_tag"]."&show_comments=1#comments>".$page_tag["page_tag"]."</a>";
            print(($i+1).". ".$link."<br />\n");
        }
    }
    else
    {
        print("No comments contained the word(s) \"$phrase\". :-(");
    }
}

?>
</td></tr></table>

And the following function added to wakka.php (I added it right under the one for textsearch)[SEE NOTE BELOW]
    function CommentTextSearch($phrase)
    {
        $data = "";
        if ($this->CheckMySQLVersion(4,00,01))
        {   
            $data = $this->LoadAll("(select * from "
            .$this->config["table_prefix"]
            ."comments where page_tag like('%".mysql_escape_string($phrase)."%'))
                UNION (select * from "
.$this->config["table_prefix"]
                ."comments where match(page_tag, comment) against('".mysql_escape_string($phrase)."'))");
        }
        /* if no results perform a more general search */
        if (!$data)  {
                $data = $this->LoadAll("select * from "
                .$this->config["table_prefix"]
                ."comments where (page_tag like '%".mysql_escape_string($phrase)."%' or
                   comment like '%"
.mysql_escape_string($phrase)."%')
                   order by time DESC"
);
        }
       
        return($data);
    }

NOTE: On the server running MYSQL 3.23.56 this code works just fine. But on a more recent version of MYSQL (4.0.20) it crashes. To make it work there one must remove the "If" statement (and all code in it) that checks the MYSQL version. Doesn't make any sense to me since the same code is in the page text search code and work there, but at least it works searching comments if I take it out. Note that the code still needs work....if the search word appears in 3 comments, then the pagename is listed 3 times. I tried to figure out how to get a MYSQL filter ("distinct") take care of this, but had no luck.
Feel free to adapt and modify as you'd like.

Search for Pages Owned

Somebody, somewhere mentioned that they were interested in searching for pages owned by a particular user. I thought, why re-invent the whole wheel, and wrote some code that'll be part of the search page. It only shows results IF it's a user name that's entered (so, you'll see output for the presence in comments, in pages, and for page ownership with a single search).

The following is added at the BOTTOM of the textsearch.php file....
<?php
if (($phrase = $_REQUEST["phrase"]) && ($phrase = $this->LoadUser( $phrase )))
    {
$pageowner2 = $_REQUEST["phrase"];
$site_base = $this->GetConfigValue("base_url");
$count = 0;
$query = "SELECT tag,owner,latest FROM ".$this->config['table_prefix']."pages WHERE latest = 'Y' ORDER BY tag asc";
$result = mysql_query($query);
           echo "</p><strong>".$pageowner2." owns these pages.....</strong>";
$pageowner2 = strtolower($pageowner2);
            echo "<BR><TABLE width='200' border='0'>";
while($row=mysql_fetch_array($result)) {
        $pageowner = strtolower($row['owner']);
        if ($pageowner == $pageowner2){
        $count = ($count + 1);
        $urltag = $site_base.$row['tag'];
        echo "<TR BGCOLOR='#DDDDDD'><TD valign='top' ALIGN='center'>&nbsp;".$count."&nbsp;</TD>";
        echo "<TD ALIGN='left'>&nbsp;<A HREF=\"".$urltag."\">".$row['tag']."</a>&nbsp;</TD>";
        echo "</TR>";
        }
    }
echo "</table>";
            if ($count < 1)
            {
            echo "(oops, no pages yet)";
            }
}
?>


Simple Column Codes

You can make columns with three simple actions (I originally got these at wakkawiki). You place {{colstart}} at the start of the text you want in a column, {{colmiddle}} in the middle where you want the break (or you can have more than one of these), and {{colend}} at the end of the text. When you save, voila, 2 (or more) columns.

save as colstart.php in actions directory
<table border="0" cellpadding="5" cellspacing="10" width="100%"><tr><td valign="top">
replace cellspacing="0" by cellspacing="10" ...

save as colmid.php in actions directory
</td><td valign="top">
...and remove <td valign="top"><img src="/icons/blank.png" alt=" " width="10" height="1"></td>here - same effect, no silly blank image needed! (whoops....I'd taken that out elsewhere, forgot to here when I copied over) (Of course layout tables should be avoided, but if you must, do it cleanly!) --JavaWoman
thanks for the suggestions. Thought the code might help with the FormattingRules page. --GmBowen

save as colend.php in actions directory
</td></tr></table>

Database Status Action

(see here for example.) This action is modified from one by Charles Népote at wikini which is part of an administration interface. Simply, it shows you each table, the # of entries, and the total size of the table. Probably inessential, but interesting to monitor what's going on.
<?php
// dbstatus.php
// originally developed by Charles Népote (charles@nepote.org) for wikini
// Version 0.1 du 10/09/2004
// License GPL.
// slightly modified by GMBowen for wikka wiki. (if you want the action usable by only admin,
// remove the double slashes on line 17 & 46) Use: {{dbstatus [details="yes"]}}

/*
Si vous souhaitez avoir un tableau joliment encadré il faut ajouter
les styles suivant à wakka.css

.simple_table { border-collapse: collapse; }
.simple_table th, td { border: 1px solid #666; padding: 0.5em; }
*/

//if ($this->IsAdmin()) {

$status = $this->LoadAll('SHOW TABLE STATUS LIKE \''.$this->config["table_prefix"].'%\'');

echo    "<strong>Status of Wiki Database....</strong><br><small>(if you want to see <strong>all</strong> the details, use {{dbstatus details=\"yes\"}})</small>\n",
    "<table class=\"simple_table\">\n",
    "<tr>\n",
    "<th>Name</th>\n",
    "<th># Records</th>\n",
    "<th>Size</th>\n",
    "</tr>\n";

foreach ($status as $table)
{
    echo
    "<tr>\n",
    "<td>", $table['Name'], "</td>\n",
    "<td>", $table['Rows'], "</td>\n",
    "<td>", round($table['Data_length']/1024, 2), " Ko</td>\n",
    "</tr>\n";
}

echo    "</table>\n";

// Details
if ($details=="yes"){
echo "<pre>";
print_r ($status);
echo "</pre>";}
//}
?>

Code for detecting InstantMessaging Online

the following was obtained from comawiki where it was put up, I think, by Michael Hartmann. It allows you to enter the username for ICQ, AIM & MSN to see if that user is on-line. I think they'll be easy to turn into actions with parameters for the name & ID of individuals....and will be useful for determining if other team members are on-line.

""<A HREF="ymsgr:sendIM?ibukimiha">
<IMG SRC="http://www.mplampla.com:800/yahoo/ibukimiha"
align="absmiddle" border="0" ALT="Yahoo Online Status Indicator"
onerror="this.onerror=null;this.src='http://www.mplampla.com:800/image/yahoounknown.gif';"></A>
<A HREF="http://www.mplampla.com:800/message/icq/317419095">
<IMG SRC="http://www.mplampla.com:800/icq/317419095"
align="absmiddle" border="0" ALT="ICQ Online Status Indicator"
onerror="this.onerror=null;this.src='http://www.mplampla.com:800/image/icqunknown.gif';"></A>
<A HREF="aim:goim?screenname=IbukiMicha">
<IMG SRC="http://www.mplampla.com:800/aim/IbukiMicha"
align="absmiddle" border="0" ALT="AIM Online Status Indicator"
onerror="this.onerror=null;this.src='http://www.mplampla.com:800/image/aimunknown.gif';"></A> ""
http://web.icq.com/whitepages/online?icq=317419095&img=3

Other Mods in development

Many current mods: An action in development is the interactive table action which is a "big" one for our interests...it is like a *very* simple spreadsheet tool -- an interactive table actually -- that will do sum, count, frequency & average on the column entries & sum, count & average on selectable rows for multiple sheets connected to one page (they're owned "on" a specific page) . We are very close to release. It also has a separate "permissions" system so that the owner of the spreadsheets can assign shared editing rights to other users. It also has associated actions including { {myspreadsheets} } (to list pages with associated spreadsheets for any user), { {spreadusermanagement} } for the logged in user to easily add and remove users to their multiple sheets/pages, { {inserttable} } which allows any sheet to be inserted (w/o editing ability) on any page by any body. If a user doesn't have permission they'll still be able to "browse" the sheets on the page the { {spreadsheet} } action is on but not edit them. In addition, there will be an "easy" version { {ezspreadsheet} } to help scaffold new users towards using the full package. Look for the release in the next 3 weeks (my programmer is taking a couple of weeks off).


Tools for (semi) structured interactions: (1) I've developed a flash-based "chat" that embeds on wiki pages (vchat modded from flatfile to database). I can't distribute it, because I'm not sure the licensing on the site I obtained it from allows it (although they provided all the source code and everything so it can be modded). It works pretty well, and I've written two associated actions ({ {mychats} } and { {listchat page="name"} }) which allow you to see what chats you own (whether the action is on a page or not) and the history of what chats has occured (unlike other chats like MSN, all of the chats are kept in the database so it is recoverable). An advantage of this chat system is it allows kids to communicate with each other w/o being exposed to adult-oriented spam (like happens with email). (2) The wiki based internal messaging system is complete (although I already have "upgrade" ideas) and is posted at WikkaMail. It is complemented by (3) a wiki blog tool and (4) a wiki forum tool that allows you to set up discussion forums (using individual wiki pages for each topic). Altogether these constitute a communication toolset that facilitates different modes of communication and different personal communication styles (as well as for different types of projects).


One reason for the development of these tools is to make the wiki a communication portal. In many uses a site will have a blog, and a forum area, and a wiki area as an add-on. Users have to register into each tool. Now, with wikka, you can use wikka as the central tool and build the other tools into it. In fact, the users get to determine when/how/if these tools are used. In other words, the users have more discretionary control over how they construct the site.


Also developed is graphing software that works within wikka (see GraphMaker).....also see (here and here). The advantage of graphmaker is you don't have to rely on uploading images. That program will be further refined so that it can re-load the graph code and re-edit it. I'm still working on getting it to save the graphic to the hard drive. A "pagewatches" action is more-or-less finished....it allows you to keep a list of pages that you're looking to see if changes have been made on. And what's my dream regarding the wiki?? A rich text editor choice with wysiwyg (in addition to wikiedit)...it'll make it more user friendly for kids, but methinks that must be a hard thing to accomplish (since nobody has progressed with the idea much).


I'm going to use most of these for teaching purposes (such as having students keep an on-line journal of events) with students at various grade levels. Currently, students in a post-graduate science methods course are using the wiki to manage & keep track of the work they are doing on a science/technology project.

Other Recent Code Releases/Submissions


[Show Code]

CategoryUsers
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki