OriginalTechnology
# handsome

Default value when editing articles in handsome theme

1,051 words3 minute169 views0 likes

Summary

This article introduces how to modify the functions_mine.php file of the Handsome theme, and set the default values ​​​​of the big picture and small picture input boxes in the article editing page to the API address, thereby avoiding the need to manually fill in random cover image links every time, simplifying the operation process, and improving editing efficiency.

Recently, I have been researching for a long time because of the issue of the cover image, and finally made a random API, but it was too troublesome to fill in every time, so here is this article

Modify path

/usr/themes/handsome/functions_mine.php

is at about line 723

starts modifying

Delete the following code

    $thumb = new Typecho_Widget_Helper_Form_Element_Text('thumb', NULL, "", _mt('大头图地址'), _t('输入图片URL,则优先使用该图片作为头图</br>不填此处则按照后台外观设置中的 <code>主题增强功能-博客头图设置</code>顺序显示头图。</br>大头图的尺寸为8:3'));
    $layout->addItem($thumb);
    $thumbSmall = new Typecho_Widget_Helper_Form_Element_Text('thumbSmall', NULL, "", _t('小头图地址'), _t('因为当首页文章显示小头图的时候,文章页面仍然会显示大头图</br>当前文章如果不是小头图样式,你可以忽略该设置项。</br>如果当前文章是小头图你仍然也可以不填,默认会自动大头图的图片至正方形尺寸显示在首页</br>但是为了最佳体验,你可以填一张小图片(正方形尺寸)'));
    $layout->addItem($thumbSmall);

replaced with

$thumb = new Typecho_Widget_Helper_Form_Element_Text('thumb', NULL, "api地址", _mt('大头图地址'), _t('输入图片URL,则优先使用该图片作为头图</br>不填此处则按照后台外观设置中的 <code>主题增强功能-博客头图设置</code>顺序显示头图。</br>大头图的尺寸为8:3'));
$layout->addItem($thumb);

$thumbSmall = new Typecho_Widget_Helper_Form_Element_Text('thumbSmall', NULL, "api地址", _t('小头图地址'), _t('因为当首页文章显示小头图的时候,文章页面仍然会显示大头图</br>当前文章如果不是小头图样式,你可以忽略该设置项。</br>如果当前文章是小头图你仍然也可以不填,默认会自动大头图的图片至正方形尺寸显示在首页</br>但是为了最佳体验,你可以填一张小图片(正方形尺寸)'));
$layout->addItem($thumbSmall);
Loading comments…
Related articles

Related articles