Jump to content

User talk:星耀晨曦/Flow

About this board

你说我们要怎样才能使用维基百科的模板啊?

36
AndyPKU (talkcontribs)

比如我觉得维基百科的模板很好用,想用在自己的mw站上,应该怎么做呢?(我曾经尝试把它们的源代码复制到我的网站上来,但是发现还是会出现乱码。。)

星耀晨曦 (talkcontribs)

利用导出功能和导入功能。

AndyPKU (talkcontribs)

哟,还能导出导入。。。

AndyPKU (talkcontribs)

怎么导出导入啊?我在帮助:模板里面没有找到相应的解决方案啊。

星耀晨曦 (talkcontribs)
AndyPKU (talkcontribs)

我原先还想说直接复制粘贴它们的源代码不就完事了嘛。。可是发现这样不行。。。

星耀晨曦 (talkcontribs)

如果一个模版不包含另一个模版的话,复制粘贴也可以。但导出功能可以批量导出一个模板和这个模板所依赖的所有其它模板。

AndyPKU (talkcontribs)

Wikipedia

   zhwiki
   https://zh.wikipedia.org/wiki/Wikipedia:%E9%A6%96%E9%A1%B5
   MediaWiki 1.31.0-wmf.17
   first-letter
   
     Media
     Special
     
     Talk
     User
     User talk
     Wikipedia
     Wikipedia talk
     File
     File talk
     MediaWiki
     MediaWiki talk
     Template
     Template talk
     Help
     Help talk
     Category
     Category talk
     Portal
     Portal talk
     Draft
     Draft talk
     模块
     模块讨论
     Gadget
     Gadget talk
     Gadget definition
     Gadget definition talk
     Topic
   
 
 
   Template:艺人
   10
   5903294
   
   
     46301744
     2017-09-22T22:17:13Z
     
       Raymon090
       2170119
     
     编辑工具:自动创建重定向到[[Template:藝人]]
     wikitext
     text/x-wiki
     #REDIRECT [[Template:藝人]]

{{簡繁重定向}}

     dmwuzejkar3hvr9dzc6my8spdfhw4su

这个是导出以后出现的文字(或者说代码?)但是并不是一个文件。。。

AndyPKU (talkcontribs)

我好像搞清楚如何导出导入了。不过我在导入页面的时候好像出了一些问题。

AndyPKU (talkcontribs)

我用你的方式导入了几个页面(包含模板),为什么会出错呢?

AndyPKU (talkcontribs)

江西铜业股份

