Forum Replies Created
-
In reply to: Plugin Request: bbP ExportIn reply to: Plugin release – elf Akismet
Your code is very decent so keep writing
You have the status right.
WordPress finally has an admin menu generator? Good to hear.
Sadly I’ve lost touch with the WP codebase since 2.5 or so, I was getting really turned off by the bloat.
The problem is every website has different needs.
Some have only 10 visitors a day but the site operator wants every feature including the kitchen sink. They don’t care if it takes several seconds for their page to render as long a they have every fancy feature available and they can just use wp-super-cache to deal with the load.
But other sites have thousands of visitors a day and when a page takes too much cpu time or mysql time to render, then you multiply that by hundreds of simultaneous connections. Then you fail and your host kicks you off or you have to buy a bigger server.
WordPress started lean and mean, 1.5 was good, 2.0-2.1 was a great product. Then they started throwing in the kitchen sink. Then with every next release started breaking compatibility with every release, changing cookies, changing admin structure. 3.0 is a scary creature indeed.
There is no doubt in my mind that a bbPress plugin under WordPress is going to require 1 megabyte of code executing per instance with plugins in a realistic environment. The site operator with 10 visitors per day won’t care because they have every feature the could want in one package. The operator with an active, growing user based is going to have to constantly upgrade their server to handle the problem.
Active forums don’t deal well with caching, unlike blogs.
Blogs are write once, read many times.
Forums are write many times, read many times.
Different environment, different needs.
But performance should always be designed into software.
In reply to: Plugin release – elf AkismetVery nice! Welcome to the world of bbPress plugin authorship!
I see you jumped on my suggestion from the other day about trusted users.
Isn’t it crazy how it just takes 10 lines to do the actual process but 100 more for the admin menu? This is why I hate admin menus, lol.
Some performance pointers:
Scanning the table for the user post count is non-trivial (you can only use one index at a time in mysql and you are already using poster_id and post_status so there’s a scan somewhere). So once you know to trust the user (unless they are set to “never trust”) might as well save that in meta and let them by the next time without a scan.
Also, you don’t appear to be looking at the already trusted status being given to the filter. If
$trusted
is already set true, don’t even bother with the rest as it’s probably admin or mods.Here’s a feature idea:
instead of just counting post_status=0, why not gather the counts for all the status
$bbdb->get_results("SELECT post_status,count(*) as count FROM $bbdb->posts WHERE poster_id = $user_id GROUP BY post_status ORDER BY post_status");
Then you’ll know status 0, 1 and 2
2 should be empty, not even set for virtually any approved user.
If they have one, or more than one post status 2, then they should not be trusted.
Optionally they have a very high status 1 count in comparison to 0, something is up with that because it’s a bunch of deleted posts, so maybe not trust them either.
ps. another trick I use it to check if the user can ‘throttle’. If they can, they are already trusted in a sense because they are being allowed to post as fast as they want.
pps. Don’t forget you can also examine the membership age of the user, here’s a hint, it’s in user_registered
floor((time()-bb_gmtstrtotime( $user->user_registered ))/86400)
should be the age in days
paulhawke, there is nothing “clean” about wordpress design. The code may have been cleaned up over time, but the result after 5+ years is there is a ton of code.
But the critical part is it loads EVERYTHING, regardless of the task at hand, all functions, all options, all plugins. Only the admin area is excluded from the load. But even the admin functions in plugins are loaded because there is no api structure to load those portions only in admin. (I’ve attempted to address that last problem in some of my later plugins for bbPress).
Loading a bbPress page as a plugin for WordPress will require the same process, EVERYTHING has to load, but now it will be worse.
This is why caching is critical with WordPress or it gets slaughtered when there are many requests. As soon as bbPress 1.0 was retooled to use backpress, it inherited the same problems as WordPress.
bbPress as a plugin will have the same problems as with backpress, but now even more so as all the wordpress plugins are loaded. It’s deep integration regardless if the user wants it or not. You will not be able to use bbPress functions without all of WordPress loaded because it will be substituting for backpress.
It’s forced deep integration, easiest way to explain it, and that’s a very bad idea.
MT made me learn perl and practically got brain damage from it back in 2003.
Then MT pulled that nonsense in 2004 and I jumped ship like so many others.
In hindsight MT did me a huge favor.
Best wishes to vbulletin users, I hope we can come up with a smoother conversion method for them.
In reply to: Converting vBulletin to bbPressIf you have id 1 you can use my fix-admin-access plugin.
But any user id can be made keymaster.
Might not just be delayed email, might be blocked by any number of antispam devices by accident.
If you can, try an email address that would be served directly by the server itself – though I have found gmail is pretty darn smart about not blocking most emails (hotmail is the worst).
In reply to: How to fix links after increasing "Items per page"This could be handled with javascript and (unfortunately) a page reload.
PHP cannot see the hash because it’s not sent by the browser to the server.
But javascript can see it.
When the page loads, javascript could look at the hash and then see if an object with that id exists on the page. If not, it could do a proper request from the server via a plugin.
per your example:
http://www.domain.org/forum/topic.php?id=5579&page=8#post-56412
pseudo code:
if (window.location.hash
&& window.location.hash.substring(0,5)=="post-"
&& !document.getElementById(window.location.hash)) {
document.location="?post="+window.location.hash;
}Then on the server side a plugin would look for the post request and return the proper new url.
A little bit messy but would allow backwards compatibility if there are links out there which cannot be fixed, especially on other sites.
WordPress has the same problem with post and comment pagination as the pages constantly move. It’s a poor design.
In reply to: Whoa! (bbPress.org 2.0 is live)Hmm, my font-size increase trick is no longer working, someone changed the stylesheet.
The default font-size is ridiculously small.
Did someone seriously hard code the font-sizes into PX instead of percent or em?
Ah this will fix it in Stylish
* {font-size:98% !important;}
In reply to: Highlighting source codeThis has been done a few different ways for bbpress over the years, this plugin is the easiest to find but there are other ways:
Thanks for the feedback.
Good to hear they fixed it in 1.0 – it’s actually easy to fix by hacking the core, only two characters need to be changed that way!
(
>0
instead of=1
)In reply to: Modlook tagYes, I wrote the “Skip Akismet” plugin last year to do that.
https://bbpress.org/plugins/topic/skip-akismet/
It’s cross compatible with bbPress and WordPress, however they refused to accept it into the WordPress plugin repository and told me to submit it to the core (which I didn’t bother if they are going to be like that).
Later I discovered the akismet plugin itself already has a “trusted user” filter via
bb_is_trusted
so my method is overly complicated, but my plugin could in theory be modified to trust users who have X number of posts or pass a certain minimum membership age.This method however would be much cleaner:
add_filter( 'bb_is_trusted_user','more_trusted',10,2);
function more_trusted($trusted,$user_id) {
// bb_get_user here and determine if trusted, possibly cache result
return $trusted; // boolean true/false
}Feel free to develop that, let me know if you need help.
In reply to: really not sure bbpress is any goodAkismet accidentally marks regular posts as spam.
Some of your posts are getting auto spammed.
In reply to: Modlook tagYes
In reply to: Modlook tagYeah a bunch of users and posts are getting marked as spam.
This is an ongoing issue with akismet.
Chris and I have to clear the queue by hand every so often…
In reply to: Whoa! (bbPress.org 2.0 is live)Noel the fonts are small in Firefox but that may be because they don’t seem to scale for some reason when “large fonts” are enabled in Windows.
Like I pointed out, resetting the body to
font-size:100%;
seems to fix the whole problem for me.The overly large gravatars still takes some getting used to however, I’ve never seen a forum system with avatars over 100×100
In reply to: Whoa! (bbPress.org 2.0 is live)If the text is too small, just use the Stylish plugin for firefox and add this rule
body {font-size:100% !important;}
(or increase 100% as desired)
In reply to: Whoa! (bbPress.org 2.0 is live)Gautam, I would at least remove the bbpress header and bee graphic on yours.
In reply to: Whoa! (bbPress.org 2.0 is live)Chris the bbpress.org theme willl likely never be available since it’s not a GPL creation, Matt paid employees to have it made.
However there is a WPMimic theme for bbPress which makes it look very close to this since it simulates wordpress.org
For some reason I have the wrong screenshot of it but you can see it in action like this:
In reply to: User Wall Plugin…. from bbshowcaseAh, I forgot that one was still activated.
I’ve have several new plugins but they were made for a client that paid for them – I’d have to get permission to release them as GPL, it’s up to them.
ps. you found that one darn fast!
In reply to: Whoa! (bbPress.org 2.0 is live)Keep up the great work Noel, thanks!
We might be able to guilt/nag Matt into getting a proper Wiki installed here once he gets WordPress 3 out the door (but then there will be 3.0.1 and 3.0.2 the week after, so maybe 2 weeks then, lol)
In reply to: Need a copy of the following themesSince I’ve reactivated bbShowcase you can probably nab a few missing ones there:
http://bbshowcase.org/forums/view/available-themes
I will release a plugin this summer that allows bbPress 0.9 to use many bbPress 1.x themes.
By the way, Futurekind will never be released, it’s proprietary that I made specifically for bbshowcase.
In reply to: Is it just me or does the plugin search suck?Until I have time to write something better, you are welcome to use the single page plugin list I have on bbShowcase:
http://bbshowcase.org/forums/view/available-plugins
(just use control+F and search away)
In reply to: new website doesn't work properlyOh and the font-size on the forum can be fixed by adding this to the end of the stylesheet.
body {font-size:100% !important;}
Everything scales because of the CSS reset and tests well in stylish for me as I can now read everything without squinting.