From: Reini U. <ru...@x-...> - 2001-08-04 11:30:07
|
I'll start now to merge my AcadWiki enhancements into CVS. I need the latest improvements on VersionControl and UserAuth. Good work! I'll try: BetterIndex, RandomPage, OrphanPages, WantedPages, improved BackLink, SeparateListOutput, MagicPages, SplitWordsInTitle, BetterRecentChanges, HowToBlockRobots, optional PageChangeNotification to the admin only, ImageLinks (see http://phpwiki.sourceforge.net/phpwiki/index.php?full=CategoryNextWikiSuggestions) maybe: locale stuff (this is awful, I just broke my german wiki db after having recompiled to php-4.0.6) maybe: localized WikiNameRegexp with TrailingNumbers (optionally) maybe: multiline code, my ugly hacks for <code> .. </code>, <verbatim> .. </verbatim>, and <nowiki> .. </nowiki> RandomPage: ----------- how to workaround this mysql 3.23 feature which doesn't work in 3.22? select pagename from wiki order by rand() limit 1; the rand() function is defined in 3.22 also, but I wanted to avoid subselects. attempt 1: $res = mysql_query("select pagename from $WikiPageStore", $dbi["dbc"]); srand((double)microtime()*1000000); $rows = mysql_num_rows($res); $page = mysql_result($res,rand(0,$rows-1)); how can one avoid to checkout all pages by using mysql the rand() function? LIMIT doesn't accept ROUND($pagecount*rand()),1 as argument. mysql v3.22.25 doesn't accept this syntax neither: set @i:=round(200*rand()); oh bad. at least attempt 1 is cross-db compatible. CharCount: ---------- A new user requested feature: display the number of chars in pageinfo, maybe words also. we need this to produce a community text for a local internet handbook, which must have 10,000 chars. is this okay to put it into the pageinfo field. I know that currently there are only static db fields, but the user doesn't care. some convenience figures wouldn't hurt imho on the info page. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |