当前位置:首页 > ZBLOG > 正文

zblog发布文章写代码的简单介绍

今天给各位分享zblog发布文章写代码的知识,其中也会对进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

请问zblog博客或者html代码,怎么添加一个隐藏内容--需要输入密码 或者 需要登录才能看!

可以在发布文章的时候可以把文章类型设置成私人文章,这样只有在登录状态下才能查看文章的。更多的内容可以去zblog仿站乐园看下。。

zblogphp的发表的文章在源码哪个文件夹

1、新建广告文件

在模板文件夹内建一个文件作为放广告代码的文件(这里暂且命名为:post-ad.php)

2、修改模板文件

找到 \zb_users\theme\default\template\index.php (default根据你自己的模板为准)这个文件找到下面这段代码:

PHP

{foreach $articles as $article}

{if $article.IsTop}

{template:post-istop}

{else}

{template:post-multi}

{/if}

{/foreach}

如果你只想在置顶列表里加入广告那么将上面的代码替换为:

PHP

{php}$j=1;{/php}

{foreach $articles as $article}

{if $article.IsTop}

{template:post-istop}

{if $j==3}

{template:post-ad} (这里也可以不调用,直接放广告代码)

{/if}

{php}$j++;{/php}

{else}

{template:post-multi}

{/if}

{/foreach}

(数字3为广告出现的位置,post-ad 为第一步建的文件名,下同)

如果你想在除置顶列表外加入广告那么将上面的代码替换为:

PHP

{php}$i=1;{/php}

{foreach $articles as $article}

{if $article.IsTop}

{template:post-istop}

{else}

{template:post-multi}

{if $i==3}

{template:post-ad}

{/if}

{php}$i++;{/php}

{/if}

{/foreach}

上面两个位置同时出现的代码为:

PHP

{php}$i=1;$j=1;{/php}

{foreach $articles as $article}

{if $article.IsTop}

{template:post-istop}

{if $j==3}

{template:post-ad}

{/if}

{php}$j++;{/php}

{else}

{template:post-multi}

{if $i==3}

{template:post-ad}

{/if}

{php}$i++;{/php}

{/if}

{/foreach}

zblog编辑器FCKeditor中如何插入代码并高亮显示

不但可以向本文一样显示代码,并且高亮显示。

一、在FCKeditor的配置文件(一般为fckconfig.js或custom.config.js)中,配置 FCKConfig.ToolbarSets设置部分 添加一个按钮值 'InsertCode',步骤如下:

1、在配置文件中找到下面的代码:

JavaScript代码

XML/HTML代码

FCKConfig.ToolbarSets[Default]=[

['Source','FontName','FontSize'],

['TextColor','BGColor'],

['Image','Media','Flash','Table','Smiley','SpecialChar'],

['ShowBlocks','Preview','FitWindow'],

'/',

['PasteText','Templates','Find','RemoveFormat'],

['Undo','Redo'],

['-','Bold','Italic','Underline','StrikeThrough'],

['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],

['JustifyLeft','JustifyCenter','JustifyRight'],

['Link','Unlink','Rule'],

['Subscript','Superscript','-','InsertCode']//Nocommaforthelastrow.];看到了么?最后一句的区别。

2、查找:FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/';

在下面加上:

FCKConfig.Plugins.Add('insertcodeRun');

二、打开fckeditor\editor\lang文件夹里的zh-cn.js,在结尾的 };之前 加入以下代码

InsertCodeBtn : 插入代码

注意:加入上面代码时,原来的最未句代码后面要加个逗号.

请问那个用Z-blog建二级目录网站,在哪里写代码?

不用写什么代码吧

建个子目录,把zblog的程序放到里面,然后将域名绑定,服务器端设置绑定到子目录就可以了

zblog发布文章写代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于、zblog发布文章写代码的信息别忘了在本站进行查找喔。

取消
扫码支持 支付码