1
<?PHP // $Id: TEMPLATE_format.php,v 1.1.2.1 2004/11/09 18:36:59 stronk7 Exp $
3
function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
5
global $THEME, $CFG, $USER;
7
$colour = $THEME->cellheading2;
9
$user = get_record("user", "id", $entry->userid);
10
$strby = get_string("writtenby", "glossary");
12
echo "<table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" class=\"forumpost\" align=\"center\"r>\n";
14
echo "<td width=\"100%\" valign=\"top\" bgcolor=\"#FFFFFF\">\n";
17
//Use this function to show author's image
18
//Comments: Configuration not supported
19
print_user_picture($user->id, $course->id, $user->picture);
21
//Line separator to show this template fine. :-)
24
//Use this code to show author's name
25
//Comments: Configuration not supported
26
echo "$strby " . fullname($user, isteacher($course->id)) . "<br />\n";
28
//Use this code to show modification date
29
//Comments: Configuration not supported
30
echo get_string("lastedited").": ". userdate($entry->timemodified) . "<br />\n";
32
//Use this function to show the approval button. It'll be showed if necessary
33
//Comments: You can configure this parameters:
34
//----Define where to show the approval button
35
$approvalalign = 'right'; //Values: left, center and right (default right)
36
//----Define if the approval button must be showed into a 100% width table
37
$approvalinsidetable = true; //Values: true, false (default true)
39
glossary_print_entry_approval($cm, $entry, $mode, $approvalalign, $approvalinsidetable);
41
//Line separator to show this template fine. :-)
44
//Use this function to show the attachment. It'll be showed if necessary
45
//Comments: You can configure this parameters:
46
//----Define how to show the attachment
47
$attachmentformat = 'html'; //Values: html (link) and NULL (inline image if possible) (default NULL)
48
//----Define where to show the attachment
49
$attachmentalign = 'right'; //Values: left, center and right (default right)
50
//----Define if the attachment must be showed into a 100% width table
51
$attachmentinsidetable = true; //Values: true, false (default true)
53
glossary_print_entry_attachment($entry,$attachmentformat,$attachmentalign,$attachmentinsidetable);
55
//Line separator to show this template fine. :-)
58
//Use this function to print the concept
59
//Comments: Configuration not supported
60
glossary_print_entry_concept($entry);
62
//Line separator to show this template fine. :-)
65
//Use this function to show the definition
66
//Comments: Configuration not supported
67
glossary_print_entry_definition($entry);
69
//Line separator to show this template fine. :-)
72
//Use this function to show aliases, editing icons and ratings (all know as the 'lower section')
73
//Comments: You can configure this parameters:
74
//----Define when to show the aliases popup
75
// use it only if you are really sure!
76
//$aliases = true; //Values: true, false (Default: true)
77
//----Uncoment this line to avoid ratings being showed
78
// use it only if you are really sure! You can define this in the glossary conf. page.
80
//----Uncoment this line to avoid editing icons being showed
81
// use it only if you are really sure!
82
//$printicons = false;
83
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
86
print_string("noentry", "glossary");
96
function glossary_print_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL) {
98
//The print view for this format is exactly the normal view, so we use it
99
//Anyway, you can modify this to use your own print format!!
101
//Take out autolinking in definitions in print view
102
$entry->definition = '<nolink>'.$entry->definition.'</nolink>';
104
//Call to view function (without icons, ratings and aliases) and return its result
105
return glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);