Activities for Nov 16
B2Evolution Customization Notes
All customizations are prefaced by comments thus:
MDH_Custom begin... [explanation]
and end with comments thus:
MDH_Custom end... [explanation]
Files changed so far:
blogs/a_noskin.php
blogs/inc/MODEL/items/_item.class.php
blogs/inc/MODEL/items/_itemlist.class.php
blogs/inc/VIEW/items/_browse_posts_exp.inc.php
blogs/inc/VIEW/items/_item.form.php
blogs/skins/_atom/_main.php
blogs/skins/_rdf/_main.php
blogs/skins/_rss/_main.php
blogs/skins/_rss2/_main.php
blogs/skins/basic/_main.php
blogs/skins/bluesky/_main.php
blogs/skins/custom/_main.php
blogs/skins/guadeloupe/_main.php
blogs/skins/natural_pink/_main.php
blogs/skins/nifty_corners/_main.php
blogs/skins/originalb2/_main.php
blogs/skins/wpc_aubmach/_main.php
blogs/skins/wpc_default/_main.php
blogs/plugins/_quicktags.plugin.php
1. Adding new custom tag generators to the toolbar:
The toolbar is created by the _quicktags.plugin.php file in the plugins folder. Each button is created by a call to a script function. NOTE: It seems that the shortcut key assignments don't work as advertised (e.g. Alt + W), but with an additional Shift (Alt + Shift + W).
2. Adding a "Minutes worked" field to the db and to the post interface:
DB:
The evo_posts table contains the fields which store individual posts. An integer field has been added to that table:
post_minutes_worked int(11) UNSIGNED No 0
PHP MODEL:
The blogs/inc/MODEL/items/_item_class.php file contains the item class definition which interfaces with the db.
The blogs/inc/MODEL/items/_itemlist.class.php handles lists of items.
New variables, functions and codeblocks have been added to both of these files modelled on the handling of item_priority, which is also an unsigned int(11) field. The only slight difference is that when priority is displayed, it has to be converted to a string value representing what a particular priority setting means (there are five options); our minutes_worked field is simpler, because we can simply output a number.
PHP VIEW:
The blogs/inc/VIEW/_item.form.php file implements the interface to the item class, and provides the form elements on the page. This has been modified in several places to create the necessary form field and label, and re-populate it when editing an existing post.
The blogs/inc/VIEW/items/_browse_posts_exp.inc.php file implements post browsing. This has again been modified to display the minutes worked value in the post header.
PHP SKINS etc.:
The blogs/a_noskin.php file outputs a simple representation of a list of posts. This has been modified to show the value of minutes worked in post headers.
The blogs/skins/*/_main.php file is the main template for each particular skin. Again, a modification has been added in each case to include minutes worked in post display. Modifications vary considerably; some files are outputting XHTML for the Web, others XML syndication feeds.