警告
使用此 Plugin 必須有 HTML 、 PHP 基礎知識。
簡介
此 Plugin 取代了分頁,使用者只要將頁面向下捲動,新的內容便會自動載入。
安裝
- 解壓縮檔案。
- 將 pageless 資料夾放到 /user/plugins 資料夾中,然後到 Habari 管理介面中啟用它。
- 將 pageless 資料夾中的 pageless.php 複製到你使用中的 Theme 資料夾,並根據你所使用的 Theme 來修改。(通常只要參考 multiple.php ,刪除 foreach 以外的部份即可。)
設定
啟用後,請按下 Configure 來設定此 Plugin ,你必須設定這些項目:
- How many posts to load each time? – 你一次想載入幾篇文章?
- Class name of posts – 每篇文章共同的 CSS class
- ID of page selector – 頁碼選擇器的 ID
設定範例
正確的 HTML 架構如下:
<div id="entry-post_1" class="hentry">
<!-- Post 1 -->
</div>
<div id="entry-post_2" class="hentry">
<!-- Post 2 -->
</div>
<div id="entry-post_3" class="hentry">
<!-- Post 3 -->
</div>
<div id="page-selector">
<!-- Page: 1, 2, 3, ... -->
</div>
- 每篇文章各有一個 ID ,格式為 entry-post_slug
- 每篇文章都有一個共同的 CSS class ,範例中為 hentry
- 頁碼選擇器有一個 ID ,範例中為 page-selector
如果你的 HTML 架構不符合以上條件,請修改你的 Theme 。
下載
更新紀錄
- 0.1 (2008-07-31) – 初次釋出。
Caution
You must have basic HTML and PHP knowledge to use this plugin.
Introduction
This plugin give your blog the ability of Infinite scrolling, instead of breaking content into ‘pages.’
Installation
- Extract the file.
- Put the folder ‘pageless’ to /user/plugins and activate it.
- Copy ‘pageless.php’ from ‘pageless’ folder the activated theme folder and modify it base on the theme (Mostly you can simply copy ‘mutiple.php’ in the activated theme folder and remove all lines before or after the foreach block).
Configuration
After activated it, click Configure button to setup the plugin. All of following options are required and have to be set properly.
- How many posts to load each time?
- Class name of posts
- ID of page selector
Example
There is an example of correct HTML structure.
<div id="entry-post_1" class="hentry">
<!-- Post 1 -->
</div>
<div id="entry-post_2" class="hentry">
<!-- Post 2 -->
</div>
<div id="entry-post_3" class="hentry">
<!-- Post 3 -->
</div>
<div id="page-selector">
<!-- Page: 1, 2, 3, ... -->
</div>
- Each post’s container must have an ID named ‘entry-post_slug’. If you are sure you won’t write any post which slug is begin with ‘entry-’ or ‘page-‘, then you can simply named it ‘post_slug’.
- Every post must have an identical CSS class, e.g. ‘hentry’, and this CSS class must not appear elsewhere. You have to put this in Class name of posts.
- The page selector’s container must have an ID, e.g. ‘page-selector’. You have to put this in ID of page selector.
If your HTML structure does not conform these rules, you have to modify the theme.
Download
Changelog
- 0.1 (2008-07-31) – Initial release.