Just curious, both in terms of registration, and posting…
I only have a small test forum up, that is integrated with my personal blog, but I was experimenting with a few ideas earlier. I go by the philosophy that layers of protection is always the way to go.
So far I’ve implemented:
1.) Visual check, pre reg form (eg. select the hamster image)
2.) Blacklisting popular spam email domains (eg. mail.ru)
3.) Hidden field trap (no javascript, just css)
4.) Maths puzzle question
5.) TanTan Spam Filter port
6.) Askimet (obviously!)
The first 4 are aimed at blocking spam bot registrations, and the final 2 at keeping posts clean. All the registration checks are core hacks (as I’m only experimenting).
Any other techniques being used successfully to ward off spammers from bbpress? Maybe something like implementing ‘Bad Behavior’ filtering for the registration process for example?
PS. Happy New Year to all!
Using latest trunk code, but bb_head works fine in combo with add_action here.
Hmmm still not working. Something’s strange because even this doesn’t show:
<?php
/*
Plugin Name: test stuff
*/
add_action('bb_head', 'my_add_test_tag');
function my_add_test_tag() {
echo '<!-- testing here -->';
}
?>
I’ve tried activating/deactivating these plugins, and I’ve tried 2 browsers to ensure it’s not cache I’m seeing. Grr.
I’ve recently enabled the hard cache, to see how it handles on a test forum with only a few users. The first problem I’ve come across has been an error with $bb_cache->get_forums() – the array it was returning when cached was 0, instead of containing the forum ids.
I fixed it by a simple reversal of the sections of code within the get_forums() function in cache.php:
$forums = (array) $bbdb->get_results("SELECT * FROM $bbdb->forums $where ORDER BY forum_order");
if ( $this->use_cache && $normal && $forums )
$this->write_cache(BBPATH . 'bb-cache/bb_forums', $forums);
$_forums = array();
foreach ( $forums as $forum )
$_forums[(int) $forum->forum_id] = $bb_forum_cache[(int) $forum->forum_id] = $forum;
After reversing them (the above are their original positions), I then made sure the write cache line was using $_forums, instead of $forums.
No idea if this may have other consequences I’ve yet to unearth, but I thought it may be worth noting here.
I’ve also used the “load all options” function from wordpress as a basis for creating a global array containing all topicmeta options. By default (even with cache enabled, although maybe I’ve missed a setting), there were several calls to to topicmeta, whereas only one was really required.
How can I set the number of Latest Discussions list on the front page only, separately from the listings on the individual forum pages?
For example, I want to list 5 items on the front page, but 10 on the forum pages.
Thanks!
Although “redir” indicated mod_rewrite working. But, that doesn’t seem to be working on “http://www.make2for1.com/forum/general” testing, or it would output similar result like “http://make2for1.com/forum.php?id=1” did.
No idea why “RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]” didn’t match on your forums.
What was the file path of 404 in web server’s log (using rewrite rules), when accessed “http://www.make2for1.com/forum/general”?
livibetter: You are right. I reversed the modifications after testing. They are in place now. A side note, if the directory ‘youcantfindme’ does not exist then http://make2for1.com/redir returns:
“Error 404 – Not found
Your browser can’t find the document corresponding to the URL you typed in.”
And shows http://make2for1.com/youcantfindme in the address field of the browser. If I create the directory ‘youcantfindme’ and put an index file in there then http://make2for1.com/redir does indeed show the index file and the address changes to http://make2for1.com/youcantfindme.
The debug test shows the following:
—-
http://make2for1.com/forum.php?id=1
REQUEST_URI: string(15) “/forum.php?id=1”
should be: string(14) “/forum/general”
full permalink: string(38) “http://www.make2for1.com/forum/general”
PATH_INFO: string(10) “/forum.php”
http://www.make2for1.com/forum/general
Error 404 – Not found
Your browser can’t find the document corresponding to the URL you typed in.
[That was with the RewriteRule redir youcantfindme [R=301,L] .htaccess]
http://www.make2for1.com/forum/general
[with the actual .htaccess generated with http://make2for1.com/bb-admin/rewrite-rules.php%5D
also
Error 404 – Not found
Your browser can’t find the document corresponding to the URL you typed in.
—-
I have returned the .htaccess back to
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule redir youcantfindme [R=301,L]
</IfModule>
so you can see the http://make2for1.com/redir work
If anyone wants to play with this, I’ll happily setup an ftp account. Email juggler@gmail.com
I have left the changes in place.
Thanks.
Doug
(edit: How did you know it was working? I didn’t notice your 404 doesn’t give the url information. Please use the following code for testing
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule redir youcantfindme [R=301,L]
</IfModule>
This time please check the browser’s address, and make sure you read http://make2for1.com/youcantfindme. If you do read that, please continue to the following testing.)
Please place $bb->debug = 1; to your config.php
Add exit; right after bb_repermalink(); in forum.php like
<?php
require_once('./bb-load.php');
$forum_id = 0;
bb_repermalink();
exit;
Then navigate to http://make2for1.com/forum.php?id=1 and http://www.make2for1.com/forum/general, once you done, post the result and DO NOT REMOVE this modification (allow us to check it).
Performed livibetter’s test. mod_rewrite undeniable works.
Yes i’ve changed it back now and its all working fine just completed the install.
Only thing now is that i can’t seem to post or read the test posts that are already there.
It’s saying :
The requested URL /home/bbpress/topic/1 was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
When i click on: your first topic
Or when i try to post a new topic
Any ideas ?
Correction I can post topics I just can’t view any. But it does show the new topics I’ve made. But doesn’t let me view them ?
http://the3rdplace.co.uk/home/bbpress/
Could you test your mod_rewrite is really working on http://make2for1.com/
Please add the following to the top of .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule redir youcantfindme
</IfModule>
Use browser and navigate to http://make2for1.com/redir
If you read /youcantfindme was not found, then mod_rewrite does work.
This is a common problem with the latest release, especially on GoDaddy (and Dreamhost too, I think.) Anyway, the problem you’re describing has been fixed in the trunk releases but not in the public release. The best thing to do would be to download a later revision like r971 or r980. See these posts from sambauers:
https://bbpress.org/forums/topic/intergration-will-not-let-me-logon-using-my-wordpress-login?replies=30#post-12803
https://bbpress.org/forums/topic/broken-profiles-for-users-with-spaces-in-the-names?replies=5#post-12769
Here is the page where you can download r971 (probably your best bet):
https://trac.bbpress.org/browser/trunk?rev=971
As I’ve written elsewhere, I’ve gotten everything up and running with trunk. As it might not be compatible with the release of WordPress I’m using (2.3.1), I’m wondering when a release of bbPress that fixes these problems and is compatible with WP 2.3.1 (or with the then latest available release of WP) will be available?
@chrishajer
I’m not sure that’s the right advice. The latest development versions will definitely break integration as they are geared towards integration with the current WordPress trunk. There are lots of differences in password hashing and cookie storage.
Revision [971] might be OK to use for this specific problem, but I can’t guarantee it. And it won’t fix socket connection under MySQLi.
It is fixed in the latest development version, I believe. There just hasn’t been a release that includes that functionality.
https://bbpress.org/forums/topic/db-access-problem-in-the-first-installation-step?replies=26#post-12711
I remember there is a post about this. Anyway, I made one.
Put this in plugin folder: http://bbpress.pastebin.com/f271761bf , use any filename you like
And this to register-success.php of template:
<?php
global $STP_password;
if ($STP_password)
echo "<p>Your password is: $STP_password</p>";
?>
Activate plugin and test.
I have no problems on my test forum.
When you see that error, right click, view source, then paste that source here.
When using a socket, you need something like this:
https://bbpress.org/forums/topic/cannot-select-db-error?replies=11#post-12434
It’s OK to start a new topic as well. All these recent topics dredging up old problems that are sort of close make it hard to solve the latest problem, your problem. A lot of the earlier advice in this thread doesn’t apply to your specific problem.
I was testing your temp fix Livibetter, and I was running into this error:
XML Parsing Error: no element found
Location: http://localhost/wrdp2/bbp1/rss.php?forum=1
Line Number 12, Column 1:
Line 12 of rss.php reads: <link><?php bb_option( ‘uri’ ); ?></link>
The very latest trunk [988] is a little unstable.
You are better off with [980] the zip download of [980] can be found at the bottom of the following page:
https://trac.bbpress.org/browser/trunk?rev=980
I hope there’s a new release soon as well, but it doesn’t look like a date has been set yet?
https://trac.bbpress.org/milestone/0.8.4%20%26%20Pings
raygene: you can always download the latest development release which generally has all the discussed patches applied:
https://trac.bbpress.org/changeset/988/trunk?old_path=%2F&format=zip
There is always a link to the zip archive at the bottom of the trac browser.
https://trac.bbpress.org/browser/trunk
Exactly what I wanted. I was under the impression that this was already doable, I first got the idea that it could already be done from 9rules.com. I was viewing the notes section, where it pulls all the latest topics from all the forums, the feed only shows the topics and not the comments within. Oddly enough, the individual forums themselves show the topic as well as comments within the topics.
Granted that what I’m looking for is in the trac you provided, but I’m still wondering how 9rules managed to get the front part working to only show the topic and not the replies within, and could this not be applied within forum feeds?
I did some digging around and found that the 9rule feed is just basically the latest discussion feed, unfortunately mine is still pulling replies within topics. I’m not interested in only being able to do that as it basically gimps what I’m trying to do, but I was curious why mine pulls replies into the feed. Thanks again.
Amazing work, however I haven’t tested this on a live server yet, so probable use based on speed is still up in the air. Thanks a lot for putting this together Livibetter.