! bitweaver ((ReleaseThree)) Schema & Structural changes
|
|
+||~Date|Package|Reason|Who |
+17-APR-2010 | liberty | plural content name support | [/will] |
+SQL92|{code source=SQL title="Add pos column"} |
+ALTER TABLE liberty_content_types RENAME COLUMN content_description TO content_name; |
+ALTER TABLE liberty_content_types ADD COLUMN content_name_plural VARCHAR(250); |
+{/code} |
+API| {div} |
+* Change content type hash references from content_description to content_name |
+* Change hash key content_description passed to LibertyContent::getTitle to content_name |
+* Better than changing content_description to content_name is to change hash references to __use the get methods__ of LibertyContent or LibertySystem with the content_type_guid {code} |
+ LibertyContent::getContentTypeName( plural_version:boolean ) |
+ LibertySystem::getContentTypeName( content_type_guid:string, plural_version:boolean ){/code}These return the singular by default when the optional 'plural_version' param is not set |
+* Change sql selects from liberty_content_type for content_description to content_name and add content_name_plural if desired |
+* Update registerContentType in class declarations - change content_description to content_name; you can also add content_name_plural to your class if you wish to add a unique plural of the name, otherwise a default one will be created from the singular by appending an 's' to the end. For example by default a content_name of 'Image' will have a plural of 'Images'. You'll want to set the plural value in cases where appending 's' doesnt not just work; for example words that end in 'y', like 'Gallery' you can specificy the plural as 'Galleries'. For those managing content such as wild animals, like 'Moose' with bitweaver, you would want to declare a plural that is same as the singular: Moose; otherwise bitweaver would create 'Mooses' for you.{/div} |
+|| |
+ |
+* Use of javascript functions in utils/javascript/bitweaver.js should now always be prefaced with the "BitBase." namespace, ala "BitBase.insertAt('foo')", also toggle & flip are replaced with toggleElementDisplay. See bitweaver.js deprecated functions for more. To find deprecated functions, you can run this bash script:{code source="bash" name="check_js.sh"}for func in addLoadHook setCookieArray getCookieArray setCookie getCookie deleteCookie flip toggle setupShowHide utf16to8 utf8to16 serialize unserialize genPass toggle_dynamic_var setSelectionRange setCaretToPos insertAt showById hideById flipMulti flipIcon setFlipIcon flipWithSign setFlipWithSign getElementValue setElementValue switchCheckboxes disableSubmit go popUpWin closeWin |
+do |
+ echo "CHECKING FOR FUNCTION $func" |
+ grep -r "$func[ ]*(" */templates/*tpl |grep -v BitBase |
+done{/code} |
* Logic files no longer should require the root 'bit_setup_inc.php' to start up bitweaver, but instead use a relative pathing mechanism to require_once( '../kernel/setup_inc.php' ); If you have your own code, you can update it with:{code source="bash"}find . -name "*.php" -exec perl -i -wpe 's/\.\.\/bit_setup_inc\.php/..\/kernel\/setup_inc.php/g' {} \;{/code}
|
|
! bitweaver ((ReleaseTwo)) Schema changes
|