-
帝国cms前台投稿标题图片字段上传图片自动加上水印的方法
所属栏目:[教程] 日期:2021-01-08 热度:170
在e/class/userfun.php这个自定义函数文件中添加一个函数 function user_TranImgAuto($mid,$f,$isadd,$isq,$value,$cs){ global $empire,$dbtbpre,$public_r,$emod_r,$class_r,$tranpicturetype,$musername; //$filetf=$f.'imgf';//变量名 $filetf=$f.'fil[详细]
-
帝国cms前台会员投稿编辑器上传图片自动加上水印的方法
所属栏目:[教程] 日期:2021-01-08 热度:81
帝国CMS后台有水印功能,可以在后台参数设置中设置水印图片,但不支持前台。前台编辑器不支持水印功能。使用以下方法即可实现: 以最新版帝国CMS 7.2 utf-8 为例: 1、打开 e/class/qinfofun.php 文件, if($type==1)//图片{ 在下面添加以下代码: include[详细]
-
帝国cms搜索模板支持调用动态标签方法
所属栏目:[教程] 日期:2021-01-08 热度:167
复制以下代码到e/search/result/index.php ?php require('../../class/connect.php');require('../../class/db_sql.php');require('../../class/functions.php');require('../../class/t_functions.php');require('../../data/dbcache/class.php');require[详细]
-
在帝国cms内容页里调用收藏该内容的会员信息
所属栏目:[教程] 日期:2021-01-08 热度:92
[e:loop={"select a.*,b.* from [!db.pre!]enewsfava a LEFT JOIN [!db.pre!]enewsmemberadd b ON a.userid=b.userid where classid='$navinfor[classid]' and id='$navinfor[id]'",24,0}]lia href="[!--news.url--]e/space/?userid=?=$bqr[userid]?" targ[详细]
-
帝国CMS安装时出现You have an error in your SQL syntax错误代
所属栏目:[教程] 日期:2021-01-08 热度:65
帝国CMS安装时出现以下错误代码 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TYPE=MYISAM' 解决方法:安装时mysql版本没有选择对,mariadb要选择mysql5.[详细]
-
iframe框架调用高度自适应方法
所属栏目:[教程] 日期:2021-01-08 热度:64
iframe frameborder="0" src="http://www.daixiao360.cn/" class="iframe" frameborder="0" id="test" onload="this.height=100" width="762px" scrolling="no"/iframescript type="text/javascript"function reinitIframe(){var iframe = document.getEle[详细]
-
帝国cms模板里显示发布信息人的ip地址
所属栏目:[教程] 日期:2021-01-08 热度:187
1、管理数据表 - ***数据表 - 管理字段 - 添加一个 IP字段 2、建立infoip字段(字段名必须为infoip)、字段类型用VARCHAR、长度15,然后在投稿表单里增加这一段隐藏字段 input type="hidden" name="ip" type="text" id="ip" value="?=$ecmsfirstpost==1?eg[详细]
-
帝国cms后台标题图片实现远程下载
所属栏目:[教程] 日期:2021-01-08 热度:167
帝国CMS的标题图片都是需要手动上传的,常常需要到别的网站下载图片,然后再上传。 本教程就可以实现直接填写远程图片地址,系统会自动下载保存图片。 第一步:添加字段处理函数 将以下函数插入到 e/class/userfun.php 文件中 function f_picurl($mid,$f,$[详细]
-
帝国cms内容页调用下线时间代码
所属栏目:[教程] 日期:2021-01-08 热度:103
?$info=$empire-fetch1("select * from phome_enewsinfovote where classid='$navinfor[classid]' and id='$navinfor[id]'");echo date("Y-m-d H:i:s",$info[infodowntime]);?[详细]
-
帝国cms内容页文章字数统计
所属栏目:[教程] 日期:2021-01-08 热度:115
1、 ?=strlen($navinfor[newstext])? 统计:8022 个字 2、 ?=strlen(strip_tags($navinfor[newstext]))? 加上过滤后 统计:1559 个字 3、 ?=strlen(htmlspecialchars(strip_tags(str_replace('nbsp;','',str_replace('ldquo;',str_replace('rdquo;',$navin[详细]
-
帝国cms内容页模板显示作者
所属栏目:[教程] 日期:2021-01-08 热度:99
作者为空,则不输出任何内容 ?if($navinfor['writer']=="") {echo '';}else{echo 'span作者:'.$navinfor[writer].'/span';}? 或者输出其他 ?if($navinfor['writer']=="") {echo '占无作者';}else{echo 'span作者:'.$navinfor[writer].'/span';}?[详细]
