r19882 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19881‎ | r19882 | r19883 >
Date:14:23, 11 February 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Restructured files and docu to make SMW_LocalSettings.php obsolete. Installation should now be simpler.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/INSTALL (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_InlineQueries.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/INSTALL
@@ -38,89 +38,66 @@
3939 If you upgrade an existing installation of Semantic MediaWiki, also read the
4040 remarks in the section "Notes on upgrading" below!
4141
42 -(1) Extract the archive or check out the current files from CVS to obtain the
 42+(1) Extract the archive or check out the current files from SVN to obtain the
4343 directory "SemanticMediaWiki" that contains all relevant files. Copy this
4444 directory to "[wikipath]/extensions/" (or extract/download it to this place).
4545 We abbreviate "[wikipath]/extensions/SemanticMediaWiki" as "[SMW_path]" below.
46 -(2) Copy the file "[SMW_path]/includes/SMW_LocalSettingsTemplate.php" to a file
47 - "[SMW_path]/includes/SMW_LocalSettings.php". Edit this new file to adjust
48 - various basic settings. Some of these settings might be crucial for properly
49 - running the wiki, so be sure not to skip this step.
50 -(3) Insert the following line at the end (just before "?>") of the file
 46+(2) Edit the file [wikipath]/includes/Parser.php of your MediaWiki installation.
 47+ Insert the line
 48+ "wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text, null ) );"
 49+ in the method "internalParse" right after the line
 50+ "$text = $this->replaceVariables( $text, $args );"
 51+ This does not impair the wiki if SMW is not used, so it can be done even on
 52+ wiki farms.
 53+(3) Insert the following lines at the end (just before "?>") of the file
5154 "[wikipath]/LocalSettings.php":
52 - "include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php');"
 55+ include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php');
 56+ enableSemantics('\example.org\');
 57+ where \example.org\ should be replaced by your server's name (or IP address).
 58+ If you have custom namespaces (e.g. "Portal"), read the note below.
5359 (4) In your wiki, log in as a user with admin status and go to the page
5460 "Special:SMWAdmin" to do the final setup steps.
5561
56 -This finishes the basic installation. There are some additional highly recommended
57 -features that need to be enabled individually if you want them. Read on.
58 -
5962 '''Remark:''' Semantic MediaWiki uses six additional custom namespaces (see
6063 http://meta.wikimedia.org/wiki/Help:Custom_namespaces). If you have your own
61 -custom namespaces, then you already specified this in step (2) above. If you
62 -add more namespaces later on, then you have to assign them to higher numbers
63 -than those used by Semantic MediaWiki in file "SMW_Settings.php".
 64+custom namespaces, you have to set the parameter $smwgNamespaceIndex before
 65+including SMW_Settings.php. See the documentation within SMW_Settings.php for
 66+details. If you add more namespaces later on, then you have to assign them to
 67+higher numbers than those used by Semantic MediaWiki.
6468
65 -=== Enabling support for templates, <nowiki>, ... ===
 69+=== Customising Semantic MediaWiki ===
6670
67 -It can be helpful to have semantic annotations build into templates, in
68 -particular if filler variables for them are provided dynamically on each
69 -use. This feature can easily be enabled by hooking the processing of semantic
70 -links to a later point during parsing. This is not done by default yet,
71 -since it requires a patch against the MediaWiki code. To get this function,
72 -do the following two steps:
 71+Semantic MediaWiki can be customised by a number of settings. To do so, you
 72+can assignemts to respective parameters directly after the line
 73+"include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php');"
 74+in your LocalSetting.php. For example, one can write
7375
74 -(1) Edit the file [wikipath]/includes/Parser.php. Insert the line
75 - "wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text, null ) );"
76 - in the method "internalParse" right after the line
77 - "$text = $this->replaceVariables( $text, $args );"
78 -(2) Edit the file [SMW_path]/includes/SMW_LocalSettings.php to set the option
79 - $smwgEnableTemplateSupport to true.
 76+include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php');
 77+$smwgIQDefaultLinking = 'all';
 78+enableSemantics(example.org);
8079
 80+to enable links on all results returned by inline queries. The parameters that
 81+are available are documented in the files SMW_Settings.php (general) and
 82+SMW_InlineQueries.php (related to queries).
 83+
 84+=== Support for templates, <nowiki>, ... ===
 85+
 86+The patch of [wikipath]/includes/Parser.php above was needed to make SMW work
 87+with templates, <nowiki>, <!-- -->, etc. This change is not done by default yet,
 88+since it requires a patch against the MediaWiki code.
 89+
8190 Unless you changed the default setting, annotations in template articles will
8291 be ignored automatically. Otherwise you have to use <noinclude> and <includeonly>
8392 tags.
8493
85 -=== Enabling CSS, tooltips, etc. in MediaWiki < 1.7 ===
 94+=== Running SMW on older versions of MediaWiki ===
8695
87 -Deprecated. MediaWiki 1.6 is not officially supported any longer. You can try it
88 -without much risk, but we might use code and features that were not available in 1.6.
 96+If your site is still running on PHP4, SMW is not supported. It would be possible
 97+to backport the code to the old PHP version, but this needs some work. If you have
 98+PHP5 but an older MediaWiki version, additional patches/modifications might be
 99+needed. Download an older release of SMW and have a look at the included INSTALL
 100+instructions to find out whether other changes are recommended therein.
89101
90 -Extensions in MediaWiki < 1.7 could not add CSS or JavaScript to every
91 -wiki page without some code changes to MediaWiki:
92 -
93 -Open the file [wikipath]/includes/OutputPage.php, and insert the line
94 -"smwfAddHTMLHeader($this);" between "wfProfileIn( 'Output-skin' );" and
95 -"$sk->outputPage( $this );" (in function "output()").
96 -
97 -If you have several installations running on the same MediaWiki installation,
98 -and not all of them use the Semantic MediaWiki extensions, you may instead
99 -choose to add the following three lines:
100 -if( $_SERVER["HTTP_HOST"] == 'domainwith.smwenabled.org' ) {
101 - smwfAddHTMLHeader($this);
102 -}
103 -
104 -=== Enabling tooltips in MediaWiki <= 1.5.8 ===
105 -
106 -Deprecated. MediaWiki 1.5 is not officially supported any longer. You can try it,
107 -but we probably use code and features that were not available in 1.5.
108 -
109 -We make use of some JavaScript to display tooltips for attributes that provide
110 -value conversions for different units. Up to MediaWiki 1.5.5, this is prevented
111 -by bug http://bugzilla.wikimedia.org/show_bug.cgi?id=3603. To fix this, edit
112 -the file [wikipath]/skins/MonoBook.php and insert the line
113 -
114 - <?php $this->html('headscripts') ?>
115 -
116 -right before "</head>" (around line 72). This should not be required in future
117 -versions of MediaWiki. To check whether tooltips work, try the preview mode of
118 -some article first (since this should always work). Tooltips might fail on some
119 -other occassions -- check out the workaround in "Known issues".
120 -
121 -If you prefer to use HTML-only tooltips, you can achieve this by commenting
122 -out the line containing "ParserAfterTidy" within the file
123 -[SMW_path]/includes/SMW_Settings.php.
124 -
125102 == Notes on upgrading ==
126103
127104 The below instructions describe how to upgrade from one minor version to the next, e.g.
@@ -130,18 +107,19 @@
131108 to 0.2 before upgrtading further from 0.2 to 0.3. Also, do not forget to backup your
132109 database before any upgrade.
133110
134 -'''Upgrading from 0.5:'''
 111+'''Upgrading from vesions prior to 0.6:'''
135112
136 -Please recreate your SMW_LocalSettings.php, since they have changed slightly.
 113+The file SMW_LocalSettings.php is now obsolete. Modify your LocalSettings.php as described
 114+above, and import your changes in SMW_LocalSettings.php, if any, into LocalSettings.php as
 115+well.
137116
138117 '''Upgrading from 0.4.x:'''
139118
140 -Upgrading does not require any special changes. However, you have to upgrade MediaWiki to 1.7
141 -and SMW to 0.5. This should not be a problem, and in fact you need one patch less. Please
142 -recreate your SMW_LocalSettings.php, since it might have changed.
 119+Upgrading does not require any special changes. However, you have to upgrade MediaWiki
 120+and SMW. This should not be a problem, and in fact you need one patch less.
143121
144 -Moreover, the type "Geographic area" and "Geographic length" are no longer built in. But you
145 -can easily create them by yourself with the new type customisation features. See the docu at
 122+The type "Geographic area" and "Geographic length" are no longer built in. But you can
 123+easily create them by yourself with the new type customisation features. See the docu at
146124 ontoworld.org for details.
147125
148126 == FAQ ==
@@ -190,12 +168,16 @@
191169 Your database was not initialized properly. Go to Special:SMWAdmin for
192170 instructions.
193171
 172+- Problem: Semantic annotations are not processed at all, but appear as
 173+ links within the text.
194174 - Problem: Semantic relations that are included via templates or excluded
195175 via <includeonly> statements are not processed properly.
196176 - Problem: "&nbsp;" appears in the Factbox, comments and <nowiki> do not
197177 seem to disable annotations properly.
198178
199 - Enable template support. The required manual patch is described above.
 179+ Enable template support by the patch described in the installation above.
 180+ Check that your page Special:Version shows SMW and lists the additional hook
 181+ "InternalParseBeforeLinks".
200182
201183 - Problem: After installing SMW, some or all pages are not displayed at all.
202184 - Problem: In some cases, pages are displayed incompletely, with some parts
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_InlineQueries.php
@@ -45,8 +45,9 @@
4646 /* Configure default behaviour of inline queries */
4747 // Default linking behaviour. Can be one of "none", "subject", "all"
4848 $smwgIQDefaultLinking = 'subject';
49 - // Which namespaces should be searched by default?
50 - $smwgIQSearchNamespaces = NULL; //can be defined as an array of NS_IDs in LocalSettings
 49+ // Which namespaces should be searched by default? Setting this to NULL will
 50+ // switch off such default restrictions on searching (possibly increasing performance)
 51+ $smwgIQSearchNamespaces = array(NS_MAIN, NS_IMAGE);
5152 /* Configure power/performance trade-off for inline queries */
5253 // Switches on or off all queries.
5354 $smwgIQEnabled = true;
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
@@ -3,6 +3,103 @@
44 * Global functions and constants for Semantic MediaWiki.
55 */
66
 7+define('SMW_VERSION','0.6a');
 8+
 9+// constants for special properties, used for datatype assignment and storage
 10+define('SMW_SP_HAS_TYPE',1);
 11+define('SMW_SP_HAS_URI',2);
 12+define('SMW_SP_HAS_CATEGORY',4);
 13+define('SMW_SP_IS_SUBRELATION_OF',3);
 14+define('SMW_SP_IS_SUBATTRIBUTE_OF',5);
 15+define('SMW_SP_MAIN_DISPLAY_UNIT', 6);
 16+define('SMW_SP_DISPLAY_UNIT', 7);
 17+define('SMW_SP_IMPORTED_FROM',8);
 18+define('SMW_SP_EXT_BASEURI',9);
 19+define('SMW_SP_EXT_NSID',10);
 20+define('SMW_SP_EXT_SECTION',11);
 21+define('SMW_SP_CONVERSION_FACTOR', 12);
 22+define('SMW_SP_SERVICE_LINK', 13);
 23+define('SMW_SP_POSSIBLE_VALUES', 14);
 24+
 25+// constants for displaying the factbox
 26+define('SMW_FACTBOX_HIDDEN', 1);
 27+define('SMW_FACTBOX_NONEMPTY', 3);
 28+define('SMW_FACTBOX_SHOWN', 5);
 29+
 30+/**
 31+ * Switch on Semantic MediaWiki. This function must be called in LocalSettings.php
 32+ * after incldung this file. It is used to ensure that required parameters for SMW
 33+ * are really provided, without requiring the existence of a dedicated file
 34+ * SMW_LocalSettings.php. For readability, this is the only global function that
 35+ * does not adhere to the naming conventions.
 36+ */
 37+function enableSemantics($server) {
 38+ global $smwgVersion, $smwgServer, $smwgIP, $smwgStoreActive, $wgHooks, $wgExtensionCredits, $smwgEnableTemplateSupport;
 39+
 40+ if ( $server == "" ) {
 41+ print "Semantic MediaWiki: please supply the name of your server to enable semantics.";
 42+ return false;
 43+ }
 44+ $smwgServer = $server;
 45+
 46+ /**
 47+ * Setting this to false prevents any new data from being stored in
 48+ * the static SMWSemanticData store, and disables printing of the
 49+ * factbox, and clearing of the existing data.
 50+ * This is a hack to enable parsing of included articles in a save
 51+ * way without importing their annotations. Unfortunatelly, there
 52+ * appears to be no way for finding out whether the current parse
 53+ * is the "main" parse, or whether some intro, docu, or whatever
 54+ * text is parsed. Using the hook mechanism, we have to rely on
 55+ * globals/static fields -- so we cannot somehow differentiate this
 56+ * store between parsers.
 57+ */
 58+ $smwgStoreActive = true;
 59+
 60+ /**********************************************/
 61+ /***** register specials *****/
 62+ /**********************************************/
 63+
 64+ //require_once($smwgIP . '/specials/SearchSemantic/SMW_SpecialSearchSemantic.php'); //really not longer functional!
 65+ require_once($smwgIP . '/specials/SearchTriple/SMW_SpecialSearchTriple.php');
 66+ require_once($smwgIP . '/specials/ExportRDF/SMW_SpecialExportRDF.php'); // coming soon
 67+ require_once($smwgIP . '/specials/SMWAdmin/SMW_SpecialSMWAdmin.php');
 68+ require_once($smwgIP . '/specials/OntologyImport/SMW_SpecialOntologyImport.php');
 69+ require_once($smwgIP . '/specials/AskSpecial/SMW_SpecialAsk.php');
 70+
 71+ require_once($smwgIP . '/specials/Relations/SMW_SpecialRelations.php');
 72+ require_once($smwgIP . '/specials/Relations/SMW_SpecialUnusedRelations.php');
 73+ require_once($smwgIP . '/specials/Relations/SMW_SpecialAttributes.php');
 74+ require_once($smwgIP . '/specials/Relations/SMW_SpecialUnusedAttributes.php');
 75+ require_once($smwgIP . '/specials/Relations/SMW_SpecialTypes.php');
 76+
 77+ /**********************************************/
 78+ /***** register hooks *****/
 79+ /**********************************************/
 80+
 81+ require_once($smwgIP . '/includes/SMW_Hooks.php');
 82+ require_once($smwgIP . '/includes/SMW_RefreshTab.php');
 83+
 84+ if ($smwgEnableTemplateSupport===true) {
 85+ $wgHooks['InternalParseBeforeLinks'][] = 'smwfParserHook'; //patch required;
 86+ } else {
 87+ $wgHooks['ParserAfterStrip'][] = 'smwfParserHook'; //default setting
 88+ }
 89+
 90+ $wgHooks['ParserAfterTidy'][] = 'smwfParserAfterTidyHook';
 91+ $wgHooks['ArticleSaveComplete'][] = 'smwfSaveHook';
 92+ $wgHooks['ArticleDelete'][] = 'smwfDeleteHook';
 93+ $wgHooks['TitleMoveComplete'][]='smwfMoveHook';
 94+ $wgHooks['BeforePageDisplay'][]='smwfAddHTMLHeader';
 95+
 96+ /**********************************************/
 97+ /***** credits (see "Special:Version") *****/
 98+ /**********************************************/
 99+ $wgExtensionCredits['parserhook'][]= array('name'=>'Semantic MediaWiki', 'version'=>SMW_VERSION, 'author'=>'Klaus&nbsp;Lassleben, Markus&nbsp;Kr&ouml;tzsch, Denny&nbsp;Vrandecic, S&nbsp;Page. Maintained by AIFB Karlsruhe.', 'url'=>'http://sourceforge.net/projects/semediawiki/', 'description' => 'Making your wiki more accessible&nbsp;&ndash; for machines and humans');
 100+
 101+ return true;
 102+}
 103+
7104 /**********************************************/
8105 /***** Header modifications *****/
9106 /**********************************************/
@@ -86,24 +183,25 @@
87184 * parameter denotes the least unused even namespace ID that is
88185 * greater or equal to 100.
89186 */
90 - function smwfInitNamespaces($base_idx) {
91 - global $wgExtraNamespaces, $wgNamespacesWithSubpages, $wgLanguageCode, $smwgContLang;
 187+ function smwfInitNamespaces() {
 188+ global $smwgNamespaceIndex, $wgExtraNamespaces, $wgNamespacesWithSubpages, $wgLanguageCode, $smwgContLang;
92189
 190+ if (!isset($smwgNamespaceIndex)) {
 191+ $smwgNamespaceIndex = 100;
 192+ }
 193+
93194 smwfInitContentLanguage($wgLanguageCode);
94195
95 - $namespaceIndex=$base_idx;
 196+ define('SMW_NS_RELATION', $smwgNamespaceIndex);
 197+ define('SMW_NS_RELATION_TALK', $smwgNamespaceIndex+1);
 198+ define('SMW_NS_ATTRIBUTE', $smwgNamespaceIndex+2);
 199+ define('SMW_NS_ATTRIBUTE_TALK', $smwgNamespaceIndex+3);
 200+ define('SMW_NS_TYPE', $smwgNamespaceIndex+4);
 201+ define('SMW_NS_TYPE_TALK', $smwgNamespaceIndex+5);
96202
97 - define('SMW_NS_RELATION', $namespaceIndex);
98 - define('SMW_NS_RELATION_TALK', $namespaceIndex+1);
99 - define('SMW_NS_ATTRIBUTE', $namespaceIndex+2);
100 - define('SMW_NS_ATTRIBUTE_TALK', $namespaceIndex+3);
101 - define('SMW_NS_TYPE', $namespaceIndex+4);
102 - define('SMW_NS_TYPE_TALK', $namespaceIndex+5);
103 -
104203 // Register namespace identifiers
105204 if (!is_array($wgExtraNamespaces)) { $wgExtraNamespaces=array(); }
106 - $wgExtraNamespaces = $wgExtraNamespaces +
107 - $smwgContLang->getNamespaceArray();
 205+ $wgExtraNamespaces = $wgExtraNamespaces + $smwgContLang->getNamespaceArray();
108206
109207 // Support subpages only for talk pages by default
110208 $wgNamespacesWithSubpages = $wgNamespacesWithSubpages + array(
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php
@@ -1,32 +1,5 @@
22 <?php
33
4 -$smwgVersion = '0.6a';
5 -
6 -// constants for special properties, used for datatype assignment and storage
7 -define('SMW_SP_HAS_TYPE',1);
8 -define('SMW_SP_HAS_URI',2);
9 -define('SMW_SP_HAS_CATEGORY',4);
10 -define('SMW_SP_IS_SUBRELATION_OF',3);
11 -define('SMW_SP_IS_SUBATTRIBUTE_OF',5);
12 -define('SMW_SP_MAIN_DISPLAY_UNIT', 6);
13 -define('SMW_SP_DISPLAY_UNIT', 7);
14 -define('SMW_SP_IMPORTED_FROM',8);
15 -define('SMW_SP_EXT_BASEURI',9);
16 -define('SMW_SP_EXT_NSID',10);
17 -define('SMW_SP_EXT_SECTION',11);
18 -define('SMW_SP_CONVERSION_FACTOR', 12);
19 -define('SMW_SP_SERVICE_LINK', 13);
20 -define('SMW_SP_POSSIBLE_VALUES', 14);
21 -
22 -// constants for displaying the factbox
23 -define('SMW_FACTBOX_HIDDEN', 1);
24 -define('SMW_FACTBOX_NONEMPTY', 3);
25 -define('SMW_FACTBOX_SHOWN', 5);
26 -//default:
27 -$smwgShowFactbox = SMW_FACTBOX_NONEMPTY;
28 -
29 -// some default settings which usually need no modification
30 -
314 ###
325 # This is the path to your installation of Semantic MediaWiki as
336 # seen from the web. Change it if required ($wgScriptPath is the
@@ -43,71 +16,107 @@
4417 $smwgIP = $IP . '/extensions/SemanticMediaWiki';
4518 ##
4619
47 -/**
48 -* Setting this to false prevents any new data from being stored in
49 -* the static SMWSemanticData store, and disables printing of the
50 -* factbox, and clearing of the existing data.
51 -* This is a hack to enable parsing of included articles in a save
52 -* way without importing their annotations. Unfortunatelly, there
53 -* appears to be no way for finding out whether the current parse
54 -* is the "main" parse, or whether some intro, docu, or whatever
55 -* text is parsed. Using the hook mechanism, we have to rely on
56 -* globals/static fields -- so we cannot somehow differentiate this
57 -* store between parsers.
58 -*/
59 -$smwgStoreActive = true;
60 -
6120 // load global functions
6221 require_once('SMW_GlobalFunctions.php');
6322
64 -// load (default) settings for inline queries first
65 -require_once('SMW_InlineQueries.php');
 23+###
 24+# If you already have custom namespaces on your site, insert
 25+# $smwgNamespaceIndex = ???;
 26+# into your LocalSettings.php *before* including this file.
 27+# The number ??? must be the smallest even namespace number
 28+# that is not in use yet. However, it must not be smaller
 29+# than 100.
 30+##
 31+if (!isset($smwgNamespaceIndex)) {
 32+ smwfInitNamespaces(100);
 33+} else {
 34+ smwfInitNamespaces();
 35+}
6636
67 -// get local configuration ...
68 -require("SMW_LocalSettings.php");
 37+###
 38+# This setting allows you to select in which cases you want to have a factbox
 39+# appear below an article. The default setting is "SMW_FACTBOX_NONEMPTY"
 40+# which shows only those factboxes that have some content. Other options:
 41+##
 42+$smwgShowFactbox = SMW_FACTBOX_NONEMPTY;
 43+//$smwgShowFactbox = SMW_FACTBOX_HIDDEN; # hide always
 44+//$smwgShowFactbox = SMW_FACTBOX_SHOWN; # show always
 45+##
6946
 47+###
 48+# Settings for RDF export
 49+##
 50+$smwgAllowRecursiveExport = false; // can normal users request recursive export?
 51+$smwgExportBacklinks = true; // should backlinks be included by default?
 52+##
7053
71 -/**********************************************/
72 -/***** register specials *****/
73 -/**********************************************/
 54+###
 55+# Overwriting the following array, you can define for which namespaces
 56+# the semantic links and annotations are to be evaluated. On other
 57+# pages, annotations can be given but are silently ignored. This is
 58+# useful since, e.g., talk pages usually do not have attributes and
 59+# the like. In fact, is is not obvious what a meaningful attribute of
 60+# a talk page could be. Pages without annotations will also be ignored
 61+# during full RDF export, unless they are referred to from another
 62+# article.
 63+##
 64+$smwgNamespacesWithSemanticLinks = array(
 65+ NS_MAIN => true,
 66+ NS_TALK => false,
 67+ NS_USER => true,
 68+ NS_USER_TALK => false,
 69+ NS_PROJECT => true,
 70+ NS_PROJECT_TALK => false,
 71+ NS_IMAGE => true,
 72+ NS_IMAGE_TALK => false,
 73+ NS_MEDIAWIKI => false,
 74+ NS_MEDIAWIKI_TALK => false,
 75+ NS_TEMPLATE => false,
 76+ NS_TEMPLATE_TALK => false,
 77+ NS_HELP => true,
 78+ NS_HELP_TALK => false,
 79+ NS_CATEGORY => true,
 80+ NS_CATEGORY_TALK => false,
 81+ SMW_NS_RELATION => true,
 82+ SMW_NS_RELATION_TALK => false,
 83+ SMW_NS_ATTRIBUTE => true,
 84+ SMW_NS_ATTRIBUTE_TALK => false,
 85+ SMW_NS_TYPE => true,
 86+ SMW_NS_TYPE_TALK => false
 87+);
 88+##
7489
75 -//require_once($smwgIP . '/specials/SearchSemantic/SMW_SpecialSearchSemantic.php'); //really not longer functional!
76 -require_once($smwgIP . '/specials/SearchTriple/SMW_SpecialSearchTriple.php');
77 -require_once($smwgIP . '/specials/ExportRDF/SMW_SpecialExportRDF.php'); // coming soon
78 -require_once($smwgIP . '/specials/SMWAdmin/SMW_SpecialSMWAdmin.php');
79 -require_once($smwgIP . '/specials/OntologyImport/SMW_SpecialOntologyImport.php');
80 -require_once($smwgIP . '/specials/AskSpecial/SMW_SpecialAsk.php');
8190
82 -require_once($smwgIP . '/specials/Relations/SMW_SpecialRelations.php');
83 -require_once($smwgIP . '/specials/Relations/SMW_SpecialUnusedRelations.php');
84 -require_once($smwgIP . '/specials/Relations/SMW_SpecialAttributes.php');
85 -require_once($smwgIP . '/specials/Relations/SMW_SpecialUnusedAttributes.php');
86 -require_once($smwgIP . '/specials/Relations/SMW_SpecialTypes.php');
 91+// some default settings which usually need no modification
8792
88 -/**********************************************/
89 -/***** register hooks *****/
90 -/**********************************************/
 93+###
 94+# Set the following value to "true" if you want to enable support
 95+# for semantic annotations within templates. For the moment, this
 96+# will only work if after minor change in your MediaWiki files --
 97+# see INSTALL for details. Enabling this is necessary for normal
 98+# operation.
 99+##
 100+$smwgEnableTemplateSupport = true;
 101+##
91102
92 -require_once($smwgIP . '/includes/SMW_Hooks.php');
93 -require_once($smwgIP . '/includes/SMW_RefreshTab.php');
 103+###
 104+# If you want to import ontologies, you need to install RAP,
 105+# a free RDF API for PHP, see
 106+# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/
 107+# The following is the path to your installation of RAP
 108+# (the directory where you extracted the files to) as seen
 109+# from your local filesystem. Note that ontology import is
 110+# highly experimental at the moment, and may not do what you
 111+# extect.
 112+##
 113+$smwgRAPPath = $smwgIP . '/libs/rdfapi-php';
 114+//$smwgRAPPath = '/another/example/path/rdfapi-php';
 115+##
94116
95 -if ($smwgEnableTemplateSupport===true) {
96 - $wgHooks['InternalParseBeforeLinks'][] = 'smwfParserHook'; //patch required;
97 -} else {
98 - $wgHooks['ParserAfterStrip'][] = 'smwfParserHook'; //default setting
99 -}
 117+// load (default) settings for inline queries
 118+require_once('SMW_InlineQueries.php');
100119
101 -$wgHooks['ParserAfterTidy'][] = 'smwfParserAfterTidyHook';
102 -$wgHooks['ArticleSaveComplete'][] = 'smwfSaveHook';
103 -$wgHooks['ArticleDelete'][] = 'smwfDeleteHook';
104 -$wgHooks['TitleMoveComplete'][]='smwfMoveHook';
105 -$wgHooks['BeforePageDisplay'][]='smwfAddHTMLHeader';
 120+// get local configuration ...
 121+//require("SMW_LocalSettings.php");
106122
107 -/**********************************************/
108 -/***** credits (see "Special:Version") *****/
109 -/**********************************************/
110 -
111 -global $wgExtensionCredits;
112 -$wgExtensionCredits['parserhook'][]= array('name'=>'Semantic MediaWiki', 'version'=>$smwgVersion, 'author'=>'Klaus Lassleben, Markus Kr&ouml;tzsch, Kai H&uuml;ner, Denny Vrandecic, S Page. Maintained by AIFB Karlsruhe.', 'url'=>'http://sourceforge.net/projects/semediawiki/', 'description' => 'Making your wiki more accessible&nbsp;&ndash; for machines and humans');
113 -
114123 ?>

Status & tagging log