网站更新日志

目录
[隐藏]

又更新了一次主题,这次没有较大的动作。主要是色彩搭配进行了更新,其次才是在功能上进行了修正以及更新。
最近写日志越来越喜欢用文本而不是可视化的方式编辑了,随便说一句那个啥qTranslate和相当多的东西是冲突的,时间显示我就是反复调整了多次才实验好的,另外如果wordpress的版本和qTranlate不搭配的情况下会出现各种问题,比如日志编辑器在IE下面就无法使用。

1.更新了各处的搭配色彩

对主显示颜色采用了777这个既不模糊也不黑的刺眼的色彩,让人眼难以长时间进行聚焦,实际上我故意采用这个颜色的。
这次无意发现了rgba的用法,鉴于大环境下谷歌都宣布不支持IE8了,我想只要是成为了W3C的标准的就尽管用吧,而且我不是那么的追求各个浏览器完全一致。调试的时候自然也是实验过了IE7的(当然主要是查看效果如何差,然后尽量添加冗余赋值弥补)。

2.评论框的tabindex修正

这样按tab的时候就会正常跳到CAPTCHI的输入框了,这是改wp-include/comment-template.php实现的,记下了,以便下次升级时查阅修改。

3.CAPTCHI的comment form修改

3.1对样式进行了定制(在设置中)

进行如下列css的修改定制,

input#captcha_code{ width: 150px;height: 30px;margin-left: 20px;}
.captchaSizeDivLarge{  width:250px; padding-top:10px; }//去掉了height,很关键

3.2然后对源码si-captcha.php进行如下修改

搜索comment form WP3,对si_captcha_comment_form_wp3进行如下修改:

