micolog 模板的制作-illacrimo-plus-2(完结)

micolog 模板的制作-illacrimo-plus-1

这篇文章写了一部分很久都没有更新,现在终于把这部分完善了。各位看官请接着看~~

base.html
{{ blog.title}}:          博客标题
{{ blog.feedurl }}:      RSS地址
/static/wlwmanifest.xml
{{ blog.theme_name }}     当前主题名称
{{blog.baseurl}}          根域名
{{self.m_list_pages}}     自定义页面列表
{{self.logouturl}}        用户退出
{{ blog.author }}         blog作者
{{ self.login_user.email }} 当前用户email
{{ self.login_user.nickname }} 当前用户名

{% block title %} {{ blog.title}}{% endblock %}     标题块
{% block head_block %}{% endblock %}                头部文件块
{%if ishome%}current_page_item{%else%}page_item{%endif%} 判断是否当前页为首页
{% block topmenu %}{% endblock %}         顶部菜单(生成)
{%if self.is_admin%}{%endif%}             判断是否是admin
{%if self.is_login%}{%endif%}             判断是否是登录用户

{%block content %}{%endblock%}            通用页面中间内容部分

index.html
{% extends “base.html” %}   继承自base.html
{% block content%}{% endblock %}  定义content块替换base.html中的此块
循环中
{{entry.key}}       文章ID
{{entry.title}}     文章名字
{{entry.author}}    文章作者
/{{ entry.link }}   文章URL
{{entry.edit_url}}   文章编辑地址
{{entry.date|datetz:”F jS, Y”}}  文章时间(具体参数可以参照php语言的时间格式化)
{{entry.content_excerpt}}  文章简介
{{entry.commentcount}}  评论数量
{% if entry.strtags %}Tags: {%for tag in entry.tags%}{{tag}} {%endfor%}{%endif%}   文章tags循环(附加判断是否有tags)
{% if show_next %}Older Posts »{%endif%}    下一页
{% if show_prev %}« Newer Posts{%endif%}   上一页

siderbar.html
{% for comment in recent_comments %}

  • {{comment.author}}:{{comment.shortcontent}}… {%endfor%}       最近评论(循环列表)
    {%for next in entry.next%}
    {{next.title}}?
    {%endfor%}                        下一篇文章
    {%for prev in entry.prev%}
    ?{{prev.title}}
    {%endfor%}                        上一篇文章
    {{ entry.content }}               文章正文

    comments.html
    {{entry.comments.count}}          文章评论数量
    {%cycle alt1,alt %}               文章评论间隔(奇数编号的评论为alt1,偶数为alt)
     

    123

    category.html
    {{category.name}}                 分类名字

大家可以看到还有几个模板文件没有替换,比如:tag.html,error404.html,这些文件大家可以自己看着办,因为这些文件都几乎没有什么标签了。

大家可以参照这个标签列表来替换你喜欢的wordpress主题,按照上面的文件顺序查找替换所有php的标签(类似这样的“”的内容)就可以完成了,如果你喜欢这个主题也可以用我做的这个。

用法:将其解压到micologthemes目录下,修改script.js替换QQ号码还有msn号码就可以了。

具体介绍请参看:http://www.cbmland.com/post/767/illacrimo-plus-theme-204-for-wordpress-27.html

下载:

illacrimo Plus Theme 2.04 for wordpress 2.7 for micolog

p.s. 由于没有更好的文件上传空间了,所以麻烦大家到纳米盘下载了哈。

http://d.namipan.com/d/e20d20d71abe8253674dd4dbfd73021d65537c94ec410500

这是微软的下载点:

http://cid-c02be930ae8e85a2.skydrive.live.com/self.aspx/.Public/illacrimo-plus.rar

对不起,忘记把Google广告去掉了,请大家打开sing.html把两处广告和base.html的一处广告去掉。

暑假期间六维IPV6邀请码赠送~(3)

不定期送出邀请码哦,送出时间不定数量不定(主要是看我的money哦),希望大家珍惜帐号。

为了防止邀请码被复制去了,用截图发个大家,希望大家理解~~ (入股可以请帮我点点点广告吧,不胜感激,呵呵)

 

image

记得要区分大小写哦

jiql – 说明文档(一个运行在GAE上面的Mysql)(翻译未完成)

概览

jiql是在JAVA GAE上访问Google Datastore的JDBC wrapper(这个不知道怎么说了,请大家见谅)

jiql支持标准的sql语言进行访问

jiql supports the use of standard SQL as a method for accessing jiql支持使用标准的SQL访问jiql数据储存

设计 

