Revision [1910]

This is an old revision of GmBowen made by GmBowen on 2004-10-18 18:30:49.

 

I'm a university prof who is modifying parts of wikka so that it can be used by high school kids to collaborate on school project work and writing. 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. I'm not a programmer myself, although I do understand lots about programming, and so I've hired a recent grad from my university to implement some features for me that I think my target audience for using the wiki will need. The wiki is only one of the central tools they'll be using, and has to coordinate with numerous other tools (such as a graph drawing and an on-line drawing tool).

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.....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".

Mods in Development

Two current mods in development...a "chat" that as an embedded flash chat (vchat modded from flatfile to database)....altho' it's difficult to pass to someone else cuz the fla file needs to be edited for each website (we've not been able to solve the absolute/relative path statement issue).....and the interactive table mod (kinda a mini-spreadsheet).

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)....I've made it available at http://131.202.167.33/wiki/actions/uploadimage.phps .... to use it you will of course have to change phps to php. 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. Currently, the changes in wikka_users is....

+-----------------------------------------------------------------------------------------------------------+
| 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. I have a modified version of 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 (this is from a modification of a registration script extraneous to Wikka that makes a directory for each registrant). Or, if you're not interested in doing that, I have a modified version of the "gallery" action available for wikka that you could change so it would just shows thumbnails of images of the logged in user and allows erasing images...currently it just goes to the users personal directory, but you could change that (my programming guy modded this so it generates thumbnails using GD....the original version of the gallery required you to generate the thumbnails yourself)[Code Available Here]. Hope this helps. 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.

"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 have a couple of actions. The first one is one that can be embedded on the page and only erases history if an administrator clicks on the "erase history" button (otherwise it shows text saying only an administrator can use the action). Another way this is useful for me is that I might have kids 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). The second 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)). I think the second is a bit of a "security risk" wrt wiki users using it, so I'd suggest calling it something that is non-obvious and embedding it only on pages that you don't care to have history for and that nobody else has write-access to.
<?
// code developed by GMBowen & JGoguen to allow admins to erase history on a given page
if ($this->IsAdmin())
{
    echo '<table><tr><td><form action="" method="post">
    <input type="submit" name="erasehistory" value="Erase History of Page"></td></table> <br /></form>'
;
}
if ($_POST['erasehistory'] && $this->IsAdmin())
{
$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());
}
elseif ($_POST['erasehistory'] && !$this->IsAdmin())
{
echo "<i>History can only be erased by an administrator.</i>";
}
?>

auto erasing of history.....
<?
// 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());
?>

Other Mods in development

The programmer is working on some other issues for me right now (other mods for wakka.....a *very* simple spreadsheet-like interactive table tool actually....we're currently having a problem with the foreach() statement which is why we've not released it yet). Since my system is set up to provide "personal" (user name based) image directories, we've developed a modified version of the wikka-based gallery tool so that kids can have on-line presentations of their pictures (it'll only come from their personal file areas, not on a per-page basis)). I'll post the other things my programmer is working on here when completed. Also working on a simple scheduler partly based on GmBowenCalendar, but having problems with writing to the database consistently....but will be useful for doing some PIM functions, and collaborating on timetables -- Mike

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 menu....which I've called mypagesmenu.php .... basically it just lists the pages you own in a different way (although you can designate not having a title AND 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 either & so I'm posting it for the more "casual" wikka user (and, the DT's etc are welcome to do any fixes that they see necessary). -- 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>");
}

?>


Other Soon-To-Be Released Actions

We've "mostly" finished another action for "pagewatches".....so that you can keep a list of pages that you're looking to see if changes have been made on. The code for the action and the table info for it will be posted on Monday/Tuesday next.....
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki