]> git.mjollnir.org Git - moodle.git/commitdiff
Now glossaries can produce RSS feeds too !!
authorstronk7 <stronk7>
Sun, 9 May 2004 22:20:05 +0000 (22:20 +0000)
committerstronk7 <stronk7>
Sun, 9 May 2004 22:20:05 +0000 (22:20 +0000)
Some strings (RSS related) has been moved from forum.php to moodle.php
to avoid suplicating them once per module.
It seems to work fine, please test...:-)

17 files changed:
lang/en/forum.php
lang/en/glossary.php
lang/en/help/glossary/rssarticles.html [new file with mode: 0644]
lang/en/help/glossary/rsstype.html [new file with mode: 0644]
lang/en/moodle.php
mod/forum/config.html
mod/forum/mod.html
mod/glossary/config.html
mod/glossary/db/mysql.php
mod/glossary/db/mysql.sql
mod/glossary/db/oci8po.sql
mod/glossary/db/postgres7.php
mod/glossary/db/postgres7.sql
mod/glossary/mod.html
mod/glossary/rsslib.php [new file with mode: 0644]
mod/glossary/version.php
mod/glossary/view.php

index d12f9826a0f23466c0b7757edd9f7b3ea38b0af1..3a7985223d590b6f17a4b74195d18fa93c21ac52 100644 (file)
@@ -114,8 +114,6 @@ $string['reply'] = 'Reply';
 $string['replyforum'] = 'Reply to forum';
 $string['rsssubscriberssdiscussions'] = 'Display the RSS feed for \'$a\' discussions';
 $string['rsssubscriberssposts'] = 'Display the RSS feed for \'$a\' posts';
-$string['rsstype'] = "RSS feed for this forum";
-$string['rssarticles'] = "Number of RSS recent articles";
 $string['search'] = 'Search';
 $string['searchforums'] = 'Search forums';
 $string['searcholderposts'] = 'Search older posts...';
index 2913907970b35edc1f693bfaaf613f3028080c0c..da2b2809b70f6c51f0d2f914dfdecdcfaa2585b3 100644 (file)
@@ -49,6 +49,7 @@ $string['commentson'] = 'Comments on';
 $string['commentupdated'] = 'The comment has been updated.';
 $string['concept'] = 'Concept';
 $string['concepts'] = 'Concepts';
+$string['configenablerssfeeds'] = 'This switch will enable the possibility of RSS feeds for all glosaries.  You will still need to turn feeds on manually in the settings for each glossary.';
 $string['currentglossary'] = 'Current glossary';
 $string['dateview'] = 'Browse by date';
 $string['defaultapproval'] = 'Default approval status';
@@ -135,6 +136,7 @@ $string['ratingsuse'] = 'Use ratings';
 $string['ratingtime'] = 'Restrict ratings to entries with dates in this range:';
 $string['rejectedentries'] = 'Rejected entries';
 $string['rejectionrpt'] = 'Rejection Report';
+$string['rsssubscriberss'] = 'Display the RSS feed for \'$a\' concepts';
 $string['searchindefinition'] = 'Search full text';
 $string['secondaryglossary'] = 'Secondary glossary';
 $string['sendinratings'] = 'Send in my latest ratings';
diff --git a/lang/en/help/glossary/rssarticles.html b/lang/en/help/glossary/rssarticles.html
new file mode 100644 (file)
index 0000000..d3f33f6
--- /dev/null
@@ -0,0 +1,8 @@
+<P ALIGN=CENTER><B>Number of RSS recent articles</B></P>
+
+<P>This option allows you to select the number of articles
+   to include in the RSS Feed.
+
+<P>A number between 5 and 20 should be appropiate for
+   most glossaries. Increase it if the glossary is very used.
+
diff --git a/lang/en/help/glossary/rsstype.html b/lang/en/help/glossary/rsstype.html
new file mode 100644 (file)
index 0000000..0256a2f
--- /dev/null
@@ -0,0 +1,14 @@
+<P ALIGN=CENTER><B>RSS feed for this glossary</B></P>
+
+<P>This option allows you to enable RSS feeds in this glossary.
+
+<P>You can select between two types of feeds:
+
+<UL>
+<LI><B>With author:</B> Using this, generated feeds will include
+       the name of the autor in every article.
+
+<LI><B>Without author:</B> Using this, generated feeds won't include
+       the name of the autor in every article.
+</UL>
+
index d2f8bbf302c26f57f01f52e100d96686c20f744b..b148227b45195f85181fb6ed8ba4e1e7792dbe9a 100644 (file)
@@ -142,6 +142,7 @@ $string['configcountry'] = 'If you set a country here, then this country will be
 $string['configdebug'] = 'If you turn this on, then PHP\'s error_reporting will be increased so that more warnings are printed.  This is only useful for developers.';
 $string['configdeleteunconfirmed'] = 'If you are using email authentication, this is the period within which a response will be accepted from users.  After this period, old unconfirmed accounts are deleted.';
 $string['configenablerssfeeds'] = 'This switch will enable RSS feeds from across the site.  To actually see any change you will need to enable RSS feeds in the individual modules too - go to the Modules settings under Admin Configuration.';
+$string['configenablerssfeedsdisabled'] = ' It is not available because RSS feeds are disabled in all the Site. To enable them, go to the Variables settings under Admin Configuration.';
 $string['configerrorlevel'] = 'Choose the amount of PHP warnings that you want to be displayed.  Normal is usually the best choice.';
 $string['configfilteruploadedfiles'] = 'Enabling this setting will cause Moodle to process all uploaded HTML and text files with the filters before displaying them.';
 $string['configforcelogin'] = 'Normally, the front page of the site and the course listings (but not courses) can be read by people without logging in to the site.  If you want to force people to log in before they do ANYTHING on the site, then you should enable this setting.';
@@ -756,6 +757,8 @@ $string['restoreto'] = 'Restore to';
 $string['returningtosite'] = 'Returning to this web site?';
 $string['revert'] = 'Revert';
 $string['role'] = 'Role';
+$string['rsstype'] = "RSS feed for this activity";
+$string['rssarticles'] = "Number of RSS recent articles";
 $string['savechanges'] = 'Save changes';
 $string['saveto'] = 'Save to';
 $string['scale'] = 'Scale';
index 7b44f470d1aefb41f511760b95f3d96fcc73f844..783cabe9cd05838c32819b91448838bb9b854c13 100644 (file)
@@ -67,7 +67,7 @@
     <?php 
         print_string("configenablerssfeeds","forum");
         if ($CFG->enablerssfeeds == 0) {
-            print_string("configenablerssfeedsdisabled","forum");
+            print_string("configenablerssfeedsdisabled");
         }
     ?>
     </td>
index 18d4df98b791e4442ce2de9ddbccf745f2666534..e7e7d7d9e292e32bef947c98612097aa688d5659 100644 (file)
     //Only show rss parameters if rss is activated at site and forum levels  
     if ($CFG->enablerssfeeds && $CFG->forum_enablerssfeeds) {
         echo "<tr valign=top>";
-        echo "<td align=right><p><b>".get_string("rsstype", "forum")."</b></p></td>";
+        echo "<td align=right><p><b>".get_string("rsstype")."</b></p></td>";
         echo "<td>";
         unset($choices);
         $choices[0] = get_string("none");
         $choices[1] = get_string("discussions", "forum");
         $choices[2] = get_string("posts", "forum");
         choose_from_menu ($choices, "rsstype", $form->rsstype, "");
-        helpbutton("rsstype", get_string("rsstype", "forum"), "forum");
+        helpbutton("rsstype", get_string("rsstype"), "forum");
         echo "</td>";
         echo "</tr>";
 
         echo "<tr valign=top>";
-        echo "<td align=right><p><b>".get_string("rssarticles", "forum")."</b></p></td>";
+        echo "<td align=right><p><b>".get_string("rssarticles")."</b></p></td>";
         echo "<td>";
         unset($choices);
         $choices[0] = "0";
         $choices[40] = "40";
         $choices[50] = "50";
         choose_from_menu ($choices, "rssarticles", $form->rssarticles, "");
-        helpbutton("rssarticles", get_string("rssarticles", "forum"), "forum");
+        helpbutton("rssarticles", get_string("rssarticles"), "forum");
         echo "</td>";
         echo "</tr>";
     }
index 949b58e1ac4f3decab36a143840c646f76b16671..73f949e01a49f305991d5d1b26b9da1a575fa015 100644 (file)
 
        </td>
 </tr>
+<tr valign=top>
+        <td align=right><p>glossary_enablerssfeeds:</td>
+        <td>
+    <?php
+        if ($CFG->enablerssfeeds == 0) {
+            print_string("no");
+        } else {
+            unset($options);
+            $options[0] = get_string("no");
+            $options[1] = get_string("yes");
+
+            choose_from_menu ($options, "glossary_enablerssfeeds", $CFG->glossary_enablerssfeeds, "", "", "");
+        }
+    ?>
+    </td>
+    <td>
+    <?php
+        print_string("configenablerssfeeds","glossary");
+        if ($CFG->enablerssfeeds == 0) {
+            print_string("configenablerssfeedsdisabled");
+        }
+    ?>
+    </td>
+</tr>
 <tr>
     <td colspan=3 align=center>
        <input type="submit" value="<?php print_string("savechanges") ?>"></td>
index 7e1c629b9a00e2b7f412251411a4eb68b0808fca..00eaeabb0611d7e1206dc18ec0f166a423954c65 100644 (file)
@@ -249,6 +249,12 @@ function glossary_upgrade($oldversion) {
             set_config("textfilters", $CFG->textfilters);
         }
     }
+
+  if ($oldversion < 2004050900) {
+      table_column("glossary","","rsstype","tinyint","2", "unsigned", "0", "", "entbypage");
+      table_column("glossary","","rssarticles","tinyint","2", "unsigned", "0", "", "rsstype");
+      set_config("glossary_enablerssfeeds",0);
+  }
     
   return true;
 }
index cf11269917bdc66242d5a6af3b61a08e98efa6b1..260d4e66e42a79eeb5920bd4d88c68d8ea9c76a9 100644 (file)
@@ -25,10 +25,12 @@ CREATE TABLE prefix_glossary (
      defaultapproval tinyint(2) unsigned NOT NULL default '1',
      globalglossary tinyint(2) unsigned NOT NULL default '0',
      entbypage tinyint(3) unsigned NOT NULL default '10',
-        assessed int(10) unsigned NOT NULL default '0',
-        assesstimestart int(10) unsigned NOT NULL default '0',
-        assesstimefinish int(10) unsigned NOT NULL default '0',
-        scale int(10) NOT NULL default '0',
+     rsstype tinyint(2) unsigned NOT NULL default '0',
+     rssarticles tinyint(2) unsigned NOT NULL default '0',
+     assessed int(10) unsigned NOT NULL default '0',
+     assesstimestart int(10) unsigned NOT NULL default '0',
+     assesstimefinish int(10) unsigned NOT NULL default '0',
+     scale int(10) NOT NULL default '0',
      timecreated int(10) unsigned NOT NULL default '0',
      timemodified int(10) unsigned NOT NULL default '0',
      PRIMARY KEY  (id)
index d18e06be51124c605af195c175894d82944761c9..092dadd9b3c8dd50727df0d425220b2e9569586c 100755 (executable)
@@ -21,6 +21,8 @@ CREATE TABLE prefix_glossary (
   showspecial number(2) default '1' not null,
   showall number(2) default '1' not null,
   showalphabet number(2) default '1' not null,
+  rsstype number(2) default '0' NOT NULL,
+  rssarticles number(2) default '0' NOT NULL,
   timecreated number(10) default '0' not null,
   timemodified number(10) default '0' not null
 );
index 15b2adaccc9920585581fc594e2a77c2342d95d9..76974f0ac5a167076312fd69bcc95d19a06b91da 100644 (file)
@@ -13,6 +13,12 @@ function glossary_upgrade($oldversion) {
         }
     }
 
+  if ($oldversion < 2004050900) {
+      table_column("glossary","","rsstype","integer","2", "unsigned", "0", "", "entbypage");
+      table_column("glossary","","rssarticles","integer","2", "unsigned", "0", "", "rsstype");
+      set_config("glossary_enablerssfeeds",0);
+  }
+
     return true;
 }
 
