WordPress: FAQ Troubleshooting:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: Back to FAQ __TOC__ <div style="clear:both"> </div> ==Why can't I see my posts? All I see is ''Sorry, no posts match your criteria''?== Clearing your browser cache and cookies ...)
 
无编辑摘要
 
(未显示3个用户的25个中间版本)
第1行: 第1行:
[[FAQ|Back to FAQ]]
<span style="border:1px solid #000; text-align:center; float:right; padding:6px;"><strong>导航:</strong> [[WordPress:WordPress文档|上一级]] | [[WordPress]] | {{Template:WordPress导航}}</span>
<div style="clear:both;"></div>
[[Wordpress:FAQ|返回到常见问题解答]]
 
__TOC__
__TOC__
<div style="clear:both">
<div style="clear:both">
</div>
</div>
==管理==
===我的文章能有个标题而不是/index.php?p=76吗?===
看看:
* [[Wordpress:Using Permalinks|使用Permalinks]]
===如果我有 mod_rewrite我怎么能找出?===
寻求关于你的服务器的信息,你可以使用PHP的信息功能:
*将这个粘贴到一个新的记事本/ BBEdit文件
<tt><?php phpinfo(); ?></tt>
*以'''info.php'''形式保存
*上传到服务器。在你的浏览器中访问(www.example.com/info.php)
那样做,你会得到关于你的php版本和[[Wordpress:Glossary#mod_rewrite| mod_rewrite]]的信息。
'''info.php'''文件返回了一个页面,叙述了你的PHP安装的详细信息。你可以看看mod_rewrite模板是否已经载入了。在'''apache'''标题下,看一下'''载入的模块'''部分,看看mod_rewiite模板是否罗列出来了。
===我怎样改变文件和文件夹权限?===
看看:
* [[Wordpress:Changing File Permissions|改变文件权限]]
===为什么版本号不是以任何特定的周期序列排的?===
改进的WordPress版本的版本号也许没有遵从一种严格的单一的数字序列(或者在试验发布情况下的,字母序列),因为版本号反映了相对的进步,而且改变也是针对现有的或者以前的版本。
===我怎样开启 Permalinks,,我应做些什么来处理错误?===
看看:
* [[Wordpress:Using Permalinks|使用Permalinks]]
=== User Levels 是用来做什么的 ?不同的User Levels 拥有什么权限?===
看看:
* [[Wordpress:User Levels|User Levels]]
=== ''wp-config.php''上的''644'' 权限会对与我分享服务器的其他的所有用户妥协用户名和密码吗?===
将PHP设置到你的服务器上的方式是有限制的,如果你先前使用Movable Type,Perl也许是与suexec一起设置的,因此Movable Type以你的用户方式来执行。在这种情况下,PHP以网络服务器用户运行,这就是它最少是444的原因。有phpsuexec,但似乎许多主机都不使用它。
然而在现代化分享的主机中,这并不是一个问题,因为即使文件是“世界性"可读的,每个帐户有一个“jailshell"的设置,这种设置将人们紧闭在自己的主目录上,而且可以通过一个open_basedir约束来轻松地改变PHP,制止人们写PHP脚本来阅读你的文件。如果你真的担心,你应该联系你的主机,看看他们采取了什么样的措施。
===从''wp-login.php''上登录后,我怎样再次引导用户到''index.php''页面?===
这个能让你在你的用户登录后,将他们引导到你的博客主页,而不是管理面板上。
在''wp-login.php''上,找一下以下的代码行:
<nowiki>if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() )</nowiki>
在那一行的后面,可以找到这一行:
<nowiki><$redirect_to = 'wp-admin/';</nowiki>
将那个改为:
<nowiki>$redirect_to = 'index.php';</nowiki>
如果你的博客设置索引页在WordPress文件不同的目录上,(看[[Wordpress:Giving_WordPress_Its_Own_Directory|设置WordPress本身的目录]]),接着你要用一个关于''wp-login.php'' 的[[Wordpress:Glossary#Relative_Path|相关的路径]]对''index.php''做出参考。例如,如果你的WordPress文件在一个称作wordpress的文件夹里,但是你的index.php 文件在你的网络根目录文件夹里,你要将代码行改为:
<nowiki>$redirect_to = '../index.php';</nowiki>
===我怎样改变我的文件权限, 那样的话我就可以用模板编辑器来编辑文件?===
看看:
* [[Wordpress:Changing File Permissions|改变文件权限]]
===我怎样阻止其它的站点通过热点链接来链接我的图像?===


你可以使用.htaccess文件来保护阻止你的图像被热点链接,或者换句话说,阻止其它的站点热点链接你的图像。这可能消耗你的带宽,因为如果其他人直接链接你站点上的图像,你就会丢失带宽。


==Why can't I see my posts? All I see is ''Sorry, no posts match your criteria''?==
[http://www.clockwatchers.com/htaccess_images.html Clockwatchers的htaccess 图像指南] 提供更多的详细信息。


Clearing your browser cache and cookies may resolve this problem.  Also, check your <tt>search.php</tt> and <tt>index.php</tt> template files for errors.


See also:
你可以用这个工具来检查一下图像是不是得到了合理的保护,而且那个还有一些额外的小贴士。


* [[I Make Changes and Nothing Happens]]
关于更多阻止热点链接的更成熟的方法,请看[http://www.alistapart.com/articles/hotlinking/ A List Apart's Smarter 防止图像热点链接].


==How do I find more help?==
===我怎样使用phpMyadmin做备份并且重建我的WordPress数据库?===  


There are various resources that will help you find more help with WordPress, in addition to these [[FAQ]].  You can also increase your search capabilities by adding the [http://asymptomatic.net/2005/07/20/1765/codex-searcher/ Codex and Forum Searcher Plugin] and search both the Codex and Forum from your WordPress Administration Panels. Click on one of the search results and the page will open in a new window or tab so you can have the article or discussion open while working on WordPress.
看看:
* [[Wordpress:Backing Up Your Database|备份你的数据库]] and [[Wordpress:Restoring Your Database From Backup|从文件备份中重建数据库]]


* [[Troubleshooting]]
===我怎样阻止评论泛滥?===
* [[Finding WordPress Help]]
评论泛滥指的是在很短的时间内,你的网点上粘贴了许多的评论(可能是垃圾广告)。[http://mindfulmusings.net/ Mark Ghosh的博客] 文章, [http://weblogtoolscollection.com/archives/2004/07/07/comment-flood-prevention-a-really-simple-solution/ 防止评论泛滥-一个很简单的解决办法],以及相关的[http://weblogtoolscollection.com/archives/2004/07/07/more-comment-flood/评论泛滥保护插件],允许你在每一个评论之间设置一个时间间隔,防止随后的评论粘贴得过快。
* [[Using the Support Forums]]
* [[Technical Articles|Resources and Technical Articles about WordPress]]
* [[Troubleshooting#Installation_Problems|Installation Problems]]


===Where can I find help with the CSS problems I'm having?===
下面有份代码的修改(针对的是WP1.2):


The following are articles that will help you troubleshoot and solve many of your [[CSS]] problems:
在wp-comments-post.php里(在评论之中,你应该能找到位置),将下面的添加上去:


* [[Blog Design and Layout]]
// Simple flood-protection
* [[Finding Your CSS Styles]]
$lasttime = $wpdb->get_var("SELECT comment_date FROM $tablecomments ORDER BY comment_date DESC LIMIT 1&#8243;);
* [[CSS Fixing Browser Bugs]]
if (!empty($lasttime)) {
* [[CSS Troubleshooting]]
$time_lastcomment= mysql2date(’U', $lasttime);
* [[CSS|WordPress CSS Information and Resources]]
$time_newcomment= mysql2date(’U', $now);
if (($time_newcomment - $time_lastcomment) < 300)
die( __(’Sorry, this blog only allows a new comment once every 300 seconds. If you really want to write a comment,
just wait a few and hit refresh on this page. Chances are you tried to add a comment about halfway between 0 and 300 seconds. 
Comment flooders are annoying. Thank you for being patient.’) );
}


==Why does the password emailed to me look weird?==
If the password emailed to you looks strange, see [http://allnarfedup.com/2004/11/10/solving-garbled-text/ Solving Garbled Text].


==How to fix my site statistics problem on a WordPress 2.x blog hosted at Dreamhost?==
===为什么我不能删除''未归类'' 的种类?===


Dreamhost has a kb/wiki post about this called, [http://wiki.dreamhost.com/index.php/Making_stats_accessible_with_htaccess Making stats accessible with htaccess].
任何在[[Wordpress:Administration Panels|管理]] >
[[Wordpress:Administration_Panels#Manage_-_Change_your_content|管理]] > [[Wordpress:Manage_Categories_SubPanel|种类]]中的对''# of Posts''有一个非零数值的种类都不可以被删除。''未归类''的种类可能会被分配到一些文章,但是'''所有的'''[[Wordpress:Pages|页面]]都被指派了''未归类''的种类。因此即使''未归类''的种类中,没有分配到任何文章,[[Wordpress:Pages|页面]]都包含在''# of Posts''的计算以内。
即使默认的种类是空的,也不能将它删除,但是你可在管理面板上的''选项'' - ''写'' 页面中,规定你的默认种类中的文章和链接。
===为什么叫编写或者编辑一个页面的时候,没有页面模板选项?===
如果在编写或者编辑一个[[Wordpress:Pages|页面]]时,没有一个页面模板选项,也许是因为没有一个适当结构的[[Wordpress:Stepping Into Templates|模板文件]]。一个分配到[[Wordpress:Pages|页面]]上的页面模板盒,至少你的主题中有一个模板文件,在模板文件的开始有一个内似以下的结构:


==Why do I get an error message about ''Sending Referrers''?==
<pre>
If you got this message when trying to save a post, consider checking [[Administration_Panels|Administration]] > [[Administration_Panels#General|Options]] > [[General_Options_SubPanel|General]] and make sure both your '''WordPress address (URI)'''  and the '''Blog address (URI)''' do not use 'www'.  For example, instead of '''<nowiki>http://www.sample.com</nowiki>''' use '''<nowiki>http://sample.com</nowiki>''' in those fields.  This information orginally reported via http://wordpress.org/support/topic/72235
<?php
/*
Template Name: Links
*/
?>
</pre>


See also:
* [[Enable Sending Referrers]]


==Are there are any problems with using MySQL 4.1.7 for WordPress?==
例子来源于WordPress默认主题wp-content/themes/default/links.php文件。


See  [[FAQ_Installation#Can_I_install_WordPress_on_Windows_2000.3F|Can I install WordPress on Windows 2000?]]


==How do I empty a database table?==
也看看:
See  also:
* [[Emptying a Database Table]]


==How do I fix the following error ''SQL/DB Error errcode 13 Can't create/write to file''?==
[[Wordpress:Pages#Page_Templates|页面模板]]
'''Problem:''' The MySQL variable <tt>tmpdir</tt> is set to a directory that cannot be written to when using PHP to access MySQL.


To verify this, enter MySQL at the command line and type <tt>show variables</tt>;
== 配置 ==


You'll get a long list and one of them will read: '''tmpdir = /somedir/''' (whatever your setting is.)
===我怎样更改?日期和 / 或者时间是怎样显示的?===


'''Solution:''' Alter the '''tmpdir''' variable to point to a writable directory.
看看:


'''Steps:'''
* [[Wordpress:Formatting Date and Time|安排日期和时间布置]]
<ol>
<li>Find the '''my.cnf''' file. On *nix systems this is usually in '''/etc/'''.</li>
<li>Once found, open this in a simple text editor and find the '''[mysqld]''' section.</li>
<li>Under this section, find the '''tmpdir''' line. If this line is commented (has a '''#''' at the start), delete the '''#''' and edit the line so that it reads: '''tmpdir = /writable/dir''' where '''/writable/dir''' is a directory to which you can write. Some use '''/tmp''', or you might also try '''/home//'''.
</li>
<li>Save the file.</li>
<li>Shutdown MySQL by typing <tt>mysqlshutdown -u -p shutdown</tt>.</li>
<li>Start MySQL by going to the MySQL directory and typing <tt>./bin/safe_mysqld &</tt>. Usually the MySQL directory is in '''/usr/local''' or sometimes in '''/usr/''' on Linux systems.
</li>
</ol>
If none of this make sense and you have someone to administrate your system for you, show the above to them and they should be able to figure it out.


==How do I solve the ''Headers already sent'' warning problem?==
===我怎样控制人们做的评论?===


'''Description:''' You get a warning message on your browser that says:
看看:


<tt>Warning: Cannot modify header information - headers already sent by
* [[Wordpress:Comment Moderation|调适评论]]
(output started at</tt>


'''Reason and Solution :'''
===讨论选项是什么意思?===
看看:
* [[Wordpress:Discussion Options|讨论选项]]


It is usually because there are spaces, new lines, or other garbage
===我怎样安装插件?===
before an opening '''<tt><?php</tt>''' tag or after a closing '''<tt>?></tt>''' tag, typically in
看看:
'''wp-config.php'''. This could be true about some other file too, so please check the error message, as it will list the specific file name where the error occurred (see "Interpreting the Error Message" below).  Replacing the faulty file with one from your most recent backup or one from a fresh WordPress download is your best bet, but if neither of those are an option, please follow the steps below.
* [[Wordpress:Managing Plugins|管理插件]]


Just because you cannot see anything does not mean that PHP sees the same.
===当我粘贴进的种类不止一个的时候,我怎么改变种类之间出现的东西?===
设定文章种类显示的方式,打开'''index.php'''文件,找到这一行'''<nowiki><div class meta></nowiki>'''.你就会看到下面的代码:
<tt><?php the_category() ?></tt>
在'''( )'''括号和引号里面,加上或者改变这个,反映你想要的新面貌。
如果你想在种类之间加上逗号,标签应该显示为:


# Download the file mentioned in the error message.
<tt><?php the_category(',') ?></tt>
# Open that file in a [[Glossary#Text editor|plain text editor]] ('''NOT''' MS Word or similar. Notepad or BBEdit are fine).
# Check that the ''very'' first characters are '''<tt><?php</tt>'''
# Check that the ''very'' last characters are '''<tt>?></tt>'''


To be sure about the end of the file, do this:
如果你想要一个箭头记号,标签应该显示为:
#Place the cursor between the ? and >
#Now press the DELETE key on your computer
#*Note to MAC users: The "DELETE" key on a PC deletes characters to the ''right'' of the cursor.  That is the key noted here.
#Keep that key pressed
#For at least 15 seconds
#Now type > and
#'''save''' without pressing any other key at all.
#If you press another key, you will bring the problem back.


'''Interpreting the Error Message:'''
<tt><?php the_category(' > ') ?></tt>


If the error message states: <code>Warning: Cannot modify header information - headers already sent by (output started at /path/blog/wp-config.php:34) in /path/blog/wp-login.php on line 42</code>, then the problem is at line #34 of <code>wp-config.php</code>, not line #42 of <code>wp-login.php</code>.  In this scenario, line #42 of <code>wp-login.php</code> is the victim.  It is being affected by the excess whitespace at line #34 of <code>wp-config.php</code>.
如果你想要一个bullet符号(一种划分段落的符号),标签应该显示为:


If the error message states: <code>Warning: Cannot modify header information - headers already sent by (output started at /path/wp-admin/admin-header.php:8) in /path/wp-admin/post.php on line 569</code>, then the problem is at line #8 of <code>admin-header.php</code>, not line #569 of <code>post.php</code>.  In this scenario, line #569 of <code>post.php</code> is the victim.  It is being affected by the excess whitespace at line #8 of <code>admin-header.php</code>.
<tt><?php the_category(' &amp;bull; ') ?></tt>


==Why can't I see the visual rich editor when using Apple's Safari browser?==
如果你希望在种类之间出现"竖线" ( | ),标签会显示为:


'''Description:''' The visual rich editor in the Write interface (aka "the WYSIWYG editor") does not display when using Apple's Safari browser.
<tt><?php the_category(' | ') ?></tt>


'''Reason and Solution:'''
运用你的想象力与创造力,将种类之间的区分为你喜欢的形式。
In early versions of Safari, the visual rich editor would cause the browser to crash immediately upon loading the Write interface.  This was due to a bug in Safari, not WordPress.  Since the WordPress developers had no way of correcting this, they chose to disable the visual rich editor for Safari users.  At this point in time, there are three alternatives for affected users.  One could '''upgrade to Safari 3.0.4 or higher and WordPress 2.3 or higher''', use [http://www.mozilla.com/firefox/ Firefox] or [http://caminobrowser.org/ Camino], or de-select "Users should use the visual rich editor by default" in [[Administration_Panels|Administration]] > [[Administration_Panels#Writing|Options]] > [[Writing_Options_SubPanel|Writing]] and install [http://wordpress.org/extend/plugins/deans-fckeditor-for-wordpress-plugin/ Dean's FCKEditor For WordPress].


==Why can't I see the Quicktag buttons when using Apple's Safari browser?==
===为什么所有的评论都被审核了?===


'''Description:''' The Quicktag buttons in the Write interface do not display when using Apple's Safari browser.
转到[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|选项]] > [[Wordpress:Administration_Panels#Discussion|讨论]]面板,并请确保'''一个管理者必须批准评论 (不管下面的匹配是怎样的)''' 没有被选中。选择了那个选项,所有的评论就要被送到审核队列中等待被批准。确保 ''' 如果评论包括不止x个链接,在队列中按住评论''' 是空白的而且包含了一个大于零的数字。 如果这个数值是空白的或者是零,所有包含链接的评论都要被审核。如果上述选项都未被选中,连接是值高于零,你仍然有这个麻烦, 你的 [[Wordpress:Spam Words|垃圾信息]] 列表在列表的信息中可能还有空行,标点符号,或者单独的字母。所列的条目之间应该有间距,或者每个条目应该单起一行, 如果你完成了这一步,给你安装的过滤评论中广告的插件升级。 如果这个仍然是个问题,一个个的关闭过滤评论中广告的插件,确定问题所在,并且与插件作者联系寻求帮助。


'''Reason and Solution:'''  
===我怎样阻止人们在评论中粘贴HTML?===
In early versions of Safari, the Quicktag buttons would function, but not as intended. This was due to a bug in Safari, not WordPress.  Since the WordPress developers had no way of correcting this, they chose to disable the Quicktag buttons for Safari users.  At this point in time, there are three alternatives for affected users.  One could '''upgrade to Safari 2.0.4 or higher and WordPress 2.0.7 or higher''', use [http://www.getfirefox.com Firefox] or [http://www.caminobrowser.org/ Camino], or (for earlier versions of WordPress) remove the <tt>if</tt> statement on line 1085 and the word "<tt>else</tt>" on line 1092 of <tt>/wp-admin/admin-functions.php</tt> .
在评论区接受HTML标签,是由'''wp-includes'''文件夹中的'''kses.php'''文件管理。
在一个文本编辑器中打开这个文件,将HTML标签列表放到文件上方附近。每个HTML标签罗列在单独的一行,以PHP数组允许的标签结构形式。以<tt>//</tt>开始的行,'''在评论中清除'''或者被关闭,因此以<tt>//</tt>开始的行,指定HTML标签'''不'''允许出现在评论中。
阻止人们在评论中粘贴HTML,编辑你的'''kses.php'''文件来允许或者不允许特殊的HTML标签出现在你的评论中,通过在列表上合适的行的开头加上<tt>//</tt>。清除所有的HTML标签,将所有允许HTML标签的行comment化。在执行这些的时候,确保你的文件都保存了。
注:你可以只是清除所有的行,而不是将它们comment化,通过在行的开头加上<tt>//</tt>,你能收到同样的效果,同时保存标签列表以便以后可能重新启用。
===我怎样禁止评论?===
首先,在[[Wordpress:Administration_Panels#Options_-_Configuration_Settings|选项]] > [[Wordpress:Administration_Panels#Discussion|讨论]] 面板上不要选中'''允许人们在文章中粘贴评论'''。这只能在''将来的文章''中禁止评论。现在,需要完全的禁止评论,你就要编辑每篇文章,并且在[[Wordpress:Write Post SubPanel|写文章安装盘]]上不要选中'''允许评论''' 。另外, 你可以在一个shell帐户的命令行上运行这个这个MySQL 询问或者使用 [[Wordpress:phpMyAdmin|phpMyAdmin]]: <tt>UPDATE wp_posts SET comment_status="closed";</tt>
如果你的目的是永远地禁止评论,你也应该删除<tt>wp-comments-post.php</tt>文件。
===我怎样禁止 trackbacks 和pingbacks?===
首先在 [[Wordpress:Administration_Panels#Options_-_Configuration_Settings|选项]] > [[Wordpress:Administration_Panels#Discussion|讨论]] 面板上不要选中 '''允许来自其它博客的(pingback和 trackbacks.)的链接通知''' 这只能在''将来的文章''中禁用trackbacks和pingbacks。现在,要完全的禁用trackbacks 和pingbacks,你需要编辑每篇文章,并且在写文章安装盘上不要选中'''允许 Pings'''。另外可以在一个shell帐户的命令行上运行MySQL询问或者使用PHPMyAdmin: <tt>UPDATE wp_posts SET ping_status="closed";</tt>
如果你的目的是永久地禁用trackbacks 和 pingbacks,你也应该删除<tt>wp-trackback.php</tt> 文件。
===我怎样禁用我的RSS 或者 syndicated feeds?===
禁用你的RSS or syndicated feeds,你必须删除<tt>wp-atom.php</tt>, <tt>wp-commentsrss2.php</tt>, <tt>wp-feed.php</tt>, <tt>wp-rdf.php</tt>, <tt>wp-rss.php</tt>, 和<tt>wp-rss2.php</tt> 文件。
===我怎样更改 ''站点管理'' 名?===
更改你的管理名,在[[Wordpress:Administration_Panels|管理面板]]中选择'''用户->你的档案'''标签。在这儿改。然而你不能在管理面板内部更改用户名。要做到这一点,你必须直接地编辑你的MySQL数据库,但是并不推荐你这样做,因为别的用户不能经常看到你的用户名。
看看:
* [[Wordpress:Your Profile SubPanel|你的档案安装盘]]
===我怎样找到上传图像的绝对路径?===
找到一个网页的绝对路径,[http://www.tamba2.org.uk/downloads/absolutepath.zip absolutepath.zip]会帮助你。下载,解压ftp到网页 / 图像 / 目录 的地址,然后在你的浏览器- http://www.example.com/images/absolutepath.php中访问那个文件。


For example, change this:
<pre>function the_quicktags() {
// Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP
if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Safari'))
echo '
<div id="quicktags">
<script src="../wp-includes/js/quicktags.js" type="text/javascript"></script>
<script type="text/javascript">if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar();</script>
</div>
';
else echo '
<script type="text/javascript"></pre>


to this:
===我改变哪个文件来改变我的博客外表?===
<pre>function the_quicktags() {
// Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP
echo '
<div id="quicktags">
<script src="../wp-includes/js/quicktags.js" type="text/javascript"></script>
<script type="text/javascript">if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar();</script>
</div>
';
echo '
<script type="text/javascript"></pre>


==E-mailed passwords are not being received==
以下的文件影响你的站点在公众中的显示,在你的管理屏面上的'''模板''' 选择上,通过使用内置的编辑器,你能轻松地改变每个文件。
'''Description:''' When users try to register with your blog or change their passwords by entering their username and email, WordPress indicates that their password has been emailed to them, but it is never received.


'''Reason and Solution:'''  WordPress uses the standard php mail function, which uses sendmail.  No account information is needed. This is not generally a problem if you are using a hosting service, but if you are using your own box and do not have an SMTP server, the mail will never send.  If you are using a *NIX box, you should have either postfix or sendmail on your machine; you will just need to set them up (Google for how-to's).  If you do not want to go through setting up a complete mail server on your *NIX box you may find [http://packages.debian.org/stable/mail/ssmtp ssmtp] useful -- it provides ''"A secure, effective and simple way of getting mail off a system to your mail hub"''.  On a Windows machine, try a sendmail emulator like [http://glob.com.au/sendmail/ Glob SendMail].


More help can be found on the forums at: http://wordpress.org/support/topic.php?id=24981
  * '''index.php'''
      这影响你的内容布局。


As a plugin-based alternative, you could try [http://www.coffee2code.com/archives/2004/06/28/plugin-wpphpmailer/ wpPHPMailer].  It ''"enables WordPress to send e-mail via SMTP instead of via PHP's mail() function (aka sendmail)."''


'''Windows Host Specific:''' With the plugin mentioned above you can work around the issue of e-mails not being received. 
  * '''style.css'''
      这个负责怎样控制你的博客的风格和呈现的方式。


Another alternative is to edit the ''class-pop3.php'' file in wp-includes, there is a variable, ''$MAILSERVER'', which allows you to hard code your smtp server. However, ''wp-php.php'' in the root directory actually loops through depending on the author to determine a value to set the from address on the e-mail and defaults to the admin address particularly in the case of users registering.
  * '''wp-comments.php'''
      这控制着用户提交的评论和trackbacks的布局以及提及评论的形式。


This is fine if your admin address is a valid e-mail address.  For example, if your admin e-mail is: ''admin@"yourhost.com"'', your smtp server must also be ''smtp."yourhost.com"''.  If the domains do not match your mail will not send.  (Your SMTP server may not require authentication however, your host in most cases still checks to make sure incoming SMTP traffic is still valid.  This is to prevent spam.)
  * '''wp-comments-popup.php'''
      只有你决定使用一个弹出来的评论框时才需要这个文件。
      (默认情况下,没有弹出来的评论筐)


When using the plugin wpPHPMailer the same applies, and there is an option to hard code the from address.


==How do I get the Quicktag <nowiki><!--nextpage--></nowiki> back?==
For some reason,  the <nowiki><!--nextpage--></nowiki> Quicktag button was "removed" in 1.5.1. To get it back, just do the following:


'''In Wordpress 1.5.x'''
===我能拥有弹出来的评论吗?===
 
要让评论弹出来,你要给你使用的WordPress版本选择合适的方法。
 
 
'''WordPress版本 2.0 默认主题'''
 
在 '''header.php''' 里加上这一行:
<tt><?php 评论_跳出_脚本(); ?></tt>
 
在这一行的''上面'':
<pre><?php wp_head(); ?></pre>
 
 
例如:


Open ''wp-admin/quicktags.js'' in a text editor and locate this section (starting at line 135):
<pre>
<pre>
/*
<?php comments_popup_script(); ?>
edButtons[edButtons.length] =
<?php wp_head(); ?>
new edButton('ed_next'
</head></pre>
,'page'
 
,'<!--nextpage-->'
'''WordPress 2.0 经典主题'''
,''
 
,'p'
在这件'''header.php''' 上查找这一行(第21行):
,-1
<pre><?php //comments_popup_script(); // off by default ?></pre>
);
 
*/
移动第一个评论标记,将其改为:
</pre>
<pre><?php comments_popup_script(); // off by default ?></pre>
Just remove the /* and */ lines to uncomment the block of code. That should return the button to your editing windows.
 
 
'''WordPress 1.5版本 默认主题'''
 
 
在 '''header.php''' 中''加上'' 这一行:
<tt><?php comments_popup_script(); // off by default ?></tt>
 
在这一行的''下面'':
 
<pre><?php wp_get_archives('type=monthly&format=link'); ?></pre>
 
例如:
 
<pre><?php wp_get_archives('type=monthly&format=link'); ?>
<?php comments_popup_script(); // off by default ?>
<?php wp_head(); ?></pre>
 
'''WordPress 1.5 版本经典主题'''
 
在 '''header.php''' 里是这一行:
<tt><?php //comments_popup_script(); // off by default ?></tt>
把那个改为
<tt><?php comments_popup_script(); // off by default ?></tt>
 
'''WordPress1.2版本 '''
 
在 '''index.php''' 里是这一行:
<tt><?php //comments_popup_script(); // off by default ?></tt>
把那个改为
<tt><?php comments_popup_script(); // off by default ?></tt>
 
 
===我怎样上传图像?===
允许图像上传到你的站点:
在管理面板上,转到'''Options -> Miscellaneous'''
* 选择选项'''允许文件上传'''
**如果你需要关于找到完全路径的帮助,请看看[[#Wordpress:How_do_I_find_the_absolute_path_I_need_for_uploading_images.3F|我怎样找到上传图像的完全路径?]].
**如果你需要关于改变权限方面的帮助,访问[[Wordpress:Changing_File_Permissions|改变文件权限]].
*然后在最顶端选中主菜单。点击'''上传'''
*在Wordpress 2.0中,转到'''写-> 写文章''' or '''写 -> 写网页'''并且使用那里的上载界面。
 
===我能改变WordPress 数据库插件保存文件备份的位置吗?===
 
当前(从WordPress2.0起),WordPress数据库插件在''wp-content/backup-xxxxxx'' 文件夹(这里的 xxxxxx 的序列是随机排的)中保存文件备份。更改使用的文件夹,就要更改''wp-db-backup.php'' 文件。
在WordPress1.7版本的数据库插件中,你更改一下第22行,第22行上写着
<code>define('WP_BACKUP_DIR', 'wp-content/backup-' . $rand);</code>
更改为:
  <code>define('WP_BACKUP_DIR', 'mydir/mysubdir');</code>
==修改 ==
 
===我能更改 Smilies吗?===
看看:
* [[Wordpress:Using Smilies|使用Smilies]]
 
===我怎样编辑文件?===
看看:
* [[Wordpress:Editing Files|编辑文件]]
===What is '' Loop''是什么?===
看看:
* [[Wordpress:The Loop|The Loop]] and [[Wordpress:The Loop in Action|活动的Loop]]
===我怎样为我的文章改变URL-结构?===
看看:
* [[Wordpress:Using Permalinks|使用Permalinks ]]
===我怎样为我的 Windows 服务器上的文章改变URL-结构?===
看看:
* [[Wordpress:Using_Permalinks#Using_Permalinks_Without_mod_rewrite|在没有mod rewrite情况下,使用Permalinks]]
===我怎样使用WordPress 模板标签来改变博客上显示的内容?===
看看:
* [[Wordpress:Template Tags|模板标签]]
=== 我怎样在一个新的窗口中打开''所有的''链接?===
将这个放进你的主题的[[Wordpress:Using_Themes#Theme_Files|template header.php]] 文件的<tt><head></tt>部分:
<tt><base target="_blank" /></tt>
看看:
* [[Wordpress:Using Themes|使用主题]]
* [http://www.w3schools.com/tags/tag_base.asp W3 Schools base 标签解释]
===我怎样在我的RSS feed中增加一个图像?===
看看:
* [http://wordlog.com/archives/2004/08/01/add-an-image-to-your-rss-20-field/ 在wordlog.com上给你的RSS 2.0 feed增加一个图像]
 
 
 
 
===我怎样制止自己的评论发送给了我自己?===
'''WordPress version 1.2'''
 
当你粘贴评论时用的邮箱地址与评论的作者的邮箱地址(通知邮件发送的地址)相同的时候,这个会阻止WP向你发送邮件。这个仅用于v1.2 / 1.2.1代码。
 
In functions.php change the following line:
<tt>if ('' == $user->user_email) return false; // If there's no email to send the comment to</tt>
to
  <tt><small>if ('' == $user->user_email || $comment->comment_author_email == $user->user_email) return false; // If there's no email to send the comment to</small></tt>
 
在 functions.php 中,将下面的行:
<tt>if ('' == $user->user_email) return false; // 如果没有邮件将评论发送到</tt>
改为
<tt><small>if ('' == $user->user_email || $comment->comment_author_email == $user->user_email) return false; // 如果没有邮件将评论发送到</small></tt>
 
===如果我关掉评论, 博客上显示 "关闭评论". 那么我怎样更改这个?===
 
将你的评论特色关掉:
 
'''WordPress 1.2版本'''
 
: wp-includes/template-functions-comment.php的第58行显示 '关掉评论' 
 


'''In Wordpress 2.0.x'''
'''WordPress 1.3版本'''


Open ''wp-includes/js/quicktags.js'' in a text editor and locate this section (starting at line 135):
: wp-includes/template-functions-comment.php的第98行显示'关掉评论'
<pre>
//
edButtons[edButtons.length] =
new edButton('ed_next'
,'page'
,'<!--nextpage-->'
,''
,'p'
,-1
);
//
</pre>
Just remove the two // lines after and before the block of code to uncomment it. 


Now Open '''wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js'' in a text editor and locate this section (starting at line 15):
===当我用密码保护一篇文章时,我怎样改变显示的内容?===
<pre>
创建密码保护的文章, 请看wp-includes/template-functions-post.php 的第19行。
var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');return false;"><img id="{$editor_id}_wordpress_more" src="{$pluginurl}/images/more.gif" title="'+titleMore+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
// Add this to the buttons var to put the Page button into the toolbar.
// '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\')" target="_self" onclick="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\');return false;"><img id="{$editor_id}_wordpress_page" src="{$pluginurl}/images/page.gif" title="'+titlePage+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
</pre>


On line 17 copy the text between the apostrophes and paste it at the end of line 15 exactly before the trailing '; as follows:


<pre>
var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');return false;"><img id="{$editor_id}_wordpress_more" src="{$pluginurl}/images/more.gif" title="'+titleMore+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a> <a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\')" target="_self" onclick="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\');return false;"><img id="{$editor_id}_wordpress_page" src="{$pluginurl}/images/page.gif" title="'+titlePage+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
</pre>


This will show the the Quicktag <nowiki><!--nextpage--></nowiki> again. You can also enable the hotkey access by doing just one more thing. Open '''wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js'' with a text editor. Note that it's not the same file as the one from the previous step, as although it has the same name it is on a different path. Locate the following lines (should be line 23 and 24):
<pre>
+ '<input type="button" accesskey="t" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');" />'
+ '<input type="button" accesskey="u" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\',false);" />'
</pre>
Copy line 23, paste it as a new line just below line 23, and edit it as follows:
<pre>
+ '<input type="button" accesskey="t" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');" />'
+ '<input type="button" accesskey="p" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\');" />'
+ '<input type="button" accesskey="u" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\',false);" />'
</pre>
This will enable the Alt+P shortcut for the <nowiki><!--nextpage--></nowiki> tag.


==I used the Quicktag <nowiki><!--nextpage--></nowiki> in a post so why doesn't it work?==
In some [[Using Themes|Themes]], such as the WordPress Classic Theme, you may see the <nowiki><!--nextpage--></nowiki> work properly on your main page, but other [[Using Themes|Themes]], such as the WordPress default Theme,  may only show the ''page break'' when viewing the posts individually.  It may be necessary to change your Theme's [[Templates|template]] ''page.php'' or ''index.php'' file to make this feature work according to your wishes.  You'll need to add the following:
<pre><?php wp_link_pages(); ?> ?</pre>


== MySQL Error 28 ==
===我怎样运行某些HTML标签出现在我的评论之中?===
'''WordPress 1.2之前的版本'''
如果你想制服kses.php中的$allowedtags变量,在你的my-hacks.php文件中你可以这样做,前提是在你设置了$allowedtags数组后,你增加了以下的代码。
<tt>define('CUSTOM_TAGS', true);</tt>


You get the following error:
===我怎样给 WordPress添加高级搜索能力?===
看看:
*[http://weblogtoolscollection.com/archives/2004/06/07/advanced-contextual-search-for-wordpress/ 博客工具收集中的Wordpress高级上下文搜索]


Error code 28: No space left on device
==文章==
===我怎样上传一个图像并将它显示在文章中?===
允许图像上传到你的站点上:
*从[[Wordpress:Miscellaneous_Options_SubPanel#Allow_File_Uploads|管理面板->选项->Miscellaneous]]上
**选择选项 '''允许文件上传'''


This is a MySQL error and has nothing to do with WordPress directly; you should contact your host about it. Some users have reported that running a "repair table" command in [[phpMyAdmin]] fixed the problem.
*如果你需要关于找到绝对路径方面的帮助, 访问[[Wordpress:Glossary#Absolute Path|绝对路径]]


[http://www.mysql.com/newsletter/2003-10/a0000000249.html Error 28, and how to avoid it]:
*如果你需要关于改变权限方面的帮助, 访问[[Wordpress:Changing_File_Permissions|改变文件权限]]


<pre>
*然后在顶上方,选中主菜单。点击'''上传'''
If you get this error, check all filesystems in
which MySQL operates. If you followed recommendations
to split datadir, tmpdir and log files into dedicated
filesystems, more than one filesystem is involved. In
addition, be aware that MySQL often creates temporary
tables for some queries. Most of these are placed in
tmpdir; however, some may be found in the database
directory (e.g. ALTER TABLE). Also, ensure that
sufficient free disk space is available for MySQL.
</pre>


It could be because:
查阅以下的文章,看怎样在在文中排列图像:
* you are out of space on /tmp (wherever tmpdir is), or,
*[http://www.mfr.f2s.com/graphicalcss/align/index.html 怎样合理地排列图像]
* you have too many files in /tmp (even if there is lots of free space)


Relevant discussion threads:
*[http://weblogtoolscollection.com/archives/2004/04/12/image-alignment-drop-shadows/ 怎样用对齐创建一个阴影效果]
* http://wordpress.org/support/3/1738
* http://wordpress.org/support/3/2923
* http://wordpress.org/support/3/2760


==Why are the Quote Marks escaped or not escaped?==
* [http://wordpress.org/support/topic/9815 WordPress 支持论坛文章]


If you write plugins, or use a plugin like [http://www.nosq.com/2004/10/runphp-wordpress-plugin/ RunPHP], or make advanced custom templates, you may eventually find yourself dealing with data in the database.  WordPress <em>usually</em> manages this data for you in such a way that it is immediately usable.  There are circumstances though (especially if you are dealing directly with the database without using WordPress) where you will experience weirdness.
看看:
*[[Wordpress:Using Images|使用图像]]
*[[Wordpress:Photoblogs and Galleries|博客照片与图画]]
*[[Wordpress:Wrapping Text Around Images|图像周围的文字]]


For example, quote marks cannot be stored directly in the MySQL database. MySQL uses quote marks in its SQL language. When a quote mark is used, for example, in a post, When the post is saved to the database, every quote mark gets escaped. That means a backslash character is prepended, which signifies that the next character should be taken as part of the input, and not as part of the SQL command. 
=== pingback是什么?===
看看:
* [[Wordpress:Introduction_to_Blogging#Pingbacks| 写博客, Pingbacks介绍]]


For example, if you are adding the following in your post:
===什么是 trackback?===
看看:
* [[Wordpress:Introduction_to_Blogging#Trackbacks| 写博客, Trackbacks介绍]]


<pre>...an article about "Happiness" is at
===我的文章的 permalink 在哪儿?===
<a href="http://example.com/happy" title="Happiness">Happiness</a>
看看:
if you would like to read it...</pre>
* [[Wordpress:Linking Posts Pages and Categories|链接的文章, 网页, 与目录]]


Is actually imported into the database looking like this:
===我能使用桌面博客软件吗?===
See
*[[Wordpress:Weblog Client|博客Client ]]


<pre>...an article about \"Happiness\" is at
===我能通过邮件写博客吗?===
<a href=\"http://example.com/happy\" title=\"Happiness\">Happiness</a>
看看
if you would like to read it...</pre>
*[[Wordpress:Blog by Email|通过邮件写博客]]


When pulling data out of the database, the backslashes may not always be automatically removed. If this becomes an issue, you can use the [http://www.php.net/stripslashes stripslashes()] PHP function on the text.
== 垃圾信息, 垃圾信息制作者,评论 ==
===我怎样做可以阻止评论中的垃圾广告?===
看看:
* [[Wordpress:Combating Comment Spam|抗击评论中的垃圾广告]]


==Why do I get a blank page when I submit a comment?==
===更多的关于评论中垃圾广告的信息===
'''Description:''' When anyone tries to comment on a post, the window goes blank and the comment doesn't appear to have been recognised by WordPress.
看看:
* [[Wordpress:Comment Spam|评论中的垃圾广告]]


'''Reason and Solution:'''
===我需要哪些的垃圾广告用语?===
The Theme that you are using is missing a critical part of the comment form so WordPress doesn't know which post the comment refers to.  You need to check the comment.php in your Theme and ensure that the following code appears within the form.
看看:
<pre>
* [[Wordpress:Spam Words|垃圾广告用语]]
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</pre>


Relevant discussion threads:


* http://wordpress.org/support/topic/38683
===为什么所有的评论都被审核了?===
如果你所有的评论都被送去审核了,但本来不是所有的都有审核,可能因为你的'''垃圾广告词'''列在了[[Wordpress:Discussion_Options#Comment_Moderation|管理面板->选项 -> 讨论]]上。它可能有一个单独的字母或者一个空行,或者一个空格。将这些删除。
点击垃圾广告词语箱,选中然后复制所有的并将它粘贴到记事本中进行检查。
检查到不固定的数据并不简单,很容易错过多个空白行,将垃圾广告插件添加到那个列表上,这样做可以更简单。
仔细地检查 :)
== 引进和输出 ==
=== 当显示文件太大不能引进时,我怎样引进一个WordPress WXR文件?===
如果一个WordPress WXR 文件,一个WordPress输出的xml文件太大了,不能输出,你可以尝试一些方法来打破这个限制。
*通过将一篇文章中的数据分开,并将标题粘贴到每个文件上,将WordPress WXR 文件分成几个小部分。
*通过改变记忆_限制 设置(例如<tt>记忆_限制 = 64M ;</tt>),在php.ini中改变PHP的记忆限制。注:大多数主机不允许这样做:
*通过.htaccess  (e.g. <tt>php_记忆限制_值 64M</tt>)来增加PHP的记忆限制。注:大多数主机不允许这样做。
*通过 wp-config.php (例如<tt>define('WP_MEMORY_LIMIT', '64MB');</tt>)增加PHP记忆限制
<!-- not confirmed this works *Increase the PHP post_max_filesize setting in php.ini.  注:大多数主机不允许这样做. -->
看看
* [[Wordpress:Importing Content|引进的内容]]
* [[Wordpress:Editing_wp-config.php#Increasing_memory_allocated_to_PHP|编辑 wp-config.php]]


[[FAQ|Back to FAQ]]
[[Wordpress:FAQ|返回到常见问题解答]]
This allows you to redirect users to your blog's main page

2008年5月27日 (二) 10:55的最新版本

导航: 上一级 | WordPress | 首页 | WordPress中文论坛 | WordPress主机 | CMS程序 | 论坛程序 | ECShop | ShopNC | PowerEasy

返回到常见问题解答

管理[ ]

我的文章能有个标题而不是/index.php?p=76吗?[ ]

看看:

如果我有 mod_rewrite我怎么能找出?[ ]

寻求关于你的服务器的信息,你可以使用PHP的信息功能:

  • 将这个粘贴到一个新的记事本/ BBEdit文件

<?php phpinfo(); ?>

  • info.php形式保存
  • 上传到服务器。在你的浏览器中访问(www.example.com/info.php)

那样做,你会得到关于你的php版本和 mod_rewrite的信息。 info.php文件返回了一个页面,叙述了你的PHP安装的详细信息。你可以看看mod_rewrite模板是否已经载入了。在apache标题下,看一下载入的模块部分,看看mod_rewiite模板是否罗列出来了。

我怎样改变文件和文件夹权限?[ ]

看看:

为什么版本号不是以任何特定的周期序列排的?[ ]

改进的WordPress版本的版本号也许没有遵从一种严格的单一的数字序列(或者在试验发布情况下的,字母序列),因为版本号反映了相对的进步,而且改变也是针对现有的或者以前的版本。

我怎样开启 Permalinks,,我应做些什么来处理错误?[ ]

看看:

User Levels 是用来做什么的 ?不同的User Levels 拥有什么权限?[ ]

看看:

wp-config.php上的644 权限会对与我分享服务器的其他的所有用户妥协用户名和密码吗?[ ]

将PHP设置到你的服务器上的方式是有限制的,如果你先前使用Movable Type,Perl也许是与suexec一起设置的,因此Movable Type以你的用户方式来执行。在这种情况下,PHP以网络服务器用户运行,这就是它最少是444的原因。有phpsuexec,但似乎许多主机都不使用它。

然而在现代化分享的主机中,这并不是一个问题,因为即使文件是“世界性"可读的,每个帐户有一个“jailshell"的设置,这种设置将人们紧闭在自己的主目录上,而且可以通过一个open_basedir约束来轻松地改变PHP,制止人们写PHP脚本来阅读你的文件。如果你真的担心,你应该联系你的主机,看看他们采取了什么样的措施。

wp-login.php上登录后,我怎样再次引导用户到index.php页面?[ ]

这个能让你在你的用户登录后,将他们引导到你的博客主页,而不是管理面板上。

wp-login.php上,找一下以下的代码行: if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() )

在那一行的后面,可以找到这一行:

<$redirect_to = 'wp-admin/';

将那个改为: $redirect_to = 'index.php';

如果你的博客设置索引页在WordPress文件不同的目录上,(看设置WordPress本身的目录),接着你要用一个关于wp-login.php相关的路径index.php做出参考。例如,如果你的WordPress文件在一个称作wordpress的文件夹里,但是你的index.php 文件在你的网络根目录文件夹里,你要将代码行改为: $redirect_to = '../index.php';

我怎样改变我的文件权限, 那样的话我就可以用模板编辑器来编辑文件?[ ]

看看:

我怎样阻止其它的站点通过热点链接来链接我的图像?[ ]

你可以使用.htaccess文件来保护阻止你的图像被热点链接,或者换句话说,阻止其它的站点热点链接你的图像。这可能消耗你的带宽,因为如果其他人直接链接你站点上的图像,你就会丢失带宽。

Clockwatchers的htaccess 图像指南 提供更多的详细信息。


你可以用这个工具来检查一下图像是不是得到了合理的保护,而且那个还有一些额外的小贴士。

关于更多阻止热点链接的更成熟的方法,请看A List Apart's Smarter 防止图像热点链接.

我怎样使用phpMyadmin做备份并且重建我的WordPress数据库?[ ]

看看:

我怎样阻止评论泛滥?[ ]

评论泛滥指的是在很短的时间内,你的网点上粘贴了许多的评论(可能是垃圾广告)。Mark Ghosh的博客 文章, 防止评论泛滥-一个很简单的解决办法,以及相关的[1],允许你在每一个评论之间设置一个时间间隔,防止随后的评论粘贴得过快。

下面有份代码的修改(针对的是WP1.2):

在wp-comments-post.php里(在评论之中,你应该能找到位置),将下面的添加上去:

// Simple flood-protection
$lasttime = $wpdb->get_var("SELECT comment_date FROM $tablecomments ORDER BY comment_date DESC LIMIT 1″);
if (!empty($lasttime)) {
$time_lastcomment= mysql2date(’U', $lasttime);
$time_newcomment= mysql2date(’U', $now);
if (($time_newcomment - $time_lastcomment) < 300)
die( __(’Sorry, this blog only allows a new comment once every 300 seconds. If you really want to write a comment,
just wait a few and hit refresh on this page. Chances are you tried to add a comment about halfway between 0 and 300 seconds.   
Comment flooders are annoying. Thank you for being patient.’) );
}


为什么我不能删除未归类 的种类?[ ]

任何在管理 > 管理 > 种类中的对# of Posts有一个非零数值的种类都不可以被删除。未归类的种类可能会被分配到一些文章,但是所有的页面都被指派了未归类的种类。因此即使未归类的种类中,没有分配到任何文章,页面都包含在# of Posts的计算以内。 即使默认的种类是空的,也不能将它删除,但是你可在管理面板上的选项 - 页面中,规定你的默认种类中的文章和链接。

为什么叫编写或者编辑一个页面的时候,没有页面模板选项?[ ]

如果在编写或者编辑一个页面时,没有一个页面模板选项,也许是因为没有一个适当结构的模板文件。一个分配到页面上的页面模板盒,至少你的主题中有一个模板文件,在模板文件的开始有一个内似以下的结构:

<?php
/*
Template Name: Links
*/
?>


例子来源于WordPress默认主题wp-content/themes/default/links.php文件。


也看看:

页面模板

配置[ ]

我怎样更改?日期和 / 或者时间是怎样显示的?[ ]

看看:

我怎样控制人们做的评论?[ ]

看看:

讨论选项是什么意思?[ ]

看看:

我怎样安装插件?[ ]

看看:

当我粘贴进的种类不止一个的时候,我怎么改变种类之间出现的东西?[ ]

设定文章种类显示的方式,打开index.php文件,找到这一行<div class meta>.你就会看到下面的代码: <?php the_category() ?>( )括号和引号里面,加上或者改变这个,反映你想要的新面貌。

如果你想在种类之间加上逗号,标签应该显示为:

<?php the_category(',') ?>

如果你想要一个箭头记号,标签应该显示为:

<?php the_category(' > ') ?>

如果你想要一个bullet符号(一种划分段落的符号),标签应该显示为:

<?php the_category(' &bull; ') ?>

如果你希望在种类之间出现"竖线" ( | ),标签会显示为:

<?php the_category(' | ') ?>

运用你的想象力与创造力,将种类之间的区分为你喜欢的形式。

为什么所有的评论都被审核了?[ ]

转到选项 > 讨论面板,并请确保一个管理者必须批准评论 (不管下面的匹配是怎样的) 没有被选中。选择了那个选项,所有的评论就要被送到审核队列中等待被批准。确保 如果评论包括不止x个链接,在队列中按住评论 是空白的而且包含了一个大于零的数字。 如果这个数值是空白的或者是零,所有包含链接的评论都要被审核。如果上述选项都未被选中,连接是值高于零,你仍然有这个麻烦, 你的 垃圾信息 列表在列表的信息中可能还有空行,标点符号,或者单独的字母。所列的条目之间应该有间距,或者每个条目应该单起一行, 如果你完成了这一步,给你安装的过滤评论中广告的插件升级。 如果这个仍然是个问题,一个个的关闭过滤评论中广告的插件,确定问题所在,并且与插件作者联系寻求帮助。

我怎样阻止人们在评论中粘贴HTML?[ ]

在评论区接受HTML标签,是由wp-includes文件夹中的kses.php文件管理。 在一个文本编辑器中打开这个文件,将HTML标签列表放到文件上方附近。每个HTML标签罗列在单独的一行,以PHP数组允许的标签结构形式。以//开始的行,在评论中清除或者被关闭,因此以//开始的行,指定HTML标签允许出现在评论中。 阻止人们在评论中粘贴HTML,编辑你的kses.php文件来允许或者不允许特殊的HTML标签出现在你的评论中,通过在列表上合适的行的开头加上//。清除所有的HTML标签,将所有允许HTML标签的行comment化。在执行这些的时候,确保你的文件都保存了。 注:你可以只是清除所有的行,而不是将它们comment化,通过在行的开头加上//,你能收到同样的效果,同时保存标签列表以便以后可能重新启用。

我怎样禁止评论?[ ]

首先,在选项 > 讨论 面板上不要选中允许人们在文章中粘贴评论。这只能在将来的文章中禁止评论。现在,需要完全的禁止评论,你就要编辑每篇文章,并且在写文章安装盘上不要选中允许评论 。另外, 你可以在一个shell帐户的命令行上运行这个这个MySQL 询问或者使用 phpMyAdmin: UPDATE wp_posts SET comment_status="closed"; 如果你的目的是永远地禁止评论,你也应该删除wp-comments-post.php文件。

我怎样禁止 trackbacks 和pingbacks?[ ]

首先在 选项 > 讨论 面板上不要选中 允许来自其它博客的(pingback和 trackbacks.)的链接通知 这只能在将来的文章中禁用trackbacks和pingbacks。现在,要完全的禁用trackbacks 和pingbacks,你需要编辑每篇文章,并且在写文章安装盘上不要选中允许 Pings。另外可以在一个shell帐户的命令行上运行MySQL询问或者使用PHPMyAdmin: UPDATE wp_posts SET ping_status="closed"; 如果你的目的是永久地禁用trackbacks 和 pingbacks,你也应该删除wp-trackback.php 文件。

我怎样禁用我的RSS 或者 syndicated feeds?[ ]

禁用你的RSS or syndicated feeds,你必须删除wp-atom.php, wp-commentsrss2.php, wp-feed.php, wp-rdf.php, wp-rss.php, 和wp-rss2.php 文件。

我怎样更改 站点管理 名?[ ]

更改你的管理名,在管理面板中选择用户->你的档案标签。在这儿改。然而你不能在管理面板内部更改用户名。要做到这一点,你必须直接地编辑你的MySQL数据库,但是并不推荐你这样做,因为别的用户不能经常看到你的用户名。 看看:

我怎样找到上传图像的绝对路径?[ ]

找到一个网页的绝对路径,absolutepath.zip会帮助你。下载,解压ftp到网页 / 图像 / 目录 的地址,然后在你的浏览器- http://www.example.com/images/absolutepath.php中访问那个文件。


我改变哪个文件来改变我的博客外表?[ ]

以下的文件影响你的站点在公众中的显示,在你的管理屏面上的模板 选择上,通过使用内置的编辑器,你能轻松地改变每个文件。


 * index.php
     这影响你的内容布局。


  * style.css
     这个负责怎样控制你的博客的风格和呈现的方式。
  * wp-comments.php
     这控制着用户提交的评论和trackbacks的布局以及提及评论的形式。
 * wp-comments-popup.php
     只有你决定使用一个弹出来的评论框时才需要这个文件。
     (默认情况下,没有弹出来的评论筐)。


我能拥有弹出来的评论吗?[ ]

要让评论弹出来,你要给你使用的WordPress版本选择合适的方法。


WordPress版本 2.0 默认主题

header.php 里加上这一行:

<?php 评论_跳出_脚本(); ?>

在这一行的上面:

<?php wp_head(); ?>


例如:

<?php comments_popup_script(); ?>
<?php wp_head(); ?>
</head>

WordPress 2.0 经典主题

在这件header.php 上查找这一行(第21行):

<?php //comments_popup_script(); // off by default ?>

移动第一个评论标记,将其改为:

<?php comments_popup_script(); // off by default ?>


WordPress 1.5版本 默认主题


header.php加上 这一行:

<?php comments_popup_script(); // off by default ?>

在这一行的下面:

<?php wp_get_archives('type=monthly&format=link'); ?>

例如:

<?php wp_get_archives('type=monthly&format=link'); ?>
<?php comments_popup_script(); // off by default ?>
<?php wp_head(); ?>

WordPress 1.5 版本经典主题

header.php 里是这一行:

<?php //comments_popup_script(); // off by default ?>

把那个改为

<?php comments_popup_script(); // off by default ?>

WordPress1.2版本

index.php 里是这一行:

<?php //comments_popup_script(); // off by default ?>

把那个改为

<?php comments_popup_script(); // off by default ?>


我怎样上传图像?[ ]

允许图像上传到你的站点: 在管理面板上,转到Options -> Miscellaneous

  • 选择选项允许文件上传
  • 然后在最顶端选中主菜单。点击上传
  • 在Wordpress 2.0中,转到写-> 写文章 or 写 -> 写网页并且使用那里的上载界面。

我能改变WordPress 数据库插件保存文件备份的位置吗?[ ]

当前(从WordPress2.0起),WordPress数据库插件在wp-content/backup-xxxxxx 文件夹(这里的 xxxxxx 的序列是随机排的)中保存文件备份。更改使用的文件夹,就要更改wp-db-backup.php 文件。 在WordPress1.7版本的数据库插件中,你更改一下第22行,第22行上写着 define('WP_BACKUP_DIR', 'wp-content/backup-' . $rand); 更改为:

  define('WP_BACKUP_DIR', 'mydir/mysubdir');

修改[ ]

我能更改 Smilies吗?[ ]

看看:

我怎样编辑文件?[ ]

看看:

What is Loop是什么?[ ]

看看:

我怎样为我的文章改变URL-结构?[ ]

看看:

我怎样为我的 Windows 服务器上的文章改变URL-结构?[ ]

看看:

我怎样使用WordPress 模板标签来改变博客上显示的内容?[ ]

看看:

我怎样在一个新的窗口中打开所有的链接?[ ]

将这个放进你的主题的template header.php 文件的<head>部分:

<base target="_blank" />

看看:

我怎样在我的RSS feed中增加一个图像?[ ]

看看:



我怎样制止自己的评论发送给了我自己?[ ]

WordPress version 1.2

当你粘贴评论时用的邮箱地址与评论的作者的邮箱地址(通知邮件发送的地址)相同的时候,这个会阻止WP向你发送邮件。这个仅用于v1.2 / 1.2.1代码。

In functions.php change the following line:

if ( == $user->user_email) return false; // If there's no email to send the comment to

to

if ( == $user->user_email || $comment->comment_author_email == $user->user_email) return false; // If there's no email to send the comment to

在 functions.php 中,将下面的行:

if ( == $user->user_email) return false; // 如果没有邮件将评论发送到

改为

if ( == $user->user_email || $comment->comment_author_email == $user->user_email) return false; // 如果没有邮件将评论发送到

如果我关掉评论, 博客上显示 "关闭评论". 那么我怎样更改这个?[ ]

将你的评论特色关掉:

WordPress 1.2版本

wp-includes/template-functions-comment.php的第58行显示 '关掉评论'


WordPress 1.3版本

wp-includes/template-functions-comment.php的第98行显示'关掉评论'

当我用密码保护一篇文章时,我怎样改变显示的内容?[ ]

创建密码保护的文章, 请看wp-includes/template-functions-post.php 的第19行。



我怎样运行某些HTML标签出现在我的评论之中?[ ]

WordPress 1.2之前的版本 如果你想制服kses.php中的$allowedtags变量,在你的my-hacks.php文件中你可以这样做,前提是在你设置了$allowedtags数组后,你增加了以下的代码。 define('CUSTOM_TAGS', true);

我怎样给 WordPress添加高级搜索能力?[ ]

看看:

文章[ ]

我怎样上传一个图像并将它显示在文章中?[ ]

允许图像上传到你的站点上:

  • 如果你需要关于找到绝对路径方面的帮助, 访问绝对路径
  • 然后在顶上方,选中主菜单。点击上传

查阅以下的文章,看怎样在在文中排列图像:

看看:

pingback是什么?[ ]

看看:

什么是 trackback?[ ]

看看:

我的文章的 permalink 在哪儿?[ ]

看看:

我能使用桌面博客软件吗?[ ]

See

我能通过邮件写博客吗?[ ]

看看

垃圾信息, 垃圾信息制作者,评论[ ]

我怎样做可以阻止评论中的垃圾广告?[ ]

看看:

更多的关于评论中垃圾广告的信息[ ]

看看:

我需要哪些的垃圾广告用语?[ ]

看看:


为什么所有的评论都被审核了?[ ]

如果你所有的评论都被送去审核了,但本来不是所有的都有审核,可能因为你的垃圾广告词列在了管理面板->选项 -> 讨论上。它可能有一个单独的字母或者一个空行,或者一个空格。将这些删除。 点击垃圾广告词语箱,选中然后复制所有的并将它粘贴到记事本中进行检查。 检查到不固定的数据并不简单,很容易错过多个空白行,将垃圾广告插件添加到那个列表上,这样做可以更简单。 仔细地检查 :)

引进和输出[ ]

当显示文件太大不能引进时,我怎样引进一个WordPress WXR文件?[ ]

如果一个WordPress WXR 文件,一个WordPress输出的xml文件太大了,不能输出,你可以尝试一些方法来打破这个限制。

  • 通过将一篇文章中的数据分开,并将标题粘贴到每个文件上,将WordPress WXR 文件分成几个小部分。
  • 通过改变记忆_限制 设置(例如记忆_限制 = 64M ;),在php.ini中改变PHP的记忆限制。注:大多数主机不允许这样做:
  • 通过.htaccess (e.g. php_记忆限制_值 64M)来增加PHP的记忆限制。注:大多数主机不允许这样做。
  • 通过 wp-config.php (例如define('WP_MEMORY_LIMIT', '64MB');)增加PHP记忆限制

看看

返回到常见问题解答 This allows you to redirect users to your blog's main page