Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 6, 2016
0 parents
commit 4754be2
Showing
96 changed files
with
2,317 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
<html> | ||
|
||
<head> | ||
<title>The Definitive Guide to Plone, Errata</title> | ||
</head> | ||
|
||
<body> | ||
<pre> | ||
|
||
Chapter 4 | ||
|
||
Page 52: | ||
|
||
Error in text. The current text reads: | ||
|
||
"it won't show up in navigation or searches" | ||
|
||
This should read: | ||
|
||
"it won't show up in navigation" | ||
|
||
|
||
Page 87 | ||
|
||
Error in text. The current text reads: | ||
|
||
"Then I deleted right slots" | ||
|
||
This should read: | ||
|
||
"Then I deleted all the content in the right_slots property." | ||
|
||
Page 89 | ||
|
||
The current text reads: | ||
|
||
"Selecting this folder" | ||
|
||
This should read: | ||
|
||
"De-selecting this folder" | ||
|
||
|
||
|
||
Page 93 | ||
|
||
Error in text in the sidebar. The current text reads: | ||
|
||
"For the Type field, enter list." | ||
|
||
This should read: | ||
|
||
"For the Type field, enter lines." | ||
|
||
|
||
Chapter 5 | ||
|
||
Page 123 | ||
|
||
Code is wrong. The current code reads: | ||
|
||
<a href="http://plone.org/Members/andy/book">Link</a> | ||
|
||
This should read: | ||
|
||
<a href="http://plone.org/Members/andy/book" title="Plone Book">Link</a> | ||
Code is wrong. The current code reads: | ||
|
||
<a href="#" tal:attributes="href python:request.get('message', 'change', default)" /> | ||
|
||
This should read: | ||
|
||
<a href="#" tal:attributes="href python:request.get('message', default)" /> | ||
|
||
And as a result text is wrong: | ||
|
||
"then first value will be used, which is of course change." | ||
|
||
Should be: | ||
|
||
"then first value will be used, which is of course message." | ||
|
||
|
||
|
||
Chapter 7 | ||
|
||
Page 181 | ||
|
||
Error in text. The current text reads | ||
|
||
"has a number of variables in populated using Dynamic HTML (DTML)." | ||
|
||
This should read: | ||
|
||
"has a number of variables in populated using Document Template Markup Language (DTML)" | ||
|
||
|
||
Chapter 9 | ||
|
||
Page 270-1 | ||
|
||
There is code for fixing up users called fixUsers. This code has an error. The current lines read: | ||
|
||
if p is not Noneand p!= 'Epoz': | ||
m.setMemberProperties({'wysiwyg_editor', 'Epoz',}) | ||
|
||
This should read: | ||
|
||
if p is not None and p!= 'Epoz': | ||
m.setMemberProperties({'wysiwyg_editor': 'Epoz',}) | ||
|
||
|
||
Page 271-2 | ||
|
||
There is a code for calculating the users in a group. This code has an error. The current lines read: | ||
|
||
group = getGroupById(group) | ||
|
||
This should read: | ||
|
||
group = pg.getGroupById(group) | ||
|
||
Chapter 11 | ||
|
||
Page 321 | ||
|
||
The current text reads: | ||
|
||
"This is a title for the content type. This isn't used in Plone" | ||
|
||
Should read: | ||
|
||
"This is a title for the content type." | ||
|
||
The current text reads: | ||
|
||
"This is the action that will be called when the item is clicked in the folder lists, folder contents and so on. Usually this is the view, so enter the name of the template." | ||
|
||
Should read: | ||
|
||
"This isn't used in Plone" | ||
|
||
Page 333 | ||
|
||
Error in table: | ||
|
||
"The portal type as defined in the portal_types tool." | ||
|
||
Should read: | ||
|
||
"The portal type's title as defined in the portal_types tool." | ||
|
||
Page 339 | ||
|
||
Error in code: | ||
|
||
"CreationDate = { "query": [start, end]," | ||
|
||
Should read: | ||
|
||
"created = { "query": [start, end]," | ||
|
||
Chapter 13 | ||
|
||
Page 403 | ||
|
||
Error in code. Currently reads: | ||
|
||
default_output_types = 'text/html', | ||
|
||
Should read: | ||
|
||
default_output_type = 'text/html', | ||
|
||
|
||
Page 425 | ||
|
||
Multiple errors in this script. I'll take each one... | ||
|
||
At the top add the following line: | ||
|
||
from Products.Archetypes.public import registerType, BaseContent | ||
|
||
The current text reads: | ||
|
||
from Products.Archetypes.public import Schema | ||
|
||
This should read: | ||
|
||
from Products.Archetypes.public import Schema, BaseSchema | ||
|
||
The current text reads: | ||
|
||
from Products.Archetypes.public import IntegerWidget, StringField | ||
|
||
This should read: | ||
|
||
from Products.Archetypes.public import IntegerWidget, StringWidget | ||
|
||
The current text has the following line appearing twice: | ||
|
||
storage = SQLStorage(), | ||
|
||
Both of these lines should read: | ||
|
||
storage = PostgreSQLStorage(), | ||
|
||
Appendix B | ||
|
||
Page 525 | ||
|
||
This code has an error. The current lines read: | ||
|
||
if p is not None and p!= 'Epoz': | ||
m.setMemberProperties({'wysiwyg_editor', 'Epoz',}) | ||
|
||
This should read: | ||
|
||
if p is not None and p!= 'Epoz': | ||
m.setMemberProperties({'wysiwyg_editor': 'Epoz',}) | ||
|
||
Page 526 | ||
|
||
|
||
There is a code for calculating the users in a group. This code has an error. The current lines read: | ||
|
||
group = getGroupById(group) | ||
|
||
This should read: | ||
|
||
group = pg.getGroupById(group) | ||
</pre> | ||
|
||
</body> | ||
</html> |
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2004 Andy McKay | ||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user�s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
D/skins//// | ||
D/Extensions//// | ||
/__init__.py/1.2/Mon Jun 7 19:23:33 2004// | ||
/config.py/1.2/Mon Jun 7 19:23:33 2004// | ||
/readme.txt/1.1/Mon Jun 7 19:23:33 2004// | ||
/refresh.txt/1.1/Mon Jun 7 19:23:33 2004// | ||
/version.txt/1.1/Mon Jun 7 18:52:42 2004// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Andy/Book/examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
:ext:andy@agmweb.ca:/home/cvs |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/Install.py/1.2/Mon Jun 7 19:19:17 2004// | ||
/import.py/1.1/Mon Jun 7 19:23:33 2004// | ||
/test.csv/1.1/Tue Jan 6 21:44:21 2004// | ||
D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Andy/Book/examples/Extensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
:ext:andy@agmweb.ca:/home/cvs |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from Products.CMFCore.TypesTool import ContentFactoryMetadata | ||
from Products.CMFCore.DirectoryView import createDirectoryView | ||
from Products.CMFCore.utils import getToolByName | ||
from Products.CMFCore.TypesTool import FactoryTypeInformation as fti_klass | ||
|
||
from Products.PloneBookExamples.config import layer_name, layer_location | ||
|
||
def install(self): | ||
""" Install this product """ | ||
out = [] | ||
typesTool = getToolByName(self, 'portal_types') | ||
skinsTool = getToolByName(self, 'portal_skins') | ||
|
||
# add in the directory view pointing to our skin | ||
if layer_name not in skinsTool.objectIds(): | ||
createDirectoryView(skinsTool, layer_location, layer_name) | ||
out.append('Added "%s" directory view to portal_skins' % layer_name) | ||
|
||
# add in the layer to all our skins | ||
skins = skinsTool.getSkinSelections() | ||
for skin in skins: | ||
path = skinsTool.getSkinPath(skin) | ||
path = [ p.strip() for p in path.split(',') ] | ||
if layer_name not in path: | ||
path.insert(path.index('custom')+1, layer_name) | ||
|
||
path = ", ".join(path) | ||
skinsTool.addSkinSelection(skin, path) | ||
out.append('Added "%s" to "%s" skins' % (layer_name, skin)) | ||
else: | ||
out.append('Skipping "%s" skin' % skin) | ||
|
||
return "\n".join(out) | ||
|
||
# Andy McKay | ||
# June 5th, add this as a convenience to | ||
# clear out all the skin settings for installing and uninstalling | ||
# this product | ||
def uninstall(self): | ||
""" UnInstall this product """ | ||
out = [] | ||
typesTool = getToolByName(self, 'portal_types') | ||
skinsTool = getToolByName(self, 'portal_skins') | ||
|
||
# add in the directory view pointing to our skin | ||
if layer_name in skinsTool.objectIds(): | ||
skinsTool.manage_delObjects([layer_name,]) | ||
out.append('Deleted "%s" directory view from portal_skins' % layer_name) | ||
|
||
# add in the layer to all our skins | ||
skins = skinsTool.getSkinSelections() | ||
for skin in skins: | ||
path = skinsTool.getSkinPath(skin) | ||
path = [ p.strip() for p in path.split(',') ] | ||
if layer_name not in path: | ||
del path[path.index(layer_name)] | ||
|
||
path = ", ".join(path) | ||
skinsTool.addSkinSelection(skin, path) | ||
skinsTool.addSkinSelection(skin, path) | ||
out.append('Removed "%s" from %s" skins' % (layer_name, skin)) | ||
else: | ||
out.append('Skipping "%s" skin' % skin) | ||
|
||
return "\n".join(out) |
Oops, something went wrong.