index 824d5d06cf0c61c1484de4a333e58cff4300fdda..a6e6f9788ec52c9d1b25dc1273b14ed72aaaa784 100644 (file)
@@ -25,10 +25,12 @@ CREATE TABLE prefix_glossary (
      defaultapproval int2 NOT NULL default '1',
      globalglossary int2 NOT NULL default '0',
      entbypage int NOT NULL default '10',
-        assessed int4 NOT NULL default '0',
-        assesstimestart int4 NOT NULL default '0',
-        assesstimefinish int4 NOT NULL default '0',
-        scale int4 NOT NULL default '0',
+     rsstype integer NOT NULL default '0',
+     rssarticles integer NOT NULL default '0',
+     assessed int4 NOT NULL default '0',
+     assesstimestart int4 NOT NULL default '0',
+     assesstimefinish int4 NOT NULL default '0',
+     scale int4 NOT NULL default '0',
      timecreated int4 NOT NULL default '0',
      timemodified int4 NOT NULL default '0',
      PRIMARY KEY  (id)
index 6cf3cafd1faf096a98c90bf5636cf7471da930bb..c55aa71398fb409cc78dbf26c344cb410e6b39f7 100644 (file)
@@ -46,6 +46,12 @@ if (!isset($form->showalphabet)) {
 if (!isset($form->showspecial)) {
     $form->showspecial = 1;
 }
+    if (!isset($form->rsstype)) {
+        $form->rsstype = 0;
+    }
+    if (!isset($form->rssarticles)) {
+        $form->rssarticles = 0;
+    }
 ?>
 <FORM name="form" method="post" action="<?=$ME ?>">
 <CENTER>
@@ -322,6 +328,44 @@ if (!$mainglossary or $mainglossary->id == $form->instance ) {
   </select> <?php helpbutton("shows", get_string("showall", "glossary"), "glossary") ?>
     </TD>
 </TR>
+<?php
+    //Only show rss parameters if rss is activated at site and glossary levels
+    if ($CFG->enablerssfeeds && $CFG->glossary_enablerssfeeds) {
+        echo "<tr valign=top>";
+        echo "<td align=right><p><b>".get_string("rsstype")."</b></p></td>";
+        echo "<td>";
+        unset($choices);
+        $choices[0] = get_string("none");
+        $choices[1] = get_string("withauthor", "glossary");
+        $choices[2] = get_string("withoutauthor", "glossary");
+        choose_from_menu ($choices, "rsstype", $form->rsstype, "");
+        helpbutton("rsstype", get_string("rsstype"), "glossary");
+        echo "</td>";
+        echo "</tr>";
+
+        echo "<tr valign=top>";
+        echo "<td align=right><p><b>".get_string("rssarticles")."</b></p></td>";
+        echo "<td>";
+        unset($choices);
+        $choices[0] = "0";
+        $choices[1] = "1";
+        $choices[2] = "2";
+        $choices[3] = "3";
+        $choices[4] = "4";
+        $choices[5] = "5";
+        $choices[10] = "10";
+        $choices[15] = "15";
+        $choices[20] = "20";
+        $choices[25] = "25";
+        $choices[30] = "30";
+        $choices[40] = "40";
+        $choices[50] = "50";
+        choose_from_menu ($choices, "rssarticles", $form->rssarticles, "");
+        helpbutton("rssarticles", get_string("rssarticles"), "glossary");
+        echo "</td>";
+        echo "</tr>";
+    }
+?>
 <tr>
     <td align=right valign=top><p><b><?php print_string("allowratings", "glossary") ?>:</b></p></td>
     <td>
diff --git a/mod/glossary/rsslib.php b/mod/glossary/rsslib.php
new file mode 100644 (file)
index 0000000..08bc032
--- /dev/null
@@ -0,0 +1,209 @@
+<?PHP  // $Id$
+    //This file adds support to rss feeds generation
+
+    //This function is the main entry point to glossary
+    //rss feeds generation. Foreach site glossary with rss enabled
+    //build one XML rss structure.
+    function glossary_rss_feeds() {
+
+        global $CFG;
+
+        $status = true;
+
+        //Check CFG->enablerssfeeds
+        if (empty($CFG->enablerssfeeds)) {
+            //Some debug...
+            if ($CFG->debug > 7) {
+                echo "DISABLED (admin variables)";
+            }
+        //Check CFG->glossary_enablerssfeeds
+        } else if (empty($CFG->glossary_enablerssfeeds)) {
+            //Some debug...
+            if ($CFG->debug > 7) {
+                echo "DISABLED (module configuration)";
+            }
+        //It's working so we start...
+        } else {
+            //Iterate over all glossaries
+            if ($glossaries = get_records("glossary")) {
+                foreach ($glossaries as $glossary) {
+                    if (!empty($glossary->rsstype) && !empty($glossary->rssarticles) && $status) {
+                        //Some debug...
+                        if ($CFG->debug > 7) {
+                            echo "ID: $glossary->id->";
+                        }
+                        //Get the XML contents
+                        $result = glossary_rss_feed($glossary);
+                        //Save the XML contents to file
+                        if (!empty($result)) {
+                            $status = rss_save_file("glossary",$glossary,$result);
+                        }
+                        //Some debug...
+                        if ($CFG->debug > 7) {
+                            if (empty($result)) {
+                                echo "(empty) ";
+                            } else {
+                                if (!empty($status)) {
+                                    echo "OK ";
+                                } else {
+                                    echo "FAIL ";
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        return $status;
+    }
+
+    //This function return the XML rss contents about the glossary record passed as parameter
+    //It returns false if something is wrong
+    function glossary_rss_feed($glossary) {
+
+        global $CFG;
+
+        $status = true;
+
+        //Check CFG->enablerssfeeds
+        if (empty($CFG->enablerssfeeds)) {
+            //Some debug...
+            if ($CFG->debug > 7) {
+                echo "DISABLED (admin variables)"; 
+            }           
+        //Check CFG->glossary_enablerssfeeds
+        } else if (empty($CFG->glossary_enablerssfeeds)) {
+            //Some debug... 
+            if ($CFG->debug > 7) {
+                echo "DISABLED (module configuration)";
+            }           
+        //It's working so we start...
+        } else {
+            //Check the glossary has rss activated
+            if (!empty($glossary->rsstype) && !empty($glossary->rssarticles)) {
+                //Depending of the glossary->rsstype, we are going to execute, different sqls
+                if ($glossary->rsstype == 1) {    //With author RSS
+                    $items = glossary_rss_feed_withauthor($glossary);
+                } else {                //Without author RSS
+                    $items = glossary_rss_feed_withoutauthor($glossary);
+     
+                }
+                //Now, if items, we begin building the structure
+                if (!empty($items)) {
+                    //First all rss feeds common headers
+                    $header = rss_standard_header($glossary->name,
+                                                  $CFG->wwwroot."/mod/glossary/view.php?f=".$glossary->id,
+                                                  $glossary->intro);
+                    //Now all the rss items
+                    if (!empty($header)) {
+                        $articles = rss_add_items($items);
+                    }
+                    //Now all rss feeds common footers
+                    if (!empty($header) && !empty($articles)) {
+                        $footer = rss_standard_footer();
+                    }
+                    //Now, if everything is ok, concatenate it
+                    if (!empty($header) && !empty($articles) && !empty($footer)) {
+                        $status = $header.$articles.$footer;
+                    } else {
+                        $status = false;
+                    } 
+                } else {
+                    $status = false;
+                }
+            }
+        }
+        return $status;
+    }
+
+    //This function returns "items" record array to be used to build the rss feed
+    //for a Type=with author glossary
+    function glossary_rss_feed_withauthor($glossary) {
+
+        global $CFG;
+
+        $items = array();
+
+        if ($recs = get_records_sql ("SELECT e.id entryid, 
+                                             e.concept entryconcept, 
+                                             e.definition entrydefinition, 
+                                             e.format entryformat, 
+                                             e.timecreated entrytimecreated, 
+                                             u.id userid, 
+                                             u.firstname userfirstname,
+                                             u.lastname userlastname
+                                      FROM {$CFG->prefix}glossary_entries e,
+                                           {$CFG->prefix}user u
+                                      WHERE e.glossaryid = '$glossary->id' AND
+                                            u.id = e.userid
+                                      ORDER BY e.timecreated desc")) {
+            //Iterate over each entry to get glossary->rssarticles records
+            $articlesleft = $glossary->rssarticles;
+            $item = NULL;
+            $user = NULL;
+            foreach ($recs as $rec) {
+                unset($item);
+                unset($user);
+                $item->title = $rec->entryconcept;
+                $user->firstname = $rec->userfirstname;
+                $user->lastname = $rec->userlastname;
+                $item->author = fullname($user);
+                $item->pubdate = $rec->entrytimecreated;
+                $item->link = $CFG->wwwroot."/mod/glossary/showentry.php?courseid=".$glossary->course."&eid=".$rec->entryid;
+                $item->description = format_text($rec->entrydefinition,$rec->entryformat,NULL,$glossary->course);
+                $items[] = $item;
+                $articlesleft--;
+                if ($articlesleft < 1) {
+                    break;
+                }
+            }
+        }
+        return $items;
+    }
+
+    //This function returns "items" record array to be used to build the rss feed
+    //for a Type=without author glossary
+    function glossary_rss_feed_withoutauthor($glossary) {
+
+        global $CFG;
+
+        $items = array();
+
+        if ($recs = get_records_sql ("SELECT e.id entryid,
+                                             e.concept entryconcept,
+                                             e.definition entrydefinition,
+                                             e.format entryformat,
+                                             e.timecreated entrytimecreated,
+                                             u.id userid,
+                                             u.firstname userfirstname,
+                                             u.lastname userlastname
+                                      FROM {$CFG->prefix}glossary_entries e,
+                                           {$CFG->prefix}user u
+                                      WHERE e.glossaryid = '$glossary->id' AND
+                                            u.id = e.userid
+                                      ORDER BY e.timecreated desc")) {
+            //Iterate over each entry to get glossary->rssarticles records
+            $articlesleft = $glossary->rssarticles;
+            $item = NULL;
+            $user = NULL;
+            foreach ($recs as $rec) {
+                unset($item);
+                unset($user);
+                $item->title = $rec->entryconcept;
+                $user->firstname = $rec->userfirstname;
+                $user->lastname = $rec->userlastname;
+                //$item->author = fullname($user);
+                $item->pubdate = $rec->entrytimecreated;
+                $item->link = $CFG->wwwroot."/mod/glossary/showentry.php?courseid=".$glossary->course."&eid=".$rec->entryid;
+                $item->description = format_text($rec->entrydefinition,$rec->entryformat,NULL,$glossary->course);
+                $items[] = $item;
+                $articlesleft--;
+                if ($articlesleft < 1) {
+                    break;
+                }
+            }
+        }
+        return $items;
+    }
+    
+?>
index c9106e176f44d0bf98276b21e64857cce216c601..9d48af27e153f433381e0f4f92592e61dc447a75 100644 (file)
@@ -5,8 +5,8 @@
 ///  This fragment is called by moodle_needs_upgrading() and /admin/index.php
 /////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2004022200;  // The current module version (Date: YYYYMMDDXX)
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->version  = 2004050900;  // The current module version (Date: YYYYMMDDXX)
+$module->requires = 2004050300;  // Requires this Moodle version
 $module->cron     = 0;           // Period for cron to check this module (secs)
 
 $release = "0.5 development";   // User-friendly version number
index dbf27f0c45701801cb8346f115e80e7efe9f9a4b..eb660f087b701620ff8075d507d62fc9b11f4e9d 100644 (file)
@@ -2,6 +2,8 @@
 /// This page prints a particular instance of glossary
     require_once("../../config.php");
     require_once("lib.php");
+    require_once("$CFG->dirroot/rss/rsslib.php");
+
     global $CFG, $THEME, $USER;
     $debug = 0;
     $CFG->startpagetime = microtime();            
         "$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
         "", "", true, update_module_button($cm->id, $course->id, $strglossary),
         navmenu($course, $cm));
+
+    //If rss are activated at site and glossary level and this glossary has rss defined, show link
+        if ($CFG->enablerssfeeds && $CFG->glossary_enablerssfeeds && $glossary->rsstype and $glossary->rssarticles) {
+            echo '<table width="100%" border="0" cellpadding="3" cellspacing="0"><tr valign="top"><td align="right">';
+            $tooltiptext = get_string("rsssubscriberss","glossary",$glossary->name);
+            rss_print_link($course->id, $USER->id, "glossary", $glossary->id, $tooltiptext);
+            echo '</td></tr></table>';
+        }
     
     echo '<p align="center"><font size="3"><b>' . stripslashes_safe($glossary->name);
     if ( $isuserframe and $mode != 'search') {