3 require('includes/header.php');
5 $page_title = 'Edit ignored phrases';
6 $onload_javascript = 'focusId(\'ignore_list\'); init();';
8 if($_POST['form_sent'])
10 check_length($_POST['ignore_list'], 'ignore list', 0, 4000);
14 $update_ignore_list = $link->prepare('INSERT INTO ignore_lists (uid, ignored_phrases) VALUES (?, ?) ON DUPLICATE KEY UPDATE ignored_phrases = ?;');
15 $update_ignore_list->bind_param('sss', $_SESSION['UID'], $_POST['ignore_list'], $_POST['ignore_list']);
16 $update_ignore_list->execute();
17 $update_ignore_list->close();
19 $_SESSION['notice'] = 'Ignore list updated.';
20 if($_COOKIE['ostrich_mode'] != 1)
22 $_SESSION['notice'] .= ' You must <a href="/dashboard">enable ostrich mode</a> for this to have any effect.';
27 $ignored_phrases = $_POST['ignore_list'];
31 $fetch_ignore_list = $link->prepare('SELECT ignored_phrases FROM ignore_lists WHERE uid = ?');
32 $fetch_ignore_list->bind_param('s', $_COOKIE['UID']);
33 $fetch_ignore_list->execute();
34 $fetch_ignore_list->bind_result($ignored_phrases);
35 $fetch_ignore_list->fetch();
36 $fetch_ignore_list->close();
42 <p
>When ostrich mode is
<a href
="/dashboard">enabled
</a
>, any topic
or reply that contains a phrase on your ignore
list will be hidden
. Citations to hidden replies will be replaced with
"@hidden". Enter
one (case insensitive
) phrase per line
.</p
>
44 <form action
="" method
="post">
46 <textarea id
="ignore_list" name
="ignore_list" cols
="80" rows
="10"><?php
echo sanitize_for_textarea($ignored_phrases) ?
></textarea
>
50 <input type
="submit" name
="form_sent" value
="Update" />
57 require('includes/footer.php');