Add a talk function to Typecho

Objective

Discover that very few people write such articles, probably everyone will, only I think it is very good (

Custom fields

To say that it is actually an article, only when the theme's home page is displayed will appear as a "say" style, then you need to publish the article when you choose to publish the say style, here you need to add a custom field selection in functions.ph
p . Custom fields are in this code

function themefields ($layout)

}

Then add a code inside that chooses the publishing style

        $type s new Typecho_Widget_Helper_Form_Element_Select ('type', array ('0' s'>'general article', '1' s >'say'), '0', 'article type');
    $layout->adItem ($type);

This allows you to make a selection at the time of publication, with the general article selected by default.

Judging.

Custom fields are finished, you need to make a decision on the home page, whether you choose to say or choose the general article, choose wh
ich to output which style and then this time index.php need an if field

Cycle.

Then at the bottom of the if field you're going to write down the out
put at type 1, like this one I wrote to Nexmoe

     
         
        An he said:
          
              
       
            
          
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next