//主要就是把标题和*号提前,图片和输入框放在同一行上面,并对全局进行了少量的css定制
// this function adds the captcha to the comment form WP3
function si_captcha_comment_form_wp3() {
    global $si_captcha_url, $si_captcha_opt;

    // skip the captcha if user is logged in and the settings allow
    if (is_user_logged_in() && $si_captcha_opt['si_captcha_perm'] == 'true') {
       // skip the CAPTCHA display if the minimum capability is met
       if ( current_user_can( $si_captcha_opt['si_captcha_perm_level'] ) ) {
               // skip capthca
               return true;
       }
    }

// the captch html
// Test for some required things, print error message right here if not OK.
if ($this->si_captcha_check_requires()) {

  $si_aria_required = ($si_captcha_opt['si_captcha_aria_required'] == 'true') ? ' aria-required="true" ' : '';

// the captcha html - comment form 3.0+
if (is_user_logged_in()) {
      echo '<br />';
}

echo '<p>';

$label_string = '<label id="captcha_code_label" for="captcha_code" >';
$label_string .= ($si_captcha_opt['si_captcha_label_captcha'] != '') ? $si_captcha_opt['si_captcha_label_captcha'] : __('CAPTCHA Code', 'si-captcha');
$label_string .= '</label>';
$required_string = '<span class="required">'.$si_captcha_opt['si_captcha_required_indicator']."</span>\n";
$input_string = '<input id="captcha_code" name="captcha_code" type="text" size="6" tabindex=4 ' . $si_aria_required . ' />
';

 if ($si_captcha_opt['si_captcha_comment_label_position'] == 'label-required-input' || $si_captcha_opt['si_captcha_comment_label_position'] == 'left'  ) { // buddypress (label-required-input)(label left)
      echo $label_string . $required_string . $input_string; // BP
 } else if ($si_captcha_opt['si_captcha_comment_label_position'] == 'label-required-linebreak-input' ||  $si_captcha_opt['si_captcha_comment_label_position'] == 'top' ) {
      echo $label_string . $required_string .'<br />'. $input_string; // regular WP - twenty ten
 } else if ($si_captcha_opt['si_captcha_comment_label_position'] == 'label-input-required' ||  $si_captcha_opt['si_captcha_comment_label_position'] == 'right' ) {
      echo $label_string . $input_string . $required_string; // suffusion
 } else if ($si_captcha_opt['si_captcha_comment_label_position'] == 'input-label-required' ) {
      echo $label_string . $required_string . '</p>'; // regular WP
      echo '<div ';
      echo ($si_captcha_opt['si_captcha_captcha_small'] == 'true') ? 'class="captchaSizeDivSmall"' : 'class="captchaSizeDivLarge"';
      echo '>';
      $this->si_captcha_captcha_html('si_image_com','com');
      echo '</div>';
      echo '<p>'.$input_string;
 } else {
      echo $label_string . $required_string . '</p>';  // regular WP
      echo '<div ';
      echo ($si_captcha_opt['si_captcha_captcha_small'] == 'true') ? 'class="captchaSizeDivSmall"' : 'class="captchaSizeDivLarge"';
      echo '>';
      $this->si_captcha_captcha_html('si_image_com','com');
      echo '</div>';
      echo '<p>'.$input_string;
 }
echo '</p>';

}

4.Content Index

以前标题和目录不能并列排版,我总以为是h标题的缘故,因为把一个p段落放在h标题前面,发现时可以的并列的。但是往往我要用目录的文章都是没有开头段落的,然后就很丑的排版,看起来总是很大一块空白。今天无意发现了一个文章也用了这个目录,调试的时候惊奇的发现他的h也可以并列排布,于是乎开始在我的页面上乱点一气,无意之中发现了一个非常关键的属性,在我的主题中有下面这样一个代码,发现注释掉了clear:both后就可以直接可以了。

h1, h2, h3, h4, h5, h6 {
/*clear: both;*/
font-weight: normal;
}

5.box-shadow & text-shadow

本来我只是想搜索一个外发光类似的效果,无意中发现了

box-shadow: 0 0 10px #000;

这个神奇的代码,于是在各处进行了运用,然后测试了各大主流国际浏览器,基本都是正常显示的包括目录和广告都用了。text-shadow的更加方便地使用,然后在title和网站描述上面都使用了,形成了阴影文字和外发光文字。

6.css优先级问题

感觉到了这是一个无比复杂的问题,暂时还没掌握门道,感觉应该有什么很巧妙的法子来判断。主要问题出在div的class下面的ul使用 .divclass ul的优先级似乎比ul的id选择#ulid要高,我怎么都选不中,另外多层div嵌套的时候怎么似乎class也是可以隔着选择的,感觉很奇怪。下次有时间研究下DOM Tree,看网上似乎有说和内嵌元素与块元素等似乎很复杂的样子。

7.RSS Widget

修改样式在新窗口打开在default-widgets.php中。

8.添加链接

而且速度影响不大。好了,不多说了,直接把以下代码放入模板文件functions.php中就行了。

//3.5+添加链接
add_filter( 'pre_option_link_manager_enabled', '__return_true' );

9.CDN加速

现在使用了两个dns,静态文件使用了快速的七牛CDN,网页本身使用了国外的cdn.net的CDN。而这一切都没有使用插件,据说有Domain Theme和Wordpress官方推荐的WPMU站点网络博客,现在我使用的是一种强制固化home_url的方法。在wp_config.php的<?php下面紧跟着一行添加

if ($_SERVER['HTTP_HOST']=='orign.rexdf.org'):
    define("WP_SITEURL", "https://blog.rexdf.org");
    define("WP_HOME", "https://blog.rexdf.org");
else:
    define("WP_SITEURL", "https://blog.rexdf.org");
    define("WP_HOME", "https://blog.rexdf.org");
endif;

然后停止blog的A记录解析,专用cname指向CDN,然后配置orign的DNS指向空间,在空间中添加orign的权限,同时把.htaccess中配置orign指向博客安装目录。

本文链接:网站更新日志

转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:Rexdf,谢谢!^^


此条目发表在网站建设分类目录,贴了, 标签。将固定链接加入收藏夹。

2 Responses to 网站更新日志

  1. rexdf说:
    UC Browser 9.3.0.321 Android 4.1.2
    Mozilla/5.0 (Linux; U; Android 4.1.2; zh-CN; MI-ONE C1 Build/JZO54K) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.3.0.321 U3/0.8.0 Mobile Safari/534.31

    :keai: 测试一下ip

回复 rexdf 取消回复

您的电子邮箱地址不会被公开。

*

:zsmilebig: :zsadbig: :zwiredbig: :zgreenhappy: more »

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据