Telegram代理-MTProxy一键搭建管理脚本

安装:

wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/MTProxy-Bash/master/install.sh && bash install.sh

卸载:

wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/MTProxy-Bash/master/uninstall.sh && bash uninstall.sh

去掉模块中的wordpress.org

用过wordpress博客程序的人都知道,wordpress小工具默认有一个模块“功能”;这个功能主要的作用就是注册和登陆;但是当我们启动这个功能后:显示如下:功能

管理站点
登出
文章RSS
评论RSS
WordPress.org

很明显,这样的情况不是我们所想要的,我们至少要去掉”wordpress.org”;这样无论是对自己网站品牌来说还是对于网站优化来说都是有必要的;

wordpress 去掉“wordpress.org”步骤:

1、进入文件夹

一般情况下,路径是:根目录\wp-includes\widgets

2、找到 class-wp-widget-meta.php

3、修改 class-wp-widget-meta.php
一般情况下,我们只需要修改60行~75行代码即可,这几行代码就是主要输出“wordpress.org”的,可以选择删除,也可以选择屏蔽;我是选择的后者:

<?php
/**
* Filters the "Powered by WordPress" text in the Meta widget.
*
* @since 3.6.0
*
* @param string $title_text Default title text for the WordPress.org link.
*/
echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
esc_url( __( 'https://wordpress.org/' ) ),
esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
_x( 'WordPress.org', 'meta widget link text' )
) );
wp_meta();
?>

修改为

<?php
/**
* Filters the "Powered by WordPress" text in the Meta widget.
*
* @since 3.6.0
*
* @param string $title_text Default title text for the WordPress.org link.
echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
esc_url( __( 'https://wordpress.org/' ) ),
esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
_x( 'WordPress.org', 'meta widget link text' )
) );
wp_meta();
*/
?>

chevereto伪静态

# Image not found replacement
location ~* (jpe?g|png|gif) {
log_not_found off;
error_page 404 /content/images/system/default/404.gif;
}

# CORS header (avoids font rendering issues)
location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
add_header Access-Control-Allow-Origin "*";
}

# Pretty URLs
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /admin {
try_files $uri /admin/index.php?$args;
}

discuz单板块设为首页

在程序根目录找到

forum.php
index.php

首先将这两个文件另存一份,以备日后恢复,

首先修改forum.php

找到这句

define('CURSCRIPT', 'forum');

下面加入

$_GET +=array('mod'=>'forumdisplay','fid'=>2);

上面的’2’是设定论坛单版的版块fid号,
还记得刚安装好论坛时是否有个默认版块,它的fid号就是’2’了,
设定其它版块为单版的主版块,可以把这个’2’的版块fid号修改,首先先找到设定单版的版块fid,
版块的fid的获取方法,
可以打开一个版块,复制它的地址,寻找以下字段,
fid=
后面的数值就是版块的fid,
forum.php的修改完成后,把forum.php的全部代码复制到index.php中,现在论坛单版就完成,你现在可以打开主页,主页变成了设定的版块。

mysql批量更换域名

zblog帖子内容域名批量替换mysql数据库语句:

UPDATE zbp_post SET log_Content = replace( log_Content, '老域名','新域名')

discuz帖子内容页mysql批量替换语句:

UPDATE pre_forum_post SET message = replace( message, '老域名','新域名')

wordpress使用mysql批量修改文章外链的语句:

UPDATE wp_posts SET post_content = REPLACE( post_content, '老域名', '新域名' )

discuz更新邮件激活状态

update pre_common_member set emailstatus = 1

wordpress仅文章新标签页打开

在主题根目录下面 打开 content.php 这个文件

第28行如下代码:

<a href=”<?php the_permalink(); ?>” rel=”bookmark”><?php the_title(); ?></a>
在rel…前面加上target=”_blank”,如下:

<a href="<?php the_permalink(); ?>" target="_blank"rel="bookmark"><?php the_title(); ?></a>

这样首页显示的文章标题,点击后就是在新的标签页或新窗口打开的了,其他的就不会再新窗口打开!

Discuz!-更新自定义字段后-后台数据库数据更新完毕但前台不显示的处理办法

起初以为是非常奇怪的问题,在phpMyAdmin下批量执行数据库语句成功更新了数据库,后台也都修改好了可选值,但是前台就是不更新,缓存问题!
然后就想办法后台更新缓存,模板缓存,用户-更新统计项资料统计里“”和“更新数据”。
更新完还是不行,后经广峰点化……原来是memcache内存缓存导致的,要清理该内存缓存需要在后台的-全局-性能优化-内存优化-memcache的对应行点击“内存清理”即可。清理完后,前台页面已经正常了。

wordpress表格自适应代码

正确的(自适应宽度)代码如下:

<div>周杰伦jay专辑《范特西》专辑曲目</div>
<table style="table-layout: fixed;" border="1" width="100%" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<th style="text-align: left;">序号</th>
<th style="text-align: left;">曲名</th>
<th style="text-align: left;">作词</th>
<th style="text-align: left;">作曲</th>
<th style="text-align: left;">编曲</th>
</tr>
<tr>
……
</tr>
</tbody>
</table>

可以看到上面代码中关于定义table(表格)属性的代码是:

<table style="table-layout: fixed;" border="1" width="100%" cellspacing="0" cellpadding="2">

discuz新触屏版图片宽度自适应

文件位置:template/default/m/css/comm.css

找到第99行:

.detailCon img,.img img{max-width:300px;margin:10px auto;height:auto !important;}

修改为:

.detailCon img,.img img{max-width:100%;margin:10px auto;height:auto !important;}

保存并更新缓存即可