‘心得笔记’ 分类的存档

今天去郑永那里评论的时候发现,评论的时候竟然有出现我博客的最新文章,遂通过郑永评论框那里的插件链接到达插件作者的页面,找到了这么一个可以在评论时显示评论者最新文章的插件。 插件地址:http://comluv.com/download/commentluv-wordpress/ 安装后的后台设置界面: 效果的话嘛!大家在下面评论的时候勾选“显示您的最新博文”就有啦!

2010年5月17日23:43 | 14 条评论

1、更改标题:页面的标题不要包含博客名称 一些包含大量内容的, 或者属于某一类的页面, 只显示标题. 其他的页面只显示博客名称. 我的实现代码如下. <title><?php if ( is_single() || is_page() || is_category() || is_tag() ) { wp_title(”); } else { bloginfo(‘name’); } ?></title> 2、Keywords & Description Keywords 为搜索引擎提供网页包含的核心内容, Description 则为搜索引擎提供网页的描述信息.这个我没有使用一些SEO的插件,自己手动来改代码吧!当然,不同的页面处理方法也不同的。下面是搜索来的: <?php if (is_home()){ $keywords = “wordpress,网络管理,php学习,”; $description = “华斐的学习博客,关注wordpress和互联网相关的一些东西”; } elseif (is_single()){ if ($post->post_excerpt) { $description = $post->post_excerpt; } else { if(preg_match(‘/<p>(.*)<\/p>/iU’,trim(strip_tags($post->post_content,”<p>”)),$result)){ $post_content [...]

2010年5月14日01:08 | 4 条评论
标签: , ,

好久没有折腾Wordpress了,晚上趁着睡不着,更换下主题并做些修改,为了以后方便修改和查找,在此记录下。   第一、修改inove导航菜单同时显示页面和分类 1、给主题设置里添加一个选项:show all(意思就是同时显示页面和分类)。 1)修改inove/functions.php在第220行找到: <label> <input name="menu_type" type=”radio” value=”categories” <?phpif($options['menu_type'] == ‘categories’) echo "checked=’checked’"; ?> /> <?php _e(‘Show categories as menu.’, ‘inove’); ?> </label> 2)在下面添加: <label>    <input name="menu_type" type=”radio” value=”pages_and_categories” <?phpif($options['menu_type'] == ‘pages_and_categories’) echo"checked=’checked’"; ?> />  <?php _e(‘Show All.’, ‘inove’); ?> </label> 2、实现ShowAll功能: 1)修改inove/templates/header.php在第30行找到: <?php if($options['menu_type'] == ‘categories’){wp_list_categories(‘title_li=0&orderby=name&show_count=0′);} else {wp_list_pages(‘title_li=0&sort_column=menu_order’);} ?> 2)将上面的代码替换为: <?php [...]

2010年5月13日02:26 | 1 条评论
2010年5月6日00:57 | 没有评论
分类: 心得笔记

最近由于考试要求,需要配置LINUX下的网络服务。安装了虚拟机,下载了Cent Os并安装在VirtualBox里面,今天折腾了一下午就主要是安装和配置SSH登录。安装就不用说了,网上搜索有一大堆的教程,我觉得难点还是在分区那一块地方,理解好了就万事大吉。 下面说说从Windows下面通过Putty用SSH方式登录的配置吧。 SSH默认是使用端口22来连接的,VirtualBox的联网方式是NAT。 Ctrl+R打开cmd,cd 到VirtualBox的安装目录,执行下面几条语句:   VBoxManage setextradata linxu_server “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol” TCP VBoxManage setextradata linux_server “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort” 22 //这个端口可以自由设定 VBoxManage setextradata linux_server “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort” 22 //linxu系统中的SSH服务端口22 注:linux_server为VirtualBox虚拟机的名字 原理:把来自Host系统的22这个端口的数据转发到Guest系统的22这个端口 然后重启虚拟机,就可以用PUTTY登录了。

2010年4月30日18:01 | 1 条评论
分类: 心得笔记
标签: