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


PHP StringUtil::parseHtml方法代码示例

本文整理汇总了PHP中StringUtil::parseHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP StringUtil::parseHtml方法的具体用法?PHP StringUtil::parseHtml怎么用?PHP StringUtil::parseHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StringUtil的用法示例。


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

示例1:

        ?>
" class="avatar-circle">
						<img src="<?php 
        echo $comment['user_info']['avatar_middle'];
        ?>
" width="60" height="60">
					</a>
				</div>
				<div class="cmt-body">
					<p class="mbs xcm">
						<strong class="xcn"><?php 
        echo $comment['user_info']['realname'];
        ?>
:</strong>
						<?php 
        echo StringUtil::parseHtml($comment['content']);
        ?>
					</p>
					<div class="mbs fss">
						<span><?php 
        echo ConvertUtil::formatDate($comment['ctime'], 'u');
        ?>
</span>
						<div class="pull-right">
							<a href="javascript:;" data-act="getreply" data-param='{"type":"reply","module":"message","table":"comment","rowid":"<?php 
        echo $comment['cid'];
        ?>
","name":"<?php 
        echo $comment['user_info']['realname'];
        ?>
","type":"reply"}'><?php 
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:loadComment.php

示例2:

			<div class="wb-info-picword clearfix">
				<p>
					<?php 
    $sourceInfo = $oldInfo;
    ?>
					<?php 
    if (!empty($shareInfo['shareHtml'])) {
        ?>
						<?php 
        echo $shareInfo['shareHtml'];
        ?>
					<?php 
    } else {
        ?>
						<?php 
        echo StringUtil::parseHtml($sourceInfo['source_content']);
        ?>
					<?php 
    }
    ?>
				</p>
			</div>
			<!--转载的内容 E-->
		<?php 
}
?>
	</div>
	<!--微博盒子 S-->
	<div data-node-type="feedForwardComment">
		<form action="javascript:;">
			<div class="wb-pub-box wb-forword-pub">
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:index.php

