当前位置: 首页>>代码示例>>PHP>>正文


PHP convert_to_links函数代码示例

本文整理汇总了PHP中convert_to_links函数的典型用法代码示例。如果您正苦于以下问题:PHP convert_to_links函数的具体用法?PHP convert_to_links怎么用?PHP convert_to_links使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了convert_to_links函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: workspaces_render_widget_member_information

function workspaces_render_widget_member_information(Member $member, &$prop_html = "")
{
    $ws_ot = ObjectTypes::findByName('workspace');
    if ($member->getObjectTypeId() == $ws_ot->getId()) {
        $ws = Workspaces::getWorkspaceById($member->getObjectId());
        if ($ws instanceof Workspace && trim($member->getDescription()) != "" && $ws->getColumnValue('show_description_in_overview')) {
            $prop_html .= '<div style="margin-bottom:5px;">' . escape_html_whitespace(convert_to_links(clean($member->getDescription()))) . '</div>';
        }
    }
}
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:10,代码来源:workspaces_hooks.php

示例2: get_comments

 private function get_comments($request)
 {
     try {
         $object = Objects::findObject($request['oid']);
         $comments = $object->getComments();
         $clean_comments = array();
         foreach ($comments as $comment) {
             $user_name = $comment->getCreatedByDisplayName();
             $updated_on = format_datetime($comment->getUpdatedOn());
             $text = escape_html_whitespace(convert_to_links(clean($comment->getText())));
             $clean_comment = array("author" => $user_name, "date" => $updated_on, "text" => $text);
             $clean_comments[] = $clean_comment;
         }
         return $this->response('json', $clean_comments);
     } catch (Exception $exception) {
         throw $exception;
     }
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:18,代码来源:ApiController.class.php

示例3: echo

<?php  /* @var $workspace Workspace */ 
	if ( $workspace->getColumnValue('show_description_in_overview') ) : ?> 
<div class="widget-persons widget">

	<div class="widget-header" onclick="og.dashExpand('<?php echo $genid?>');">
		<?php echo (isset($widget_title)) ? $widget_title : lang("workspace description");?>
		<div class="dash-expander ico-dash-expanded" id="<?php echo $genid; ?>expander"></div>
	</div>
	
	<div class="widget-body" id="<?php echo $genid; ?>_widget_body">
		<?php echo escape_html_whitespace(convert_to_links(clean($workspace->getDescription()))); ?>
	</div>
</div>
<?php  endif ;?>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:14,代码来源:template.php

示例4: add_page_action

    }
    if ($message->canDelete(logged_user())) {
        if ($message->isTrashed()) {
            add_page_action(lang('restore from trash'), "javascript:if(confirm(lang('confirm restore objects'))) og.openLink('" . $message->getUntrashUrl() . "');", 'ico-restore', null, null, true);
            add_page_action(lang('delete permanently'), "javascript:if(confirm(lang('confirm delete permanently'))) og.openLink('" . $message->getDeletePermanentlyUrl() . "');", 'ico-delete', null, null, true);
        } else {
            add_page_action(lang('move to trash'), "javascript:if(confirm(lang('confirm move to trash'))) og.openLink('" . $message->getTrashUrl() . "');", 'ico-trash', null, null, true);
        }
    }
    // if
    add_page_action(lang('print view'), $message->getPrintViewUrl(), "ico-print", "_blank");
    ?>

<div style="padding:7px">
<div class="message">
<?php 
    if ($message->getTypeContent() == "text") {
        $content = escape_html_whitespace(convert_to_links(clean($message->getText())));
    } else {
        $content = '<div class="wysiwyg-description">' . convert_to_links(purify_html(nl2br($message->getText()))) . '</div>';
    }
    tpl_assign("content", $content);
    tpl_assign("object", $message);
    tpl_assign('iconclass', $message->isTrashed() ? 'ico-large-message-trashed' : ($message->isArchived() ? 'ico-large-message-archived' : 'ico-large-message'));
    $this->includeTemplate(get_template_path('view', 'co'));
    ?>
</div>
</div>
<?php 
}
//if isset
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:view.php

示例5: clean

					<div class="contact-picture-container">
						<img class="commentUserAvatar" src="<?php 
                echo $comment->getCreatedBy()->getPictureUrl();
                ?>
" alt="<?php 
                echo clean($comment->getCreatedBy()->getObjectName());
                ?>
