Real Buddha Quotes

外掛說明

The internet is full of fake quotations attributed to the Buddha. By using this plugin you can help spread the actual words of the Buddha with your website visitors.

You can display this quote using a shortcode or a widget. (At the moment, there is no block for this plugin. If you would like to help create one, please contact us!)

There is the option for the citation of the verse to link back to the SuttaFriends.org website so your readers can see the quotation in the context of the whole Dhammapada and have the chance to explore more real Buddha quotes.

Shortcode

To include a random Dhammapada in the content of a page or post, simply insert the shortcode

[random-dhammapada]

To make the citation (e.g. “Dhammapada 20”) link back to the verse on SuttaFriends.org, go to Settings>Real Buddha Quotes

Inserting into your theme

If you like to put the quotation somewhere on your website that does not allow shortcodes, you can add this PHP to one of your theme files:

echo random_dhp_shortcode();

This will insert the quotation. There are no parameters. Only try this if you are familiar with codign in PHP. Always make a backup before changing templates.

Styling

Styling of the quotation and the citation is done through css. We recommend the following:

div.random-dhammapada{
    border:solid 1px;
    padding:10px;}

p.rdhp-verse {
    font-style:italic;}

div.rdhp-citation {
    text-align:right!important;}

p.rdhp-attribution, p.rdhp-verse {
    margin-bottom:0px;}

p.rdhp-attribution {
    font-size:.9em;}

If you like the citation (e.g. Dhammapada 175) to appear on the next line, add this CSS:

.rdhp-cite-link {display:block}

Drop cap

The following code could create a drop cap (first letter larger size).

p.rdhp-verse:first-child:first-letter {
  float: left;
  font-size: 3.5em;
  line-height: 2empx;
  padding-top: .15em;
  padding-right: .1em;
  padding-left: 0px;

You will need to adjust all of the sizes and test on desktop as well as mobile to make sure it looks correct in different contexts.

螢幕擷圖

  • There is only one setting, but you can also find detailed instructions on the settings page.
  • There are no settings for the widget, other than an optional title.
  • This is an example of the widget, styled with the suggested css.
  • Using the shortcode you can add the quotation anywhere on you site, seamlessly integrating into your own look and feel.
  • Don’t be afraid to experiment with different blocks. Here is the built in Gutenberg MEdia & text block.
  • And this is what the front end looks like.
  • Your theme or custom blocks may have even fancier blocks. Here is the Stackable Blockquote block.
  • And this is what the front end looks like.
  • You can create drop caps through css. See instructions on the settings page.

安裝方式

After installing you will see no change to your website. You will either need to add the widget to your widget area or include a shortcode on one of your pages.

常見問題集

Whose translation of the Dhammapada is this?

The translation is attributed to Ven. Kiribathgoda Gnanananda. The entire translation can be read at SuttaFriends.org. There you can find out about how to get the print book

What is the copyright for this text?

The text of the Dhammapada is copyright Mahamegha Publications.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Real Buddha Quotes〉的開發相關工作。

參與者

將〈Real Buddha Quotes〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