示例3: parseComment

 protected function parseComment($data)
 {
     $uid = Ibos::app()->user->uid;
     $isAdministrator = Ibos::app()->user->isadministrator;
     $data["userInfo"] = User::model()->fetchByUid($uid);
     $data["content"] = StringUtil::pregHtml($data["content"]);
     $data["content"] = StringUtil::parseHtml($data["content"]);
     $data["lang"] = Ibos::getLangSources(array("message.default"));
     $data["isCommentDel"] = $isAdministrator || $uid === $data["uid"];
     if (!empty($data["attachmentid"])) {
         $data["attach"] = AttachUtil::getAttach($data["attachmentid"]);
     }
     return $this->render($this->getParseView("comment", "parse"), $data, true);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:14,代码来源:IWComment.php

示例4: getCommentList

 public function getCommentList($map = null, $order = "cid ASC", $limit = 10, $offset = 0, $isReply = false)
 {
     $list = $this->getDbConnection()->createCommand()->select("*")->from($this->tableName())->where($map)->order($order)->limit($limit)->offset($offset)->queryAll();
     $uid = Ibos::app()->user->uid;
     $isAdministrator = Ibos::app()->user->isadministrator;
     foreach ($list as $k => &$v) {
         if (!empty($v["tocid"]) && $isReply) {
             $replyInfo = $this->getCommentInfo($v["tocid"], false);
             $v["replyInfo"] = "//@<a class='anchor' data-toggle='usercard' data-param='uid={$replyInfo["user_info"]["uid"]}' href='{$replyInfo["user_info"]["space_url"]}' target='_blank'>" . $replyInfo["user_info"]["realname"] . "</a>:" . $replyInfo["content"];
         } else {
             $v["replyInfo"] = "";
         }
         $v["isCommentDel"] = $isAdministrator || $uid === $v["uid"];
         $v["user_info"] = User::model()->fetchByUid($v["uid"]);
         $v["content"] = StringUtil::parseHtml($v["content"] . $v["replyInfo"]);
         $v["sourceInfo"] = Source::getCommentSource($v);
         if (!empty($v["attachmentid"])) {
             $v["attach"] = AttachUtil::getAttach($v["attachmentid"]);
         }
     }
     return $list;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:22,代码来源:Comment.php

示例5:

    ?>
</strong></span>
		</div>
		<div class="main-list-item-body">
			<div class="msg-box <?php 
    if ($row['fromuid'] == $uid) {
        ?>
msg-box-inverse bglb<?php 
    } else {
    }
    ?>
">
				<span class="msg-box-arrow"> <i></i></span>
				<div class="msg-box-body">
					<p class="xcm mb"><?php 
    echo StringUtil::parseHtml($row['content']);
    ?>
</p>
					<div>
						<span class="tcm fss"><?php 
    echo ConvertUtil::formatDate($row['mtime'], 'u');
    ?>
</span>
						<div class="pull-right">
							<!--
							<a href="javascript:;" onclick="replyMessage('<?php 
    echo $row['fromuser']['realname'];
    ?>
')">回复</a>
							-->
						</div>
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:message.php

示例6:

        ?>
" class="avatar-circle">
					<img src="<?php 
        echo $comment["user_info"]["avatar_middle"];
        ?>
" width="60" height="60">
				</a>
			</div>
			<div class="cmt-body">
				<p class="mbs xcm">
					<strong class="xcn"><?php 
        echo $comment["user_info"]["realname"];
        ?>
:</strong>
					<?php 
        echo StringUtil::parseHtml($comment["content"]);
        ?>
				</p>
				<div class="mbs fss">
					<span><?php 
        echo ConvertUtil::formatDate($comment["ctime"], "u");
        ?>
</span>
					<div class="pull-right">
						<a href="javascript:;" data-act="getreply" data-param='{"type":"reply","module":"message","table":"comment","rowid":"<?php 
        echo $comment["cid"];
        ?>
","name":"<?php 
        echo $comment["user_info"]["realname"];
        ?>
","type":"reply"}'><?php 
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:loadComment.php

示例7: array

            ?>
											<strong><?php 
            echo $row['lastmessage']['user']['realname'];
            ?>
</strong> <?php 
            echo $lang['To'], $lang['Me'], $lang['Say'];
            ?>
											<?php 
        }
        ?>
											<!-- 单行,过长时截断字符 -->
											<a href="<?php 
        echo $this->createUrl('pm/detail', array('id' => $row['listid'], 'type' => $row['type']));
        ?>
" class="xcm"><?php 
        echo StringUtil::parseHtml(StringUtil::cutStr($row['lastmessage']['content'], 100));
        ?>
</a>
										</p>
										<div>
											<div class="pull-left">
												<label class="checkbox checkbox-inline mbz">
													<input type="checkbox" value="<?php 
        echo $row['listid'];
        ?>
" name="pm">
												</label>
												<span class="tcm fss"><?php 
        echo ConvertUtil::formatDate($row['listctime'], 'u');
        ?>
</span>
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:index.php

示例8: parseTemplate

 private function parseTemplate($_data)
 {
     $user = User::model()->fetchByUid($_data["uid"]);
     $_data["data"] = unserialize($_data["feeddata"]);
     $var = $_data["data"];
     if (!empty($var["attach_id"])) {
         $var["attachInfo"] = AttachUtil::getAttach($var["attach_id"]);
         $attachUrl = FileUtil::getAttachUrl();
         foreach ($var["attachInfo"] as $ak => $av) {
             $_attach = array("attach_id" => $av["aid"], "attach_name" => $av["filename"], "attach_url" => FileUtil::fileName($attachUrl . "/" . $av["attachment"]), "extension" => StringUtil::getFileExt($av["filename"]), "size" => $av["filesize"]);
             if ($_data["type"] == "postimage") {
                 $_attach["attach_small"] = WbCommonUtil::getThumbImageUrl($av, WbConst::ALBUM_DISPLAY_WIDTH, WbConst::ALBUM_DISPLAY_HEIGHT);
                 $_attach["attach_middle"] = WbCommonUtil::getThumbImageUrl($av, WbConst::WEIBO_DISPLAY_WIDTH, WbConst::WEIBO_DISPLAY_HEIGHT);
             }
             $var["attachInfo"][$ak] = $_attach;
         }
     }
     $var["uid"] = $_data["uid"];
     $var["actor"] = "<a href='{$user["space_url"]}' data-toggle='usercard' data-param=\"uid={$user["uid"]}\">{$user["realname"]}</a>";
     $var["actor_uid"] = $user["uid"];
     $var["actor_uname"] = $user["realname"];
     $var["feedid"] = $_data["feedid"];
     if (!empty($_data["rowid"])) {
         empty($_data["table"]) && ($_data["table"] = "feed");
         $var["sourceInfo"] = Source::getSourceInfo($_data["table"], $_data["rowid"], false, $_data["module"]);
     } else {
         $var["sourceInfo"] = null;
     }
     $feedTemplateAlias = "application.modules.message.config.feed.{$_data["type"]}Feed";
     $file = Ibos::getPathOfAlias($feedTemplateAlias);
     if (!file_exists($file . ".php")) {
         $feedTemplateAlias = "application.modules.message.config.feed.postFeed";
     }
     $feedXmlContent = Ibos::app()->getController()->renderPartial($feedTemplateAlias, $var, true);
     $s = simplexml_load_string($feedXmlContent);
     if (!$s) {
         return false;
     }
     $result = $s->xpath("//feed[@type='" . StringUtil::filterCleanHtml($_data["type"]) . "']");
     $actions = (array) $result[0]->feedAttr;
     $return["content"] = $var["content"];
     if (isset($var["attach_id"])) {
         $return["attach_id"] = $var["attach_id"];
     }
     $return["userInfo"] = $user;
     $return["title"] = trim((string) $result[0]->title);
     $return["body"] = trim((string) $result[0]->body);
     $return["info"] = trim((string) $result[0]["info"]);
     $return["body"] = StringUtil::parseHtml($return["body"]);
     $return["api_source"] = $var["sourceInfo"];
     $return["actions"] = $actions["@attributes"];
     if (!$this->notDel($_data["module"], $_data["type"], $_data["rowid"])) {
         $return["body"] = Ibos::lang("Info already delete", "message.default");
     }
     return $return;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:56,代码来源:Feed.php


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