jiql介绍一个概念叫做“叶表”(Table Leafs) 。 叶表是一种可以无限量动态添加或者合并在一起形成一个新表的数据储存方式。叶表用SQL提供了一个标准的方法,用来避开GAE不超过一千个返回结果的限制,为了优化结果,在相似叶表中他们拥有相同的父级。这意味着所有的叶表成员都储存在同一个google云节点,可以高速访问数据。

要禁用叶表,可以在创建表的声明末尾添加:

tableleafs=false

 

Quickstart 快速入门

下载jiql.jar (JAVA Database engine和驱动)放在WEB-INF/lib/目录下

注意: appengine-api.jar也必须置于WEB-INF/lib下面 。该文件是GAE SDK下的重要文件。下面我们将创建一个JDBC连接上jiql数据库

在你需要的地方使用下面的代码:

String url = "jdbc:jiql://local";

String password = "";

String user = "";

Properties props = new Properties();

props.put("user",user);

props.put("password",password);

Class clazz = Class.forName("org.jiql.jdbc.Driver");

Driver driver = (Driver) clazz.newInstance();

Connection Conn = driver.connect(url,props);

下面是一个通过JDBC创建的一个简单GAE留言板程序:

http://jiql.googlecode.com/files/jiql-jdbc-guestbook.war

下载iql-jdbc-guestbook.war后用winrar解压到你的GAE应用目录。

编辑./WEB-INF/appengine-web.xml添加你自己的GAE应用ID。

上传到你的可运行JAVA的GAE上面。

首先你要运行下面的这个jsp页面,这将创建所需要的数据表。

http://yourapp.appspot.com/init.jsp

然后你可以浏览http://yourapp.appspot.com/guestbook.jsp 开始使用这个留言板程序。

 

源代码也可以在下面的网址下载:

http://jiql.googlecode.com/files/jiql-jdbc-guestbook.src.zip

Remote Access 远程访问

你可以通过JiqlServlet远程访问google datastore。

This requires setting up the GAE-J Server as well as the Client Application configuration. 这就需要建立GAE约翰逊服务器以及客户端应用程序配置。

这需要按照客户端应用配置你的GAE-jiql。

GAE-J 服务的配置:

首先在web.xml中配置JiqlServlet:

<servlet>

<servlet-name>jiqlservlet</servlet-name>

<servlet-class>org.jiql.JiqlServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>jiqlservlet</servlet-name>

<url-pattern>/jiqlservlet</url-pattern>

</servlet-mapping>

接着在jiql.properties文件中添加验证信息。

File: ./WEB-INF/jiql.properties

Entries:

user=admin

password=jiql

客户端应用程序配置

按照下面的步骤在你的JAVA代码中创建一个到jiql的连接:

String url = "jdbc:jiql:https://yourapp.appspot.com/jiqlservlet";

String user = "admin";

String password = "jiql";

//or

// String url = "jdbc:jiql:https://yourapp.appspot.com/jiqlservlet?user=admin&password=jiql";

Properties props = new Properties();

props.put("user",user);

props.put("password",password);

Class clazz = Class.forName("org.jiql.jdbc.Driver");

Driver driver = (Driver) clazz.newInstance();

Connection Conn = driver.connect(url,props);

远程客户端所需要的lib文件:

jiql.jar

appengine-api.jar

Apache Commons HTTPClient – you may download the bundled JAR here .

Transactions 

jiql一定程度支持了Transactions

Transactions 的支持是基于谷歌数据存储Transactions引擎的。 谷歌数据存储不支持全局事务。

Transactions 仅限于Entities/Rows 内或Table/Kind。

这意味着您无法在同一Transactions对Table/Kind执行多个操作。为了使用Transactions,设置enable.transactions连接属性选项为true 。

注意:Transactions不支持远程连接。

Limitations 限制

FILTERS

对于较大的数据集,设置较少的限制条件将只会返回大约1000项结果。(GAE限制)结果将可能返回超时,在这种情况下,你应该尝试更多的限制条件。(这段请参看原文,谢谢~~)

JOINS

When working with large data sets, JOINS should be combined with at least 1 filter acting on a specific table.  Otherwise, the query would involve traversing the entirety of all the tables in the JOIN.  Such an operation is time consuming and may create a Google App Engine Timeout if the operation exceeds 30 seconds.

Optional Properties 可选属性

date.format

指定的日期格式的日期时间字段。

例如date.format =yyyy / mm / dd

enable.transactions

使Transactions(请参阅交易专题)

例如enable.transactions=true

DatabaseProductVersion

用来模拟其他数据库版本,如MySQL的。

例如DatabaseProductVersion=4.0.0

DriverVersion

用来模拟其他数据库类型,如MySQL的。

例如 DriverVersion=mysql-connector-java-5.0.4 ()

Catalog

用于指定数据库目录。

例如Catalog=jiql

MetaCache

用于缓存元数据,如DatabaseMetaData 。