" />
					</div>
					<?php 
            }
            // if
            ?>
					
					<div class="commentText"><?php 
            echo escape_html_whitespace(convert_to_links(clean($comment->getText())));
            ?>
</div>
					<div class="clear"></div>
					<?php 
            $object_links_render = render_object_links($comment, $comment->canEdit(logged_user()) && !$__comments_object->isTrashed(), true, false);
            if ($object_links_render != '') {
                echo '<div>' . $object_links_render . '</div>';
            }
            ?>
				</div>
			</div>
	<?php 
        }
        // foreach
    } else {
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:object_comments.php

示例6: escape_html_whitespace

			}
			$content .= '
				<input type="hidden" id="'.$genid.'viewingImages" value="'.($remove_images?'no':'yes').'" />
				<input type="hidden" id="'.$genid.'viewingQuoted" value="'.($remove_quoted?'no':'yes').'" />
			';
		} else {
			if ($email->getBodyPlain() != '') {
				$remove_quoted = MailUtilities::hasQuotedText($email->getBodyPlain()) && $hide_quoted_text_in_emails;
				$content = "";
				if ($remove_quoted) {
					$content = MailUtilities::replaceQuotedText($email->getBodyPlain(), '-----'.lang('hidden quoted text').'-----');
					$content = '<div id="'.$genid.'noQuoteMail">' . escape_html_whitespace(convert_to_links(clean($content))) . '</div>';
					$content = str_replace('-----'.lang('hidden quoted text')."-----", '<span style="color: #777;font-style:italic;padding: 5px 20px">&lt;'.lang('hidden quoted text').'&gt;</span>', $content);
					$content .= '<a class="internalLink" style="padding-left:10px;" id="'.$genid.'quotedLink" href="#" onclick="og.showQuotedText(\''.$genid.'\')">:: '.lang('show quoted text').' ::</a>';
				}
				$content .= '<div id="'.$genid.'completeMail"'.($remove_quoted ? ' style="display:none"' : '').'>' . escape_html_whitespace(convert_to_links(clean($email->getBodyPlain()))) . '</div>';
				$content = '<div style="max-height: 600px; overflow: auto;">' . $content . '</div>';
			} else $content = '<div></div>';
		}
		$strDraft = '';
		if ($email->getIsDraft()) {
			$strDraft = "<span style='font-size:80%;color:red'>&nbsp;".lang('draft')."</style>";
		}
				
		tpl_assign("title", lang('email') . ': ' . clean($email->getSubject()).$strDraft);
		tpl_assign('iconclass', $email->isTrashed()? 'ico-large-email-trashed' : ($email->isArchived() ? 'ico-large-email-archived' : 'ico-large-email'));
		tpl_assign("mail_conversation_block" , $conversation_block);
		tpl_assign("content", $content);
		tpl_assign("object", $email);
		tpl_assign("description", $description);
		
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:30,代码来源:view.php

示例7: lang

</div>
</fieldset>
<?php 
}
// if
?>

<?php 
if ($file->getDescription()) {
    ?>
      <fieldset><legend><?php 
    echo lang('description');
    ?>
</legend>
      <?php 
    echo escape_html_whitespace(convert_to_links(clean($file->getDescription())));
    ?>
      </fieldset>
<?php 
}
// if
?>

