本文整理汇总了PHP中GetDDImage函数的典型用法代码示例。如果您正苦于以下问题:PHP GetDDImage函数的具体用法?PHP GetDDImage怎么用?PHP GetDDImage使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetDDImage函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cn_substrR
$writer = cn_substrR($writer, 20);
$source = cn_substrR($source, 30);
$description = cn_substrR($description, 250);
$keywords = trim(cn_substrR($keywords, 60));
$filename = trim(cn_substrR($filename, 40));
$isremote = empty($isremote) ? 0 : $isremote;
$serviterm = empty($serviterm) ? "" : $serviterm;
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) {
$arcrank = -1;
}
$adminid = $cuserLogin->getUserID();
//处理上传的缩略图
if (empty($ddisremote)) {
$ddisremote = 0;
}
$litpic = GetDDImage('none', $picname, $ddisremote);
//分析body里的内容
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext');
//分析处理附加表数据
$inadd_f = '';
$inadd_v = '';
if (!empty($dede_addonfields)) {
$addonfields = explode(';', $dede_addonfields);
$inadd_f = '';
$inadd_v = '';
if (is_array($addonfields)) {
foreach ($addonfields as $v) {
if ($v == '') {
continue;
}
$vs = explode(',', $v);
示例2: cn_substr
if($ishtml==0) $ismake = -1;
else $ismake = 0;
$title = cn_substr($title,80);
$shorttitle = cn_substr($shorttitle,36);
$color = cn_substr($color,10);
$writer = cn_substr($writer,30);
$source = cn_substr($source,50);
$description = cn_substr($description,250);
if($keywords!="") $keywords = trim(cn_substr($keywords,60))." ";
//处理上传的缩略图
if(empty($ddisremote)) $ddisremote = 0;
$litpic = GetDDImage('litpic',$picname,$ddisremote);
$adminID = $cuserLogin->getUserID();
$dsql = new DedeSql(false);
$cts = GetChannelTable($dsql,$channelid);
$arcID = GetIndexKey($dsql,$typeid,$channelid);
//加入主档案表
//----------------------------------
$inQuery = "INSERT INTO `{$cts['maintable']}`(
ID,typeid,typeid2,sortrank,iscommend,ismake,channel,
arcrank,click,title,shorttitle,color,writer,source,litpic,
pubdate,senddate,arcatt,adminID,memberID,description,keywords,templet)
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$iscommend','$ismake','$channelid',
示例3: DedeSql
}
$dsql = new DedeSql(false);
//获得父栏目
$nrow = $dsql->GetOne("Select * From #@__story_catalog where id='$catid' ");
$bcatid = $nrow['pid'];
$booktype = $nrow['booktype'];
$pubdate = GetMkTime($pubdate);
$bookname = cn_substr($bookname,50);
if($keywords!="") $keywords = trim(cn_substr($keywords,60));
//处理上传的缩略图
$litpic = GetDDImage('litpic',$litpicname,0);
$adminID = $cuserLogin->getUserID();
//自动摘要
if($description=="" && $cfg_auot_description>0){
$description = stripslashes(cn_substr(html2text($body),$cfg_auot_description));
$description = addslashes($description);
}
//----------------------------------
$upQuery = "
Update `#@__story_books`
set catid='$catid',
bcatid='$bcatid',
iscommend='$iscommend',
示例4: GetDDImgFromBody
/**
* 取第一个图片为缩略图
*
* @access public
* @param string $body 文档内容
* @return string
*/
function GetDDImgFromBody(&$body)
{
$litpic = '';
preg_match_all("/(src)=[\"|'| ]{0,}([^>]*\\.(gif|jpg|bmp|png))/isU", $body, $img_array);
$img_array = array_unique($img_array[2]);
if (count($img_array) > 0) {
$picname = preg_replace("/[\"|'| ]{1,}/", '', $img_array[0]);
if (preg_match("#_lit\\.#", $picname)) {
$litpic = $picname;
} else {
$litpic = GetDDImage('ddfirst', $picname, 1);
}
}
return $litpic;
}
示例5: GetIP
$userip = GetIP();
$isremote = empty($isremote) ? 0 : $isremote;
$serviterm = empty($serviterm) ? "" : $serviterm;
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) {
$arcrank = -1;
}
$adminid = $cuserLogin->getUserID();
//处理上传的缩略图
if (empty($ddisremote)) {
$ddisremote = 0;
}
$litpic = GetDDImage('none', $picname, $ddisremote);
//使用第一张图作为缩略图
if ($ddisfirst == 1 && $litpic == '') {
if (isset($imgurl1)) {
$litpic = GetDDImage('ddfirst', $imgurl1, $isrm);
}
}
//生成文档ID
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid);
if (empty($arcID)) {
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1");
exit;
}
$imgurls = "{dede:pagestyle maxwidth='{$maxwidth}' pagepicnum='{$pagepicnum}' ddmaxwidth='{$ddmaxwidth}' row='{$row}' col='{$col}' value='{$pagestyle}'/}\r\n";
$hasone = FALSE;
//处理并保存从网上复制的图片
/*---------------------
function _getformhtml()
------------------*/
if ($formhtml == 1) {
示例6: GetDDImgFromBody
function GetDDImgFromBody(&$body)
{
$litpic = '';
preg_match_all("/(src|SRC)=[\"|'| ]{0,}(.*\.(gif|jpg|jpeg|bmp|png))/isU",$body,$img_array);
$img_array = array_unique($img_array[2]);
if(count($img_array)>0){
$picname = preg_replace("/[\"|'| ]{1,}/","",$img_array[0]);
if(ereg("_lit\.",$picname)) $litpic = $picname;
else $litpic = GetDDImage('ddfirst',$picname,0);
}
return $litpic;
}