Many bloggers ooed and awed about new microcontent types. But, YIKES, all users upload to same images folder when using the microcontent upload file forms. Here's what I did to stop that. Sledgehammer solution, no doubt.
Edit mc-renderers.php to disable the media upload functions(all user images were dumping into the same images folder in wp-inst directory and I uploaded one mp3 file as a test and still can't find it). Users can simply upload to their file directory using the post/page upload until/if I figure out something else.
changed this :
$result = $this->displayData($dataValue);
$result .= '<input type="file" name="sb_action_upload_file_name'. $this->_encodeFieldName($contentPath) .
'" value="Choose File" size="35"/>
';
$result .= '<input type="submit" name="sb_action_upload_file' . $this->_encodeFieldName($contentPath) .
'" value="Upload '.ucfirst($this->fileType).'"/>';
$result .= ' or enter URL: <input type="text" size="11" id="image-upload-data" name="' . $this->_encodeFieldName($contentPath) . '" value="' . $dataValue . '"/>';
return $result;
into this:
$result = $this->displayData($dataValue);
$result .= '<input type="submit" name="sb_action_upload_file' . $this->_encodeFieldName($contentPath) .
'" value="Enter URL to '.ucfirst($this->fileType).'"/>';
$result .= ' : <input type="text" size="11" id="image-upload-data" name="' . $this->_encodeFieldName($contentPath) . '" value="' . $dataValue . '"/>';
return $result;
Edit sb-options.php next to disable uploads:
deleted this:
</fieldset>
<fieldset class="options">
<legend><?php _e('File Upload Locations'); ?></legend>
Some Structured Blogging post types allow you to upload files and images to be included in the post. For this to work you must provide
a directory where the files can be uploaded and the URL location where that directory is accessible via the web.
<table width="100%" cellspacing="2" cellpadding="5" class="editform">
<tr valign="top">
<td><?php _e('File Upload Directory'); ?>:</td>
<td><input name="sb-file-upload-directory" type="text" id="sb-file-upload-directory" value="<?php form_option('sb-file-upload-directory'); ?>" size="20" /></td>
</tr>
<tr valign="top">
<td><?php _e('URL of Upload Location'); ?>:</td>
<td><input name="sb-file-upload-url" type="text" id="sb-file-upload-directory" value="<?php form_option('sb-file-upload-url'); ?>" size="20" /></td>
</td>
</tr>
</table>
All's well till the next hack.
D Sader