[New Templates] SEO friendly templates for LifeType 1.2x

打造最简洁的life Type summary首页

| | | Trackbacks (0)

打造最简洁的life Type summary首页

    多用户博客一般把 summary.php作为网站的首页。
   
    方法是把下面内容加到根目录下的.htaccess文件里:
   
    <IfModule mod_dir.c>
        DirectoryIndex summary.php index.php index.html
    </IfModule>
   
    但默认的summary首页非常难看, 而且打开速度非常慢。而 http://www.chinese-blog.org 的推崇的风格是简洁, Google式的简洁。于是立即自己动手。
   
    summary.php的 html模板文件在templates/summary/目录下。
    主要修改以下三个文件:
   
    上部的导航栏:
    header.template
   
    中间的最新文章,搜索栏,最多阅读文章等。
    index.template
   
    底部:
    footer.template
   
    先把所有动态内容去掉。速度快了很多。
    如果需可,也可以在index.template中加上类似代码:
   
    <b>Most Read Articles:</b> <br />
      {assign var=readestBlogs value=$summaryStats->getMostReadArticles()}  
      {if $readestBlogs}

          {foreach name=readest from=$readestBlogs item=post}
            {assign var="blog" value=$post->getBlogInfo()}
         {assign var="url" value=$blog->getBlogRequestGenerator()}  

              <a href="{$url->postPermalink($post)}">{$post->getTopic()|strip_tags|truncate:60}</a> ({$post->getNumReads()})<br />
 
          {/foreach}

      {/if} 
     
      接下来要做一个全新的 blog模板,去掉全部不必要的内容,且对搜索引擎友好。

    Jan 28, 2008

how to install lifetype 1.26

| | | Trackbacks (0)

how to install lifetype 1.26

    LifeType is a Blogging platform built with PHP, designed with maximum customizability, speed and ease of use in mind. Forums and bugs reports can be found at http://www.lifetype.net/

    First, create a database and create a MySql user who has priviliges only to access the LifeTypes database:
    MySQL 字符集: UTF-8 Unicode (utf8)
    MySQL 连接校对 utf8_unicode_ci
    创建一个新的数据库: database name, ut8_unicode_ci
    CREATE DATABASE `chineseblog` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
   
   
    1   download LifeType 1.26 from
    http://sourceforge.net/projects/lifetype/
    wget http://nchc.dl.sourceforge.net/sourceforge/lifetype/lifetype-1.2.6.tar.gz

    2   upload lifetype-1.2.6.tar.gz to server
    
    Use putty to login your account.
   
    Use 'tar' command line tool will extract the files for you:
    tar -zxvpf lifetype-1.2.6.tar.gz
    cd lifetype-1.2.6
    cp -af . ../public_html
   
    3   replace some files
   
    remove locale folder:
    rm -rf locale
   
    open locale\locale_en_UK.php and locale\admin\locale_en_UK.php, saved as UTF-8 encoding.
    find:
    $messages['encoding'] = 'iso-8859-1';
    replace with:
    $messages['encoding'] = 'UTF-8';
   
    rm -rf templates/standar/*
    instead of with "seo-friendly-green" template
   
    NOTE: Please do not forget the 'p' modifier when using tar as some of the folders inside the package have special permissions that should be kept when unpacking (by default, tar does not keep the same permissions as in the package). See below in Setting up for Installation.

    This will create a folder called "lifetype-1.2.6" This folder contains several PHP scripts and some more folders, each one of them containing things like the code needed by the application, translations, templates, and so on. In any case, this folder name is arbitrary, so rename it to whatever name you'd like.


    4   LifeType Setting up for Installation
   
    Checking permissions and creating additional folders
    Make sure that the contents of the folder we just created can be read by the user running the web server. Please consult the documentation of your operating system to check for the name of that user ("www", "apache", "nobody", etc).

    LifeType also needs two additional folders with special permissions. Those folders are tmp/ and gallery/. They should have the right permissions if you did not forget the 'p' modifier when using the tar tool but even if we did not forget it, it's a good idea to check the permissions again. Both of these folders should have write access for the user running the web server. It is very important that these files have the permissions set right, or else we'll run into all sort of permission-related troubles.

    cd public_html
   
    chmod 777 tmp
    chmod 777 gallery
    chmod 777 config/config.properties.php
   
    Before starting the installation process, make sure that the file config/config.properties.php is also writable by the web server. This is necessary so that wizard.php can save the configuration settings in it. Once installation is complete, permissions can be reverted to some more secure settings.

 

    4   LifeType Installation Wizard
   
    In order to start the wizard, point your browser to the installation script at
    http://www.chinese-blog.org/ wizard.php
   
    This step will perform some basic checks to your environment to verify that it complies with the software requirements.
    If everything is correct, there will be a button labeled "Next" at the bottom right corner.

    Now we should provide the installer with our database settings: database server, database user, database password, name of the database that will be used to store the tables and a table prefix.

    Database server * :
    localhost
   
    Database user * :
    e.g. chineseblog
   
    Database password *
    e.g. http://www.chinese-blog.org
   
    Database name *
    e.g. chineseblog
   
    Database prefix *
    e.g. http://www.chinese-blog.org

    Next step, Confirm the database set.
    Database default character set, the default value is latin1, http://www.chinese-blog.org use utf8, do not check "Please check this if you want the installer to create the database" because chinese-blog.org has created database.
   
    If everything went well, we should only see a very brief screen informing us that the previous operation was successful and that we can proceed to the next step.

    Now is time to create the first user.
   
    User name * :
    e.g. chineseblog
   
    Password * :
    e.g. http://www.chinese-blog.org
   
    Email address *
    e.g. main At chinese-blog.org
   
    Once the user has been created, we will create a blog. This blog will be owned by the user that was just created so please select a meaningul name for your blog, a locale (translation) and a template set, select a language, e.g. "Simplified Chinese traslantion (UTF-8)",  select default template.

    Click the Next button at the bottom right corner when ready.
   
    Once the user and the blog have been created, the installation process is now complete. During the last step of the installation process LifeType will also auto-detect whether GD2 or ImageMagick are available as image handling backends and select the most suitable one (with GD2 being preferred over ImageMagick as it is a native PHP extension)


    5   Finalizing the LifeType Installation
   
    Now everything is ready so please remember to revert the permissions of the config/config.properties.php to safer values (r--r--r-- would be fine).

    The installation script has buttons pointing to the different areas of your new blog: index.php as the blog entry point, admin.php as the admin interface and summary.php as the central point of your community (if needed)

    Remember to remove wizard.php file since it is not needed anymore. Also, if you are not planning to use your newly installed LifeType to give a blogging service, please remove both the summary.php and register.php scripts.

    LifeType runs by default using plain URLs. If you wish to use the so-called search-engine-friendly URLs (only available when using Apache), have a look at the .htaccess file and fix, if needed, the paths of the lines starting with ErrorDocument:
   
    LifeType runs by default using plain URLs. If you wish to use the so-called search-engine-friendly URLs (only available when using Apache), have a look at the .htaccess file and fix, if needed, the paths of the lines starting with ErrorDocument:

    Many people install LifeType in a folder called /LifeType/, but if you installed it in the root of your web server, those lines should look like(the default value):

    ErrorDocument 401 /error.php
    ErrorDocument 403 /error.php
    ErrorDocument 404 /error.php

    http://wiki.lifetype.net/index.php/Installation
   
    Jan 28, 2008

«Previous   1 2 3 4 5 6 7  Next»