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


PHP GetDDImage函数代码示例

本文整理汇总了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);
开发者ID:suibber,项目名称:jb,代码行数:31,代码来源:article_edit.php

示例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',
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:30,代码来源:spec_add_action.php

示例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',
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:story_edit_action.php

示例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;
}
开发者ID:playfay,项目名称:FlowDedeCmsBackstageTemplets,代码行数:22,代码来源:inc_archives_functions.php

示例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) {
开发者ID:nanhuacrab,项目名称:www,代码行数:31,代码来源:album_add.php

示例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;
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:12,代码来源:inc_archives_functions.php


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