Search Results for 'code'
-
AuthorSearch Results
-
June 5, 2009 at 7:48 am #74151
In reply to: For hacky peeps
Atsutane
MemberYou can find basic action/filter hook inside
pluggable.php
andtemplate-functions.php
And for function that not need any action/filter hook, u need to create it by imagination
June 5, 2009 at 5:01 am #74039In reply to: bbPress v1’s eventual release
michael3185
Member@johnhiler – I guess you’re not alone in not wanting an ‘authority’, though all I mean by the word is those creating and maintaining bbPress being seen as an authority in ‘the outside world’, as opposed to ‘the inner world’ of bbPress forum users. It’s already being done in a way, internally, by us getting to know who we trust most. Perhaps I’m letting my enthusiasm for a great product carry me away..?
Maybe just this thread and the comments from various members is enough in itself, as like any other, it raises awareness. For myself, I already have a few names in my head of those I trust when it comes to plugins, which are an essential part of bbPress. _ck_’s comments are funny in a way, about only writing plugins for fun or to show what can be done, hers(?) turning out to be among the very best! Perhaps I am barking up the wrong tree, and it should just be left as it is; to be fun, a hacking ground for those who want to hack, with gems coming up here and there from the talented coders. As you say _ck_, it spreads the workload and encourages new input, perhaps in ways that just wouldn’t happen if it wasn’t Open Source.
In any case, I’m grateful to those who invest time and effort into extending bbPres. My needs are few, as almost everything I want exists already. I’d like user roles in a stable version, and may have to go the way another thread suggests, and edit a file to add my own. I’d also like a sticky topic sort order plugin, but don’t have the skills to create it (yet). Tell you what I will do though, regardless of any standards for plugins, etc. I’m going to advertise bbPress personally; word of mouth, on my sites, etc.
Returning to my original thought; “bbPress v1’s eventual release”… I’ll have user roles when that version is considered stable enough for general use. For now, 0.9.0.5, completely free, is excellent.
June 5, 2009 at 1:37 am #74038In reply to: bbPress v1’s eventual release
johnhiler
Member@Michael3185 – Personally I wouldn’t trust a top-down authority to validate plugins. But some sort of bottoms up thing, I could get behind.
But if you want to take the lead on it, you could draft a proposal and post it in a new thread! Maybe some other users would be into it.
June 4, 2009 at 10:44 pm #70353In reply to: Basic integration screencast
quiltingwithmoxie
MemberI get all the way to the end of the installation in step 3 at http://quiltingwithmoxie.com/guild and there is no user present in the Key Master box. However, I have a user…me! I tried to enter the user info manually and got this error:
Database installation failed!!!
Referrer is OK, beginning installation…
>>> Setting up custom user table constants
>>>>>> Removed user tables from schema
Step 1 – Creating database tables
>>> Database installation failed!!!
>>>>>> Halting installation!
If I leave it blank it won’t go any further. What is wrong? Why can I not get this installed? I meticulously followed the videos directions. Thanks for any help you can give
June 4, 2009 at 9:55 pm #74037In reply to: bbPress v1’s eventual release
_ck_
ParticipantPeople don’t write software to see their name in lights.
I think the point is being missed by some who haven’t kept up with bbPress history.
bbPress wasn’t invented by Matt to create a better forum for the masses.
It was invented to serve the needs of Automattic needing (faster) support forums.
It just happens to be open source so others can improve it, write plugins for it, etc.
You’ll never have “certified plugins”, that would have no useful purpose to Automattic. On the flip side I would never have written a single plugin if I thought it was being held to some kind of standard, I wrote them for “fun”, to see if I could do it, or to show others it was possible.
Releasing a product as open source is a way for business to get additional labor on their products for free by encouraging adoption. That’s not a criticism, that’s how it works in general. Matt used code from other open source projects so he’s motivated to also share his projects as open source.
Sure there are some projects that are made from scratch to try to serve the greater good. But there’s no reward for that, you can never please more than a handful of people with whatever you try to do, given how many different opinions and experiences there are in any community.
Some of the wishes expressed in this topic were expressed last year, the year before that and will be said next year and the year after that. Don’t use bbPress if any of those issues are important to you, because WordPress has been around for six+ years and it still has those issues and always will.
June 4, 2009 at 7:56 pm #74036In reply to: bbPress v1’s eventual release
michael3185
MemberYeah, I use NightGunner’s PM, and it’s a gem. As to the legal side, I know so-called civilisation has become litigation mad, but you just put it in a nutshell yourself; “bbPress Certified”. If it’s in quotes, it’s ‘a quote from someone’, and not legally binding as a testimonial (at least here in the UK, which is why all our adverts are wrapped in quotes). I’m sure with the millions of dollars Automatic were given recently, they could easily get advice on making it litigation safe too.
You know, it doesn’t have to be much of a big thing from this end, but it’d inspire confidence in ‘the outside world’, by which I mean those who want Open Source software, but not problems, as they’re not coders or forum hounds. On the inside it could be very simple indeed, ie;
1. Is the code neat and readable? 1 star.
2. Uses the the proper hooks and function calls? +1 star.
3. Works instantly with the current ‘safe’ release? + 1 star.
4. Doesn’t affect, and isn’t affected by, other plugins? +1 star.
etc.
User ratings could go alongside it as an extra, and us forum hounds can carry on as usual. However – and it’s a big however in the eyes of the outside world – the creators of bbPress (and their other systems) gain massive kudos, and therefore, a larger user base. Imagine a press release;
“Sammy Surfer, creator of burblePress said today; We’re into the next generation of forum software. What we’ve realised is that most folks want it to run straight out of the box. We have a compact and powerful core engine, and are announcing our new certification system for plugins. Plugins allow users to develop additional functionality, and while we can’t guarantee code others produce, we do look at and rate plugins. In fact, plugins are key to making burblePress do what you want it to do, so get involved!”
Etc., etc., ad nauseam.
Funny, don’t you think, that no Open Source forum producers have had the balls to do this yet..? But I’ll tell you this: the first one who does will have their name in lights. Do M$ produce amazing, unbeatable code which rules the world? Do they hell. Have they grabbed the world’s attentions and millions of users simply because they set their own standards? You bet your damned underpants. I hope Sam reads this, and throws his own undies to the wind.
June 4, 2009 at 5:20 pm #74034In reply to: bbPress v1’s eventual release
michael3185
MemberI can see what you mean, but I don’t think it’s going the wrong way at all, and it’s not contrary to Open Source. (Open Source is not another name for ‘A Flaming Mess’). It’s common sense. It needs to be implemented in an easy-going way, but be there as a label so users know that plugins have been looked at and given a thumbs-up by those in the know. And those in the know don’t have to create a huge system and lots more work for themselves either. They’re already glancing at plugins from what I’ve been told. All that’s needed are some simple guidelines as a standard.
As I said, the current user rating system is useless. I downloaded a bunch of 5 Star plugins and they crashed badly. Since then, I ignore the star ratings. I also look at the code before installing a plugin. If it looks like granny’s hair in a tornado, I dump it. Anyone who writes code without caring how it reads is unlikely to write code that works. You either care, or you don’t.
Bear in mind that I’m talking about end users here, not forum fiends who love to delve into things (and I’ve quickly become one of those!) Picture someone like my voluntary sector clients, and others, who want to download, install, and play. They don’t want hassle, and they don’t want to hang around forums looking for fixes to plugins which provide functions they need. They want the star system to mean something, and they want the people who created the software in the first place to authorise plugins in some way.
It doesn’t have to be Big Brother. For those who aren’t coders or forum hounds, it just has to work. having something like ‘bbPress Certified’ or whatever, would give some idea as to whether it’s going to plug and play, or whether you plug and pray. Sadly, at the moment, the latter is more likely. Just read through the forums! (And yes, I very much do respect the time and effort people put into developing plugins).
June 4, 2009 at 3:28 pm #74141In reply to: Am I a bozo?
michael3185
MemberYeah, I was a bozo the other day due to including a URL. I’m still a bozo today, though not in the eyes of bbPress.
June 4, 2009 at 11:15 am #74032In reply to: bbPress v1’s eventual release
timskii
MemberTo clarify my optimization comment slightly:
It may be optimized for memcached, since all those individual pieces of user information rarely change, so all those queries will fall straight to the memory, which becomes ruthlessly efficient. If all the information used on each page is queried together, memcached would fill up with page-specific results, rather than user-specific results: So many individual queries is logically more efficient if you are caching the results of those queries.
There is some logic in this: The structure still works reasonably well on smaller (often shared) setups, where caching can be technically difficult to implement. However BBPress is aiming to support large scale deployment, which is almost inevitably going to mean the use of caching. If you can only write the code optimally for one of those users, optimizing it for someone that can save whole machines in the process, is sensible.
June 4, 2009 at 7:02 am #14897arandomdan
MemberI’m running WP 2.7.1 and bbPress Version 1.0-rc-1 on
localhost
. WP has been installed to/3dd/
and I installed bbPress to/3dd/bbpress/
today and have done all the proper steps for syncing in the bbPress admin.I have added the following code to
bb-config.php
:require(BB_PATH . '../wp-blog-header.php');<br />
define('WP_AUTH_COOKIE_VERSION', 1);<br />
$bb->bb_xmlrpc_allow_user_switching = true;I can login to both WP and bbPress with my WP user account (yay!), but <b>the problem is that WP doesn’t know when I logged in to bbPress and vice versa</b> (i.e. when I am logged into WP, bbPress still shows the login form). In addition, <b>when I login to bbPress, WP logs me out; and when I login to WP, I am no longer logged in on bbPress</b>. I have cleared my cookies many times and tried it in both IE and Firefox, same result.
Together, WP and bbPress create the following cookies (aside from the wp-settings and test cookies):
Domain Cookie name<br />
/3dd/ wordpress_logged_in_*<br />
/3dd/wp-admin wordpress_*<br />
/3dd/wp-content/plugins wordpress_*<br />
/3dd/bbpress/bb-admin wordpress_*<br />
/3dd/bbpress/bb-plugins wordpress_*<br />
/3dd/bbpress/my-plugins wordpress_*<br />
/3dd wordpress_logged_in_*<br />I believe the last 4 are created by bbPress and it should be noted that there is no trailing slash on the wordpress_logged_in_* cookie path.
Does anyone know what the problem might be?
June 4, 2009 at 2:43 am #74030In reply to: bbPress v1’s eventual release
johnhiler
MemberTrying to grok the vision here… bbPress would have a top-down certification model, where someone would audit the code of all plugins and do testing to certify that the plugins work in various bbPress versions?
June 4, 2009 at 2:07 am #74029In reply to: bbPress v1’s eventual release
michael3185
MemberAha. Then Go sambauers, Go sambauers, Go sambauers – YAY! (Pretty girls doing athletic stuff here. Well, it can’t hurt, can it?)
If Sam’s the man, then listen up Sam. Standards for plugins are essential. Really. Essential. Yep, really essential. Can’t say it enough. I’ll say it again: If bbPress and associated systems want to be taken seriously in the working world, then standards for plugin development are absolutely essential. Really, absolutely, and any other words that mean really and absolutely.
Leave the rest of the ‘bb developers’ behind. Simply calling plugins ‘bbPress Certified’ will make the world assume that those behind bbPress are an authority who have the power to authorise things. M$ did it, and millions of people believe in them. Do it Sam, and you’ll quickly become an authority. People will believe in you, and plugin coders will soon learn to adhere to your standards. In fact, they’ll have to. Those who produce cool ideas but crap code, or cool code but no admin settings so users have to hack (and can’t or don’t want to), will become a thing of the past.
Those of us who aren’t programmers will be able to download and use certified plugins that do what bbPress core does: just click and go. Think of the kudos. Think of the subscriptions. Think of the write-ups in The Times, etc. bbPress: click, go.
June 3, 2009 at 10:45 pm #71259johnhiler
MemberThe easiest way is to your server to use PHP5?
https://bbpress.org/forums/topic/warning-cannot-yet-handle-mbcs-in-html_entity_decode-in-home2
June 3, 2009 at 10:44 pm #71258adman22
MemberI continue to have the same problem, Any other suggests?
June 3, 2009 at 10:34 pm #74027In reply to: bbPress v1’s eventual release
michael3185
MemberHoly cow. You know what I said about plugin programmers maybe not knowing what they’re doing..? Re-reading, I do wonder…
If all this inefficiency is real, then who’s writing the core code, and are they truly competent..? I would hope that those who construct a system like bbPress have some professional training behind them. If not, then perhaps we’re back into school kid land…
June 3, 2009 at 10:31 pm #14893Topic: warning :: error
in forum Installationadman22
MemberI have tried several times now, all with the same results of the setup going wrong. I keep getting this error message when trying setup things up even once step 1 is completed: Warning: cannot yet handle MBCS in html_entity_decode()! in /forums/bb-includes/wp-functions.php on line 113 Might anyone know whats going wrong, I have downloaded the most recently files? Thanks.
June 3, 2009 at 9:33 pm #73990In reply to: bbPress RC1 with WordPress 2.8 shared login
Tynan Beatty
MemberI just upgraded a public site from the latest WP2.7.x to the latest WP2.8-beta2 and decided to upgrade the site’s bbP1.0alpha6 and the bbP Integration plugin that was made for that version (all working as expected).
I was having similar problems with wp2.8-beta2-11509 and bbp1.0-rc-1, using the bbPress Integration 1.0-rc-2 plugin. I found that adding it’s suggested changes to my wp-config.php was causing the problems. I also removed the integration speedups suggested from the bbP admin ‘WordPress Integration’ settings. Now I haven’t tested registration from the bbPress end, but everything else seems to work back and forth. Here’s what I have near the bottom of wp-config.php with everything working:
define('WPLANG', '');
define('COOKIEPATH', '/');
/* That's all, stop editing! Happy blogging. */Where the
'/'
might be a'/subfolder/'
And here is the bottom of bb-config.php:
define('BB_LANG', '');
?>The only thing I’ve found not working thus far is users logging in from the bbP side cannot log out from the WP side. Everything else seems integrated for logins/logouts (login/out from WP, login from WP/out from bbP, login/out from bbP).
This is a minor issue compared to not being able to login to WP at all when using the suggested bbP integration changes to wp-config. I also have all 4 random keys matching between configs, including the nonces (which I don’t think were mentioned in the integration video post, but I don’t remember now). I hope there’s a fix for the login from bbP/logout from WP in the next release of the Integration Plugin, and I also hope that the issue doesn’t affect registration from bbP (since it seems to be related to the plugin). Great work on this so far Sam
On a side note, further testing suggested that it was the ‘SITECOOKIEPATH’ definition causing the inability to login from WP, and the ‘COOKIEHASH’ definition seems to allow WP login, but break the integration.
peace~
June 3, 2009 at 5:03 pm #74026In reply to: bbPress v1’s eventual release
timskii
MemberThe memcached information is useful to know. And based on what I’ve found below, will logically make an absolutely huge difference. Closer to “requires memcached” on a busy forum.
You see, I’ve done some more tests. And BBPress seems to do a lot of simple queries to check information that generally doesn’t change.
I’ve hooked up _ck_’s excellent BB-Benchmark, and started looking for patterns. I assume this picks up everything in 1.0.
As a general rule, page rendering (after queries) is very slightly slower with 1.0. That can probably be explained simply by twice the volume (in bytes) of files typically being executed from 0.9.4 to 1.0. Only about 10ms difference. So, not an issue.
The crux of the problem is the volume of queries. The fastest query execution is 1ms – measured, it seems, to within 0.1ms – although I’m unsure of that accuracy. This may be due to the way the database is hosted – mySQL is on a separate machine, which is logically going to impose a delay in getting results back.
1.0’s slowest query is faster than 0.9.4. But 1.0 executes vastly more queries: It’s almost inevitable that 40 queries will takes longer to execute than 10 queries, because there is such a significant overhead associated with “running a query”, regardless of its complexity.
Here are examples of what I found:
On the front page, forum views, and tag views, many pairs of queries are being run that look like:
SELECT * FROM wp_users WHERE ID = ‘n’
SELECT meta_key, meta_value FROM wp_usermeta WHERE user_id = ‘n’ /* WP_Users::append_meta */
My first thought was that my templates or plugins were broken. But disabling everything, and switching to the default theme, still causes all these pairs of queries to be executed.
The only reason I can see for the first query is to extract the display name for each of the last post authors. I can’t see any requirement for the second query, unless you were trying to augment the name with some extra information, like a title.
The topic table contains a last poster field, but it cannot contain the display name, presumably because the display name can be changed on a whim, while the old username was unchanging. If you have a lot of active posters (rather than a handful), a 20-post-per-page view could easily require 40 individual queries, just to check a piece of information that probably has not changed.
Now, we can argue that there should be some element of caching of the display name in the topics table. I wouldn’t have a problem with, for example, always seeing the name the user displayed when they posted, rather than the name they are currently using. But there’s also a compromise position, where the last poster name is only checked against wp_users at intervals.
Profile views repeat this a lot:
SELECT
meta_key
,meta_value
FROMbb_meta
WHEREobject_type
= ‘bb_post’ ANDobject_id
= n /* bb_append_meta */And I’m only displaying recent replies.
Turning to a topic page. I’ve looked at the first 20 posts in a 260+ post-long topic. A real mix of users, some who have added a lot of custom data (I allow quite a lot to be added, which is stored in wp_usermeta). This is painful: 30ms total query time on 0.9.4, 120ms on 1.0. 14 queries plays 79 queries.
Again, the key weakness is duplication of ostensibly similar queries. Line after line of:
SELECT
meta_key
,meta_value
FROMbb_meta
WHEREobject_type
= ‘bb_post’ ANDobject_id
= n /* bb_append_meta */or
SELECT * FROM wp_users WHERE ID = ‘n’
or
SELECT post_id FROM bb_posts WHERE topic_id = n AND post_status = 0 ORDER BY post_id ASC LIMIT 1
In contrast, 0.9.4 manages to decide all the IDs it needs, throws them all into one query, and presumably lets the PHP split out the results. The wp_usermeta data continues to be pulled out in such a manner:
SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (n,n,n,n…) /* WP_Users::append_meta */
In 3ms. Bargain.
Keep in mind, you won’t see this pattern if your forum contains 20 posts by you. You must have the variety of posters, that tends to only be found on larger forums.
My gut feeling is that some of the loops aren’t terribly well optimized. Or not well optimized for remote databases. Or not well optimized for operation without a secondary cache. Something’s instinctively not right.
June 3, 2009 at 3:36 pm #73762In reply to: How to translate bbPress to another language
Arturo
Participantif you use poedit it generate automatically .mo when you save the .po
i use it to translate bbpress, wpmu and buddypress
June 3, 2009 at 12:45 pm #74089In reply to: How to move a post to a different forum?
Fabrizio Pivari
Participant> Just ask the original poster to create a new post then delete the original.
Is there a possibility to add in a new release similar feature?
Fabrizio
June 3, 2009 at 7:31 am #74025In reply to: bbPress v1’s eventual release
michael3185
MemberYep, the idea of a minimal core engine with stable plugin hooks sounds the best way to me too, even as a non-developer.
Something I’m sure would help is a standard for plugins. I think too many people are put off when the core doesn’t have a function they want, but yippee; there’s a plugin! Then after many hours of frustration, ah crap; this fails too, and here we go with the forum questions again. It also makes the product look bad, even though the plugin developer may not be related to that product in any way.
A ‘bbPress Certified’ system would give users more confidence, and raise the bar for forum development as the outside world perceives it. I can see that plugin developers work hard to get things right for others, and every eventuality can’t be tested for of course. However, I also know from struggling very hard with different forum packages over the last 6 weeks that there really are no standards, and on a couple of systems people seem to have jumped on the plugin bandwagon because it’s fun and brings kudos. In one case, I found myself delving into posts from as far back as 2005 in an attempt to get something simple working. They have a massive forum, but it’s jam packed with ‘How can I make this work?!’ posts going back years. (bbPress is a gem by comparison, which is why I’m still here).
Non-programmers see a plugin on a ‘legitimate’ forum and naturally assume it’s going to work properly. Not everyone’s into hacking around, and some have no time or inclination to do so whatsoever, especially working people who want Open Source software but need it to just work out of the box. On the other side of a crucial plugin may sit a very competent programmer with great ideas, but it can just as easily be a school kid who’s learned a bit of php and doesn’t have the experience to make their ideas actually work. There’s no way of knowing, unless they post in an obviously off-putting way. The current user rating system looks good, but is quickly dismissed when two or three 5 star plugins fail.
Any standard takes time and effort in the background to assess the code others produce, though it sounds like that’s already being done anyway. I submitted a very simple plugin and wondered why it hadn’t appeared on the forum, and another member mentioned that it can take a while for it to be reviewed. If some checks were done for code readability, apparent competence, etc., as well as the checks already being done for maliciousness and obvious bugs, then you’ve got a working standard. If someone submits something your programmers can see is messily written, uses innapropriate function calls, etc., then they get a ‘Sorry, it doesn’t reach our standards’ email. Maybe a Certified bbPress Star System; 1 star – not rated; 2 stars – appears competent, or is excellent but has no admin panel; 3 stars excellent structure and use of core functions, and has admin panel, and so-on. No guarantees, but at least we’d know to go for 3 stars or more, or if you love to play, grab the 1 star and have fun improving it. Kudos for both developers! The user ratings could be left in as an extra, though casual, system.
It doesn’t really have to be any more labour intensive than at present, and if bbPress and associated systems want to be taken even more seriously in the working world, then standards for plugin development are essential.
June 3, 2009 at 3:27 am #68943In reply to: reCAPTCHA for bbPress
itissue
MemberI tested it out and it sort of works but when I miss just a few characters in the captcha, I still pass the test. It’s only when the thing I type is way off that it works. That’s probably how reCaptcha has it set up though. I guess it should be fine since bots shouldn’t be able to read images. We’ll see. Thanks for taking the time to code it into a plugin though dchest. It’s just what I’ve been looking for.
It does clash with bbPM though. I’m not sure what it is that’s doing it, but I can’t use both this and bbPM together.
June 3, 2009 at 1:53 am #74024In reply to: bbPress v1’s eventual release
Sam Bauers
ParticipantThe additional queries are probably due to the new taxonomy structure we are using for tags.
On the upside, you can now use memcached to cache bbPress objects which should give you better performance than 0.9
I’d be interested to know if the query count was also higher on other pages.
There is a small amount of code “bloat” because of BackPress abstraction layers, but it’s here to stay. It’s already being utilised in a couple of other projects including GlotPress and there are a few people interested in merging it into WordPress as well. The benefits of using it to the ongoing development of bbPress is becoming clearer all the time.
As for feature creep, it’s going to be really limited. bbPress is just supposed to do a few things simply and provide enough hooks for plugin and theme devs to add the bells and whistles. That won’t be changing any time soon. Most development over the next few iterations will be concentrating heavily on easing integration with WordPress and making the lives of plugin and theme devs easier.
June 3, 2009 at 1:23 am #74023In reply to: bbPress v1’s eventual release
timskii
MemberTo put some more detail on the “bloat” thing: I’m comparing databases with identical sets of posts/users, and very similar templates/plugins (I’d hope the 1.0RC code would be better). One setup is 0.9.4/2.5.1, the other 1.0RC/2.7.1.
With 0.9.4, my forum front page is processed consistently in under 100ms (when repeatedly refreshed). With 1.0, 150-200ms is more typical. For reference a simple 2.5.1 (without wp-cache active) WordPress front page on the same hardware is just under 100ms, 2.7.1 is just over 100ms.
That’s barely noticeable to the user, who often experiences a few 100ms of latency, and is still more likely to be slowed down waiting for adverts/graphics than the forum software to dispatch the HTML. But it evidently is slower. I don’t have a reliable way to break down that extra processing time… but I’m instinctively drawn to 11 queries vs 45 queries. Probably because those are the only other number I can see!
June 2, 2009 at 10:36 pm #73996In reply to: Strange Permalink and Post Count Behavior
citizenkeith
ParticipantThanks… the new plug-in did the trick. Still don’t understand what happened, but at least the front page isn’t as cluttered.
-
AuthorSearch Results