3 if (!isset($post->groupid
)) {
7 // find all the tags this post uses
9 if (isset($post->postid
)) {
10 if ($tagsused = get_records('blog_tag_instance', 'entryid', $post->postid
)) {
11 foreach ($tagsused as $usedtag) {
12 $usedtags[] = $usedtag -> tagid
;
18 <!-- the following form is based on moodle/mod/forum/post.html -->
20 <form name=
"entry" method=
"post" action=
"<?php echo $CFG->wwwroot;?>/blog/edit.php" id
="entry" <?php
echo $onsubmit; ?> enctype=
"multipart/form-data">
21 <input type=
"hidden" name=
"sesskey" value=
"<?php echo sesskey(); ?>" />
22 <input type
="hidden" name
="referrer" value
="<?php echo $referrer; ?>" />
25 <table border
="0" cellpadding
="5" id
="edittable">
27 <td align
="right"> 
;
29 <td colspan
="2"><strong
><?php
echo $formHeading; ?></strong>
33 <td align=
"right"><strong><?php print_string('entrytitle', 'blog'); ?>:
</strong></td>
35 <input type=
"text" name=
"etitle" size=
"60" value=
"<?php p($post->etitle) ?>" id
="etitle" />
40 <strong
><?php
print_string('publishto', 'blog'); ?>:
</strong>
44 $options = blog_applicable_publish_states(); //$blogEntry may be null
45 choose_from_menu($options, 'publishstate', $post->publishstate
, '');
48 helpbutton('publish_state', get_string('helppublish', 'blog'), 'blog');
54 <strong><?php print_string('tags'); echo ':';?></strong>
61 <b><?php print_string('otags','blog'); ?></b>
64 <b><?php print_string('ptags','blog'); ?></b>
69 <select name=
"otags[]" multiple=
"multiple" size=
"8">
71 $otags = get_records_sql('SELECT * from '.$CFG->prefix
.'tags WHERE type=\'official\' ORDER by text ASC');
72 foreach ($otags as $otag) {
73 if (in_array($otag->id
, $usedtags)) {
74 echo '<option value="'.$otag->id
.'" selected="selected">'.$otag->text
.'</option>';
76 echo '<option value="'.$otag->id
.'">'.$otag->text
.'</option>';
84 <select name=
"ptags[]" multiple=
"multiple" size=
"8">
86 $ptags = get_records_sql('SELECT * from '.$CFG->prefix
.'tags WHERE type=\'personal\' ORDER by text ASC');
87 foreach ($ptags as $ptag) {
88 if (in_array($ptag->id
, $usedtags)) {
89 echo '<option value="'.$ptag->id
.'" selected="selected">'.$ptag->text
.'</option>';
91 echo '<option value="'.$ptag->id
.'">'.$ptag->text
.'</option>';
96 <?php link_to_popup_window("/blog/tags.php",'popup',get_string('tagmanagement')); ?>
106 <td align=
"right"><strong>
108 if (isset($post->useextendedbody
) && $post->useextendedbody
) {
109 print_string('entryexcerpt', 'blog');
111 print_string('entrybody', 'blog');
114 </strong><br /><br />
117 helpbutton('writing', get_string('helpwriting'), 'moodle', true, true);
119 if ($usehtmleditor) {
120 helpbutton('richtext', get_string('helprichtext'), 'moodle', true, true);
122 emoticonhelpbutton('entry', 'body');
127 <td align=
"left" colspan=
"2">
128 <?php print_textarea($usehtmleditor, 25, 62, 500, 600, 'body', $post->body
); ?>
132 <td align=
"right"><strong><?php print_string('formattexttype'); ?>:
</strong></td>
135 if ($usehtmleditor) { /// Trying this out for a while
136 print_string('formathtml');
137 echo '<input type="hidden" name="format" value="'.FORMAT_HTML
.'" />';
139 choose_from_menu(format_text_menu(), "format", $post->format
, "");
144 helpbutton('textformat', get_string('helpformatting'));
150 <td align=
"center" colspan=
"3">
151 <input type=
"hidden" name=
"editform" value=
"1" id=
"editform" />
152 <input type=
"hidden" name=
"userid" value=
"<?php echo $userid; ?>" id
="userid" />
153 <input type
="hidden" name
="tem" id
="tem" />
155 if (isset($post->postid
) && ($post->postid
!= -1) ) {
157 <input type=
"hidden" name=
"postid" value=
"<?php echo $post->postid; ?>" id
="postid" />
158 <input type
="hidden" name
="act" value
="update" id
="act" />
159 <input type
="submit" value
="Update" id
="Submit1" name
="Submit1" /> 
;
160 <input type
="button" value
="Cancel" onclick
="javascript:history.go(-1)" id
="cancel" name
="cancel" />
163 <input type=
"hidden" name=
"act" value=
"save" id=
"act" />
164 <input type=
"submit" value=
"<?php print_string('savechanges'); ?>" id
="savechanges" name
="Submit2" /> 
;