例如 MetaCache=true

jiql Functions

除了标准的SQL函数,有一些jiql特殊函数。

LOAD

LOAD DATA INTO TABLE table_name INTEXT column1,column2

1,’text1′ 1

2,’text2′ 2

tableleafs

指定是否要使用叶表(默认使用) 。

tableleafs =false

prefix

指定是否要为jiql所创建的表添加一个前缀 (默认为true)

prefix =false

prefix_value

指定要为jiql创建的表添加的前缀名称(默认为“jiql” )

prefix_value =jiql

 

PHP

如何不改变MYSQL指令直接运行PHP

在Google App Engine for JAVA上运行PHP需要一个集成jiql的Quercus(一个在java上执行的php5)。

请在下面的网址下载:

jiql – quercus.war -一个集成jiql的Quercus

jiql – quercus.src.zip -集成jiql的Quercus源码

下载jiql – quercus.war后 ,用winrar解压到您的GAE程序目录。

Add your PHP files to the root of the unpacked Quercus application. 添加你的PHP文件到解压Quercus的目录下面。

编辑./WEB-INF/appengine-web.xml 文件并添加您的GAE程序ID 。

上传到GAE服务器。

Below is a simple PHP application from PLUS2NET as a starting PHP example: 下面是一个来自plus4net的简单PHP应用:

http://www.plus2net.com/php_tutorial/guest_book.zip

JRuby on RAILS JRuby on Rails的

Download jiql.jar java database engine and driver library and place under WEB-INF/lib/. 下载jiql.jar Java的数据库引擎和驱动程序库和下举行WEB-INF/lib / 。

Configure your database.yml like so: 配置database.yml象这样:

production: 生产:

adapter: jdbc 适配器: JDBC的

driver: org.jiql.jdbc.Driver 司机: org.jiql.jdbc.Driver

url: jdbc:jiql:local 网址: JDBC的: jiql :地方

username: admin 用户名:管理员

password: appcloem 密码: appcloem

encoding: utf8 编码:很少

Now of course Google App Engine for JAVA does not allow you to perform pre-deployment tasks, 现在当然谷歌应用程序引擎的JAVA不允许您执行部署前的任务,

such as running rake to setup your RAILS application database. 如运行耙设置你的钢轨应用数据库。 You have 2 choices. 您有2个选择。

First configure your jiql for remote access . 首先设定jiql的远程访问 。 Then run the rake DB task from your PC. 然后运行数据库任务耙从你的电脑。

For this copy of your Application, you would configure the database.yml like so: 这份对您的申请,您将配置database.yml象这样:

production: 生产:

adapter: jdbc 适配器: JDBC的

driver: org.jiql.jdbc.Driver 司机: org.jiql.jdbc.Driver

url: jdbc:jiql:https://myapp.appspot.com/jiqlservlet?user=admin&password=jiql 网址: JDBC的: jiql网址为: https : / / myapp.appspot.com / jiqlservlet ?用户=管理及密码= jiql

username: admin 用户名:管理员

password: appcloem 密码: appcloem

encoding: utf8 编码:很少

The second choice is to export the Database to a SQL formatted script. 第二种选择是 , 以出口到SQL数据库格式脚本。

With the SQL script, you have a number of choices to import the SQL script to your 随着SQL脚本,您有许多选择 , 导入到您的SQL脚本

jiql Database, which includes the use of Eclipse Database Tools Project (DTP) or jiqlAdmin . jiql数据库,其中包括使用Eclipse的数据库工具项目(排版) ,或jiqlAdmin

Below is the link to a GAE-Ready phonebook application WAR: 以下是链接到一个GAE就绪电话簿应用战争:

http://jiql.googlecode.com/files/jiql-jruby-rails-phonebook.war http://jiql.googlecode.com/files/jiql-jruby-rails-phonebook.war

After downloading jiql-ruby-rails-phonebook.war, unpack to your GAE Application directory. 下载后jiql -红宝石栏杆, phonebook.war ,解压到您的游戏应用程序目录。

Edit the ./WEB-INF/appengine-web.xml file and add your GAE Application ID. 编辑。 /网络干扰素/ appengine – web.xml中的文件并添加您的游戏应用程序ID 。

Upload to Google App Engine for JAVA. 上传到谷歌应用程序引擎的JAVA 。

Since we are not able to run ‘rake db:migrate’ on Google App Engine, 因为我们无法运行’耙分贝:迁移’的谷歌应用程序引擎
you must first run the following JSP, which will create the Database table. 您必须先运行下面的JSP技术,这将创建数据库表。
http://yourapp.appspot.com/init.jsp http://yourapp.appspot.com/init.jsp

Then browse to http://yourapp.appspot.com/people 然后浏览到http://yourapp.appspot.com/people

