Forum Replies Created
-
In reply to: Getting forum page number
Oh that’s a simple bug, I forgot the quotes around the time:
$query="SELECT count(topic_id) as position FROM $bbdb->topics WHERE forum_id=$forum_id and topic_time<='$topic->topic_time' ORDER BY topic_time DESC";
$position = $bbdb->get_var($query);In reply to: Trac linking in the support forumUm, no you missed my point. I didn’t enter an htmlentity,
I simply entered the ampersand symbol. bbPress converts it to an htmlentity
and then your plugin converts it to a trac code.
only way now to get a real & is to enter
&
or put it in backticks&
&
&&
&# & & &38;In reply to: Trac linking in the support forumThere’s is still a problem with htmlentities, you either call your filter too soon or too late after bbPress does it’s autop, etc.
demo of bug:
WordPress & bbPress
(the and symbol is converted into an htmlentitiy, then your plugin sees the # and makes it a link) Broken all over bbpress.org
You could make sure the pattern doesn’t end with a semicolon or maybe set priority 9.
In reply to: bbpress is slow like godaddy says?Maybe they gave the topic link to GoDaddy?
I wouldn’t mind having company techs getting the proper info from here to solve the problem.
There’s a huge amount of competition out there and a good customer service attitude might prevent a bad reputation. Now if they can actually solve the issue, I’ll be impressed.
However Vannak needs to do their part too
and fix the bb-config.php option I mentioned.
In reply to: Getting forum page numberThat’s because
get_var
only gets one item – the first and only.You want
get_results
which returns an array.Actually, even better in this case would be
get_col
which should return a flat array.Another trick to use on that query is possibly to include the topic_time as the end in the WHERE clause so that it doesn’t bother to pull up 10,000 topic id’s if the topic you are looking for is in the first 100
global $topic;
$query="SELECT topic_id FROM $bbdb->topics WHERE forum_id=$forum_id and topic_time<=$topic->topic_time ORDER BY topic_time DESC";
$topic_array = $bbdb->get_col($query);We could take a huge shortcut and a bit of a gamble that no other topic has the same exact topic_time as this one and simply get the position via count, assuming it’s the very last one. Occasionally you might be a page short, or a page too many.
global $topic;
$query="SELECT count(topic_id) as position FROM $bbdb->topics WHERE forum_id=$forum_id and topic_time<=$topic->topic_time ORDER BY topic_time DESC";
$position = $bbdb->get_var($query);Then you divide position by topics per page and you have the page it’s on.
$page=ceil($position/bb_get_option('page_topics'));
$link=get_topic_link(0,$page);In reply to: Login using Facebook ConnectSpeaking of OpenID I need more testers on the OpenID prototype to give me feedback. It works with both 0.9 and 1.0
In reply to: bbPress Facebook pageFor those that haven’t been around awhile, code development on bbPress tends to happen in bursts. There will be little or nothing or just trivial bug fixes for a few months and then BAM, Michael and Sam will post a whole bunch more code.
Just because you don’t get feedback on a problem from a developer doesn’t mean they don’t think it’s important, it just means they can’t make it a priority right now for some reason or another. Everyone would love bbPress to have every feature and every feature work amazingly but there simply aren’t enough people or hours available to make it happen. Every feature one person insists is absolutely critical is quite trivial to another person.
Last but not least, be careful what you wish for. If bbPress had all the features like the more mature WordPress does, it would also share the same number of problems, backward incompatibilities and constant changes. If they did to bbPress what just happened in WordPress between versions 2.3 and 2.7, I would not be making plugins for it anymore (because they all would be broken). Since bbPress takes a slower path, it tends to get things more “right” the first time around.
I think 2009 holds big things for bbPress.
Someone new to bbPress a year from now might wonder what some early adopters were complaining about.
In reply to: Login using Facebook ConnectFacebook just needs to offer OpenID like everyone else, not yet another proprietary standard.
The OpenID plugin for bbPress is nearly finished, I have an early working version, just need to finish the new account code.
Someone wrote a Facebook OpenID gateway somewhere, can’t find it at the moment.
In reply to: bbpress is slow like godaddy says?Remember that 1.298 is the page generation time on the server side, not the transmission time.
Depending on how slow their server is, the transfer could take another full second.
Then each script needs another query and turn around and render time.
I’m showing a page load to ready time of 3.6 seconds on my Firefox when the page generation time was 0.6 seconds. So 3 seconds to transfer is not good on broadband.
I’d start with the load_options switch I posted above and the script removal.
GoDaddy might actually be complaing about the excessive queries which will be fixed with the load_options.
In reply to: Kazakh LocalizationMore can be found on bbPress.org under certain tags:
https://bbpress.org/forums/tags/localization
https://bbpress.org/forums/tags/translation
https://bbpress.org/forums/tags/internationalization
In reply to: Trac linking in the support forumtesting:
bbPress is the #1 forum software for do-it-yourselfers
+
should maybe be{3,8}
insteadbackticks:
bbPress is the
#1
forum software for do-it-yourselfersnope, still broken in backticks.
testing some more:
Joe User
100 Main Street Suite #17
Anywhere, USA
nope In fact it removed the space between
Suite
and#17
[trac=123]see this ticket[/trac] or [trac]123[/trac] would be better.
Or just copy the entire url out of trac once you’ve looked up the number anyway.
In reply to: when bbp 1.0 release?Please see the other dozen “when will 1.0 be ready” topics.
bbPress 1.0 will absolutely, most certainly, not be done this year.
1.0 has many internal changes from 0.9 and several complete code rewrites on some functions and has many bugs.
Do not use the alpha on live sites.
In reply to: bbPress Facebook pageI’m not sure how many more times I can repeat that bbPress is pre-release software.
Automattic isn’t making a dime off it, it’s not being promoted, there’s no guaranteed support, all assistance, plugin development is completely voluntary. Every part of bbPress is subject to completely change and break overnight. There is no timetable, there are no feature or bug priorities. Assume you will be on your own.
If that bothers anyone, or they feel the need to rant about it, please stop using it asap and go get SMF – I am completely serious about that. I’ve sent several people about here to vbulletin where money was no object and they could afford it and all the extra hardware it requires when they grow. It has every feature you could possibly want after 10 years of development and all the bloat and price tag to prove it.
If you want forums directly integrated with WordPress and don’t like bbPress, you can go use one of the several discontinued single-developer plugins available for WordPress. They are all slow and buggy and break with every wordpress upgrade, but there you go.
Integration is tricky because it was not a priority for bbPress in the first year or two and there is no such thing as a “standard” wordpress install, everyone has their own weird configuration. The radical changes to WordPress security in the past year have not helped at all with integration ease. Sam is going to try to make integration easier in a future version by creating a plugin for WordPress that assists with the process (in fact a WP integration plugin has now become a requirement because of some recent changes with WordPress).
I suspect bbPress will become much more of a priority for Automattic in 2009 but there’s no guarantee about that of course. So weigh your options and either stick with it or move on but please don’t rant against the very people trying to help the project.
In reply to: bbpress is slow like godaddy says?Another performance tweak that will help with the end user’s page loading times (but won’t reduce that
queries - time
report for the page generation) is to remove the shedload of external javascripts that bbPress tries to load on many pages. Note that doing this will remove the ajax features but bbPress falls back to the conventional page-reload method instead so that’s okay.Only admin can use most of the ajax features anyway so this is crazy that bbPress adds half a dozen scripts for everyone, including the bloated 100k jquery library.
This technique requires a mini-plugin unfortunately:
<?php
/*
Plugin Name: bb-tweaks
*/
// get rid of default forum scripts
remove_action('bb_head', 'bb_print_scripts');
?>(I’ve never tried it but it might be possible to just put the single line
remove_action('bb_head', 'bb_print_scripts');
inside
functions.php
in the theme folder.In reply to: bbpress is slow like godaddy says?1.298 - 35 queries
is absolutely horrible actually.However I only get
0.489 - 35 queries
on that site which is barely acceptable.It’s probably due to an overloaded shared hosting box.
Let’s review some basics.
First of all, let’s make sure you are using 0.9 and not 1.0
(If you are using 1.0 I can’t really help you much because it’s slower than 0.9 for now and I keep explaining to everyone not to use it but they do anyway)
Performance 101: (for everyone)
1. go into
bb-config.php
and add this line:$bb->load_options = true;
2. after you add the above line, queries should be under 20 per page, usually less than 15 – if they are not, then you have a misbehaving plugin (or are running 1.0)
3. if you run your own server or VPS, turn on the mysql cache
4. if you run your own server or VPS, install a PHP opcode cache
(eaccelerator, APC or xcache)
5. if you are on shared hosting ask your host why they don’t use 3 and 4 and if they don’t give you a good answer, get a better host
GoDaddy is up there in like the top 10 for people who dislike their hosts.
Just google the number of people that have trouble with them on wordpress.
But unlike WordPress, bbPress doesn’t have any page cache plugins yet so if your host sucks in the first place, any large php program is not going to perform well.
In reply to: Getting forum page numberThis is also straightforward to do, but I sure would like to know why someone would do such a thing.
You can’t mimic the post_position trick because no positioning is tracked by bbPress for topics. bbPress shouldn’t even use post_position anyway but it does it to accelerate the alternative looking up the position by date.
You’d have to do a mysql query that simulates the get_latest_topics but returns only topic_id’s and then find the position of the desired topic_id in the resulting array. Then you divide by number of topics per page and there’s your page number.
In reply to: Retrieving forum ID from post IDIt’s extremely easy to get
forum
<->topic
<-> post relationships in bbPress.Depending on where you are, you may just be able to do a
global $topic,$bb_post;
Then $topic or $bb_post will have the following objects inside:
$bb_post
post_id
forum_id
topic_id
poster_id
post_text
post_time
poster_ip
post_status
post_position
$topic
topic_id
topic_title
topic_slug
topic_poster
topic_poster_name
topic_last_poster
topic_last_poster_name
topic_start_time
topic_time
forum_id
topic_status
topic_open
topic_last_post_id
topic_sticky
topic_posts
tag_count
You use it like this:
global $topic; echo "$topic->topic_title";
or to answer your original question:
global $bb_post; echo "$bb_post->forum_id";
Of course doing it this way bypasses any filters that may be in place from plugins but that may not matter if you are just trying to do something simple.
In reply to: BBpress faster than WordPressYes when you rebuild PHP to a new version you must rebuild the eaccelerator module, that’s a good tip.
Also sometimes after a rebuild you need to clear the eaccelator disk cache which is usually stored in tmp or you might have specified somewhere else in the php.ini settings.
techypenguin, mysql speed is not related to eaccelerator but mysql’s own cache.
If you are going by the time showed inside bbpress pages, that’s misleading as it shows the number of queries but the entire page generation time, not mysql query time. If you want to see the breakdown, install my bb-benchmark plugin.
In reply to: Retrieving forum ID from post IDYou can do it with a custom query.
Something like
$forum_id=$bbdb->get_var("SELECT forum_id FROM $bbdb->posts WHERE post_id=$post_id LIMIT 1");
where $post_id is your post id.
This will generate an extra query per page but for just editing that would be fine.
In reply to: New forum layoutOoh I just realized it’s more effective when the circle sits ontop of the border instead of a merge:
In reply to: New forum layoutHow about this with a vertical break line:
In reply to: BBpress faster than WordPressHow to install eaccelerator onto debian with PHP5
http://www.howtoforge.com/eaccelerator_php5_debian_etch
(should be similar or even easier for PHP4)
In reply to: BBpress faster than WordPressApache, both 1 and 2 are based on old slow code. You can spend hours fiddling with performance settings and barely fix the problem. They don’t do well for very active sites and apache can be easily ddos’ed. You can either throw more hardware at the problem or replace apache when the loads get too high.
LiteSpeed is literally twice as fast/half the load as apache (it’s also a bit expensive for the commercial version but there is a 5 account version available for free). Additionally it can plow through many kinds of ddos attacks. It’s a piece of cake to install and configure (GUI based).
The free Nginx is also twice as fast as Apache but LiteSpeed can use Apache’s httpd.conf and .htaccess files so it’s very easy to install (10 minutes tops) and you can even switch back to Apache if so desired. Nginx requires a complete rewrite of any mod_rewrite rules, etc. and requires technical skill to install/operate.
Matt is slowly converting some of Automattic’s server from LiteSpeed to Nginx to keep the ideals of open source but LiteSpeed is still too good and has no serious competition as far as compatibility so I bet he will probably continue to run it on some servers for years.
As far as opcode caches I am surprised you had trouble with eaccelerator which tends to be the most compatible/easiest to install. APC does have some quirks but it’s being adopted by PHP and may become “built in” in some future version.
In reply to: New forum layoutI can’t even read that badge, are my eyes getting that bad?
I am really partial to the old logo with the softer letters and lowercase ‘bb’.
How about any of these:
http://img136.imageshack.us/img136/1520/badge7th0.png
http://img136.imageshack.us/img136/4364/badge5ai3.png
http://img136.imageshack.us/img136/4223/badge8ad3.png
http://img136.imageshack.us/img136/1630/badge9hk7.png
(though the (bb) could use some pixel touchup for clarity on the letters)
In reply to: bbPress 0.9.0.3 (stable) releasedThere are no added new features only bugfixes, one important. No security issues.
These are the only files that need to be replaced on a 0.9.0.2sp1 install:
Props should be given to ipstenu who was the first to report the serious profile email editing bug which was actually in the code for eight months and no-one noticed. Essentially no regular member could change their email address after registering. Admin could change anyone’s email address without a problem which is why it probably went un-noticed for so long.