<?php 
if (($ftype = $file->getFileType()) instanceof FileType && $ftype->getIsImage()) {
    ?>
	<script>
	function resizeImage(genid){
		var image = document.getElementById(genid + 'Image');
		if (image){
			var width = (Ext.isIE)? image.parentNode.parentNode.offsetWidth : image.parentNode.parentNode.clientWidth;
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:file_details_content.php

示例8: render_custom_properties

                    	echo '<div style="margin:20px 0;'.$back_color.'">';
                    	echo render_custom_properties($contact);
                    	echo '</div>';
                    	$back_color = $back_color == '' ? $bc : '';
                    }
                    	
                    if (!$contact->isUser() && $contact->isCommentable()) {
                    	echo '<div style="margin:20px 0;">';
                    	echo render_object_comments($contact, $contact->getViewUrl());
                    	echo '</div>';
                    	$back_color = $back_color == '' ? $bc : '';
                    }
                    
                    if ($contact->getCommentsField()) {
                    	echo '<div class="commentsTitle">'.lang('notes').'</div>';
                    	echo escape_html_whitespace(convert_to_links(clean($contact->getCommentsField())));
                    }
                    
                    ?></div>
                    <div class="clear"></div>                    
	                <?php Hook::fire('after_contact_view', $contact, $null); ?>
                </div>
                <?php if ( isset($show_person_activity) ): ?>
                <div class="person-activity">
                    <h2><?php echo lang('related to') ?></h2>
                    <ul>
                    <?php foreach($feeds as $feed): ?>
	                    <?php if ( array_var($feed, 'object_id') != $contact->getId() ) :?>
	                        <li class="<?php echo array_var($feed, 'icon') ?>">
	                            <em class="feed-date"><?php echo ucfirst (array_var($feed, 'type')); ?> - <?php echo array_var($feed, 'dateUpdated');?></em>
	                            - <a href="Javascript:;" onclick="og.openLink('<?php echo array_var($feed, 'url') ?>');"><?php echo array_var($feed, 'name') ?></a>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:card.php

示例9: lang

		<?php 		} // if ?>
					</td></tr></table>
				</div>
		<?php 	} else { ?>
				<div class="commentHead"><span>
				<a class="internalLink" href="<?php echo $comment->getViewUrl() ?>" title="<?php echo lang('permalink') ?>">#<?php echo $counter ?></a>:
				</span> <?php echo lang('comment posted on', format_datetime($comment->getUpdatedOn())) ?>
				</div>
		<?php 	} // if ?>
		
				<div class="commentBody">
					<table style="width:100%"><tr>
		<?php 	if(($comment->getCreatedBy() instanceof Contact) && ($comment->getCreatedBy()->hasAvatar())) { ?>
					<td style="vertical-align:top;width:60px"><div class="commentUserAvatar"><img src="<?php echo $comment->getCreatedBy()->getAvatarUrl() ?>" alt="<?php echo clean($comment->getCreatedBy()->getObjectName()) ?>" /></div></td>
		<?php 	} // if ?>
					<td style="text-align:left"><?php echo escape_html_whitespace(convert_to_links(clean($comment->getText()))) ?></td>
					<?php $object_links_render = render_object_links($comment, ($comment->canEdit(logged_user()) && !$__comments_object->isTrashed()), true, false);
						if ($object_links_render != '') { 
							echo '<td style="width:200px">'. $object_links_render .'</td>'; 
						} 
					?></tr></table>
				</div>
			</div>
	<?php } // foreach ?>
<?php 	} else { ?>
		<p><?php echo lang('no comments associated with object') ?></p>
<?php	} // if ?>
	</div>
<?php } ?>

<?php if(!$__comments_object->isTrashed()) {?>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:object_comments.php

示例10: lang

    </td></tr> 
	<?php 
}
//if
?>
    
    <?php 
if ($contact->getNotes()) {
    ?>
    <tr><td colspan=2><div style="font-weight:bold; font-size:120%; color:#888; border-bottom:1px solid #DDD;width:100%; padding-top:14px">
    	<?php 
    echo lang('notes');
    ?>
    </div></td></tr><tr><td colspan=2>
      <div style="padding-left:10px"><?php 
    echo escape_html_whitespace(convert_to_links(clean($contact->getNotes())));
    ?>
</div>
    </td></tr> 
    <?php 
}
?>
    
    
    <?php 
