Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 255 lines (181 sloc) 9.113 kb
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
1 WikiTrust is a MediaWiki extension that computes in real time the
2 reputation of wiki authors, and the trust of wiki text. Text trust is
3 displayed via different colors for the text background, from dark
4 orange (low trust) to white (maximum trust). The colors can be easily
5 changed by changing a skin file. WikiTrust also computes, for each
6 word of text, the author of the word, and the revision where the word
7 was first inserted. When clicking on a word, the user is sent to the
8 revision diff where the word was added. When hovering with the mouse
9 over a word, a pop-up displays the name of the word's author.
10
476377e README typos
B. Thomas Adler authored
11 The WikiTrust extension can be added to an existing wiki, or to a new
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
12 one. If the extension is added to a new wiki, it will start computing
3429ef9 Improved the documentation.
Luca de Alfaro authored
13 reputations and trusts as soon as someone makes an edit, or requests
14 to view a trust-colored revision. The reputation and trust
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
15 computation takes some time, after which the coloring is available.
3429ef9 Improved the documentation.
Luca de Alfaro authored
16 If you switch the extension off, then on, the extension will compute
17 the missing reputation and trust values in a self-healing,
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
18 fault-tolerant fashion.
19
20
21 AUTHORS:
22
23 The main developers are:
24
25 - Luca de Alfaro (lda@dealfaro.com)
26 - Ian Pye (ipye@gmail.com)
476377e README typos
B. Thomas Adler authored
27 - Bo Adler (thumper@alumni.caltech.edu)
940b750 Some initial changes for WMF.
Luca de Alfaro authored
28
29 Other contributors:
30
31 - Krishnendu Chatterjee (krish.chat@gmail.com)
d379bc3 Minor changes to readme files.
Luca de Alfaro authored
32
33
34 REMOTE INSTALLATION
35
36 We describe in this README file the use of WikiTrust as a MediaWiki
940b750 Some initial changes for WMF.
Luca de Alfaro authored
37 extension.
38 Installation instructions for the MWF are given in README-WMF.
3429ef9 Improved the documentation.
Luca de Alfaro authored
39
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
40
3429ef9 Improved the documentation.
Luca de Alfaro authored
41 PREREQUISITES:
af4b60d I changed histiogram -> histogram and made some other documentation fixe...
Luca de Alfaro authored
42
566b14d Luca de Alfaro Improved the README
lucadealfaro authored
43 1) Install mysql and mediawiki. In Ubuntu / Debian, you can install
44 the packages:
0070919 Made it easier to build under godi
Luca de Alfaro authored
45
566b14d Luca de Alfaro Improved the README
lucadealfaro authored
46 mediawiki
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
47 php5-cli
566b14d Luca de Alfaro Improved the README
lucadealfaro authored
48 mysql-server
49 mysql-client
50 tidy
cbb7a51 Changed to 12 past revisions, some changes to readme files.
Luca de Alfaro authored
51
566b14d Luca de Alfaro Improved the README
lucadealfaro authored
52 In other distributions, follow the instructions at
53 www.mediawiki.org.
0070919 Made it easier to build under godi
Luca de Alfaro authored
54
953f9a4 Removed a bug in the merging of lists, and improved the README file.
Luca de Alfaro authored
55
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
56 ================================================================
0e3b9c1 Improved the README file.
Luca de Alfaro authored
57
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
58 THE FAST WAY:
953f9a4 Removed a bug in the merging of lists, and improved the README file.
Luca de Alfaro authored
59
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
60 We provide a statically-linked executable, which is built under
61 Ubuntu, but should work under many versions of linux.
62 If you are happy using it, then you can use these abbreaviated
63 instructions. Otherwise, see at the bottom of this file for an
64 alternative to step 2) below, which involves compiling
65 eval_online_wiki from source.
0e3b9c1 Improved the README file.
Luca de Alfaro authored
66
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
67 2) Take a deep breath.
953f9a4 Removed a bug in the merging of lists, and improved the README file.
Luca de Alfaro authored
68
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
69 3) Next, you need to install the trust coloring extension in
940b750 Some initial changes for WMF.
Luca de Alfaro authored
70 mediawiki. You can install it in
0c83c08 README: fix paths to match wmf standard
B. Thomas Adler authored
71 /var/lib/mediawiki/extensions/WikiTrust
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
72 with
0c83c08 README: fix paths to match wmf standard
B. Thomas Adler authored
73 cp -r wikitrust /var/lib/mediawiki/extensions/WikiTrust
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
74
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
75 4) You should activate the extension by editing
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
76 LocalSettings.php (part of the MediaWiki installation), adding the
77 following lines:
78
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
79 $wgUseTidy = true; // Enable Tidy
80 $wgUseAjax = true; // Enable Ajax (needed for voting)
0fce19a extension: more fixing of paths
B. Thomas Adler authored
81 require_once( $IP . "/extensions/WikiTrust/WikiTrust.php" );
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
82
0fce19a extension: more fixing of paths
B. Thomas Adler authored
83 Edit WikiTrust.php, and set the following variables:
eaa6bbf re-factored php to meed mwf standards
Ian Pye authored
84
85 $wgWikiTrustVersion = "local";
86
87 This needs to be one of local, remote, wmf.
88 Leave it as local, unless you know what you are doing.
89
90 $wgWikiTrustGadget = "gadget-WikiTrust";
91
92 By default the trust tab is selected only by a user opting in.
93 Set this to NULL to make the tab always availible.
94
95 $wgWikiTrustShowVoteButton = true;
96
97 If true, the vote option is enabled.
98
99 We are requesting that two logs be created:
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
100
101 $wgTrustLog = "/somedir/{$wgDBname}-trust.log";
102
103 This creates a log of the analysis of how useful each contribution to
104 the wiki is, as well as a log of all user reputation changes.
105 We advise you to create such a log: it contains very useful
106 information, and it is likely that we will develop a variety of tools
107 to extract the information present. You don't want to miss out. Note
108 that you are responsible for rotating / compressing the log (e.g., via
109 logrotate, or /etc/logrotate.conf or /etc/logrotate.d/
110
111 On the other hand, the log requested via
112
113 $wgTrustDebugLog = "/somedir/{$wgDBname}-trust-debug.log";
114
115 is just useful to us to track down bugs and other problems, and can be
116 safely disabled. You can disable these logs via:
117
118 $wgTrustLog = "/dev/null";
119 $wgTrustDebugLog = "/dev/null";
120
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
121 5) You need to make the installation readable from the web server.
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
122
0c83c08 README: fix paths to match wmf standard
B. Thomas Adler authored
123 $ chmod a+rX /var/lib/mediawiki/extensions/WikiTrust/*.php
124 $ chmod -R a+rX /var/lib/mediawiki/extensions/WikiTrust/include
125 $ chmod -R a+rX /var/lib/mediawiki/extensions/WikiTrust/css
126 $ chmod -R a+rX /var/lib/mediawiki/extensions/WikiTrust/js
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
127
940b750 Some initial changes for WMF.
Luca de Alfaro authored
128 Be careful not to give access to the web server to the other files,
129 as there may be obscure security issues associated with, for
130 instance, your web server having access to the .git directory (if
131 you got wikitrust via git).
3429ef9 Improved the documentation.
Luca de Alfaro authored
132
61b23f2 The script to create the tables does not seem to work.
Luca de Alfaro authored
133 6) You need to create the database tables that the trust coloring
134 extension will use. Assuming that the mediawiki database is called
135 "wikidb" (this is the default name: you give a name to the database
136 when you create the wiki instance during the MediaWiki installation
137 process), proceed as follows:
138
139 $ cd sql
140 $ ./create_db.php "path_to_mediawiki" "mysql_root_user_name"
141
142 where path_to_mediawiki is the path to the mediawiki installation
143 (such as /usr/share/mediawiki).
144 If you need to remove the tables, before recreating them, the
145 command is:
146
147 $ ./create_db.php "path_to_mediawiki" "mysql_root_user_name" remove
148
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
149 7) If there are already revisions in the wiki, you should first
150 analyze their trust, via:
3429ef9 Improved the documentation.
Luca de Alfaro authored
151
5620bdb README: fix option
B. Thomas Adler authored
152 $ ./eval_online_wiki -n_events 1000000 -db_user <username> -db_pass <pwd> -db_name <db_name>
3429ef9 Improved the documentation.
Luca de Alfaro authored
153
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
154 The '1000000' means that eval_online_wiki will compute the trust of
155 at most 1000000 revisions, then stop. You can repeat the above
156 command as many times as needed (or with a larger or smaller bound)
157 until all revisions are analyzed for trust; each invocation will
158 analyze at most 1000000 additional revisions. Typical values for
159 these parameters are:
3429ef9 Improved the documentation.
Luca de Alfaro authored
160
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
161 username: wikiuser
162 db_name: wikidb
3429ef9 Improved the documentation.
Luca de Alfaro authored
163
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
164 If you wish to redo the analysis from scratch, throwing away the
165 results of previous analyses, you can use the option '-delete_all':
3429ef9 Improved the documentation.
Luca de Alfaro authored
166
5620bdb README: fix option
B. Thomas Adler authored
167 $ ./eval_online_wiki -delete_all -n_events 1000000 -db_user <username> -db_pass <pwd> -db_name <db_name>
3429ef9 Improved the documentation.
Luca de Alfaro authored
168
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
169 Warning: the analysis can take a long time on very large wikis, so
170 do not use the option '-delete_all' lightly!
3429ef9 Improved the documentation.
Luca de Alfaro authored
171
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
172 8) You should now see a trust tab. Click on it, or edit a revision, and
173 the trust of all revision text, and the reputation of all authors,
174 will be computed.
3429ef9 Improved the documentation.
Luca de Alfaro authored
175
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
176 The trust coloring is updated automatically whenever a user edits
177 an article, or requests to view the trust informaton for a
178 revision. In particular, when a user edits an article, or when
179 someone asks to view the trust information, WikiTrust computes the
180 trust coloring not only for the newest revision, but for all past
181 revisions of all wiki articles that have not been colored yet.
5e11242 Minor changes to README files.
Luca de Alfaro authored
182
feb83ea Luca de Alfaro Improved README files
lucadealfaro authored
183 9) If you wish to upload pages to the wiki from a dump file, go to the
184 test-scripts directory, and follow the instructions in the README
185 file there.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
186
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
187 ================================================================
af4b60d I changed histiogram -> histogram and made some other documentation fixe...
Luca de Alfaro authored
188
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
189 COMPILING FROM SOURCE
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
190
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
191 If you like, you can also build the packages from source.
192 Follow these instructions in place of step 2) above.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
193
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
194 2a) You need to install some packages for Ocaml. There are two ways.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
195
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
196 2a1) The best way is to use godi (http://godi.camlcity.org), as this
197 enables you to build everything in userspace.
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
198
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
199 Get godi from http://godi.camlcity.org/godi/index.html and
200 download godi. Follow the instructions to install it. Install
a8acab8 Added the info on godi and zlib.
Luca de Alfaro authored
201 the following Ocaml packages from godi (use godi_console to
202 install them):
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
203
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
204 godi-extlib
205 godi-findlib
206 godi-ocaml-mysql
207 godi-sexplib
208 godi-type-conv
9c7fe3a docs: updated README files to mention other dependencies
B. Thomas Adler authored
209 godi-zip
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
210
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
211 2a2) If you do not wish to use godi, you can get the above packages
212 either from their source, or from the linux distribution you
213 are using. For Ubuntu, you can use the following packages:
abdbb67 Updated the README file.
Luca de Alfaro authored
214
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
215 ocaml (version 3.10.0 or greater)
216 ocaml-base
217 ocaml-native-compilers
218 ocaml-findlib
219 libmysql-ocaml
220 libmysql-ocaml-dev
221 libextlib-ocaml-dev
222 python-mysqldb
d22dd10 qureying the xml api
Ian Pye authored
223 libxml-light-ocaml-dev
224 libzip-ocaml-dev
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
225
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
226 You also need:
9ee3056 Improved README files for loading wikis into the db, and for testing.
Luca de Alfaro authored
227
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
228 type-conv
229 sexplib
230
231 Which are available from
232 http://www.janestcapital.com/ocaml/index.html .
233
234 2b) Make OcamlLdaLibs and install them.
235 If you can install without sudo rights:
236 $ make all
237 If you did not use godi, so that you need sudo rights to install:
238 $ make all-sudo
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
239
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
240 2c) Compile the code:
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
241
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
242 $ make clean ; make all ; make allopt
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
243
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
244 This creates an eval_online_wiki executable, which is what
245 computes text trust and origin, and author reputation, in a wiki.
246 The executable is called whenever someone edit the wiki, or wishes
247 to see a trust-colored version of a page.
74b1816 Added info in readme file on how to recompute the trust coloring.
Luca de Alfaro authored
248
26b5ddb Facilitated the installation by providing a statically-linked executable...
Luca de Alfaro authored
249 ================================================================
7f063a6 Removed top README file in preparation for file reorganization
Luca de Alfaro authored
250
251 BATCH MODE:
252
253 The tool has also a batch mode, useful for computing statistical
254 quantities of a wiki. Please see batch/README for more information.
Something went wrong with that request. Please try again.