Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: usebb/UseBB
base: 2bd4b23
...
head fork: usebb/UseBB
compare: 3e770d4
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 102 additions and 1 deletion.
  1. +2 −1  Changelog.txt
  2. +100 −0 sources/modules/sfs_request.php
View
3  Changelog.txt
@@ -2,7 +2,8 @@ UseBB 1.0.14 Changelog
------------------------------
- Added Google Analytics tracking code support (#93).
-- Breadcrumbs are now made with array -- can use different subsets in templates.
+- Added Stop Forum Spam API request ACP module (#91).
+- Breadcrumbs are now made with array -- can use different subsets in templates (#92).
- Allow global template variable to be unescaped through js_ prefix (for JS snippets).
UseBB 1.0.13 Changelog
View
100 sources/modules/sfs_request.php
@@ -0,0 +1,100 @@
+<?php
+
+/*
+ Copyright (C) 2003-2011 UseBB Team
+ http://www.usebb.net
+
+ This file is part of UseBB.
+
+ UseBB is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ UseBB is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with UseBB; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+/**
+ * Stop Forum Spam API request
+ *
+ * @author UseBB Team
+ * @link http://www.usebb.net
+ * @license GPL-2
+ * @copyright Copyright (C) 2003-2011 UseBB Team
+ * @package UseBB
+ */
+
+$usebb_module_info = array(
+ 'short_name' => 'sfs_request',
+ 'long_name' => 'SFS Request',
+ 'acp_category' => 'security',
+);
+
+if ( defined('RUN_MODULE') ) {
+
+ class usebb_module {
+
+ function do_request($email, &$content) {
+
+ global $functions;
+
+ $result = $functions->sfs_api_request($email);
+
+ $content .= '<h2>Result</h2>';
+
+ if ( $result === false ) {
+
+ $content .= '<p>No results found for '.unhtml($email).'.</p>';
+
+ return;
+
+ }
+
+ $content .= '<p><strong>'.unhtml($email).' is present in the database!</strong></p>';
+
+ $more = array();
+
+ if ( isset($result['frequency']) )
+ $more[] = 'Frequency: '.$result['frequency'];
+
+ if ( isset($result['lastseen']) )
+ $more[] = 'Last seen: '.$functions->make_date($result['lastseen'], "Y-m-d h:i:s a");
+
+ if ( count($more) )
+ $content .= '<ul><li>'.implode('</li><li>', $more).'</li></ul>';
+
+ }
+
+ function run_module() {
+
+ global $functions, $template;
+
+ $content = '<p>With this module you can look for an email address in <a href="http://www.stopforumspam.com/">Stop Forum Spam</a>\'s database.</p>';
+
+ if ( !empty($_POST['email']) && preg_match(EMAIL_PREG, $_POST['email']) )
+ $this->do_request($_POST['email'], $content);
+
+ $content .= '<h2>New request</h2>'
+ .'<form action="'.$functions->make_url('admin.php', array('act' => 'mod_sfs_request')).'" method="post">'
+ .'<p>Enter an email address to test: <input type="text" name="email" id="email" size="30" /></p>'
+ .'<p class="submit"><input type="submit" value="Make request" /></p>'
+ .'</form>';
+ $template->set_js_onload("set_focus('email')");
+
+ return $content;
+
+ }
+ }
+
+ $usebb_module = new usebb_module;
+
+}
+
+?>

No commit comments for this range

Something went wrong with that request. Please try again.