Index: trunk/extensions/SemanticMediaWiki/includes/SMW_OldDataValue.php |
— | — | @@ -314,7 +314,7 @@ |
315 | 315 | } |
316 | 316 | // add tooltip (only if "linking" is enabled) |
317 | 317 | if ( ($linked !== NULL) && ($linked !==false) && ($this->getTooltip() != '') ) { |
318 | | - smwfRequireHeadItem(SMW_SCRIPT_TOOLTIP); |
| 318 | + smwfRequireHeadItem(SMW_HEADER_TOOLTIP); |
319 | 319 | $result = '<span class="smwttinline">' . $result . '<span class="smwttcontent">' . $this->getTooltip() . '</span></span>'; |
320 | 320 | } |
321 | 321 | return $result; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Hooks.php |
— | — | @@ -33,6 +33,13 @@ |
34 | 34 | SMWFactbox::printFactbox($text); |
35 | 35 | } else SMWFactbox::clearStorage(); |
36 | 36 | |
| 37 | + // add link to RDF to HTML header |
| 38 | + smwfRequireHeadItem('smw_rdf', '<link rel="alternate" type="application/rdf+xml" title="' . |
| 39 | + $parser->getTitle()->getPrefixedText() . '" href="' . |
| 40 | + $parser->getOptions()->getSkin()->makeSpecialUrl( |
| 41 | + 'ExportRDF/' . $parser->getTitle()->getPrefixedText(), 'xmlmime=rdf' |
| 42 | + ) . "\" />"); |
| 43 | + |
37 | 44 | return true; // always return true, in order not to stop MW's hook processing! |
38 | 45 | } |
39 | 46 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php |
— | — | @@ -196,6 +196,7 @@ |
197 | 197 | global $wgContLang, $wgServer, $smwgShowFactbox, $smwgStoreActive, $smwgIP; |
198 | 198 | if (!$smwgStoreActive) return; |
199 | 199 | wfProfileIn("SMWFactbox::printFactbox (SMW)"); |
| 200 | + smwfRequireHeadItem(SMW_HEADER_STYLE); |
200 | 201 | switch ($smwgShowFactbox) { |
201 | 202 | case SMW_FACTBOX_HIDDEN: |
202 | 203 | wfProfileOut("SMWFactbox::printFactbox (SMW)"); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Table.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | protected function getHTML($res) { |
14 | 14 | global $smwgIQRunningNumber; |
15 | | - smwfRequireHeadItem(SMW_SCRIPT_SORTTABLE); |
| 15 | + smwfRequireHeadItem(SMW_HEADER_SORTTABLE); |
16 | 16 | |
17 | 17 | // print header |
18 | 18 | if ('broadtable' == $this->mFormat) |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | if ( ($linked === NULL)||($linked === false) ) { |
117 | 117 | return mb_substr($this->m_value, 0, 42) . ' <span class="smwwarning">…</span> ' . mb_substr($this->m_value, $len - 42); |
118 | 118 | } else { |
119 | | - smwfRequireHeadItem(SMW_SCRIPT_TOOLTIP); |
| 119 | + smwfRequireHeadItem(SMW_HEADER_TOOLTIP); |
120 | 120 | return mb_substr($this->m_value, 0, 42) . ' <span class="smwttpersist"> … <span class="smwttcontent">' . $this->m_value . '</span></span> ' . mb_substr($this->m_value, $len - 42); |
121 | 121 | } |
122 | 122 | } else { |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Timeline.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | |
48 | 48 | public function getHTML($res) { |
49 | 49 | global $smwgIQRunningNumber; |
50 | | - smwfRequireHeadItem(SMW_SCRIPT_TIMELINE); //make sure JavaScripts are available |
| 50 | + smwfRequireHeadItem(SMW_HEADER_TIMELINE); //make sure JavaScripts are available |
51 | 51 | |
52 | 52 | $eventline = ('eventline' == $this->mFormat); |
53 | 53 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | * Global functions and constants for Semantic MediaWiki. |
5 | 5 | */ |
6 | 6 | |
7 | | -define('SMW_VERSION','1.0prealpha-4'); |
| 7 | +define('SMW_VERSION','1.0alpha-1'); |
8 | 8 | |
9 | 9 | // constants for special properties, used for datatype assignment and storage |
10 | 10 | define('SMW_SP_HAS_TYPE',1); |
— | — | @@ -27,10 +27,12 @@ |
28 | 28 | define('SMW_FACTBOX_SHOWN', 5); |
29 | 29 | |
30 | 30 | // constants for identifying javascripts as used in smwfRequireHeadItem |
31 | | -define('SMW_SCRIPT_TIMELINE', 1); |
32 | | -define('SMW_SCRIPT_TOOLTIP', 2); |
33 | | -define('SMW_SCRIPT_SORTTABLE', 3); |
34 | | -// HTML items to load in current page; format: "idtext => "<script ... " |
| 31 | +define('SMW_HEADER_TIMELINE', 1); |
| 32 | +define('SMW_HEADER_TOOLTIP', 2); |
| 33 | +define('SMW_HEADER_SORTTABLE', 3); |
| 34 | +define('SMW_HEADER_STYLE', 4); |
| 35 | + |
| 36 | +// HTML items to load in current page, use smwfRequireHeadItem to extend |
35 | 37 | $smwgHeadItems = array(); |
36 | 38 | |
37 | 39 | /** |
— | — | @@ -40,14 +42,16 @@ |
41 | 43 | * SMW_LocalSettings.php. For readability, this is the only global function that |
42 | 44 | * does not adhere to the naming conventions. |
43 | 45 | */ |
44 | | -function enableSemantics($namespace = "", $complete = false) { |
45 | | - global $smwgNamespace, $wgExtensionFunctions, $wgHooks; |
46 | | - $smwgNamespace = $namespace; |
47 | | - |
| 46 | +function enableSemantics($namespace = '', $complete = false) { |
| 47 | + global $smwgNamespace, $wgExtensionFunctions; |
48 | 48 | // The dot tells that the domain is not complete. It will be completed |
49 | 49 | // in the Export since we do not want to create a title object here when |
50 | 50 | // it is not needed in many cases. |
51 | | - if (!$complete && !($smwgNamespace === '')) $smwgNamespace = ".$smwgNamespace"; |
| 51 | + if ( !$complete && ($smwgNamespace !== '') ) { |
| 52 | + $smwgNamespace = '.' . $namespace; |
| 53 | + } else { |
| 54 | + $smwgNamespace = $namespace; |
| 55 | + } |
52 | 56 | $wgExtensionFunctions[] = 'smwfSetupExtension'; |
53 | 57 | return true; |
54 | 58 | } |
— | — | @@ -65,7 +69,7 @@ |
66 | 70 | * the static SMWSemanticData store, and disables printing of the |
67 | 71 | * factbox, and clearing of the existing data. |
68 | 72 | * This is a hack to enable parsing of included articles in a save |
69 | | - * way without importing their annotations. Unfortunatelly, there |
| 73 | + * way without importing their annotations. Unfortunately, there |
70 | 74 | * appears to be no way for finding out whether the current parse |
71 | 75 | * is the "main" parse, or whether some intro, docu, or whatever |
72 | 76 | * text is parsed. Using the hook mechanism, we have to rely on |
— | — | @@ -78,12 +82,12 @@ |
79 | 83 | smwfInitContentMessages(); |
80 | 84 | |
81 | 85 | ///// setup some autoloading ///// |
82 | | - $wgAutoloadClasses[SMWResultPrinter] = $smwgIP . '/includes/SMW_QueryPrinter.php'; |
83 | | - $wgAutoloadClasses[SMWTableResultPrinter] = $smwgIP . '/includes/SMW_QP_Table.php'; |
84 | | - $wgAutoloadClasses[SMWListResultPrinter] = $smwgIP . '/includes/SMW_QP_List.php'; |
85 | | - $wgAutoloadClasses[SMWTimelineResultPrinter] = $smwgIP . '/includes/SMW_QP_Timeline.php'; |
86 | | - $wgAutoloadClasses[SMWEmbeddedResultPrinter] = $smwgIP . '/includes/SMW_QP_Embedded.php'; |
87 | | - $wgAutoloadClasses[SMWTemplateResultPrinter] = $smwgIP . '/includes/SMW_QP_Template.php'; |
| 86 | + $wgAutoloadClasses['SMWResultPrinter'] = $smwgIP . '/includes/SMW_QueryPrinter.php'; |
| 87 | + $wgAutoloadClasses['SMWTableResultPrinter'] = $smwgIP . '/includes/SMW_QP_Table.php'; |
| 88 | + $wgAutoloadClasses['SMWListResultPrinter'] = $smwgIP . '/includes/SMW_QP_List.php'; |
| 89 | + $wgAutoloadClasses['SMWTimelineResultPrinter'] = $smwgIP . '/includes/SMW_QP_Timeline.php'; |
| 90 | + $wgAutoloadClasses['SMWEmbeddedResultPrinter'] = $smwgIP . '/includes/SMW_QP_Embedded.php'; |
| 91 | + $wgAutoloadClasses['SMWTemplateResultPrinter'] = $smwgIP . '/includes/SMW_QP_Template.php'; |
88 | 92 | |
89 | 93 | ///// register specials ///// |
90 | 94 | $wgAutoloadClasses['SMWAskPage'] = $smwgIP . '/specials/AskSpecial/SMW_SpecialAsk.php'; |
— | — | @@ -113,20 +117,16 @@ |
114 | 118 | require_once($smwgIP . '/includes/SMW_Hooks.php'); |
115 | 119 | require_once($smwgIP . '/includes/SMW_RefreshTab.php'); |
116 | 120 | |
117 | | - if ($smwgEnableTemplateSupport===true) { |
118 | | - $wgHooks['InternalParseBeforeLinks'][] = 'smwfParserHook'; //patch required; |
119 | | - } else { |
120 | | - $wgHooks['ParserAfterStrip'][] = 'smwfParserHook'; //default setting |
121 | | - } |
| 121 | + $wgHooks['InternalParseBeforeLinks'][] = 'smwfParserHook'; // parse annotations |
| 122 | + $wgHooks['ParserBeforeStrip'][] = 'smwfRegisterInlineQueries'; // register the <ask> parser hook |
| 123 | + $wgHooks['ArticleSaveComplete'][] = 'smwfSaveHook'; // store annotations |
| 124 | + $wgHooks['ArticleDelete'][] = 'smwfDeleteHook'; // delete annotations |
| 125 | + $wgHooks['TitleMoveComplete'][]='smwfMoveHook'; // move annotations |
| 126 | + $wgHooks['ParserAfterTidy'][] = 'smwfAddHTMLHeadersParser'; // add items to HTML header during parsing |
| 127 | + $wgHooks['BeforePageDisplay'][]='smwfAddHTMLHeadersOutput'; // add items to HTML header during output |
122 | 128 | |
123 | | - $wgHooks['ArticleSaveComplete'][] = 'smwfSaveHook'; |
124 | | - $wgHooks['ArticleDelete'][] = 'smwfDeleteHook'; |
125 | | - $wgHooks['TitleMoveComplete'][]='smwfMoveHook'; |
126 | | - $wgHooks['BeforePageDisplay'][]='smwfAddHTMLHeader'; |
127 | | - $wgHooks['ParserBeforeStrip'][] = 'smwfRegisterInlineQueries'; // a hook for registering the <ask> parser hook |
128 | | - $wgHooks['ArticleFromTitle'][] = 'smwfShowListPage'; |
129 | | - $wgHooks['LoadAllMessages'][] = 'smwfLoadAllMessages'; // enable a complete display of all messages when requested by MW |
130 | | - $wgHooks['ParserAfterTidy'][] = 'smwfInsertHTMLHeaders'; |
| 129 | + $wgHooks['ArticleFromTitle'][] = 'smwfShowListPage'; // special implementations for property/type articles |
| 130 | + $wgHooks['LoadAllMessages'][] = 'smwfLoadAllMessages'; // complete setup of all messages when requested by MW |
131 | 131 | |
132 | 132 | ///// credits (see "Special:Version") ///// |
133 | 133 | $wgExtensionCredits['parserhook'][]= array('name'=>'Semantic MediaWiki', 'version'=>SMW_VERSION, 'author'=>"Klaus Lassleben, Markus Krötzsch, Denny Vrandecic, S Page, and others. Maintained by [http://www.aifb.uni-karlsruhe.de/Forschungsgruppen/WBS/english AIFB Karlsruhe].", 'url'=>'http://ontoworld.org/wiki/Semantic_MediaWiki', 'description' => 'Making your wiki more accessible – for machines \'\'and\'\' humans. [http://ontoworld.org/wiki/Help:Semantics View online documentation.]'); |
— | — | @@ -163,131 +163,77 @@ |
164 | 164 | /**********************************************/ |
165 | 165 | |
166 | 166 | /** |
167 | | - * Hook function to insert HTML headers into parser output. |
| 167 | + * Add some head items (e.g. JavaScripts) to the current list of things |
| 168 | + * that SMW will add to the returned HTML page. The ID can be one of SMW's |
| 169 | + * SMW_HEADER_... constants, or a string id followed by the actual item |
| 170 | + * that should be added to the output html header. In the first case, the |
| 171 | + * $item parameter should be left empty. |
168 | 172 | */ |
169 | | -function smwfInsertHTMLHeaders(&$parser, &$text) { |
| 173 | +function smwfRequireHeadItem($id, $item = '') { |
170 | 174 | global $smwgHeadItems; |
171 | | - foreach ($smwgHeadItems as $item) { |
172 | | - $parser->mOutput->addHeadItem($item); |
173 | | - } |
174 | | - $smwgHeadItems = array(); // flush array |
175 | | - return true; |
176 | | -} |
177 | | - |
178 | | -/** |
179 | | - * Add a head item (e.g. JavaScript) to the current list of things that |
180 | | - * SMW will add to the output page. This works only while a page is parsed. |
181 | | - * The $id can be one of SMW's internal numerical IDs for builtin scripts, |
182 | | - * or a non-numerical tag that uniquely identifies this item, followed by |
183 | | - * the full HTML-text $item that is to be added. |
184 | | - */ |
185 | | -function smwfRequireHeadItem($id, $item='') { |
186 | | - global $smwgHeadItems; |
187 | | - if (is_numeric($id)) { //builtin head items |
| 175 | + if (is_numeric($id)) { |
188 | 176 | global $smwgScriptPath; |
189 | 177 | // Note: currently all scripts need the sorttable-script to work, and some tooltips require the timeline. |
190 | 178 | // This is bad and will change. |
191 | 179 | switch ($id) { |
192 | | - case SMW_SCRIPT_TIMELINE: |
193 | | - smwfRequireHeadItem(SMW_SCRIPT_SORTTABLE); |
| 180 | + case SMW_HEADER_TIMELINE: |
| 181 | + smwfRequireHeadItem(SMW_HEADER_STYLE); |
| 182 | + smwfRequireHeadItem(SMW_HEADER_SORTTABLE); /// TODO: make obsolete |
194 | 183 | $smwgHeadItems['smw_tl'] = '<script type="text/javascript" src="' . $smwgScriptPath . '/skins/SimileTimeline/timeline-api.js"></script>'; |
195 | 184 | $smwgHeadItems['smw_tlhelper'] = '<script type="text/javascript" src="' . $smwgScriptPath . '/skins/SMW_timeline.js"></script>'; |
196 | 185 | return; |
197 | | - case SMW_SCRIPT_TOOLTIP: |
198 | | - smwfRequireHeadItem(SMW_SCRIPT_TIMELINE); |
| 186 | + case SMW_HEADER_TOOLTIP: |
| 187 | + smwfRequireHeadItem(SMW_HEADER_STYLE); |
| 188 | + smwfRequireHeadItem(SMW_HEADER_TIMELINE); /// TODO: make obsolete |
199 | 189 | $smwgHeadItems['smw_tt'] = '<script type="text/javascript" src="' . $smwgScriptPath . '/skins/SMW_tooltip.js"></script>'; |
200 | 190 | return; |
201 | | - case SMW_SCRIPT_SORTTABLE: |
202 | | - $smwgHeadItems['smw_st'] ='<script type="text/javascript" id="SMW_sorttable_script_inclusion" src="' . $smwgScriptPath . '/skins/SMW_sorttable.js"></script>'; |
| 191 | + case SMW_HEADER_SORTTABLE: |
| 192 | + smwfRequireHeadItem(SMW_HEADER_STYLE); |
| 193 | + $smwgHeadItems['smw_st'] = '<script type="text/javascript" id="SMW_sorttable_script_inclusion" src="' . $smwgScriptPath . '/skins/SMW_sorttable.js"></script>'; |
203 | 194 | return; |
| 195 | + case SMW_HEADER_STYLE: |
| 196 | + global $wgContLang; |
| 197 | + $smwgHeadItems['smw_css'] = '<link rel="stylesheet" type="text/css" media="screen, projection" href="' . $smwgScriptPath . '/skins/SMW_custom.css" />'; |
| 198 | + if ($wgContLang->isRTL()) { // right-to-left support |
| 199 | + $smwgHeadItems['smw_cssrtl'] = '<link rel="stylesheet" type="text/css" media="screen, projection" href="' . $smwgScriptPath . '/skins/SMW_custom_rtl.css" />'; |
| 200 | + } |
| 201 | + return; |
204 | 202 | } |
205 | | - } else { // custom head items |
| 203 | + } else { // custom head item |
206 | 204 | $smwgHeadItems[$id] = $item; |
207 | 205 | } |
208 | 206 | } |
209 | 207 | |
210 | | - /** |
211 | | - * This method is in charge of inserting additional CSS, JScript, and meta tags |
212 | | - * into the html header of each page. It is either called after initialising wgout |
213 | | - * (requiring a patch in MediaWiki), or during parsing. Calling it during parsing, |
214 | | - * however, is not sufficient to get the header modifiactions into every page that |
215 | | - * is shipped to a reader, since the parser cache can make parsing obsolete. |
216 | | - * |
217 | | - * $out is the modified OutputPage. |
218 | | - */ |
219 | | - function smwfAddHTMLHeader(&$out) { |
220 | | - wfProfileIn('smwfAddHTMLHeader (SMW)'); |
221 | | - global $smwgHeadersInPlace; // record whether headers were created already |
222 | | - global $smwgArticleHeadersInPlace; // record whether article name specific headers are already there |
223 | | - global $smwgScriptPath; |
| 208 | +/** |
| 209 | + * Hook function to insert HTML headers (CSS, JavaScript, and meta tags) into parser |
| 210 | + * output. This is our preferred method of working off the required scripts, since it |
| 211 | + * exploits parser caching. |
| 212 | + */ |
| 213 | +function smwfAddHTMLHeadersParser(&$parser, &$text) { |
| 214 | + global $smwgHeadItems; |
| 215 | + foreach ($smwgHeadItems as $key => $item) { |
| 216 | + $parser->mOutput->addHeadItem("\t\t" . $item . "\n", $key); |
| 217 | + } |
| 218 | + $smwgHeadItems = array(); // flush array so that smwfAddHTMLHeader does not take needless actions |
| 219 | + return true; |
| 220 | +} |
224 | 221 | |
225 | | - global $smwgHeadItems; |
226 | | - |
227 | | - // Fallback: add scripts to output if not done already (should happen only if we are |
228 | | - // not using a parser, e.g on special pages. |
229 | | - $i = 0; |
230 | | - foreach ($smwgHeadItems as $item) { |
231 | | - $out->addHeadItem("smw_$i", $item); |
232 | | - $i++; |
233 | | - } |
234 | | - $smwgHeadItems = array(); // flush array |
235 | | - |
236 | | - if (!$smwgHeadersInPlace) { |
237 | | -// $sortTableScript = '<script type="text/javascript" id="SMW_sorttable_script_inclusion" src="' . $smwgScriptPath . '/skins/SMW_sorttable.js"></script>'; |
238 | | -// // The above id is essential for the JavaScript to find out the $smwgScriptPath to |
239 | | -// // include images. Changes in the above must always be coordinated with the script! |
240 | | -// $out->addScript($sortTableScript); |
241 | | - |
242 | | -// $toolTipScript = '<script type="text/javascript" src="' . $smwgScriptPath . '/skins/SMW_tooltip.js"></script>'; |
243 | | -// $out->addScript($toolTipScript); |
244 | | - |
245 | | - // TODO: we should rather have a script that only pulls the whole Timeline on demand, if possible |
246 | | -// $TimelineScript = '<script type="text/javascript" src="' . $smwgScriptPath . '/skins/SimileTimeline/timeline-api.js"></script>'; |
247 | | -// $SMWTimelineScript = '<script type="text/javascript" src="' . $smwgScriptPath . '/skins/SMW_timeline.js"></script>'; |
248 | | -// $out->addScript($TimelineScript); |
249 | | -// $out->addScript($SMWTimelineScript); |
250 | | - |
251 | | - // Also we add a custom CSS file for our needs |
252 | | - $customCssUrl = $smwgScriptPath . '/skins/SMW_custom.css'; |
253 | | - $out->addLink(array( |
254 | | - 'rel' => 'stylesheet', |
255 | | - 'type' => 'text/css', |
256 | | - 'media' => 'screen, projection', |
257 | | - 'href' => $customCssUrl |
258 | | - )); |
259 | | - |
260 | | - //BEGIN RTL PATCH |
261 | | - global $wgContLang; |
262 | | - if ($wgContLang->isRTL()) { |
263 | | - $customCssUrl = $smwgScriptPath . '/skins/SMW_custom_rtl.css'; |
264 | | - $out->addLink(array( |
265 | | - 'rel' => 'stylesheet', |
266 | | - 'type' => 'text/css', |
267 | | - 'media' => 'screen, projection', |
268 | | - 'href' => $customCssUrl |
269 | | - )); |
270 | | - } |
271 | | - //END RTL PATCH |
272 | | - $smwgHeadersInPlace = true; |
273 | | - } |
274 | | - |
275 | | - if ((!$smwgArticleHeadersInPlace) && ($out->mIsarticle) && ($out->mPagetitle!='')) { |
276 | | - global $wgContLang, $wgServer, $wgScript; |
277 | | - |
278 | | - $out->addLink(array( |
279 | | - 'rel' => 'alternate', |
280 | | - 'type' => 'application/rdf+xml', |
281 | | - 'title' => $out->mPagetitle, |
282 | | - 'href' => $wgServer . $wgScript . '/' . |
283 | | - $wgContLang->getNsText(NS_SPECIAL) . ':ExportRDF/' . |
284 | | - str_replace('%2F', "/", urlencode(str_replace(' ', '_', $out->mPagetitle))) . '?xmlmime=rdf' |
285 | | - )); |
286 | | - $smwgArticleHeadersInPlace = true; |
287 | | - } |
288 | | - wfProfileOut('smwfAddHTMLHeader (SMW)'); |
289 | | - |
290 | | - return true; // always return true, in order not to stop MW's hook processing! |
| 222 | +/** |
| 223 | + * This method is in charge of inserting additional CSS, JavaScript, and meta tags |
| 224 | + * into the HTML header of each page. This method is needed for pages that are not |
| 225 | + * parsed, especially for special pages. All others get their headers with the parser |
| 226 | + * output (exploiting parser caching). |
| 227 | + */ |
| 228 | +function smwfAddHTMLHeadersOutput(&$out) { |
| 229 | + global $smwgHeadItems; |
| 230 | + // Add scripts to output if not done already (should happen only if we are |
| 231 | + // not using a parser, e.g on special pages). |
| 232 | + foreach ($smwgHeadItems as $key => $item) { |
| 233 | + $out->addHeadItem($key, "\t\t" . $item . "\n"); |
291 | 234 | } |
| 235 | + $smwgHeadItems = array(); // flush array |
| 236 | + return true; // always return true, in order not to stop MW's hook processing! |
| 237 | +} |
292 | 238 | |
293 | 239 | /**********************************************/ |
294 | 240 | /***** namespace settings *****/ |
— | — | @@ -312,9 +258,7 @@ |
313 | 259 | define('SMW_NS_TYPE', $smwgNamespaceIndex+4); |
314 | 260 | define('SMW_NS_TYPE_TALK', $smwgNamespaceIndex+5); |
315 | 261 | |
316 | | - /// @DEPRECATED |
317 | | - define('SMW_NS_ATTRIBUTE', $smwgNamespaceIndex+2); |
318 | | - define('SMW_NS_ATTRIBUTE_TALK', $smwgNamespaceIndex+3); |
| 262 | + /// For backwards compatibility. Might vanish at some point. |
319 | 263 | define('SMW_NS_RELATION', $smwgNamespaceIndex); |
320 | 264 | define('SMW_NS_RELATION_TALK', $smwgNamespaceIndex+1); |
321 | 265 | |
— | — | @@ -479,7 +423,7 @@ |
480 | 424 | */ |
481 | 425 | function smwfEncodeMessages($msgarray) { |
482 | 426 | if (count($msgarray) > 0) { |
483 | | - smwfRequireHeadItem(SMW_SCRIPT_TOOLTIP); |
| 427 | + smwfRequireHeadItem(SMW_HEADER_TOOLTIP); |
484 | 428 | $msgs = implode(' ', $msgarray); |
485 | 429 | return '<span class="smwttpersist"><span class="smwtticon">warning.png</span><span class="smwttcontent">' . $msgs . '</span></span>'; |
486 | 430 | } else { |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php |
— | — | @@ -142,16 +142,6 @@ |
143 | 143 | ## |
144 | 144 | |
145 | 145 | ### |
146 | | -# Set the following value to "true" if you want to enable support |
147 | | -# for semantic annotations within templates. For the moment, this |
148 | | -# will only work if after minor change in your MediaWiki files -- |
149 | | -# see INSTALL for details. Enabling this is necessary for normal |
150 | | -# operation. |
151 | | -## |
152 | | -$smwgEnableTemplateSupport = true; |
153 | | -## |
154 | | - |
155 | | -### |
156 | 146 | # Setting this to true allows to translate all the labels within |
157 | 147 | # the browser GIVEN that they have interwiki links. |
158 | 148 | ## |