if ($contact->hasUser()) {
    ?>
    <tr><td colspan=2><div style="font-weight:bold; font-size:120%; color:#888; border-bottom:1px solid #DDD;width:100%; padding-top:14px">
    	<?php 
    echo lang('assigned user');
    ?>
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:card_content.php

示例11: objectNotification

 static function objectNotification($object, $people, $sender, $notification, $description = null, $descArgs = null, $properties = array(), $links = array())
 {
     if (!is_array($people) || !count($people)) {
         return;
         // nothing here...
     }
     // if
     if ($sender instanceof User) {
         $sendername = $sender->getDisplayName();
         $senderemail = $sender->getEmail();
         $senderid = $sender->getId();
     } else {
         $sendername = owner_company()->getName();
         $senderemail = owner_company()->getEmail();
         if (!is_valid_email($senderemail)) {
             $senderemail = 'noreply@fengoffice.com';
         }
         $senderid = 0;
     }
     $type = $object->getObjectTypeName();
     $typename = lang($object->getObjectTypeName());
     $uid = $object->getUniqueObjectId();
     $name = $object instanceof Comment ? $object->getObject()->getObjectName() : $object->getObjectName();
     if (!isset($description)) {
         $description = "{$notification} notification {$type} desc";
         $descArgs = array(clean($object->getObjectName()), $sendername);
     }
     if (!isset($descArgs)) {
         $descArgs = array();
     }
     if ($object->columnExists('text') && trim($object->getColumnValue('text'))) {
         $text = escape_html_whitespace(convert_to_links(clean("\n" . $object->getColumnValue('text'))));
         $properties['text'] = $text;
     }
     $second_properties = array();
     //$properties['unique id'] = $uid;
     if ($object->columnExists('description') && trim($object->getColumnValue('description'))) {
         $text = escape_html_whitespace(convert_to_links(clean("\n" . $object->getColumnValue('description'))));
         $properties['description'] = $text;
     }
     if ($object instanceof ProjectFile && $object->getType() == ProjectFiles::TYPE_DOCUMENT) {
         $revision = $object->getLastRevision();
         if (trim($revision->getComment())) {
             $text = escape_html_whitespace(convert_to_links(clean("\n" . $revision->getComment())));
             $properties['revision comment'] = $text;
         }
     }
     tpl_assign('object', $object);
     tpl_assign('properties', $properties);
     tpl_assign('second_properties', $second_properties);
     $emails = array();
     foreach ($people as $user) {
         if ($user->getId() != $senderid && $object->canView($user)) {
             // send notification on user's locale and with user info
             $locale = $user->getLocale();
             Localization::instance()->loadSettings($locale, ROOT . '/language');
             $workspaces = $object->getUserWorkspaces($user);
             $ws = "";
             $plain_ws = "";
             foreach ($workspaces as $w) {
                 if ($ws) {
                     $ws .= ", ";
                 }
                 if ($plain_ws) {
                     $plain_ws .= ", ";
                 }
                 $css = get_workspace_css_properties($w->getColor());
                 $ws .= "<span style=\"{$css}\">" . $w->getPath() . "</span>";
                 $plain_ws .= $w->getPath();
             }
             $properties['workspace'] = $ws;
             tpl_assign('links', $links);
             tpl_assign('properties', $properties);
             tpl_assign('description', langA($description, $descArgs));
             $from = self::prepareEmailAddress($senderemail, $sendername);
             $emails[] = array("to" => array(self::prepareEmailAddress($user->getEmail(), $user->getDisplayName())), "from" => self::prepareEmailAddress($senderemail, $sendername), "subject" => $subject = lang("{$notification} notification {$type}", $name, $uid, $typename, $plain_ws), "body" => tpl_fetch(get_template_path('general', 'notifier')));
         }
     }
     // foreach
     $locale = logged_user() instanceof User ? logged_user()->getLocale() : DEFAULT_LOCALIZATION;
     Localization::instance()->loadSettings($locale, ROOT . '/language');
     self::queueEmails($emails);
 }
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:83,代码来源:Notifier.class.php

示例12: add_page_action

    }
    if ($object->canDelete(logged_user())) {
        if ($object->isTrashed()) {
            add_page_action(lang('restore from trash'), "javascript:if(confirm(lang('confirm restore objects'))) og.openLink('" . $object->getUntrashUrl() . "');", 'ico-restore', null, null, true);
            add_page_action(lang('delete permanently'), "javascript:if(confirm(lang('confirm delete permanently'))) og.openLink('" . $object->getDeletePermanentlyUrl() . "');", 'ico-delete', null, null, true);
        } else {
            add_page_action(lang('move to trash'), "javascript:if(confirm(lang('confirm move to trash'))) og.openLink('" . $object->getTrashUrl() . "');", 'ico-trash', null, null, true);
        }
    }
    // if
    ?>

<div style="padding:7px">
<div class="weblink">
	<?php 
    $description = escape_html_whitespace(convert_to_links(clean($object->getDescription())));
    $url = clean($object->getUrl());
    $title = clean($object->getObjectName());
    tpl_assign("url", $url);
    tpl_assign("desc", $description);
    tpl_assign("content_template", array('view_content', 'webpage'));
    tpl_assign("object", $object);
    tpl_assign('iconclass', $object->isTrashed() ? 'ico-large-weblink-trashed' : ($object->isArchived() ? 'ico-large-weblink-archived' : 'ico-large-weblink'));
    tpl_assign('title', "<a class=\"link-ico ico-open-link\" target=\"_blank\" href=\"{$url}\">{$title}</a>");
    $this->includeTemplate(get_template_path('view', 'co'));
    ?>
