| 1 : |
dantman |
11 |
# -*- coding: utf-8 -*-
|
| 2 : |
|
|
import family
|
| 3 : |
|
|
|
| 4 : |
|
|
# Base file for Wikia wiki.
|
| 5 : |
|
|
|
| 6 : |
|
|
class Family(family.Family):
|
| 7 : |
|
|
|
| 8 : |
|
|
def __init__(self):
|
| 9 : |
|
|
|
| 10 : |
|
|
family.Family.__init__(self)
|
| 11 : |
|
|
|
| 12 : |
|
|
self.wikia = {
|
| 13 : |
|
|
'projectns': None,
|
| 14 : |
|
|
'forums': True,
|
| 15 : |
|
|
'smw': False,
|
| 16 : |
|
|
'video': False,
|
| 17 : |
|
|
'kaltura': False,
|
| 18 : |
|
|
'profile': False,
|
| 19 : |
|
|
'userwiki': False,
|
| 20 : |
|
|
}
|
| 21 : |
|
|
|
| 22 : |
|
|
def initNamespaces(self):
|
| 23 : |
|
|
if self.wikia['forums'] is True:
|
| 24 : |
|
|
self.wikia['forums'] = 110
|
| 25 : |
|
|
if self.wikia['smw'] is True:
|
| 26 : |
|
|
self.wikia['smw'] = 300
|
| 27 : |
|
|
if self.wikia['video'] is True:
|
| 28 : |
|
|
self.wikia['video'] = 400
|
| 29 : |
|
|
if self.wikia['kaltura'] is True:
|
| 30 : |
|
|
self.wikia['kaltura'] = 320
|
| 31 : |
|
|
if self.wikia['profile'] is True:
|
| 32 : |
|
|
self.wikia['profile'] = 202
|
| 33 : |
|
|
if self.wikia['userwiki'] is True:
|
| 34 : |
|
|
self.wikia['userwiki'] = 200
|
| 35 : |
|
|
|
| 36 : |
|
|
if self.wikia['projectns']:
|
| 37 : |
|
|
self.namespaces[4] = { '_default':[u'%s' % self.wikia['projectns'], self.namespaces[4]['_default']] }
|
| 38 : |
|
|
self.namespaces[5] = { '_default':[u'%s talk' % self.wikia['projectns'], self.namespaces[5]['_default']] }
|
| 39 : |
|
|
|
| 40 : |
|
|
if self.wikia['forums']:
|
| 41 : |
|
|
self.namespaces[self.wikia['forums']+0] = { '_default': u'Forum', }
|
| 42 : |
|
|
self.namespaces[self.wikia['forums']+1] = { '_default': u'Forum talk', }
|
| 43 : |
|
|
|
| 44 : |
|
|
if self.wikia['smw']:
|
| 45 : |
dantman |
28 |
#self.namespaces[self.wikia['smw']+0] = { '_default': u'Relation', }
|
| 46 : |
|
|
#self.namespaces[self.wikia['smw']+1] = { '_default': u'Relation talk', }
|
| 47 : |
dantman |
11 |
self.namespaces[self.wikia['smw']+2] = { '_default': u'Property', }
|
| 48 : |
|
|
self.namespaces[self.wikia['smw']+3] = { '_default': u'Property talk', }
|
| 49 : |
|
|
self.namespaces[self.wikia['smw']+4] = { '_default': u'Type', }
|
| 50 : |
|
|
self.namespaces[self.wikia['smw']+5] = { '_default': u'Type talk', }
|
| 51 : |
|
|
|
| 52 : |
|
|
if self.wikia['video']:
|
| 53 : |
|
|
self.namespaces[self.wikia['video']+0] = { '_default': u'Video', }
|
| 54 : |
|
|
self.namespaces[self.wikia['video']+1] = { '_default': u'Video talk', }
|
| 55 : |
|
|
|
| 56 : |
|
|
if self.wikia['kaltura']:
|
| 57 : |
|
|
self.namespaces[self.wikia['kaltura']+0] = { '_default': u'Kaltura', }
|
| 58 : |
|
|
self.namespaces[self.wikia['kaltura']+1] = { '_default': u'Kaltura talk', }
|
| 59 : |
|
|
|
| 60 : |
|
|
if self.wikia['profile']:
|
| 61 : |
|
|
self.namespaces[self.wikia['profile']] = { '_default': u'User profile', }
|
| 62 : |
|
|
|
| 63 : |
|
|
if self.wikia['userwiki']:
|
| 64 : |
|
|
self.namespaces[self.wikia['userwiki']+0] = { '_default': u'UserWiki', }
|
| 65 : |
|
|
self.namespaces[self.wikia['userwiki']+1] = { '_default': u'UserWiki talk', }
|
| 66 : |
|
|
|
| 67 : |
|
|
def scriptpath(self, code):
|
| 68 : |
|
|
return ''
|
| 69 : |
|
|
|
| 70 : |
|
|
def code2encoding(self, code):
|
| 71 : |
|
|
return 'utf-8'
|
| 72 : |
|
|
|
| 73 : |
|
|
def version(self, code):
|
| 74 : |
dantman |
29 |
return u'1.13.3'
|
| 75 : |
dantman |
11 |
|