[wp-hackers] WP Developer Edition

Chris chris.hearn01 at ntlworld.com
Tue Apr 17 09:06:44 GMT 2007

I don't think there will be a problem -I should explain that my plugin 
is for a large sailing club web site.
The purpose of the plugin is:
a) To validate approx 500 member details on registration. Signing In 
activates site additional pages and facilities on the site that are 
"Member only". For example posts on "Member-only" pages can only be read 
when a member is signed in.

b) To show members detail of the year's sailing dates, duty rotas.
c) The plugin uses imported data on membership, sailing events, duty 
dates, which I keep in entirely separate tables.
The plugin generates a list (of about 120) sailing events thoughout the 
year. The plugin creates the posts and event calendar entries.
d) Members can see duty rotas for each sailing event, to check their 
duty dates, see the events for each week etc.. This is done via a custom 
theme page template and direct MySQL queries. There IS a linkage into 
the users table here, just to find the current user.
So the main linkage is to wp-posts table, and the Event Calendar plugin 
table ec3-schedule.

My plugin references these to add/delete the event list for the year. 
About 120 events. To display the duties I use a theme page template 
which looks up the member duties based on their login. and can display 
only the duties for that member, by month etc. But that is hadnled 
within the page template. There are about 800 "duties" in a year.

The plugin activates, simply look for the presence of these tables, and 
creates the tables if they dont exist.
I then currently imported the data using phpMyAdmin, (because that's 
easy for me at present) from csv table data created by the club.

For normal plugin activate/de-activate there is no impact - the data 
just sits in my tables, plus the wp-posts and ec3-schedule tables.
(When ec3 is de-activated it keeps the event table intact, so again no 

If there is a wp issue on upgrade, I have an admin page with plugin 
routines that read my tables and add all the posts and events to the 
calendar, and I also have a routine to remove all the events again. So I 
think worst case would be remove all the events, then wp upgrade, then 
run the plugin "create-sailing events" admin routine. This would only be 
necessary if the wp-post id's are affected by the upgrade, which I 
decided was unlikely.
I'm probably more dependent on the Event Calendar ec3-schedule plugin 
table structure.

If WP upgrade changes the _core_ structure I shall not upgrade!
But bear in mind that I am focused on a specific purpose, not a general 
purpose plugin - although I guess most plugins start life like this!

Hope that helps.

    Chris Hearn 
    *Tel:* 01625 827589 
    *Mob:* 07768 725141 
    *email:* chris.hearn01 at ntlworld.com 
    The information transmitted is intended only for the person or entity 
    to which it is addressed and may contain confidential and/or privileged 
    material. Any review, retransmission, dissemination or other use of, 
    or taking of any action in reliance upon, this information by persons 
    or entities other than the intended recipient is prohibited. 
    If you received this in error, please contact the sender and delete the 
    material from any computer. 

deko wrote:
>> It's work in progress at present, and has other functionality in too 
>> which i need to finish off, so needs tidying etc, but yes, then I 
>> will let you know, with pleasure.
> Thanks.  I'm interested in how you will manage your plug-in data when 
> WP is upgraded.  For example, when a user upgrades from 2.1.3 to 2.2 
> (deactivating your plug-in in the process), what happens to the data 
> in the plug-in specific table(s)?  I've read about the dbdelta 
> function (thanks Jamie) 
> http://codex.wordpress.org/Creating_Tables_with_Plugins but that 
> addresses upgrades to the plug-in table schema.  What happens when WP 
> is upgraded to a new db schema?  Will plug-in specicific table data be 
> persevered?  Or will the tables need to be exported and imported with 
> phpMyAdmin after the upgrade?  Or would you simply script that process?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list