Jump to content


Photo

Parental Controll activated?


  • Please log in to reply
No replies to this topic

#1 lolly

  • Senior Member
  • 60 posts

+4
Neutral

Posted 11 July 2012 - 13:41

@ the Startwizard have i chosen no Parental Control but is activated....

In /etc/enigma2/settings

config.ParentalControl.configured=true

In ParentalControl.py

def InitParentalControl():
global parentalControl
parentalControl = ParentalControl()
config.ParentalControl = ConfigSubsection()
config.ParentalControl.configured = ConfigYesNo(default = False)
config.ParentalControl.mode = ConfigSelection(default = "simple", choices = [("simple", _("simple")), ("complex", _("complex"))])
config.ParentalControl.storeservicepin = ConfigSelection(default = "never", choices = [("never", _("never")), ("5", _("%d minutes") % 5), ("30", _("%d minutes") % 30), ("60", _("%d minutes") % 60), ("standby", _("until standby/restart"))])
config.ParentalControl.servicepinactive = ConfigYesNo(default = False)
config.ParentalControl.setuppinactive = ConfigYesNo(default = False)
config.ParentalControl.type = ConfigSelection(default = "blacklist", choices = [(LIST_WHITELIST, _("whitelist")), (LIST_BLACKLIST, _("blacklist"))])
config.ParentalControl.setuppin = ConfigPIN(default = -1)
config.ParentalControl.retries = ConfigSubsection()
config.ParentalControl.retries.setuppin = ConfigSubsection()
config.ParentalControl.retries.setuppin.tries = ConfigInteger(default = 3)
config.ParentalControl.retries.setuppin.time = ConfigInteger(default = 3)
config.ParentalControl.retries.servicepin = ConfigSubsection()
config.ParentalControl.retries.servicepin.tries = ConfigInteger(default = 3)
config.ParentalControl.retries.servicepin.time = ConfigInteger(default = 3)
config.ParentalControl.servicepin = ConfigSubList()

In Starwizard.xml

  <step id="finisheddefaultsatlists">
   <text value="Do you want to enable the parental control feature on your dreambox?" />
   <list>
	<listentry caption="No" step="end" />
	<listentry caption="Yes" step="parentalsetup" />
   </list>
   <code pos="after">
if self["list"].index == 0:
config.ParentalControl.configured.value = True
else:
config.ParentalControl.configured.value = False
config.ParentalControl.configured.save()
   </code>
  </step>
  <step id="parentalsetup">
   <text value="You need to set a PIN code and hide it from your children.\n\nDo you want to set the pin now?" />
   <list>
	<listentry caption="Yes" step="finishparentalsetup" />
	<listentry caption="No" step="warnpin" />
   </list>
   <code pos="after">
from ParentalControlSetup import ParentalControlChangePin
if self["list"].index == 0:
self.session.open(ParentalControlChangePin, config.ParentalControl.servicepin[0], _("parental control pin"))
   </code>
  </step>
  <step id="warnpin">
   <text value="Please be aware, that anyone can disable the parental control, if you have not set a PIN." />
  </step>
  <step id="finishparentalsetup">
   <code>
if config.ParentalControl.setuppin.value == "aaaa":
config.ParentalControl.setuppinactive.value = False
else:
config.ParentalControl.setuppinactive.value = True
config.ParentalControl.setuppinactive.save()
config.ParentalControl.servicepinactive.value = True
config.ParentalControl.servicepinactive.save()
config.ParentalControl.setuppin.value = config.ParentalControl.servicepin[0].value
config.ParentalControl.setuppin.save()
   </code>

Have i overseen some things?

Edited by lolly, 11 July 2012 - 13:41.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users