$wgHiddenPrefs[] = 'visualeditor-enable'; // don't allow disabling $wgDefaultUserOptions['visualeditor-enable-experimental'] = 1; $wgVisualEditorParsoidURL = 'http://localhost:8142'; $wgVisualEditorParsoidPrefix = 'ligmincha'; $wgVisualEditorSupportedSkins[] = 'monobook'; // Organic Design extensions wfLoadExtension('ExtraMagic'); wfLoadExtension('HighlightJS'); wfLoadExtension('AjaxComments'); $wgAjaxCommentsPollServer = -1; include "{$IP}/extensions/WebSocket/WebSocket.php"; WebSocket::$log = __DIR__ . '/ws.log'; WebSocket::$rewrite = true; WebSocket::$ssl_cert = '/etc/letsencrypt/live/ligmincha.com.br/fullchain.pem'; WebSocket::$ssl_key = '/etc/letsencrypt/live/ligmincha.com.br/privkey.pem'; // Make Category:Público public access $wgHooks['UserGetRights'][] = 'wfPublicCat'; function wfPublicCat() { global $wgWhitelistRead; $title = Title::newFromText($_REQUEST['title']); if (is_object($title)) { $id = $title->getArticleID(); $dbr = wfGetDB(DB_SLAVE); if ($dbr->selectRow('categorylinks', '1', "cl_from = {$id} AND cl_to = 'Público'")) { $wgWhitelistRead[] = $title->getPrefixedText(); } } return true; }
* WebSocket extension - Allows live connections between the server and other current clients * * See http://www.organicdesign.co.nz/Extension:WebSocket for details * * @file * @ingroup Extensions * @author Aran Dunkley [http://www.organicdesign.co.nz/aran Aran Dunkley] * @copyright © 2015 Aran Dunkley * @licence GNU General Public Licence 2.0 or later */ if (!defined('MEDIAWIKI')) { die('Not an entry point.'); } define('WEBSOCKET_VERSION', '1.2.1, 2015-04-28'); require __DIR__ . '/WebSocket.class.php'; require __DIR__ . '/WebSocketClient.class.php'; WebSocket::$port = 1729; # Port the WebSocket daemon will run on WebSocket::$rewrite = false; # Configure URL rewriting so that the WebSocket port doesn't need to be public WebSocket::$perl = '/usr/bin/perl'; # Location of the Perl interpreter WebSocket::$log = false; # Set a file location to log WebSocket daemon events and errors WebSocket::$ssl_cert = false; # If the wiki uses SSL, then the WebSocket will need to know the certificate file, WebSocket::$ssl_key = false; # and the SSL key file $wgExtensionCredits['other'][] = array('path' => __FILE__, 'name' => 'WebSocket', 'author' => '[http://www.organicdesign.co.nz/aran Aran Dunkley]', 'url' => 'http://www.organicdesign.co.nz/Extension:WebSocket', 'descriptionmsg' => 'websocket-desc', 'version' => WEBSOCKET_VERSION); $wgExtensionMessagesFiles['WebSocket'] = __DIR__ . '/WebSocket.i18n.php'; new WebSocket();