wikify]]{{#if:||{{{arg}}}}} 等。此外本模板具有自由選擇不同顏色、顯示特定預設圖片等功能。

请注意:这个模板只用于在条目名字空间使用的模板,其他名字空间使用的模板请不要使用。

星耀晨曦 (talkcontribs)

AndyPKU (talkcontribs)

我把『江西铜业股份』从维基百科里面导出来了xml格式,然后再在我的mw站上导入,结果就出现了这样的问题。。我不知道是什么情况。。

星耀晨曦 (talkcontribs)

可能是模版的问题,一个一个的排查。

AndyPKU (talkcontribs)

那为什么在维基百科上能够得到完美的呈现,可是在我的站点上却不能呢?

星耀晨曦 (talkcontribs)

主要是mediawiki:common.css的问题。维基百科把大部分共用的样式放到这里,许多模板也依赖这个页面。

AndyPKU (talkcontribs)

我把维基百科的这个页面导到我的站点上去是不是就可以解决问题了?

星耀晨曦 (talkcontribs)

起码可以解决大部分问题。

AndyPKU (talkcontribs)

还是没有解决。。。导入之后。。

星耀晨曦 (talkcontribs)

。。。你能提供你的维基站点的URL和问题模板的URL吗。

AndyPKU (talkcontribs)
星耀晨曦 (talkcontribs)

额,我现在这里看是HTTP 500。

AndyPKU (talkcontribs)

好吧,这个可能是我下午在安装扩展的时候失败所致。你说要怎么恢复回去比较好呢?

星耀晨曦 (talkcontribs)

注释掉加载扩展的语句。

AndyPKU (talkcontribs)

你说的是localsettings.php的设置啊,那个我已经注释掉了。。没有用。。

AndyPKU (talkcontribs)

Fatal error: Uncaught Error: Call to a member function getCode() on null in /var/www/html/includes/user/User.php:1594 Stack trace: #0 /var/www/html/includes/user/User.php(5272): User::getDefaultOptions() #1 /var/www/html/includes/user/User.php(2884): User->loadOptions() #2 /var/www/html/includes/context/RequestContext.php(364): User->getOption('language') #3 /var/www/html/includes/Message.php(380): RequestContext->getLanguage() #4 /var/www/html/includes/Message.php(1275): Message->getLanguage() #5 /var/www/html/includes/Message.php(842): Message->fetchMessage() #6 /var/www/html/includes/Message.php(934): Message->toString('text') #7 /var/www/html/includes/exception/MWExceptionRenderer.php(200): Message->text() #8 /var/www/html/includes/exception/MWExceptionRenderer.php(304): MWExceptionRenderer::msg('dberr-again', 'Try waiting a f...') #9 /var/www/html/includes/exception/MWExceptionRenderer.php(51): MWExceptionRenderer::reportOutageHTML(Object(Wikimedia\Rdbms\DBConnectionError)) #10 /var/www/html/includes/exception/MWExce in /var/www/html/includes/user/User.php on line 1594

你说这样的错误提示,应该怎么破?

我还在想,要是有类似windows的系统还原就好了。我把整个配置回滚到某个时间点,问题就全解决了。。但是似乎没有?

星耀晨曦 (talkcontribs)

添加了什么,就删掉什么。

如果要记录配置的时间点的话可以使用git

AndyPKU (talkcontribs)

我把下载的扩展给删了。我把localsettings.php的相关语句也都删了。。但是好像还没有解决空白页的问题。。

AndyPKU (talkcontribs)

那是不是能够让网站的设置回到初始状态呢?

星耀晨曦 (talkcontribs)

你可以重新运行一遍安装程序(mw-config/index.php)来生成一个新的LocalSettings.php文件。

星耀晨曦 (talkcontribs)

尝试把所有这种wfLoadExtension()require_once加载扩展的语句注释掉。

AndyPKU (talkcontribs)

我可以加你qq或者微信吗?

AndyPKU (talkcontribs)

全部注释掉了。。还是没用。。

星耀晨曦 (talkcontribs)

qq:1509251138

AndyPKU (talkcontribs)

已添加。。

Edited needed for zhwiki for Template:nowrap begin

23
Summary by 星耀晨曦

EP has been accepted and work good.

SSastry (WMF) (talkcontribs)

That template needs to change from

<includeonly><span class="nowrap"></includeonly>

to

<includeonly><nowiki/>\n<span class="nowrap"></includeonly>

The \n is a newline. This will fix the pwrap-wrapping-bug linter errors on a lot of templates and pages.

SSastry (WMF) (talkcontribs)

It needs a <nowiki/> still. See above. Otherwise, the parser will strip the newline.

星耀晨曦 (talkcontribs)
SSastry (WMF) (talkcontribs)

Ah, I hadn't seen zh:Template:nowrap ... I am not sure how Template:nowrap is being used. I'll have to take a look at pages using it. I'll check tomorrow. But, I was referring to zh:Template:nowrap begin

星耀晨曦 (talkcontribs)

Ok, I will request for editing again.

星耀晨曦 (talkcontribs)

The zhwiki administrator does not think that this template should be modified. It says that this template will not cause lint errors, the lint error occurs because of incorrect use of this template, not a problem with this template.

Can you give an example to illustrate that the code of zh:Template:nowrap begin will cause lint errors?

SSastry (WMF) (talkcontribs)

Take a look at https://zh.wikipedia.org/wiki/Template:%E9%87%91%E6%9B%B2%E7%8D%8E%E6%9C%80%E4%BD%B3%E7%B7%A8%E6%9B%B2%E4%BA%BA%E7%8D%8E?action=parsermigration-edit - you have to open the collapsed tables to see the problem.

Now, in that edit window in that url above, add a <nowiki/>\n before the use of {{nowrap begin}} in all instances. You will see that the problem goes away. This is a workaround for a parser bug. A simpler way instead of fixing all uses of {{nowrap begin}} is to add the <nowiki/>\n in this template itself.

k

星耀晨曦 (talkcontribs)
SSastry (WMF) (talkcontribs)
SSastry (WMF) (talkcontribs)
星耀晨曦 (talkcontribs)

I noticed zh:T:Navbox, which outputs various types (multiple-unclosed-formatting-tags, pwrap-bug-workaround) of lint errors, and this template was called many times.

SSastry (WMF) (talkcontribs)

That is usually because of how the navbox template is used in those other templates.

星耀晨曦 (talkcontribs)
SSastry (WMF) (talkcontribs)

Regarding, nowrap begin, yes, looks like you will need an equivalent fix in nowrap end as well to add a "<nowiki/>\n" after the </span>. So, it will become <nowiki/>\n</span>

So, you need both, it appears.

The alternative is to fix templates so that {{nowrap begin}}, all those {{.w}} templates and {{nowrap end}} are all on the same line.

星耀晨曦 (talkcontribs)

This caused another style destruction, see test reset.

SSastry (WMF) (talkcontribs)
星耀晨曦 (talkcontribs)

Feedback from community member: {{}} was style broken. He used {{nowrap}} instead of {{nowrap_begin}}...{{nowrap_end}} to fix.

SSastry (WMF) (talkcontribs)

I see .. ok. Thanks for pursuing this.

星耀晨曦 (talkcontribs)

It looks like it's no problem, wrong used {{nowrap_begin}}...{{nowrap_end}}.

星耀晨曦 (talkcontribs)

Hi, I also received feedback from a user. In the infobox for zh:在河左岸, "主演", "制作公司", "播出日期", there text of the parameters looks strange, more out of a <p> pair in the outer layer.

SSastry (WMF) (talkcontribs)

Is this related to the nowrap templates? Or, are you reporting something else?

星耀晨曦 (talkcontribs)

See test case, maybe the nowrap templates is not compatible with some templates?

SSastry (WMF) (talkcontribs)

Hmm .. I see. Yes, so, the newlines added to the nowrap-begin and nowrap-end is causing this. This is a result of how p-wrappers are added in the parser for <td>s.

So, if you don't want this to happen, you have the following options:

  1. Option 1: Let that spacing be as is.
  2. Option 2: Fix that spacing problem some other way (ex: maybe CSS).
  3. Option 3: You have to revert changes to nowrap-begin and nowrap-end. After that you will have to make fixes similar to this to all the templates that will show up in this linter category after the revert.
Reply to "Edited needed for zhwiki for Template:nowrap begin"

support desk是一个页面,但是如何才能让这个页面有『添加话题』的功能呢?

5
Summary by 星耀晨曦

Add __NEWSECTIONLINK__ to a page.

AndyPKU (talkcontribs)

普通的页面肯定是没有的。要做怎样的设置才能有『添加话题』的功能呢?

星耀晨曦 (talkcontribs)

这个维基的support desk页面的“添加话题”是由Flow扩展附带的效果。

AndyPKU (talkcontribs)

谢谢,我尝试一下安装flow。。

星耀晨曦 (talkcontribs)

其实有其它方法可以做到这一点(比如中文维基百科的互动客栈)。听说是用css来实现,但我不知道具体的方法。

AndyPKU (talkcontribs)

我自己的站点在用户讨论页面是有一个『添加话题』的功能的。好像就类似咱们现在这个呀。但是我不知道怎么做出来的。

验证问题:code的意思是?

3
AndyPKU (talkcontribs)

不好意思,周一上班才开qq……

星耀晨曦 (talkcontribs)

这玩意随便写写,我只是为了防止突然有人加我。

AndyPKU (talkcontribs)

这样子。。。

为什么mw这里汉语的部分那么少?

9
AndyPKU (talkcontribs)

基本上绝大多数都是英文的,找不到汉语的……

星耀晨曦 (talkcontribs)

因为mw基本是由外国人开发的,本地化也没什么人做。

AndyPKU (talkcontribs)

对啊,我就说怎么没有人去做本地化呢。好歹维基百科中文还有那么丰富的内容(是不是相对英文也是很少了?)为何mw反倒没人做呢。。。

星耀晨曦 (talkcontribs)

因为国内没啥人知道mw。起码最基本的,面对用户的帮助部分做了点中文化。

AndyPKU (talkcontribs)

知道wm不能等于是知道mw?可是wm是用mw做出来的啊。

星耀晨曦 (talkcontribs)

wm是什么。

AndyPKU (talkcontribs)

wikimedia :)

AndyPKU (talkcontribs)

好吧我错了,我原本想说wikipedia的。。。结果居然把维基媒体扯进来了。。重新纠正。。

星耀晨曦 (talkcontribs)

这不一样了。你用一个东西并不需要需要知道这个东西是用什么做的。维基百科也没很张扬的宣传维基百科的底层是MediaWiki。

怎么保证目录可以被读写呢?

42
AndyPKU (talkcontribs)

可以在这边讨论么?

星耀晨曦 (talkcontribs)

你是什么系统的。

AndyPKU (talkcontribs)

centos7

星耀晨曦 (talkcontribs)

ls -l 上传目录,看看权限

AndyPKU (talkcontribs)

上传目录是什么意思啊?

AndyPKU (talkcontribs)

-rw-r--r--  1  501 games   4697 Dec  9 07:19 api.php

-rw-r--r--  1  501 games 131511 Dec  9 07:19 autoload.php

drwxr-xr-x  2  501 games   4096 Dec  9 07:19 cache

-rw-r--r--  1  501 games    116 Dec  9 07:19 CODE_OF_CONDUCT.md

-rw-r--r--  1  501 games   3595 Dec  9 07:19 composer.json

-rw-r--r--  1  501 games    102 Dec  9 07:19 composer.local.json-sample

-rw-r--r--  1  501 games  19419 Dec  9 07:19 COPYING

-rw-r--r--  1  501 games  10924 Dec  9 07:19 CREDITS

drwxr-xr-x  8  501 games   4096 Dec  9 07:19 docs

drwxr-xr-x 31  501 games   4096 Jan 12 13:53 extensions

-rw-r--r--  1  501 games     95 Dec  9 07:19 FAQ

-rw-r--r--  1  501 games   3735 Dec  9 07:19 Gruntfile.js

-rw-r--r--  1  501 games 867797 Dec  9 07:19 HISTORY

drwxr-xr-x  2  501 games   4096 Jan 18 14:18 images

-rw-r--r--  1  501 games   7705 Dec  9 07:19 img_auth.php

drwxr-xr-x 66  501 games   4096 Dec  9 07:19 includes

-rw-r--r--  1  501 games   1623 Dec  9 07:19 index.php

-rw-r--r--  1 root root      20 Jan  5 14:11 info.php

-rw-r--r--  1  501 games   3663 Dec  9 07:19 INSTALL

-rw-r--r--  1  501 games   2025 Dec  9 07:19 jsduck.json

drwxr-xr-x  6  501 games   4096 Dec  9 07:19 languages

-rw-r--r--  1  501 games   1965 Dec  9 07:19 load.php

-rw-r--r--  1 root root    6587 Jan 19 00:48 LocalSettings.php

drwxr-xr-x 17  501 games  12288 Dec  9 07:19 maintenance

drwxr-xr-x  4  501 games   4096 Dec  9 07:19 mw-config

-rw-r--r--  1  501 games   4059 Dec  9 07:19 opensearch_desc.php

-rw-r--r--  1  501 games   3274 Dec  9 07:19 phpcs.xml

-rw-r--r--  1  501 games  12013 Dec  9 07:19 profileinfo.php

-rw-r--r--  1  501 games   1529 Dec  9 07:19 README

-rw-r--r--  1  501 games  16790 Dec  9 07:19 RELEASE-NOTES-1.30

drwxr-xr-x  5  501 games   4096 Dec  9 07:19 resources

drwxr-xr-x  2  501 games   4096 Dec  9 07:19 serialized

drwxr-xr-x  6  501 games   4096 Dec  9 07:19 skins

-rw-r--r--  1  501 games   1703 Dec  9 07:19 StartProfiler.sample

drwxr-xr-x  9  501 games   4096 Dec  9 07:19 tests

-rw-r--r--  1  501 games   1087 Dec  9 07:19 thumb_handler.php

-rw-r--r--  1  501 games  21335 Dec  9 07:19 thumb.php

-rw-r--r--  1  501 games  12244 Dec  9 07:19 UPGRADE

drwxr-xr-x 22  501 games   4096 Dec  9 07:20 vendor

-rw-r--r--  1 root root  124569 Jan  6 01:46 期货.jpg

-rw-r--r--  1 root root   48546 Jan 15 09:40 期货百科.png

星耀晨曦 (talkcontribs)

暂且不论上传目录,你整个文件夹的权限都很糟糕。web目录应该只对web服务器可读,上传目录和缓存目录(如果启用了文件缓存)应该对web服务器可写。

找出web服务器的运行用户,然后返回上级目录执行

chown -R <user>:<user> <mediawikiPath>
AndyPKU (talkcontribs)

是不是LocalSettings.php所在的文件夹就应该是web服务器的运行目录啊?

星耀晨曦 (talkcontribs)

LocalSettings.php同级目录和所有的次级目录都是web目录

AndyPKU (talkcontribs)

这条命令执行以后出错:

-bash: syntax error near unexpected token `<'

星耀晨曦 (talkcontribs)

。。。把<user>替换成运行web服务器的用户,把<mediawikiPath>替换成web目录

AndyPKU (talkcontribs)

-rw-r--r--  1 root root   4697 Dec  9 07:19 api.php

-rw-r--r--  1 root root 131511 Dec  9 07:19 autoload.php

drwxr-xr-x  2 root root   4096 Dec  9 07:19 cache

-rw-r--r--  1 root root    116 Dec  9 07:19 CODE_OF_CONDUCT.md

-rw-r--r--  1 root root   3595 Dec  9 07:19 composer.json

-rw-r--r--  1 root root    102 Dec  9 07:19 composer.local.json-sample

-rw-r--r--  1 root root  19419 Dec  9 07:19 COPYING

-rw-r--r--  1 root root  10924 Dec  9 07:19 CREDITS

drwxr-xr-x  8 root root   4096 Dec  9 07:19 docs

drwxr-xr-x 31 root root   4096 Jan 12 13:53 extensions

-rw-r--r--  1 root root     95 Dec  9 07:19 FAQ

-rw-r--r--  1 root root   3735 Dec  9 07:19 Gruntfile.js

-rw-r--r--  1 root root 867797 Dec  9 07:19 HISTORY

drwxr-xr-x  2 root root   4096 Jan 18 14:18 images

-rw-r--r--  1 root root   7705 Dec  9 07:19 img_auth.php

drwxr-xr-x 66 root root   4096 Dec  9 07:19 includes

-rw-r--r--  1 root root   1623 Dec  9 07:19 index.php

-rw-r--r--  1 root root     20 Jan  5 14:11 info.php

-rw-r--r--  1 root root   3663 Dec  9 07:19 INSTALL

-rw-r--r--  1 root root   2025 Dec  9 07:19 jsduck.json

drwxr-xr-x  6 root root   4096 Dec  9 07:19 languages

-rw-r--r--  1 root root   1965 Dec  9 07:19 load.php

-rw-r--r--  1 root root   6617 Jan 22 00:19 LocalSettings.php

drwxr-xr-x 17 root root  12288 Dec  9 07:19 maintenance

drwxr-xr-x  4 root root   4096 Dec  9 07:19 mw-config

-rw-r--r--  1 root root   4059 Dec  9 07:19 opensearch_desc.php

-rw-r--r--  1 root root   3274 Dec  9 07:19 phpcs.xml

-rw-r--r--  1 root root  12013 Dec  9 07:19 profileinfo.php

-rw-r--r--  1 root root   1529 Dec  9 07:19 README

-rw-r--r--  1 root root  16790 Dec  9 07:19 RELEASE-NOTES-1.30

drwxr-xr-x  5 root root   4096 Dec  9 07:19 resources

drwxr-xr-x  2 root root   4096 Dec  9 07:19 serialized

drwxr-xr-x  6 root root   4096 Dec  9 07:19 skins

-rw-r--r--  1 root root   1703 Dec  9 07:19 StartProfiler.sample

drwxr-xr-x  9 root root   4096 Dec  9 07:19 tests

-rw-r--r--  1 root root   1087 Dec  9 07:19 thumb_handler.php

-rw-r--r--  1 root root  21335 Dec  9 07:19 thumb.php

-rw-r--r--  1 root root  12244 Dec  9 07:19 UPGRADE

drwxr-xr-x 22 root root   4096 Dec  9 07:20 vendor

-rw-r--r--  1 root root 124569 Jan  6 01:46 期货.jpg

-rw-r--r--  1 root root  48546 Jan 15 09:40 期货百科.png

这个命令执行以后,我再执行ll的命令,得到以上的结果。。

星耀晨曦 (talkcontribs)

你用root用户来运行web服务器的?我觉得不是。你用apache?

AndyPKU (talkcontribs)

好像是吧。但是我的确是用ssh登陆root的啊。。

apache,是啊。。

不好意思,我其实搞不清楚这几个概念,我就是跟着指引走然后安装的mediawiki,我其实都不懂centos系统。。

AndyPKU (talkcontribs)

我没有修改过权限啊。安装完mediawiki的时候,默认的权限就是这样啊。

星耀晨曦 (talkcontribs)

事实上,必须修改文件权限来保证网站的安全性和可用性。

AndyPKU (talkcontribs)

为什么调整一个上传文件的权限这么难啊。。。?

AndyPKU (talkcontribs)

我其实就想马上就能够上传文件,然后供用户下载。但是看到mediawiki上面的一大堆手册的内容……我也无法判断出哪些是直接有效的方式。。。

星耀晨曦 (talkcontribs)

web服务器指的是类似apache、nginx、iis这样的软件,不是服务器本身。打开apache的配置文件,查找User字段,后面跟着的就是运行用户。

AndyPKU (talkcontribs)

哦哦?这个我知道。。

我想知道User是不是我在网站上注册的用户名啊?

AndyPKU (talkcontribs)

我用的的确是apache。。配置文件。。。我不知道在哪里看。。。

星耀晨曦 (talkcontribs)

不是,二者不是一个概念。一个是服务器端上面的用户,一个是网站的用户。

AndyPKU (talkcontribs)

那我在服务器上。。。除了root以外,我不知道还有什么其他用户。。。

星耀晨曦 (talkcontribs)

配置文件一般在/etc/httpd/httpd.conf

AndyPKU (talkcontribs)

我要怎样设定上传目录?我要怎样保证上传目录可以被用户所读写呢?

星耀晨曦 (talkcontribs)

事实上,最简单的方法就是chmod -R 777 <webPath>。让所有用户可读写你的web目录,但相应也有安全问题。

AndyPKU (talkcontribs)

还是会出现

『无法创建目录“mwstore://local-backend/local-public/b/ba”』这样的错误

星耀晨曦 (talkcontribs)

你修改了$wgUploadDirectory的值吗

AndyPKU (talkcontribs)

// Create a local backend with a null lock manager

$wgFileBackends[] = array(

       'name'        => 'local-backend',

       'class'       => 'FSFileBackend',

       'lockManager' => 'nullLockManager',

       'containerPaths' => array(

               'local-public'  => "{$wgUploadDirectory}",

               'local-thumb'   => "{$wgUploadDirectory}/thumb",

               'local-transcoded' => "{$wgUploadDirectory}/transcoded",

               'local-deleted' => $wgDeletedDirectory,

               'local-temp'    => "{$wgUploadDirectory}/temp",

       ),

       'fileMode'    => 0644,

);

// Define a standard file repository that uses the local backend defined before

$wgLocalFileRepo = array (

       'class'             => 'LocalRepo',

       'name'              => 'local',

       'directory'         => $wgUploadDirectory,

       'scriptDirUrl'      => $wgScriptPath,

       'scriptExtension'   => $wgScriptExtension,

       'url'               => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,

       'hashLevels'        => $wgHashedUploadDirectory ? 2 : 0,

       'thumbScriptUrl'    => $wgThumbnailScriptPath,

       'transformVia404'   => !$wgGenerateThumbnailOnParse,

       'deletedDir'        => $wgDeletedDirectory,

       'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0,

       'backend'           => 'local-backend',

这个算不算?

星耀晨曦 (talkcontribs)

再发一遍上传目录(默认images)的权限。

AndyPKU (talkcontribs)

[root@VM_0_7_centos images]# ll

total 4

-rwxrwxrwx 1 root root  0 Jan 18 14:18 readme

-rwxrwxrwx 1 root root 84 Dec  9 07:19 README

[root@VM_0_7_centos images]#

星耀晨曦 (talkcontribs)

不知道是什么情况,你试着把上面你发的自定义配置注释掉。

AndyPKU (talkcontribs)

注释了以后,然后呢?

星耀晨曦 (talkcontribs)

还是不能上传吗

AndyPKU (talkcontribs)

太奇怪了,居然可以了。可是我并没有设定上传路径啊。。它怎么知道我上传到哪个文件夹下?

星耀晨曦 (talkcontribs)

默认上传到网站根目录下面的images文件夹下面。事实上,只要启用$wgEnableUploads = true;上传功能并确保上传目录可被web服务器写就可以上传了。

AndyPKU (talkcontribs)

文件不是直接堆在images文件夹下啊,而是在下面的子文件夹里面。好难找啊。。。

星耀晨曦 (talkcontribs)

这是因为方便管理文件。一堆文件在同一级目录也有点问题。

AndyPKU (talkcontribs)

很奇怪,我都不知道为什么我之前却失败了。

AndyPKU (talkcontribs)

这个怎么说?

AndyPKU (talkcontribs)

刚刚设定的时候好像有个用户名叫sammy的,但是我从来没有登陆过啊。。

Liuxinyu970226 (talkcontribs)

Welcome to MediaWiki.org!

Yes, welcome! This site is dedicated to documenting the MediaWiki software, the software behind many wikis, including that of Wikipedia and the Wikimedia Foundation projects.
Please, take a look at the following pages. They might prove useful to you as a newcomer here:

If you have any questions, please ask me on my talk page. Once again, welcome, and I hope you quickly feel comfortable here, and find this site useful documentation of the MediaWiki software.

Thanks!

Reply to "Welcome"
There are no older topics