Filed under: Plugin, WordPress

[WP-PostRatings]-給文章增加評分的外掛

by chijanzen on 六月 29th, 2008 | View: 1,147 views

Tags
  • No Tags
Share Comments (0)

將本站安裝 WP-PostRatings 過程記錄下來

1.請至作者的網站下載 WP-PostRatings 1.3版,解壓後上傳到Plugins/目錄,在wordpress管理後台啟用即可。

2.啟用外掛後,會多出一個[Ratings]選項,有詳細的Post Ratings日誌功能,能看到每一個評分人的IP地址和評分時間等信息。相應的文字選項設置一下即可。

3.官方的教法為

在模板index.php中找到:< ?php while (have_posts()) : the_post(); ?>

在它的下面,加入:< ?php if(function_exists('the_ratings')) { the_ratings(); } ?>

即可。(也可以在single.php, post.php,search.php 或者 page.php中加入)

我不想將評分的功能加在文章的前面,所以我將評分的功能加到文章的最後

我共修改了2個檔:

1.single.php

<!--post paging-->
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
<!--加入評分外掛-->
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

2.index.php

<!--read more-->
<?php the_content('<br />Read the rest of this entry »'); ?>
<!--加入評分外掛-->
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

以上就完成了。

Popularity: 3%

About the Author
    網路化名: chijanzen、中國龍、邪兵衛 經歷: 第二屆微軟社群之星 第三屆微軟「最有價值專家」 第五屆微軟「最有價值專家」
No comments currently exist for this post.

Why don't you make one?

Get a GravatarLeave a Reply

Name: « Required

Email Address: « Required

Website URL: « Optional

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

About me
chijanzen 分享個人Excel VBA 學習經驗,架站心得, 日常生活記事等...

Add to Google

分類
Translator
Chinese (Simplified) flagItalian flagKorean flagEnglish flagGerman flag
French flagJapanese flagRussian flagBulgarian flagFinnish flag
相簿