3 if (!defined('AT_INCLUDE_PATH')) { exit; }
6 * Free form PHP can appear here to retreive current information
7 * from the module, or a text description of the module where there is
8 * not current information
10 require('mw_connect.php');
13 $link_limit = 3; // Number of links to be displayed on "detail view" box
15 $sql = "SELECT P.page_title, R.rev_timestamp FROM ".MW_DB_PREFIX."page P, ".MW_DB_PREFIX."revision R ORDER BY R.rev_timestamp DESC LIMIT $link_limit";
17 // $sql = "SELECT hello_world_id, value FROM ".TABLE_PREFIX."hello_world WHERE course_id=".$_SESSION[course_id].
18 // " ORDER BY value LIMIT $link_limit";
19 $result = mysql_query($sql, $db_mw);
21 if (mysql_num_rows($result) > 0) {
22 while ($row = mysql_fetch_assoc($result)) {
24 * SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY are defined in include/lib/constance.lib.inc
25 * SUBLINK_TEXT_LEN determins the maxium length of the string to be displayed on "detail view" box.
27 $list[] = '<a href="'.AT_BASE_HREF.url_rewrite('mods/mediawiki/index.php?p='.$row['page_title']).'"'.
28 (strlen($row['page_title']) > SUBLINK_TEXT_LEN ? ' title="'.$row['page_title'].'"' : '') .'>'.
29 validate_length($row['page_title'], SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';