某妖博客

专注于wordpress theme设计与制作,前端开发,网站分析,网络营销等资讯博客。

wordpress首页调用特色图片

打开functions.php文件添加如下的代码

add_theme_support( ‘post-thumbnails’ );

这段代码的意思是让你的主题支持特色图片的调用 然后在你想要调用特色图片的位置添加以下代码

<?php if ( has_post_thumbnail() ) { ?>
<?php the_post_thumbnail(); ?>
<?php } else {?>
<img src="<?php bloginfo('template_url'); ?>/images/xxx.jpg" />
<?php } ?>

window7完美删除ubuntu

具体做法:

1. “控制面板”→“系统安全”→“操作中心”→“更改用户帐户控制设置”,将其改为最低限度(最下面的一        项),确认后,系统      提示重新启动系统;如图

2. 解压MbrFix后,把MbrFix.exe文件放到C盘根目录下;

3  用 Win徽标键+R 打开“运行”,输入cmd并回车,输入命令 “C:/MbrFix /drive 0 fixmbr” 并回车,此时出现    是否确认{Y/N},输    入YB并回车即可。如图

4. 重启系统,你就发现,系统直接就进入windows了.

5. 删除Ubuntu分区。

(1)鼠标右键桌面上的“我的电脑”→“管理(G)”→“存储”→“磁盘管理”;

(2)右键单击Ubuntu的分区(我们假设是“X盘”),选择“删除卷(D)……”然后确认;

(3)接着右键单击X盘, 选择“新建简单卷(I)……”,一直点击“确认”即可完成。

此时你会发现我的电脑里显现出了“X盘”,即新加卷。

ubuntu 11.04安装后win7引导消失的修复

仅适合以下情况

sudo update-grub后显示:
Found linux image: /boot/vmlinuz-2.6.39-020639rc1-generic
Found initrd image: /boot/initrd.img-2.6.39-020639rc1-generic
Found memtest86+ image: /boot/memtest86+.bin
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
done

解决办法:

sudo apt-get install --reinstall libdebian-installer4

sudo os-prober

sudo update-grub

设置ubuntu 11.10 Unity 玻璃半透明

一.修改顶部面板的半透明化。

设置Unity 顶部面板透明:

先安装CCSM,打开终端,输入下面的命令:

sudo apt-get install compizconfig-settings-manager

ubuntu-terminnal
  ubuntu-terminnal

阅读这个条目剩下部分 »

Ubuntu 桌面培训中文版正式发布

Ubuntu 桌面培训,即Ubuntu Desktop Course,为家庭用户和办公室用户提供 Ubuntu 操作系统的培训。
经过一段时间的努力,以及占用了 Aron Xu 和 Eleanor Chen 大量的聊天时间,Ubuntu 桌面培训已经完成翻译,正式公布。

本课程为家庭用户和办公室用户提供 Ubuntu 操作系统的培训。目标对象不必预先了解 Ubuntu,但必须具备基本的计算机使用能力。 本课程以模块为单位来组织。在教室中进行全日制学习的话,两天就可以学习完整个课程。另外,您可以按需选择主题和课程,本课程的关键部分可以在一天之内学 完。 相较于原英文版本,中文版针对 Ubuntu 9.10 进行了适当的修订。(由于翻译开始的时候,10.04 仅仅还处于内测阶段,尽请谅解)
本次更新了 PDF 版本,并且制作了项目主页,所有资源都可以自项目主页下载。

P.S.适用于 Lucid 的桌面培训课程也已经进入修订尾声,敬请期待。索尼a700

资源地址

  • Karmic HTML 版本: 在线浏览
  • Karmic PDF 版本: PDF (MD5SUM: 85a80def9363165372efbc5740d7a0a0)

使用ubuntu搭建wordpress本地环境

Ubuntu确实很好玩。有喜欢的命令行,简洁的界面,不同于Window要的感觉。偶尔换换环境工作,学习Linux的思维方式,是一种不错的做法。之前也折腾过Ubuntu,不过,因为网络的问题,一直没有深度去用。这次,网络方便了,并且,想在Linux下学习某些开发(主要还是和代码打交道),Ubuntu当然是最好不过的选择,并且刚发布了9.04呢。

 

 

开发,当然就会需要环境。Wordpress是自己熟悉的,并且工作在LAMP上,所以,配个LAMP环境,来学习PHP和其他开发,多好!今天,就来记下使用Ubuntu搭建wordpress本地环境的手记,嘿,记录记录,相信也会帮上某些朋友的忙。

1. 安装apache、php5、mysql

首先,我们来安装apache和php5,按下面的步骤,一步一步来安装:

sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart // 重启apache,此时php5已经可用了

接下来,我们安装mysql:

sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo /etc/init.d/apache2 restart // 再次重启apache,使新服务正常激活

然后在终端输入:

sudo ls /etc/apache2/mods-enabled

看看这个目录下,有没有php5.conf 和 php5.load,如果没有则:

sudo a2enmod php5

启用 php 模块,然后重启apache即可。哦耶,这里,apache、php5、mysql都已经可用了。这里,当然,也可以安装wordpress了。不过,别急,让我们来做一些让我们使用起来更方便的准备先。

2.安装phpmyadmin

在phpmyadmin网站上下载软件包,解压缩到本地目录/var/www/phpmyadmin(/home/user/www/phpmyadmin)。在终端下执行:

sudo cp /var/www/phpmyadmin/config.sample.inc.php /var/www/phpmyadmin/config.inc.php
sudo gedit /var/www/phpmyadmin/config.inc.php

找到”blowfish_secret”在后面填上任意字母。保存,退出!并开始安装php5-mcrypt:

sudo apt-get install php5-mcrypt

编辑php配置文件:

sudo gedit /etc/php5/apache2/php.ini

在extension下面加上

extension=php5-mcrypt.so

3.安装wordpress

这里,你可以到wordpress.org下载最新的wordpress安装包,解压,把wordpress包放到/var/www/目录下,就可以按WP的安装方法来安装了。哦也,你一定很高兴。并且,你很想修改主题,对其进行工作。

但,我知道,你发现了一个问题!类似于:主题文件不能在后台修改/后台Import不了xml。囧!是的,这个问题很烦,不过,只要你打开终端,输入下面的命令:

sudo chmod -R 777 /var/www/

把/var/www/目录的权限设计为777,DONE!哦也,你可以为此欢呼了。嘿嘿!

参考文献:

Page 1 of 3123