// member variables
var $entryId; // post.id
var $entryBody; // post.summary
- var $entryExtendedBody; // post.content
var $entryTitle; // post.subject
- var $entryKarma; // post.rating
var $entryFormat; // post.format
var $entryuserid; // post.author
- var $entryGroupId; // post.groupid
- var $entryCourseId; // post.courseid
var $entryPublishState; // post.publishstate
var $entryAuthorName; // blog_users.name
var $entryAuthorEmail; // blog_users.email
// print_object($this->entryCategoryIds); //debug
$this->entryBody = ereg_replace('<tick>', "'", stripslashes_safe($entrydetails->summary));
- if (isset($entrydetails->extendedbody)) {
- $this->entryExtendedBody = ereg_replace('<tick>', "'", stripslashes_safe($entrydetails->extendedbody));
- } else {
- $this->entryExtendedBody = '';
- }
$strftimedaydatetime = get_string('strftimedaydatetime');
$this->entryLastModified = $entrydetails->lastmodified;
$this->entryFormat = $entrydetails->format;
- //Daryl Hawes additions: course and group ids
- if (isset($entrydetails->groupid) ) {
- $this->entryGroupId = $entrydetails->groupid;
- }
- if (isset($entrydetails->courseid) ) {
- $this->entryCourseId = $entrydetails->courseid;
- }
-
if (isset($entrydetails->publishstate) ) {
$this->entryPublishState = $entrydetails->publishstate;
} else {
$menu = '';
if ($this->user_can_change_publish_state() && blog_isediting() ) {
$menu .= '<div class="publishto">'. get_string('publishto', 'blog').': ';
- $options = blog_applicable_publish_states($this->entryCourseId);
+ $options = blog_applicable_publish_states();
$menu .= choose_from_menu($options, $this->entryuserid .'-'. $this->entryId, $this->entryPublishState, '', '', '0', true);
$menu .= "\n".'</div>'."\n";
if ($includehelp) {
$template['title'] .= '</span>';
// add editing controls if allowed
- $template['courseid'] = $blogEntry->entryCourseId;
$template['userid'] = $blogEntry->entryuserid;
$template['author'] = $blogEntry->entryAuthorName;
$template['lastmod'] = $blogEntry->formattedEntryLastModified;
$template['created'] = $blogEntry->formattedEntryCreated;
$template['publishtomenu'] = $blogEntry->get_publish_to_menu(true, true);
- $template['groupid'] = $blogEntry->entryGroupId;
//forum style printing of blogs
blog_print_entry_content ($template, $blogEntry->entryId, $filtertype, $filterselect);
echo '<div align="center"><table cellspacing="0" class="forumpost" width="100%">';
echo '<tr class="header"><td class="picture left">';
- print_user_picture($template['userid'], $template['courseid'], $user->picture);
+ print_user_picture($template['userid'], SITEID, $user->picture);
echo '</td>';
echo '<td class="topic starter"><div class="subject">'.$template['title'].'</div><div class="author">';
echo '</div></td></tr>';
echo '<tr><td class="left side">';
- if ($group = get_record('groups','id',$template['groupid'])) {
- print_group_picture($group, $course->id, false, false, true);
- } else {
- echo ' ';
- }
/// Actual content