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


PHP stripWindCode函数代码示例

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


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

示例1: topicPost

 function topicPost($tid, $postdata)
 {
     global $timestamp, $winduid, $windid;
     if (!$this->info) {
         return false;
     }
     $this->_db->update("INSERT INTO pw_argument SET " . S::sqlSingle(array('tid' => $tid, 'cyid' => $this->info['id'], 'postdate' => $timestamp, 'lastpost' => $timestamp)));
     if ($postdata['ifcheck'] > 0) {
         require_once R_P . 'u/require/core.php';
         //tnum加一
         //* $this->_db->update("UPDATE pw_colonys SET tnum=tnum+'1',pnum=pnum+'1',todaypost=todaypost+'1' WHERE id=" . S::sqlEscape($this->cyid));
         $this->_db->update(pwQuery::buildClause("UPDATE :pw_table SET tnum=tnum+1,pnum=pnum+1,todaypost=todaypost+1 WHERE id=:id", array('pw_colonys', $this->cyid)));
         $this->info['tnum']++;
         $this->info['pnum']++;
         updateGroupLevel($this->cyid, $this->info);
         if ($this->info['ifopen']) {
             $weiboService = L::loadClass('weibo', 'sns');
             /* @var $weiboService PW_Weibo */
             $weiboContent = substrs(stripWindCode($postdata['content']), 125);
             $weiboExtra = array('cyid' => $this->cyid, 'title' => stripslashes($postdata['title']), 'cname' => $this->info['cname']);
             $weiboService->send($winduid, $weiboContent, 'group_article', $tid, $weiboExtra);
         }
     }
     //更新群成员表里面的最后发言时间
     $this->_db->update("UPDATE pw_cmembers SET lastpost=" . S::sqlEscape($timestamp) . " WHERE uid=" . S::sqlEscape($winduid));
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:26,代码来源:colonypost.class.php

示例2: getSourceData

 function getSourceData($sourceId)
 {
     $data = $this->_getDiaryData($sourceId);
     if (!$data) {
         return array();
     }
     $data['descrip'] = substrs(stripWindCode($data['content']), 100);
     $data['frominfo'] = 'хуж╬';
     $data['author'] = $data['username'];
     return $data;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:11,代码来源:diarysourcetype.class.php

示例3: getSourceData

 function getSourceData($sourceId)
 {
     $data = $this->_getThreadData($sourceId);
     if (!$data || $this->_checkIfDelete($data)) {
         return array();
     }
     $data['content'] = preg_replace("/\\[attachment=[0-9]+\\]/is", '', $data['content']);
     $data['descrip'] = substrs(stripWindCode($data['content']), 100);
     $data['frominfo'] = 'ÂÛ̳';
     return $data;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:11,代码来源:threadsourcetype.class.php

示例4: _cookData

 function _cookData($data)
 {
     global $db_bbsurl;
     $data['url'] = $db_bbsurl . '/apps.php?q=group&cyid=' . $data['id'];
     $data['title'] = $data['cname'];
     $data['image'] = $this->_getGroupImage($data['cnimg']);
     $data['descrip'] = substrs(strip_tags(stripWindCode($data['descrip'])), 100);
     if ($data['credit']) {
         $data['credit'] = (int) $data['credit'];
     }
     return $data;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:12,代码来源:groupsource.class.php

示例5: set_summary

 /**
  * @param $_summary the $_summary to set
  */
 function set_summary($_summary, $convert)
 {
     if ($_summary) {
         $_summary = stripWindCode($_summary);
         $_summary = strip_tags($_summary);
         $_summary = str_replace(array('"', "\n", "\r", ' ', '&', '<', '', ' '), '', $_summary);
         $_summary = substrs($_summary, 255);
         if ($convert) {
             $wordsfb = L::loadClass('FilterUtil');
             $_summary = $wordsfb->convert($_summary);
         }
         $this->_summary = trim($_summary);
     }
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:17,代码来源:seoset.class.php

示例6: getDescripByTid

function getDescripByTid($tid)
{
    global $db;
    $tid = (int) $tid;
    if (!$tid) {
        return '';
    }
    $table = GetTtable($tid);
    $content = $db->get_value("SELECT content FROM {$table} WHERE tid=" . S::sqlEscape($tid));
    $content = preg_replace("/<((style|script).*?)>(.*?)<(\\/\\1.*?)>/si", "", $content);
    $content = strip_tags(stripWindCode($content));
    $content = trim($content);
    return substrs($content, 200);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:14,代码来源:functions.php

示例7: _getContentANDSubjectByDiary

 /**
  * 有条件处理日志内容和标题
  *
  * @param array() 	$data		日志数据
  * @param bool 		$islist		是否是列表,列表页日志内容显示字节
  */
 function _getContentANDSubjectByDiary($data, $islist = false, $isFilterFace = false)
 {
     global $groupid, $db_shield, $db_windpost, $o_shownum;
     $result = array();
     if ($data['groupid'] == 6 && $db_shield && $groupid != 3) {
         $data['subject'] = '';
         $data['content'] = appShield('ban_diary');
     }
     $wordsService = $this->_serviceFactory('FilterUtil', 'filter');
     /* @var $wordsService PW_FilterUtil */
     if (!$wordsService->equal($data['ifwordsfb'])) {
         $data['content'] = $wordsService->convert($data['content'], array('id' => $data['did'], 'type' => 'diary', 'code' => $data['ifwordsfb']));
     }
     $isFilterFace == true && ($data['content'] = preg_replace("/\\[s:(.+?)\\]/eis", '', $data['content']));
     require_once R_P . 'require/bbscode.php';
     $data['ifconvert'] == 2 && ($data['content'] = convert($data['content'], $db_windpost));
     if ($islist) {
         $data['content'] = strip_tags($data['content']);
         $data['content'] = stripWindCode($this->escapeStr($data['content']));
         $o_shownum && ($data['content'] = substrs($data['content'], $o_shownum));
     }
     $data['content'] = preg_replace('/\\[upload=(\\d+)\\]/Ui', "", $data['content']);
     $data['content'] = str_replace("\n", "<br />", $data['content']);
     $result = array($data['subject'], $data['content']);
     return $result;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:32,代码来源:diary.class.php

示例8: wap_clscode

function wap_clscode($string)
{
    return stripWindCode($string);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:4,代码来源:wap_mod.php

示例9: forum_sell

}
if (!$admincheck && $foruminfo['forumsell']) {
    forum_sell($fid);
}
if ($read['ifcheck'] == 0 && !$isGM && $windid != $read['author'] && !pwRights($isBM, 'viewcheck')) {
    Showmsg('read_check');
}
if ($read['locked'] % 3 == 2 && !$isGM && !pwRights($isBM, 'viewclose')) {
    Showmsg('read_locked');
}
$db_metakeyword = substr($read['tags'], 0, strpos($read['tags'], "\t"));
$db_metakeyword = (empty($db_metakeyword) ? $subject : $db_metakeyword) . ',' . $forumtitle;
$db_metakeyword = trim(str_replace(array('|', ' - ', "\t", ' ', ',,,', ',,'), ',', $db_metakeyword), ',');
if ($groupid == 'guest' && !$read['ifshield'] && !isban($read, $fid)) {
    if ($read['ifconvert'] == 2) {
        $metadescrip = stripWindCode($read['content']);
        $metadescrip = strip_tags($metadescrip);
    } else {
        $metadescrip = strip_tags($read['content']);
    }
    $metadescrip = str_replace(array('"', "\n", "\r", '&nbsp;', '&amp;', '&lt;', '', '&#160;'), '', $metadescrip);
    $metadescrip = substrs($metadescrip, 255, false);
    if ($read['ifwordsfb'] != $db_wordsfb) {
        //$metadescrip = wordsfb($metadescrip,$read['ifwordsfb']);
        $wordsfb = L::loadClass('FilterUtil', 'filter');
        $metadescrip = $wordsfb->convert($metadescrip);
    }
    if (trim($metadescrip)) {
        $db_metadescrip = $metadescrip;
    }
    unset($metadescrip, $tmpAllow);
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:mod_read.php

示例10: IN

     $sqltab .= ' LEFT JOIN pw_cmembers cm ON c.id=cm.colonyid';
     $sqlsel .= ' AND cm.uid IN(' . S::sqlImplode($uids) . ')';
 }
 $total = $db->get_value("SELECT COUNT(DISTINCT c.id) AS sum FROM pw_colonys c {$sqltab} WHERE 1 {$sqlsel}");
 if ($total) {
     require_once R_P . 'require/bbscode.php';
     list($pages, $limit) = pwLimitPages($total, $page, "group.php?q=all" . ($members ? "&members={$members}" : '') . ($isFriends ? "&friends={$isFriends}" : '') . "&keyword=" . rawurlencode($keyword) . "&" . ($styleid ? "styleid=" . $styleid : "") . "&");
     $query = $db->query("SELECT DISTINCT c.* FROM pw_colonys c {$sqltab} WHERE 1 {$sqlsel} ORDER BY c.id DESC {$limit}");
     while ($rt = $db->fetch_array($query)) {
         if ($rt['cnimg']) {
             list($rt['cnimg']) = geturl("cn_img/{$rt['cnimg']}", 'lf');
         } else {
             $rt['cnimg'] = $GLOBALS['imgpath'] . '/g/groupnopic.gif';
         }
         $rt['cname'] = str_replace($keyword, '<font color="#FF0000">' . $keyword . '</font>', $rt['cname']);
         $rt['descrip'] = str_replace($keyword, '<font color="#FF0000">' . $keyword . '</font>', stripWindCode($rt['descrip']));
         $rt['colonyNums'] = PwColony::calculateCredit($rt);
         $rt['createtime'] = get_date($rt['createtime'], 'Y-m-d');
         $group[$rt['id']] = $rt;
     }
 }
 $colonyids = S::sqlImplode(array_keys($group));
 if ($colonyids) {
     $query = $db->query("SELECT id,ifadmin,colonyid FROM pw_cmembers WHERE colonyid IN ({$colonyids}) AND uid=" . S::sqlEscape($winduid, false));
     while ($rt = $db->fetch_array($query)) {
         $cMembers[$rt['colonyid']] = $rt['ifadmin'];
     }
 }
 $u = $winduid;
 $username = $windid;
 /*
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:group.php

示例11: IN

         }
         $description = "Latest {$Rss_newnum} article of all forums";
         if ($fids) {
             $sql = "WHERE fid IN({$fids}) AND ifcheck=1 AND topped='0' AND postdate>" . pwEscape($timestamp - 604800) . " ORDER BY postdate DESC LIMIT {$Rss_newnum}";
             $forceindex = 'FORCE INDEX (postdate)';
         }
     }
     $channel = array('title' => $db_bbsname, 'link' => $db_bbsurl, 'description' => $description, 'copyright' => "Copyright(C) {$db_bbsname}", 'generator' => "PHPWind Forums by PHPWind Studio", 'lastBuildDate' => date('r'));
     $image = array('url' => "{$imgpath}/{$stylepath}/rss.gif", 'title' => 'PHPWind Board', 'link' => $db_bbsurl, 'description' => $db_bbsname);
     $Rss = new Rss(array('xml' => "1.0", 'rss' => "2.0", 'encoding' => $db_charset));
     $Rss->channel($channel);
     $Rss->image($image);
     if ($sql) {
         $query = $db->query("SELECT t.tid,t.fid,t.subject,t.author,t.postdate,t.anonymous,tm.content FROM pw_threads t {$forceindex} RIGHT JOIN {$pw_tmsgs} tm ON tm.tid=t.tid {$sql}");
         while ($rt = $db->fetch_array($query)) {
             $rt['content'] = substrs(stripWindCode($rt['content']), 300);
             $rt['anonymous'] && ($rt['author'] = $db_anonymousname);
             if ($db_htmifopen) {
                 $link = "{$db_bbsurl}/read{$db_dir}tid-{$rt['tid']}{$db_ext}";
             } else {
                 $link = "{$db_bbsurl}/read.php?tid={$rt['tid']}";
             }
             $item = array('title' => $rt['subject'], 'description' => $rt['content'], 'link' => $link, 'author' => $rt['author'], 'category' => $forum[$rt['fid']]['name'], 'pubdate' => date('r', $rt['postdate']));
             $Rss->item($item);
         }
     }
     $Rss->generate($cache_path);
 }
 header("Content-type: application/xml");
 @readfile($cache_path);
 exit;
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:rss.php

示例12: getColonyThread

 function getColonyThread($tid)
 {
     $pw_tmsgs = GetTtable($tid);
     $rt = $this->_db->get_one("SELECT a.cyid,t.tid,t.subject,t.fid,t.ptable,tm.content,c.cname FROM pw_argument a left join pw_threads t ON a.tid=t.tid LEFT JOIN {$pw_tmsgs} tm ON t.tid=tm.tid LEFT JOIN pw_colonys c ON a.cyid=c.id WHERE a.tid=" . pwEscape($tid));
     return $rt ? array('content' => substrs(stripWindCode($rt['content']), 125), 'type' => 40, 'objectid' => $rt['tid'], 'extra' => array('title' => $rt['subject'], 'cyid' => $rt['cyid'], 'cname' => $rt['cname'])) : array();
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:6,代码来源:weibo.php

示例13: _buildGroups

 function _buildGroups($groups, $keywords)
 {
     if (!$groups) {
         return array();
     }
     $result = array();
     $keywords = $keywords ? explode(",", $keywords) : array();
     foreach ($groups as $group) {
         $group['id'] = $group['id'];
         $group['createtime'] = get_date($group['createtime'], "Y-m-d H:i");
         $group['descrip'] = substrs(stripWindCode(strip_tags($group['descrip'])), 100);
         $group['credit'] = $this->_calculateCredit($group);
         $group['sname'] = $group['sname'] ? $group['sname'] : '末分类';
         foreach ($keywords as $keyword) {
             $keyword && ($group['cname'] = $this->_highlighting($keyword, $group['cname']));
             $keyword && ($group['descrip'] = $this->_highlighting($keyword, $group['descrip']));
         }
         if ($group['cnimg']) {
             list($group['cnimg']) = geturl("cn_img/" . $group['cnimg'], 'lf');
         } else {
             $group['cnimg'] = "images/search/group.png";
         }
         $result[] = $group;
     }
     return $result;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:26,代码来源:base.search.php

示例14: array_keys

     $uids = $friends ? array_keys($friends) : array(0);
     $sqltab .= ' LEFT JOIN pw_cmembers cm ON c.id=cm.colonyid';
     $sqlsel .= ' AND cm.uid IN(' . S::sqlImplode($uids) . ')';
 }
 $total = $db->get_value("SELECT COUNT(DISTINCT c.id) AS sum FROM pw_colonys c {$sqltab} WHERE 1 {$sqlsel}");
 if ($total) {
     require_once R_P . 'require/bbscode.php';
     list($pages, $limit) = pwLimitPages($total, $page, "{$basename}a=all&keyword=" . rawurlencode($keyword) . "&" . ($styleid ? "styleid=" . $styleid : "") . "&");
     $query = $db->query("SELECT DISTINCT c.* FROM pw_colonys c {$sqltab} WHERE 1 {$sqlsel} ORDER BY c.id DESC {$limit}");
     while ($rt = $db->fetch_array($query)) {
         if ($rt['cnimg']) {
             list($rt['cnimg']) = geturl("cn_img/{$rt['cnimg']}", 'lf');
         } else {
             $rt['cnimg'] = $GLOBALS['imgpath'] . '/g/groupnopic.gif';
         }
         $rt['descrip'] = stripWindCode($rt['descrip']);
         $rt['colonyNums'] = PwColony::calculateCredit($rt);
         $rt['createtime'] = get_date($rt['createtime'], 'Y-m-d');
         $group[$rt['id']] = $rt;
     }
 }
 $colonyids = S::sqlImplode(array_keys($group));
 if ($colonyids) {
     $query = $db->query("SELECT id,ifadmin,colonyid FROM pw_cmembers WHERE colonyid IN ({$colonyids}) AND uid=" . S::sqlEscape($winduid, false));
     while ($rt = $db->fetch_array($query)) {
         $cMembers[$rt['colonyid']] = $rt['ifadmin'];
     }
 }
 $u = $winduid;
 $username = $windid;
 /*
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:m_groups.php

示例15: getLatestImgThread

 function getLatestImgThread($fids, $offset, $limit)
 {
     list($fids, $offset, $limit) = array($fids ? explode(',', $fids) : array(), intval($offset), intval($limit));
     global $attachpath;
     $tmpData = $result['threads'] = $tmpThreadInfos = array();
     $sqlLimit = $offset > 0 ? ' AND tid < ' . intval($offset) : '';
     $fidLimit = S::isArray($fids) ? ' AND fid IN (' . S::sqlImplode($fids) . ') ' : '';
     $result['count'] = intval($GLOBALS['db']->get_value("SELECT COUNT(distinct tid) as count FROM pw_attachs WHERE `pid`=0 AND `did`=0 AND `type`='img' {$fidLimit}"));
     if ($result['count'] > 0) {
         $query = $GLOBALS['db']->query("SELECT tid,attachurl,ifthumb,count(attachurl) as count FROM pw_attachs WHERE `pid`=0 AND `did`=0 AND `type`='img' {$sqlLimit} {$fidLimit} GROUP BY tid ORDER BY uploadtime DESC LIMIT " . intval($limit));
         while ($rt = $GLOBALS['db']->fetch_array($query)) {
             $rt['tid'] > 0 && ($tmpData[$rt['tid']]['picurl'] = current($this->getCustomizedCommonService()->getAttachWithThumblist(array($rt))));
             $rt['tid'] > 0 && ($tmpData[$rt['tid']]['piccount'] = $rt['count']);
         }
     }
     if (count($tmpData) > 0) {
         $tmpThreadInfos = $this->getThreadsByTids(array_filter(array_unique(array_keys($tmpData))));
         foreach ($tmpData as $tid => $value) {
             $tmpResult = isset($tmpThreadInfos[$tid]) ? $tmpThreadInfos[$tid] : array();
             if (isset($tmpResult['content'])) {
                 $tmpResult['content'] = preg_replace('|\\[attachment=\\d+\\]|i', '', $tmpResult['content']);
                 $tmpResult['content'] = strip_tags(stripWindCode($tmpResult['content']));
             }
             $tmpData[$tid] = array_merge($value, $tmpResult);
         }
     }
     $result['threads'] = $tmpData;
     return $this->buildResponse(0, $result);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:29,代码来源:ver.customized.thread.php


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