=================================================================================== 2015-09-04: Change WYSIWIG editor to new dialog system. Make sure your page view stastics table has proper ENUM-value available. Either alter page view table and accept a view minute downtime or create an seconday pageview table and copy data stepwise. Alter: ALTER TABLE wbpageview MODIFY COLUMN namespace ENUM('site','ajax_content','ajax_call','ajax_xinhadialog', 'ajax_wxmldialog'); This will block the pageview table for a few minutes, e.g. 5 Minutes for 10 million records in wbpageview. During this time the Statistic features will be blocked - browsers may run into timeouts, the web-server will may run into process limt etc. Alternatively create a new pageview-table, rename the old one and use the new one instead. This woll block the database for a very short time (less then a second). CREATE TABLE `wbpageview` ( uid INT(11) NOT NULL DEFAULT 0 , trackid CHAR(32) NOT NULL DEFAULT '' , addr VARCHAR(32) NOT NULL DEFAULT '' , namespace enum('site', 'ajax_content', 'ajax_call', 'ajax_xinhadialog', 'ajax_wxmldialog') NOT NULL DEFAULT 'site' , counter int(11) NOT NULL DEFAULT 0 , elapsedstart int(11) NOT NULL DEFAULT 0 , elapsedlast int(11) NOT NULL DEFAULT 0 , path VARCHAR(256) NOT NULL DEFAULT '' , created DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00' , hint enum('default','ignore','attack', 'spider') NOT NULL default 'default' , KEY uidx (uid) , KEY (trackid) , KEY pathidx (path) , KEY createdidx (created) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='List if page views'; ALTER TABLE wbpageview RENAME wbpageviewold; ALTER TABLE wbpageviewnew RENAME wbpageview; Afterwards, slowly import records from the old table. There is an index on "created", hence you can copy the records per day or month. This way you'll only have a limited number of records per insert-statement, so the table will be blocked for a short time only. Show the number of records per month SELECT date_format(created, '%Y-%m') AS month, count(*) AS cnt FROM wbpageviewold GROUP BY month; Then for every month until now do: INSERT INTO wbpageview SELECT * FROM wbpageviewold WHERE created BETWEEN "2010-01-01" AND "2010-02-01"; INSERT INTO wbpageview SELECT * FROM wbpageviewold WHERE created BETWEEN "2010-02-01" AND "2010-03-01"; ... =================================================================================== 2012-02-28: Improve Statistic feature. Make sure you have the following columns in your stastics tables. ----------8<----------8<----------8<----------8<----------8<----------8<---------- ALTER TABLE wbpageview ADD COLUMN trackid CHAR(32) NOT NULL DEFAULT ''; ALTER TABLE wbsessionview ADD COLUMN trackid CHAR(32) NOT NULL DEFAULT ''; ALTER TABLE wbsessionview ADD COLUMN preferedlang CHAR(6) NOT NULL DEFAULT ''; ALTER TABLE wbsessionview ADD COLUMN browser VARCHAR(256) NOT NULL DEFAULT ''; ALTER TABLE wbsessionview ADD COLUMN platform VARCHAR(256) NOT NULL DEFAULT ''; ALTER TABLE wbsessionview ADD COLUMN majorversion INT(11) NOT NULL DEFAULT 0; ALTER TABLE wbsessionview ADD COLUMN minorversion INT(11) NOT NULL DEFAULT 0; ALTER TABLE wbvfsfileview ADD COLUMN trackid CHAR(32) NOT NULL DEFAULT ''; ALTER TABLE wbvfsfileview ADD COLUMN hint enum('default','ignore','attack', 'spider') NOT NULL default 'default'; ----------8<----------8<----------8<----------8<----------8<----------8<---------- See doc/table.sql =================================================================================== 2010-09-16: Blog Features IMPORTANT: Add "published" culumn to "blog" table ALTER TABLE wbblog ADD COLUMN `published` tinyint(1) NOT NULL default '1' AFTER body; Draft Feature ============= The draft feature allows the editor to decide whether to save a blog-entry as draft or published one. To use this feature add a suitable control to "etc/blog/edit.xml" e.g. ---------8<---------8<---------8<---------8<---------8<---------8<--------- RadioGroup Publish Do you want to display this article field 1 yes 0 1 ---------8<---------8<---------8<---------8<---------8<---------8<--------- Also make sure this element finds a place in your edit-template file, see "template/Blog/edit.tmpl" As mentioned, this feature is optional. So, if you don't want to support draft, just, leave the form element away and new records will automatically set to "published" (according the table's default value). Time Controled Publishing ========================= It is possible to save ("published") blog-records with future created timestamp. The Blog-component makes sure, that it won't display future records. Using this feature, you are able to schedule blog records for publishing, e.g. place an article "Happy New Year 2011" witch created=2011-01-01 00:00:00" and it will automatically pop up on January 1st. To use this feature, add Date control to "etc/blog/edit.xml" e.g. ---------8<---------8<---------8<---------8<---------8<---------8<--------- Date Date Date and time to publish blog record field yes Y-m-d H:i:s now -1 year +3 year ---------8<---------8<---------8<---------8<---------8<---------8<--------- Again, make sure that element "created" is in your template, as well, see: "template/Blog/edit.tmpl". This feature is optional, too. Wombat is capable to auto-fill the "created" column. To do so, just add the created tag to the blog's table definition in "etc/table.xml". (This file contains plenty examples how to use auto "created" and "changed" columns). Blog Categories =============== Well, using categories for blog-entries is quite an old feature, implemented in the early days of Wombat1 :-) This feature got somewhat lost, still, tables were prepared for categories and such. Current verion of Blog-component provide category support - it is possible to display blog-entries of any number of categories, using the configuration parameter "category". In order to set/change a blog entry's category, add element "catid" to your "etc/blog/edit.xml". As the example shows, the attribute-source Table is used to load allowed records from the "blogcategory" table. ---------8<---------8<---------8<---------8<---------8<---------8<--------- Enum Category Blog's record category field 0 0 values Table blogcategory
%s - %s (%s) title brief catid
---------8<---------8<---------8<---------8<---------8<---------8<--------- As always, add this form element to the template file, see: "template/Blog/edit.tmpl". If you don't need categories, just leave away the element "catid". Don't be afraid of future requirements of your blog, you can add category support any time you want. To add and edit the categories, use the TableEditor component.