Пример #1
0
        ?>
" 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 
Пример #2
0
			<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">
Пример #3
0
 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);
 }
Пример #4
0
 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;
 }
Пример #5
0
    ?>
</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>
Пример #6
0
        ?>
" 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 
Пример #7
0
            ?>
											<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>
Пример #8
0
 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;
 }