发布时间:2023-04-04 00:58:04
来源:网络
.
秋在田野里。田野是金飘落的叶子色的。飘落的叶子澄澄的稻谷,远远望去,整个田野就像铺上了一块金色的地毯。
1、打开 \dede\swfupload.php 找到
echo "FILEID:".$_SESSION['fileid'];
|
在它的上面加入
$file_snames = explode('.', $Filename);
$file_filename = $file_snames[count($file_snames)-2];
$_SESSION['file_filename'][$_SESSION['fileid']] = $file_filename;
|
继续找到
/************************
//删除指定ID的图片
*************************/
|
在它的上面加入
/************************
//生成注释
function GetThumbnail(){ }
*************************/
else if($dopost=='thumbalt')
{
if( empty($id) )
{
header('HTTP/1.1 500 Internal Server Error');
echo 'No ID';
exit(0);
}
if (!is_array($_SESSION['file_filename']) || !isset($_SESSION['file_filename'][$id]))
{
header('HTTP/1.1 404 Not found');
exit(0);
}
if($cfg_soft_lang=='utf-8') $file_filename = $_SESSION['file_filename'][$id];
else $file_filename = iconv( 'UTF-8', 'gb2312//IGNORE' , $_SESSION['file_filename'][$id]);
echo $file_filename;
exit(0);
}
|
2、打开 \dede\album_add.php 找到
$imginfo = !empty(${'picinfook'.$k}) ? ${'picinfook'.$k} : '';
|
改成
$imginfo = !empty(${'picinfook'.$k}) ? ${'picinfook'.$k} : $_SESSION['file_filename'][$k];
|
3、打开 \dede\album_edit.php 找到
$imginfo = !empty(${'picinfook'.$k}) ? ${'picinfook'.$k} : '';
|
改成
$imginfo = !empty(${'picinfook'.$k}) ? ${'picinfook'.$k} : $_SESSION['file_filename'][$k];
|
4、打开 \dede\js\handlers.js 找到
newImgDiv.innerHTML += '<div style="margin-top:10px">注释:<input type="text" name="picinfo'+albImg+'" value="" style="width:'+iptwidth+'px;" /></div>';
|
改成
newImgDiv.innerHTML += '<div style="margin-top:10px">注释:<input type="text" name="picinfo'+albImg+'" value="" style="width:'+iptwidth+'px;" id="picinput'+albImg+'" /><span id="picinfo'+albImg+'" style="display:none;"></span></div>';
var picinfo = document.getElementById('picinfo'+albImg);
var picinput = document.getElementById('picinput'+albImg);
var myajax = new DedeAjax(picinfo,false,false,"","","");
myajax.SendGet2('swfupload.php?dopost=thumbalt&id='+pid);
picinput.value = picinfo.innerHTML;
DedeXHTTP = null;
|
完成
本文转载自:http://www.dedediy.com
以上就是[转载]dedecms织梦图集上传图片用图片名做注释。世界读书日,无论是电子书还是纸质书,无论是励志书还是专业书,无论是文言文还是白话文,无论是书声琅琅还是默默诵读,只要我们有一颗读书的心,有一颗思考的脑,有一双明慧的眼,就能共同在书海里快乐地翱翔!更多关于[转载]dedecms织梦图集上传图片用图片名做注释请关注haodaima.com其它相关文章!