to start using the RAILS phonebook application. 开始使用铁轨电话簿应用。

jiql Administration jiql管理

As jiql uses the standard JDBC protocol to manage Google DataStore, there are a number 作为jiql使用标准的JDBC议定书管理谷歌数据存储,有一些

of tools that can be used locally or remotely to manage jiql. 的工具 , 可用于本地或远程管理jiql 。 Available database management 提供数据库管理

tools include: 工具包括:

jiqlAdmin Data Querying tool for Google’s DataStore. jiqlAdmin数据查询工具 , 谷歌的数据存储。

Eclipse Database Tools Project (DTP). Eclipse的数据库工具项目(排版) 。 When configuring DTP for jiql, 当配置为jiql排版,

the Eclipse Connection Type should be set to Generic JDBC_1. Eclipse的连接类型应设置为通用JDBC_1 。

Source – Compiling 来源-编译

- Download the source here -下载源在这里

- JAVA JDK 1.6 or higher is required. -的JAVA的JDK 1.6或更高的要求。 The reason for this is that jiql implements 这样做的理由是 , jiql实施

the latest JDBC API. 最新的JDBC的API 。 The latest JDBC references SQL extensions that 最新的JDBC提到的SQL扩展

are included with JDK 1.6. 附带的JDK 1.6 。 These SQL extensions are not included in 这些数据库的扩展 , 则不会包括在

previous JAVA JDK releases. 以往的JAVA的JDK版本。

- There are 2 ways of compiling the source. -有两种方法编制的来源。 But first an explanation 但首先解释

of the JAVA source tree. 的Java源代码树。

org.jiql – is the core jiql source code. org.jiql -是核心jiql源代码。

tools. 工具。 – are code for a general library used by jiql and other projects. -是代码一般图书馆使用jiql和其他项目。

- Minimum dependencies for compiling: -最低相依汇编:

appengine-api.jar appengine – api.jar

hibernate3.jar hibernate3.jar

For minimum compiling: 最低汇编:

Download the jiql.jar and uncompress to your output folder. 下载jiql.jar并解压缩到您的输出文件夹中。

Add the output path to your classpath. 新增的输出路径到您的类路径。

This will allow you to edit org.jiql.* code and rebuild. 这将允许您编辑org.jiql .*代码和重建。

- However to compile all code, including tools.*, the following dependencies must -然而编译所有代码,包括各种工具.* ,下列相依必须

be added to your classpath: 被添加到您的类路径:

servlet-api.jar 的servlet – api.jar

ant.jar ant.jar

在Google GAE上通过JAVA运行PHP程序

一年前google推出了Google App Engine。提供了足够我们普通用户使用的空间和流量,而且还可以通过付费获得更多的空间和流量。其余的不多说了,现在许多关于GAE的介绍。

现在GAE已经至此java了,但不幸的是PHP任然毫无音讯。但是我们在google官方支持PHP之前我们可以使用基于java的QuercusQuercus基本上可以100%的支持PHP语言(需要JDK1.5)。

现在我们开始用GAE运行PHP:

1) 注册一个免费的GAE帐户 。
2) 下载此文件到您的计算机(如果连接失效大家可以搜索phpwithgae便可以下载到它,如还不行就给我留言吧。)。
3) 修改warWEB-INFappengine-web.xml ,将phpwithgae换成你自己的GAE名字。

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>phpwithjava</application>
    <version>1</version>
    <!– Configure java.util.logging –>
    <system-properties>
        <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
    </system-properties>
    <!– For PHP-Support –>
    <static-files>
        <exclude path="/*.php" />
    </static-files>
    <resource-files>
        <include path="/**.php" />
    </resource-files>
</appengine-web-app>

4) 最后上传您的程序 。(下载谷歌appengine SDK for Java ,并使用下面的命令 。
appcfg.cmd update C:projectsphpwithjavawar)

To see this in action just visit:看到这一行动只需访问:
http://phpwithjava.appspot.com/webdigi.php and http://phpwithjava.appspot.com/info.php http://phpwithjava.appspot.com/webdigi.phphttp://phpwithjava.appspot.com/info.php

我将继续翻译一些关于GAE和PHP的文章,前面大家已经看到了wordpress在gae上的运行效果了,但是那个mysql问题没有得到很好的解决,下面我们将看看如何在GAE上安装一个类似MYsql的应用,并且可以远程调用数据库

转载请注明 www.fly7.cn

暑假期间六维IPV6邀请码赠送(2)~~

不定期送出邀请码哦,送出时间不定数量不定(主要是看我的money哦),希望大家珍惜帐号。

为了防止邀请码被复制去了,用截图发个大家,希望大家理解~~

 

image

记得要区分大小写哦