function getThemeUri($uri) { if ($this->isWebkit) { $theme_uri = bb_get_plugin_uri('user#bbtouch/bbtouch.php') . '/template/'; return $theme_uri; } else { return $uri; } }
*/ /** * @package Easy Mentions * @subpackage Main Section * @author Gautam Gupta (www.gaut.am) * @link http://gaut.am/bbpress/plugins/easy-mentions/ * @license GNU General Public License version 3 (GPLv3): http://www.opensource.org/licenses/gpl-3.0.html */ bb_load_plugin_textdomain('easy-mentions', dirname(__FILE__) . '/languages'); /* Create Text Domain For Translations */ /* Defines */ define('EM_VER', '0.2'); /* Version */ define('EM_OPTIONS', 'Easy-Mentions'); /* Option Name */ define('EM_PLUGPATH', bb_get_plugin_uri(bb_plugin_basename(__FILE__))); /* Plugin URL */ /* Get the options, if not found then set them */ $em_plugopts = bb_get_option(EM_OPTIONS); if (!is_array($em_plugopts)) { $em_plugopts = array('link-tags' => 1, 'link-users' => 1, 'link-user-to' => 'profile', 'reply-link' => 0, 'reply-text' => "<em>Replying to @%%USERNAME%%\\'s <a href=\"%%POSTLINK%%\">post</a>:</em>"); bb_update_option(EM_OPTIONS, $em_plugopts); } if ($em_plugopts['link-to']) { /* Update the old options, will be removed in v0.4 */ unset($em_plugopts['link-to']); $em_plugopts['link-users'] = 1; $em_plugopts['link-tags'] = 1; $em_plugopts['link-user-to'] = $em_plugopts['link-to'] == 'website' ? 'website' : 'profile'; bb_update_option(EM_OPTIONS, $em_plugopts); }
function nospamuser_block($type, $data, $noway) { $settings = bb_get_option('nospamuser-settings'); bb_update_option('nospamuser-blocks', bb_get_option('nospamuser-blocks') + 1); $types = array('email' => __('email address', 'nospamuser'), 'ip' => __('IP address', 'nospamuser'), 'username' => __('username', 'nospamuser')); if ($noway) { bb_die(sprintf(__('Your %1$s (%2$s) is listed in <a href="%3$s">Stop Forum Spam</a>\'s database. You have been automatically blocked. If you are not a spammer, you may <a href="http://www.stopforumspam.com/removal">appeal this listing</a>.', 'nospamuser'), $types[$type], $data, 'http://www.stopforumspam.com/' . ($type == 'ip' ? 'ipcheck/' : 'search?q=') . $data), 'Registration forbidden', 403); } if (!isset($_COOKIE['nospamuser_override']) || !bb_verify_nonce($_COOKIE['nospamuser_override'], 'nospamuser-override-' . $_SERVER['REMOTE_ADDR'])) { if (!function_exists('recaptcha_check_answer')) { // Compatibility with anything else that uses reCAPTCHA require_once dirname(__FILE__) . '/recaptchalib.php'; } bb_die(sprintf(__('Your %1$s (%2$s) is listed in <a href="%3$s">Stop Forum Spam</a>\'s database. You have been automatically blocked. If you are not a spammer, you may <a href="http://www.stopforumspam.com/removal">appeal this listing</a> or solve the CAPTCHA below.', 'nospamuser'), $types[$type], $data, 'http://www.stopforumspam.com/' . ($type == 'ip' ? 'ipcheck/' : 'search?q=') . $data) . '<form method="post" action="' . bb_get_plugin_uri(bb_plugin_basename(__FILE__)) . '/bb-nospamuser.php"><script type="text/javascript">var RecaptchaOptions={theme:\'clean\'}</script>' . recaptcha_get_html($settings['recaptcha_pub']) . '<br/><input type="submit" value="' . esc_attr__('Submit', 'nospamuser') . '"/></form>', 'Registration forbidden', 401); } }