Package: iservices.controlpanel
Introduction============``iservices.controlpanel`` is a plone control panel that provides commonsettings for themers and integrators. The idea behind this control panel is thatplone administrators (and not the integrator or programmer) will have theability to:* Define social accounts for use all over the site, specially on themes. Theprogrammer/integrator will have to integrate it's product or theme with thiscontrol panel (hopefully an easy_step) and get this settings to be applied ontheir logic.* Allows to change the global background and foreground colors that plone usesto draw it's interface on plonetheme.sunburs (Actually, only two colors). If theuser requires more than that, it might be better to craft a complete themeproduct.* Change the plone logo. The site administrator can change the logo. Thisprovides an easy plone theming deployment without the cost of creating a themefrom scratch just to change the logo.* Change the footer and colophon text. The site administrator can change thetext of the footer and colophon without needing the programmer to make changesto any theme.Usage=====Install using buildout-----------------------Add ``iservices.controlpanel`` to your ``eggs`` subsection::eggs =...iservices.controlpanelThis package depends on a set of other packages, hopefully, all packages shouldbe pulled from pypi automatically. However, you'll have to adjust the``extends`` subsection according to the following pattern::extends =http://dist.plone.org/release/<plone-version>/versions.cfg...http://good-py.appspot.com/release/plone.app.z3cform/0.5.0-1?plone=<plone-version>http://good-py.appspot.com/release/plone.app.registry/1.0b2?plone=<plone-version>Replace ``<plone-version>`` with the Plone version you are working on, i.e., ``4.0.3``How to use it on your packages and themes-----------------------------------------Of course, If you use this package, you'd want access to the settings itmanages, right? This package has a small API that encapsulates the theboilerplate code and makes it easy to you to use it.In order toaccess the settings of the control panel, you just use a very simple moduleimport::>>> from iservices.controlpanel.api import settingsAll settings are available using standar Python dot notation. Example::>>> settings.background_coloru'#205C90'If you access an unknown name, you will get an AttributeError:>>> registry.some_unknown_keyTraceback (most recent call last):...NameError: name 'registry' is not definedAlso, using getattr(), even on an existing key name, does not make it:>>> getattr(settings,background_color)Traceback (most recent call last):...NameError: name 'background_color' is not definedSometimes, settings on the control panel will have empty values. It is suggestedthat, when this happens, the funcionality related to this particular settingshould be disabled or modified in some way.>>> def do_something_with(some_setting):...     if some_setting:...             print "Doing stuff when this registry entry is set."...     else:...             print "Disable functionality when this registry is not set."...>>> # the twitterlink setting is empty by default>>> print settings.twitterlinkNone>>> do_something_with(settings.twitterlink)Disable functionality when this registry is not set.>>> settings.twitterlink = 'http://twitter.com/tzicatl'>>> do_something_with(settings.twitterlink)Doing stuff when this registry entry is set.And that's all there is for the API.Credits=======AuthorNoe Nieto <noe@iservices.com.mx>Websiteshttp://iservices.com.mx/http://noenieto.com/Contact-emaildesarrollo@iservices.com.mxChangelog=========0.3.1 - March 16th, 2011----------------------- Rename README.rst -> README.txt0.3 - March 16th, 2011----------------------- Add tests for the custom css view and fix different problems around.- Add a browser layer to override the colophon and footer. Also add ahacky css stylesheet made out from a zope3 browserview.0.2 - March 15th, 2011-----------------------+ First public release with a small set of settings, proper testing and smallAPI with documentation.+ Depends on plone.app.registry, but hopefully, installing this egg alone, willpull all the required packages.+ Tested in Plone 40.1 (unreleased yet)-------------------+ Initial release, make all the setuptools boilerplate, and create the git repo.