I was working on an adaptation of the glossaire module a while back, which didn't get to the point of an official release. However, I'm looking forward to checking out your next release of the wordbook.
I'm not sure if you or others are interested, but here's some code which will allow for automatic cross-referencing of terms. Basically if any other terms in the db appear within the currently-viewed entry, each will be hyperlinked to their corresponding entries.
I've just copied the code from my file, so it'll have to be adapted to fit within your module.
// link up other terms in db
list($numterms) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("lexicon")));
$termdata = $xoopsDB->query("SELECT id, letter, term, definition, post, image, submit_by, submit_date, use_wiki FROM ".$xoopsDB->prefix("lexicon"));
while ( list($id, $letter, $term, $definition, $post, $image, $submit_by, $submit_date, $use_wiki) = $xoopsDB->fetchRow($termdata) ) {
if ($term != $glo_term) { // don't link term in its own definition
$default_term = $term;
// singular
$search_term = "/b$default_termb/i";
$replace_term = ".XOOPS_URL."/modules/lexicon/view.php?term_id=".$id."'>".$term."";
$glo_definition = preg_replace($search_term, $replace_term, $glo_definition);
// plural
$term = $default_term."s";
$search_term = "/b$termb/i";
$replace_term = ".XOOPS_URL."/modules/lexicon/view.php?term_id=".$id."'>".$term."";
$glo_definition = preg_replace($search_term, $replace_term, $glo_definition);
// plural with e
$term = $default_term."es";
$search_term = "/b$termb/i";
$replace_term = ".XOOPS_URL."/modules/lexicon/view.php?term_id=".$id."'>".$term."";
$glo_definition = preg_replace($search_term, $replace_term, $glo_definition);
}
}
Brad