Project

General

Profile

Actions

Feature #3189

closed

Feature #3177: Upgrade bbPress to 2.x

Migrate forum attachments to bbPress 2.x / GD attachments

Added by Boone Gorges over 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Group Files
Target version:
Start date:
2014-05-02
Due date:
% Done:

0%

Estimated time:
15.00 h
Deployment actions:

Description

Our current bbPress (1.x) implementation uses the following homegrown plugin to store forum post attachments: http://wordpress.org/plugins/forum-attachments-for-buddypress/ As part of the migration to bbPress 2.x, we'll need to migrate this content. Brief outline of the approach:

- Reverse engineer how the GD plugin stores attachments
- Ensure that our bbPress 1.x-2.x migration keeps track of old post IDs, so we have the necessary data to do the migration (Ray, maybe you know off the top of your head whether this is the case)?
- Write a script to do the necessary migration. This will involve both moving the files themselves (from the current bb-attachments directory), as well as recording the attachment metadata. Hopefully the GD plugin has good API-level functions we can use
- Ideally, we'll maintain backward compatibility with permalinks. Old attachment URLs look like this: commons.gc.cuny.edu/wp-content/plugins/forum-attachments-for-buddypress/download.php?filenum=2948. Probably the simplest idea is to rewrite that download.php script so that it looks up old file attachment 2948 and then redirects to the proper URL. To make it a bit prettier and more portable, I could couple it with a .htaccess rewrite rule that would direct these download.php requests to a handler that doesn't depend on the old plugin file being there, and then do the redirect. Note that this technique will require keeping track somewhere (postmeta?) of the old "filenum" data.

Actions

Also available in: Atom PDF