function display() { $html = '<br />'; $html .= '<div style="width:50px;float:left;">'; $html .= '<img src="' . $this->cont_image_url . '" width="34" height="34" alt="" />'; $html .= '</div>'; $html .= '<div style="text-align:middle;">'; $html .= '<a href ="/Contact/' . $this->idcontact . '">' . $this->full_contact_name . '</a>'; $html .= ' ' . _('posted in') . ' ' . '<a href="' . $this->website_url . '" target="_new">' . $this->website_url . '</a>'; //$ret = " ".stripslashes($this->feed_content); $ret = " " . $this->feed_content; $ret = preg_replace("#(^|[\n ])([\\w]+?://[\\w]+[^ \"\n\r\t< ]*)#", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret); $ret = preg_replace("#(^|[\n ])((www|ftp)\\.[^ \"\t\n\r< ]*)#", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); $ret = preg_replace("/@(\\w+)/", "@<a href=\"http://www.twitter.com/\\1\" target=\"_blank\">\\1</a>", $ret); $ret = preg_replace("/#(\\w+)/", "<a href=\"http://search.twitter.com/search?q=\\1\" target=\"_blank\">#\\1</a>", $ret); //$ret = substr($ret, 1); $html .= '<br />' . $ret; //$html .= '<a href ="/Contact/'.$this->idcontact.'"> more...</a>'; $html .= '</div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; //$html .= date('l, F j, g:i a ', $this->date_added); $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; $html .= '<div id="' . $this->idworkfeed . '" class="message_box"></div>'; return $html; }
function display() { $html = '<br />'; $html .= '<div style="width:50px;float:left;">'; $html .= '<img src="' . $this->contact_image_url . '" width="34" height="34" alt="" />'; $html .= '</div>'; $html .= '<div style="text-align:middle;">'; $html .= '<a href ="/Contact/' . $this->idcontact . '">' . $this->contact_full_name . '</a>'; $html .= ' ' . _('has a note from') . ' ' . '<b>' . $this->user_full_name . '</b>'; $html .= '<div id="notepreview' . $this->idcontact_note . '">'; $html .= stripslashes($this->note); //$html .= htmlentities($this->note); if ($this->more) { $html .= '<a onclick="showFullNote(' . $this->idcontact_note . '); return false;" href="#">' . _('more ...') . '</a>'; } $htnl .= '</div>'; $html .= '</div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; //$html .= date('l, F j, g:i a ', $this->date_added); $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; $html .= '<div id="' . $this->idworkfeed . '" class="message_box"></div>'; return $html; }
function display() { $do_proj_task_feed = new ProjectTask(); $do_proj_feed = new Project(); $do_user = new User(); if ($do_proj_task_feed->isProjectTaskReletedToUser($this->idproject_task)) { //$idproject = $do_proj_task_feed->getProjectForTask($this->idproject_task); $do_proj_task_feed->getProjectTaskDetails($this->idproject_task); $html .= '<br />'; if ($this->user_picture != '') { $thumb_name = $_SERVER['DOCUMENT_ROOT'] . '/dbimage/thumbnail/' . $this->user_picture; if (file_exists($thumb_name)) { $user_pic = "/dbimage/thumbnail/" . $this->user_picture; } else { $user_pic = "/images/empty_avatar.gif"; } } else { $user_pic = "/images/empty_avatar.gif"; } $user_name = $do_user->getUserNameByIdUser($this->iduser); $html .= '<div style="width:50px;float:left;">'; $html .= '<a href="/profile/' . $user_name . '"> <img width="34" height="34"alt="" src=' . $user_pic . ' > </a>'; $html .= '</div>'; $html .= '<div style="text-align:middle;"> <table width=95% border=0><tr><td>'; $html .= '<b>' . ucfirst($this->user_full_name) . '</b>' . ' ' . _('has added a note on discussion') . ' ' . '<a href ="/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('in project ') . ' ' . ' <a href="/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= ' <img src="/images/discussion.png" width="16" height="16" alt="" />'; $html .= '<div id="discusspreview' . $this->idproject_discuss . '">'; $html .= stripslashes($this->discuss); //$html .= htmlentities($this->discuss); if ($this->more) { $html .= '<a onclick="showFullProjDiscuss(' . $this->idproject_discuss . '); return false;" href="#">' . _('more...') . '</a>'; } $html .= '</div>'; $html .= '</td></tr></table></div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; // $html .= date('l, F j, g:i a', $this->date_added); $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); //$html .= ' '.$this->date_added; $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; $html .= '<div id="' . $this->idworkfeed . '" class="message_box"></div>'; } return $html; }
function display() { $html = '<br />'; $html .= '<div style="width:50px;float:left;">'; $html .= '<img src="' . $this->contact_image_url . '" width="34" height="34" alt="" />'; $html .= '</div>'; $html .= '<div style="text-align:middle;">'; $html .= '<a href ="/Contact/' . $this->idcontact . '">' . $this->contact_full_name . '</a>'; $html .= ' ' . stripslashes($this->note); $htnl .= '</div>'; $html .= '</div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; $html .= '<div id="' . $this->idworkfeed . '" class="message_box"></div>'; return $html; }
function display() { $do_user = new User(); $user_name = $do_user->getUserNameByIdUser($this->iduser); $html .= '<div style="width:50px;float:left;">'; $html .= '<img src="/images/note_icon.gif" width="34" height="34" alt="" />'; $html .= '</div>'; $html .= '<div style="text-align:middle;">'; //$html .= '<a href ="/Contact/'.$this->idcontact.'">'.$this->user_full_name.'</a>'; $username = $this->user_full_name; //$user_name = explode(' ',$username); $html .= '<a href="/profile/' . $user_name . '">' . $this->user_full_name . ' </a>'; $html .= ' ' . _('added you to the project: ') . ' ' . ' <a href="/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '</div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; return $html; }
$star_img_url = '<img src="/images/' . ($do_notes->priority > 0 ? 'star_priority.gif' : 'star_normal.gif') . '" class="star_icon" width="14" height="14" alt="" />'; //if (is_object($_SESSION["ContactNotesEditSave"])) { // $e_note_del = new Event("ContactNotes->eventdelContactNoteById"); //} //$e_note_del->addParam("goto", $_SERVER['PHP_SELF']); //$e_note_del->addParam("id", $do_notes->idcontact_note); //$del_img_url = 'delete <img src="/images/delete.gif" width="14px" height="14px" alt="" />'; echo '<div id="notetext', $note_count, '" class="vpad10">'; echo '<div style="height:24px;position:relative;"><div class="percent95"><img src="/images/note_icon.gif" class="note_icon" width="16" height="16" alt="" />', $e_PrioritySort->getLink($star_img_url); /*list($yyyy,$mm,$dd) = split("-",$do_notes->date_added); if($yyyy < date('Y')) { $added_by = date('l, F j Y', strtotime($do_notes->date_added)); } else { $added_by = date('l, F j', strtotime($do_notes->date_added)); }*/ $added_by = OfuzUtilsi18n::formatDateLong($do_notes->date_added); echo '<b>' . $added_by . '</b> (' . _('Added By :') . ' ' . $do_notes->getNoteOwnerFullName() . ')</div> </div>'; //if ($preview_note != '') { // echo '<div id="notepreview',$do_notes->idcontact_note,'">',nl2br(stripslashes($preview_note)),'<br /><a href="#" onclick="showFullNote(',$do_notes->idcontact_note,'); return false;" />more ...</a><br /></div>'; //} else { echo $note_text; //} echo $do_notes->formatDocumentLink() . '</div>'; } } else { if ($do_notes->note_visibility == 'user contact' || $do_notes->note_visibility == 'user coworker contact') { $file = ''; $preview_note = ''; if ($do_notes->document != '') { $doc_name = $do_notes->document; $doc_name = str_replace(" ", "%20%20", $do_notes->document);
/** * Display method for feed activity date * @param $date_timestamp -- the activity date timestamp * @return the formated date for the feed. */ function showFeedActivityDate($date_timestamp) { $date = date("Y-m-d H:i:s", $date_timestamp); OfuzUtilsi18n::formatDateLong($date, true); }
function display() { //$do_proj_task_feed = new ProjectTask(); // if($do_proj_task_feed->isProjectTaskReletedToUser($this->idproject_task)){ $type = $this->task_event_type; $html = '<br />'; $html .= '<div style="width:50px;float:left;">'; $html .= '<img src="/images/note_icon.gif" width="16" height="16" alt="" />'; $html .= '</div>'; $html .= '<div style="text-align:middle;">'; switch ($type) { case 'change_task_owner': $html .= _('Ownership of the task') . ' '; $html .= '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('has been changed to') . ' ' . '<b>' . $this->user_full_name . '</b>'; break; case 'close_task': $html .= '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('has been closed by ') . '<b>' . $this->user_full_name . '</b>'; break; break; case 'open_task': $html .= '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('has been re-opened by') . ' ' . '<b>' . $this->user_full_name . '</b>'; break; case 'task_progress': $html .= '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('has been set to ') . ' ' . '<b> ' . $this->progress . ' ' . '%' . ' ' . _('by') . ' ' . $this->user_full_name . '</b>'; break; case 'task_name_change': $html .= $this->task_description . ' ' . _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('is renamed as ') . ' ' . '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_name . '</a>'; $html .= _('by') . '<b>' . $this->user_full_name . '</b>'; break; case 'task_category_changed': $html .= _('Category of ') . ' ' . '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('has been changed to') . ' ' . '<i>' . $this->task_category . '</i><b> ' . ' ' . _('by') . ' ' . $this->user_full_name . '</b>'; break; case 'task_due_date_changed': $html .= _('Due date of') . ' ' . '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('has been changed to') . ' ' . '<i>' . $this->due_date . '</i><b>' . ' ' . _('by') . ' ' . $this->user_full_name . '</b>'; break; case 'new_task_add': $html .= _('A new task') . ' '; $html .= '<a href = "/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('on project') . ' ' . '<a href= "/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '<br />' . ' ' . _('has been added by') . ' ' . '<b>' . $this->user_full_name . '</b>'; break; } $html .= '</div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; //$html .= date('l, F j, g:i a', $this->date_added); $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; $html .= '<div id="' . $this->idworkfeed . '" class="message_box"></div>'; //} return $html; }
$e_discuss_del->addParam('id', $do_discuss->idproject_discuss); $e_discuss_del->addParam('context', 'ProjectDiscuss'); $del_img_url = 'delete <img src="/images/delete.gif" width="14px" height="14px" alt="" />'; echo '<div id="notetext', $do_discuss->idproject_discuss, '" class="vpad10">'; echo '<div style="height:24px;position:relative;"><div class="percent95"><img src="/images/discussion.png" class="note_icon" width="16" height="16" alt=' . _('Task Discussion') . '" />'; if ($task_operation_access === true) { //echo $e_PrioritySort->getLink($star_img_url, ' title="'._('Star this note to move it on top1').'"'); echo $e_PrioritySort->getLink($star_img_url, ' title="' . _($star_title) . '"'); } list($yyyy, $mm, $dd) = split("-", $do_discuss->date_added); /*if($yyyy < date('Y')) { echo '<b>'.date('l, F j Y', strtotime($do_discuss->date_added)).'</b> ('._('Added By :').' '.$added_by.')</div>'; } else { echo '<b>'.date('l, F j', strtotime($do_discuss->date_added)).'</b> ('._('Added By :').' '.$added_by.')</div>'; }*/ $date_added_note = OfuzUtilsi18n::formatDateLong($do_discuss->date_added); echo '<div id="item_title"> ' . $date_added_note . '</b> (' . _('Added By:') . ' <i><strong>' . $added_by . '</strong></i>)</div></div>'; echo "<br>"; echo '<div id="contact_small"><a href="/profile/' . $user_name . '"> <img width="34" height="34"alt="" src=' . $contact_picture . ' > </a></div>'; $Parsedown = new Parsedown(); if ($task_operation_access === true) { echo '<div id="trashcan', $item_count++, '" class="deletenote" style="right:0;">' . '<a href="#" onclick="fnEditNote(\'notetext' . $do_discuss->idproject_discuss . '\',' . $do_discuss->idproject_discuss . ');return false;">' . _('edit') . '</a> | ' . $e_discuss_del->getLink($del_img_url, ' title="' . _('Delete this note') . '"') . '</div>'; } echo '</div>'; if ($do_discuss->is_truncated) { echo '<div id="item_text"><div id="notepreview', $do_discuss->idproject_discuss, '">', $Parsedown->text($item_text), '…<br/><br/><a href="#" id="more_item_text" onclick="showFullNote(', $do_discuss->idproject_discuss, '); return false;">' . _('<strong>read more…</strong>') . '</a><br /></div></div>'; } else { echo "<div id='item_text'>" . $Parsedown->text($item_text) . "</div>"; } //echo '<div id="e'.$do_discuss->idproject_discuss.'" style="display: none;" class="note_edit_box"></div>'; echo $do_discuss->formatDocumentLink("ProjectTask") . '</div>