</div>
</div>
<?php 
}
//if isset
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:view.php

示例13: lang

        echo "<div><span class='bold'>" . lang('object type') . ":</span> " . $subType->getName() . "</div>";
    }
}
?>



<?php 
if ($task_list->getText()) {
    ?>
  
	<div class="wysiwyg-description"><?php 
    if ($task_list->getTypeContent() == "text") {
        echo escape_html_whitespace(convert_to_links(clean($task_list->getText())));
    } else {
        echo convert_to_links(purify_html(nl2br($task_list->getText())));
    }
    ?>
</div>
  
<?php 
}
// if
?>

<?php 
/**
 * This section displays the most important information of the task. 
 */
if ($task_list->getAssignedTo()) {
    if (logged_user()->getId() == $task_list->getAssignedTo()->getId()) {
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:task_list.php

示例14: if

	<?php } ?>
<?php } ?>
		
<?php if ($task_list->getObjectSubtype() > 0) {
		$subType = ProjectCoTypes::findById($task_list->getObjectSubtype());
		if ($subType instanceOf ProjectCoType ) {
			echo "<div><span class='bold'>" . lang('object type') . ":</span> " . $subType->getName() . "</div>";
		}
	  }
?>

<?php if($task_list->getText()) { ?>
  <fieldset><legend><?php echo lang('description') ?></legend>
	<div class="wysiwyg-description"><?php
		if($task_list->getTypeContent() == "text"){
			echo escape_html_whitespace(convert_to_links(clean($task_list->getText())));
		}else{
			echo purify_html(nl2br($task_list->getText()));
		}
	?></div>
  </fieldset>
<?php } // if 


$showOpenSubtasksDiv = is_array($task_list->getOpenSubTasks()) && count($task_list->getOpenSubTasks()) > 0;
$showCompletedSubtasksDiv = is_array($task_list->getCompletedSubTasks()) && count($task_list->getCompletedSubTasks()) > 0;

if($showOpenSubtasksDiv) { ?>
<table style="border:1px solid #717FA1;width:100%; padding-left:10px;">
<tr><th style="padding-left:10px;padding-top:4px;padding-bottom:4px;background-color:#E8EDF7;font-size:120%;font-weight:bolder;color:#717FA1;width:100%;"><?php echo lang("open subtasks") ?></th></tr>
<tr><td style="padding-left:10px;">
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:task_list.php

示例15: foreach

                                $htmlValue = '<table style="width:100%;margin-bottom:2px">';
                                foreach ($multValues as $mv) {
                                    $value = str_replace('\\|', '"%%_PIPE_%%"', $mv->getValue());
                                    $value = str_replace('|', ',', $value);
                                    $value = str_replace('"%%_PIPE_%%"', '|', $value);
                                    $title = strlen($value) > 100 && $customProp->getType() != 'memo' ? clean(str_replace('|', ',', $value)) : '';
                                    $showValue = $customProp->getType() == 'memo' ? escape_html_whitespace(convert_to_links(clean($value))) : clean($value);
                                    $htmlValue .= '<tr class="' . ($newAlt ? 'altRow' : 'row') . '"><td style="padding:0px 5px" title="' . $title . '">' . $showValue . '</td></tr>';
                                    $newAlt = !$newAlt;
                                }
                            }
                            $htmlValue .= '</table>';
                            $style = 'style="padding:1px 0px"';
                        } else {
                            $title = strlen($value) > 100 && $customProp->getType() != 'memo' ? clean($value) : '';
                            $htmlValue = $customProp->getType() == 'memo' ? escape_html_whitespace(convert_to_links(clean($value))) : $value;
                        }
                    }
                }
            }
            ?>
				<td class="value" <?php 
            echo $style;
            ?>
 title="<?php 
            echo $title;
            ?>
"><?php 
            echo $htmlValue;
            ?>
</td>
开发者ID:abhinay100,项目名称:feng_app,代码行数:31,代码来源:view.php


注:本文中的convert_to_links函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。