Opened 19 years ago
Closed 18 years ago
#14 closed enhancement (fixed)
support for status changes without AJAX support (regular http post)
| Reported by: | _ck_ | Owned by: | so1o |
|---|---|---|---|
| Priority: | normal | Component: | support-forum |
| Keywords: | Cc: |
Description
Here's some code I inserted to allow non-javascript users or topics pages loaded without scripts to still allow Support Forum to work.
around line 75 I put:
add_action('bb_init', array(&$support_forum, 'setTopicStatusProcess'));
Then after the function AJAX_setTopicStatusProcess, I added this new routine based on your other functions:
function setTopicStatusProcess() {
if (isset($_POST['action']) && $_POST['action']=="support_forum_post_process") {
global $topic;
$topic_id = (integer) @$_POST['id'];
$resolved = @$_POST['resolved'];
if ($this->getChangeableStatus($topic_id)) {
$topic = get_topic($topic_id);
if ($topic) {
$this->setTopicStatus($topic_id, $resolved);
}
}
}
}
I don't know if the two will peacefully co-exist and there may be other issues I haven't considered but it seems to work. Post data could be removed with a wp_redirect but I don't like to reload bbpress more it has to.
Note:
See TracTickets
for help on using tickets.

AJAX status switching is removed from support-forum as of 3.0.2
Now using very similar function to the above instead.
props _ck_