码字知识

小技巧:来源、作者自动显示

我想有以下技巧: 1、如果你是自己添加文件,修改你管理目录下的模板article_add: 将<input name=”source” type=”text” id=”source” style=”width:160px” size=”16″  /> 改为<input name=”source” type=”text” id=”source” style=”width:160px” size=”16″ value=”互联网收集” /> 2、如果你不想这么麻烦,在你自己的模板上添加: 来源:<span>{dede:field name=’source’ runphp=’yes’}if(@me == “”) @me = “互联网”;else @me = “”.@me; {/dede:field}</span>...

上一篇,下一篇自定义综合解决方案:标题链接调用,字数截取 灵动标签 sql 当前栏目

【一丝冰凉】今天总结下详细的解决方案: 一: 动态调用上一篇下一篇链接 <a href=”[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=pre”>上一篇</a>   动态调用上一篇链接 <a href=”[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=next”>下一篇</a> 动态调用下一篇链接 二: 运用灵动标签和SQl语句调用(感谢 平凡妹子) 上一篇链接: [e:loop={"select id,classid,newspath,filename,groupid,titleurl from [!db.pre!]ecms_”.$class_r[...

ECMS中在内容页获取当前栏目名称及链接

帝国的ECMS中获取当前栏目名称可以直接用:[!--class.name--] 获取当前栏目链接有两种方式: 1、[!--news.url--]e/public/ClassUrl/?classid=[!--self.classid--] 2、<?$r['classid']=$GLOBALS[navclassid];$classurl=sys_ReturnBqClassname($r,9);echo $classurl;?> 第一种获取的是内部动态链接,点击时会自动链接到静态页面,快速生成,占用资源少; 第二种直接得到就是静态链接,但是在文章较多的情况下,比较耗资源,但是SEO效果好。 大家可以充分比较下,选择合适自己的。 ...

ECMS中自动获取频道下子栏目

有时候频道很多,每个频道页面单独制作模版很麻烦,但是又想自动获取本频道下子栏目及连接,那么你就需要这个了。 代码如下: <? $bclassid = $class_r[$GLOBALS[navclassid]][bclassid]; //获取当前父栏目ID ?> [e:loop={"select classid,classname,classpath from [!db.pre!]enewsclass where bclassid = ‘$bclassid’ order by classid”,0,24,0}] <? $bqno%2==0?$style=”style=background:#E8E8E8;”:$style=”"; ?> <tr> <td width=”346″ height=”25″ valign=”top”><table w...

ECMS中在列表页如何单独调用年、月、日

列表内容模板(list.var) (*) 选中:使用程序代码 内容修改为: $listtemp=’<li><a href=”[!--titleurl--]” title=”[!--oldtitle--]“>[!--title--]</a> <span>’.date(“Y”,$r[newstime]).’年’.date(“m”,$r[newstime]).’月’.date(“d”,$r[newstime]).’日</span> </li>’; 其中这部分就是我开始想要的: ‘.date(“Y”,$r[newstime]).’年 ‘.date(“m”,$r[newstime]).’月 ‘.date(“d”,$r[newstime]).’日 ...

不同分类的详细页定义不同模板

时代前端上篇写过wordpress每个分类如何使用不同模板那是在不同分类的时候用不同的模板,那么现在在进一步人性化一点,让不同分类的详细页面也用不同模板,呵呵,对一些要求高的哥们就可以用上了。 具体方法 我将要对single.php(详细页面模板)文件添加一个条件标签让她达到“如果这个单页是属于xxx 分类的, 就显示xxx的风格”,这要用到If in_category 条件标签。 首先,复制两个single.php文件分别取名为 single1.php和single.2.php. 然后,把原先的single.php文件里面的内容全部删除,并用下面的代码进行替换: —————————————————...

Supesite:分享SQL调用第三方数据的心得

200985143142758
Supesite一直我喜欢的一款简单CMS,代码简单,维护也相当方便,但是目前不再开发了。我的中国财税网的考试部分就是基于Suepsite制作的。 这是我很早发布在Discuz官方的调用心得,现在把他转载回来。 首先感谢lidq.jingwu版主,他在论坛给了我很多帮助,在他的提示下,我才能成功获取到数据. 我个人认为在调用数据中最重要的就是要知道打印数据 <!–{eval print_r($_SBLOCK['vrcfonews']);}–> 只有打印出数据我们才能分析数据,采取合理的方式得到数据. 下面我以我调用ECMS最新文章,跟大家分享下: 1、我们模块管理中选择...

通过.htaccess更改主机时区显示

现在很多国内网站在河蟹中不得不搬到国外去,相应的一个问题就是国外空间的时区显示问题。虽然wordpress可以通用后台设置解决,但某些信息仍然不能解决时区的问题,如缓存所生成的文件时间、统计信息等。 一劳永逸的方法,就是在 .htaccess中增加 SetEnv TZ Asia/Chongqing 即可解决。 具体方法是: 打开网站根目录中的.htaccess,在里面的添加如下: SetEnv TZ Asia/Chongqing 之后保存即可! 测试的方法: 1、在更改.htaccess之前,我们先来测试下你空间当前的时间: 新建一个temp.php文件,写上:,上传访问,即可看到当前空间的时间。...
dd_thickbox(); $title = __('Dashboard'); $parent_file = 'index.php'; if ( is_user_admin() ) add_screen_option('layout_columns', array('max' => 4, 'default' => 1) ); else add_screen_option('layout_columns', array('max' => 4, 'default' => 2) ); $help = '

' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.' ) . '

'; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs $help = '

' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '

'; $help .= '

' . __('Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '

'; get_current_screen()->add_help_tab( array( 'id' => 'help-navigation', 'title' => __('Navigation'), 'content' => $help, ) ); $help = '

' . __('You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.') . '

'; $help .= '

' . __('Screen Options - Use the Screen Options tab to choose which Dashboard boxes to show, and how many columns to display.') . '

'; $help .= '

' . __('Drag and Drop - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.') . '

'; $help .= '

' . __('Box Controls - Click the title bar of the box to expand or collapse it. In addition, some box have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '

'; get_current_screen()->add_help_tab( array( 'id' => 'help-layout', 'title' => __('Layout'), 'content' => $help, ) ); $help = '

' . __('The boxes on your Dashboard screen are:') . '

'; $help .= '

' . __('Right Now - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.') . '

'; $help .= '

' . __('Recent Comments - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.') . '

'; $help .= '

' . __('Incoming Links - Shows links to your site found by Google Blog Search.') . '

'; $help .= '

' . __('QuickPress - Allows you to create a new post and either publish it or save it as a draft.') . '

'; $help .= '

' . __('Recent Drafts - Displays links to the 5 most recent draft posts you’ve started.') . '

'; $help .= '

' . __('WordPress Blog - Latest news from the official WordPress project.') . '

'; $help .= '

' . __('Other WordPress News - Shows the WordPress Planet feed. You can configure it to show a different feed of your choosing.') . '

'; $help .= '

' . __('Plugins - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.') . '

'; get_current_screen()->add_help_tab( array( 'id' => 'help-content', 'title' => __('Content'), 'content' => $help, ) ); unset( $help ); get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . '

' . __( 'Documentation on Dashboard' ) . '

' . '

' . __( 'Support Forums' ) . '

' ); include (ABSPATH . 'wp-admin/admin-header.php'); $today = current_time('mysql', 1); ?>

Fatal error: Call to undefined function screen_icon() in /home/vrcfocom/public_html/donvee/index.php on line 89