Changeset 1030
- Timestamp:
- 05/01/08 04:07:55 (7 months ago)
- Files:
-
- bb-attachments/trunk/bb-attachments.php (modified) (2 diffs)
- bb-attachments/trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bb-attachments/trunk/bb-attachments.php
r1021 r1030 6 6 Author: _ck_ 7 7 Author URI: http://bbShowcase.org 8 Version: 0.0. 88 Version: 0.0.9 9 9 10 10 License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/ … … 86 86 if ($bb_attachments['title']) {add_filter('topic_title', 'bb_attachments_title',200);} 87 87 } 88 add_action('post_edit_form','bb_attachments'); // auto-insert on post edit form 88 89 89 90 } 90 91 91 92 function bb_attachments($post_id=0) { 93 global $bb_attachments_on_page; 94 if (isset($bb_attachments_on_page)) {return;} else {$bb_attachments_on_page=true;} // only insert once per page -> pre 0.9.0.2 95 92 96 if ($post_id==0) {if (isset($_GET['bb_attachments'])) {$post_id=intval($_GET['bb_attachments']);} else {global $bb_post; $post_id=$bb_post->post_id;}} 93 97 if ($post_id) { bb-attachments/trunk/readme.txt
r1014 r1030 20 20 * make a directory `/bb-attachments/` ABOVE your webroot ie.`/home/username/bb-attachments/` 21 21 * `chmod 777` the above `/bb-attachments/` directory 22 * edit `edit-post.php` and below `<?php edit_form(); ?>` put `<?php if (function_exists('bb_attachments')) {bb_attachments();} ?>`22 * (skip this step if your bbPress is 0.9.0.2 or newer) edit `edit-post.php` and below `<?php edit_form(); ?>` put `<?php if (function_exists('bb_attachments')) {bb_attachments();} ?>` 23 23 * install plugin in it's own bb-attachments directory in `my-plugins` then activate plugin 24 24 * there are some optional settings you can adjust in `bb-attachments.php` … … 49 49 * 0.0.6 advanced restrictions by file type & user role, upload form displays allowed file types 50 50 * 0.0.7 one more mime option for windows/no-shell-access users 51 * 0.0.9 no longer necessary to edit `edit-post.php` template if using 0.9.0.2 or newer 51 52 52 53 == To Do ==
