Search Results for 'code'
-
AuthorSearch Results
-
September 8, 2010 at 9:47 pm #93703
In reply to: BBcode-lite users MUST upgrade to 1.0.5 ASAP
_ck_
Participant@RedBull, if you were previously using the option to enable images via bbcode-lite, make sure you uncomment the first line that enables them again (by re-installing the plugin as default you’ve disabled them).
September 8, 2010 at 7:01 pm #93702In reply to: BBcode-lite users MUST upgrade to 1.0.5 ASAP
RedBull
MemberI did the upgrade, but now the pics aren’t showing. Its just shows the complete file name with
.
September 8, 2010 at 1:25 pm #35294Topic: Login op Forum
in forum PluginsVisulla
MemberI am looking for a plugin (or code) to make a login to the page so only the persons who have this login can see the forum..? like a “Registration to the bbpress folder”. I tried some folder-registrations but then bbpress does not work at all.
Thankx for any tips.
September 8, 2010 at 8:30 am #93149In reply to: How to disable html on the posts?
minervaa
ParticipantYou need to copy paste those code in a text file then rename it as .php.After that it will become a plugin and you can opload it on your plugin folder.
If you want, you can download the same file from this link. I put some extra information (i.e. description, url etc) on the plugin.
http://www.mediafire.com/file/kx0ir4p71tmalpz/Zaerl-no-html.php
September 7, 2010 at 9:08 pm #93698In reply to: BBcode-lite users MUST upgrade to 1.0.5 ASAP
Rich Pedley
Memberdone, thanks
September 7, 2010 at 8:09 pm #85066In reply to: New bbPress Project Launched Today – WoW UI Gallery
Taeo
MemberWell I wrote one fairly large plugin to handle the image uploading and added a few template functions to then display them. I also made a few modifications of existing plugins to achieve the views and rating functionality. My original post echoes most of this in more detail.
Aside from some small modifications to the profile page code (why isn’t there a template for this?!) all of the additional functionality has been achieved through plugins and theme code. I wrote most of the functionality into a plugin I am called bb-gallery. I am also using ajaxed-quote (detective), bb-ratings (mdawaffe), bb-topic-views (wittmania, _ck_), my-views (_ck_), and front-page-topics (_ck_, mdawaffe).
September 7, 2010 at 7:08 pm #34551Topic: Latest Topics in Sidebar
in forum ThemesJeremy
MemberI’m trying to show the latest topics across the entire board in a sidebar. I foolishly tried creating a standard loop (
if ($topics) : foreach ($topics as $topic) : ?>), but of course if you’re on a forum you only see topics within that forum, not across the entire board. I can’t puzzle out how to make the right query. Should I usebb_query?$bbdb_get_results()? Something else?Thanks.
September 7, 2010 at 4:43 pm #93611In reply to: Forum Software Benchmarks: http://bb-bench.com
_ck_
ParticipantOf course it will be good to have content caching added, I already commented on how plugins can do that and bbPress never got content caching because it was being re-invented every couple of years. The reality is now it’s a moot point, bbPress 0.9 and 1.0-1.1 will never have it internally. I doubt 1.2/2.0 will ever either, they will simply rely on WP plugins to do page caching.
But I’m also saying the effects of content caching will be less visible if the test was more realistic to how forums are really used.
Apachebench is not complete enough and not real-world enough.
The problem is it’s going to take a week or two of coding to write something better and I can’t imagine someone doing that unless they were serious and skilled enough to do it.
I could write a plugin that defeats apachebench entirely, it’s very easy. AB does not load any content on the page, no images, no scripts. So basically all I have to do is send it one hard coded script tag, nothing else on the page, and the script loads the page. Then bbPress would rank as fast as an empty static html/php page.
That’s an extreme unrealistic example but it’s part of what I am saying. A real world test would load the page like a browser does, it would accept and return cookies so a user couple be logged in, and it would post new content between reads.
Writing a test like that is hard work, so I am not surprised that just using AB is the fallback.
You want bbPress to be cached? It can already do that, deep integrate with WP and then use wp-super-cache (or similar).
But then the page generation time is hidden in the first page render, let’s say it takes 800ms or more. Each next page will only take 20ms or less to serve. But Apachebench is “dumb” and doesn’t know that, it can only show best/worst and averages.
What if SMF or one of the others take 2 seconds for the first render on a new login and then 20ms for each successive? That 2 seconds is important if the content/user is constantly changing. What if a forum generates a list of topics the same for everyone but then uses javascript to change the list after the fact by using extra queries outside of the original page render? Apachebench cannot “catch” any of those scenarios or show their performance.
September 7, 2010 at 4:12 pm #93610In reply to: Forum Software Benchmarks: http://bb-bench.com
rafio
MemberHey Everyone!
I am tracking opinions on bb-bench.com on internet from my curiosity (I am NOT associated with that initiative in any way).
I find this thread interesting in negative way. Hovewer responses on those results are not suprise to me. Every dev unsatissfied with results attacks test itself ignoring bad solutions (or lack of countersolutions) in his code.
You say “test is bad because we dont implement cache while others do”. That indeed has its effect on BBPress results hovewer as end-user I am interested in performace. Caching algorithms are necessary if you aim your software for bigger communities.
Ofcourse you can say “hey, if load is too big, you can always switch to more powerful hosting plan”. Thats true, however whats heaper for user? Change hosting solution or community software for faster one?
What I am especially disgusted with is how you claimed other solutions use full-page cache, while none of them does. Lying about other software to make your one appear “more fair” is really cheap shot.
If your code lacks features like caching, you implement those, dont argue over how cache is bad and gives others unfair advantage in tests. How hard it is to implement basic cache mechanism to code? Implementing it will make software better.
September 7, 2010 at 3:31 pm #93697In reply to: BBcode-lite users MUST upgrade to 1.0.5 ASAP
_ck_
ParticipantGiven this is my second most popular plugin, I’d like to make this sticky for 24 hours or more – if the other mods will please tolerate because of the severity.
September 7, 2010 at 5:25 am #35276Topic: BBcode-lite users MUST upgrade to 1.0.5 ASAP
in forum Plugins_ck_
ParticipantAll BBcode-lite users should upgrade to 1.0.5 IMMEDIATELY
(regardless if you allow images or not)
http://bbpress.org/plugins/topic/bbcode-lite/
http://plugins-svn.bbpress.org/bbcode-lite/trunk/
This is an important security update.
September 7, 2010 at 5:12 am #93691In reply to: Security Issue (Javascript Insertion)
_ck_
ParticipantOkay here’s the reality.
Basically bbPress doesn’t run it’s tag filter on post_text when the text is finally displayed, because it would be too slow.
Instead it only checks tags during saving time and filters then.
If an item is not a tag AT SAVE TIME it won’t get checked.
That is how this is slipping through, because bbcode are not html tags.
I have a quick, dirty fix.
Basically anything that gets stuck INSIDE a tag ie.
[HERE]=< HERE >is no longer allowed to contain spaces, single quote or double quote. Stuff[blah]HERE[/blah]=<blah>HERE</blah>is okay.Preventing spaces alone, in theory, should be enough. Even url or entity encoding won’t get properly parsed. It will simply display as plain text and then you can see who is posting what instead of hidden stuff.
The only good news is that this problem in theory should not allow admin cookies to be stolen since the last version of 0.9 and 1.x already use HttpOnly cookies which cannot be read by javascript.
The downside of the quick-fix is that secondary attributes are no longer possible until I come up with another way. Example of secondary would be
altortitleetc.Many thanks for reporting this Tom!
September 7, 2010 at 4:44 am #93690In reply to: Security Issue (Javascript Insertion)
_ck_
ParticipantDouble frack, it’s not just IMG.
Working hard on a fix.
All BBcode-lite users should upgrade to 1.0.5 IMMEDIATELY
(regardless if you allow images or not)
September 7, 2010 at 4:23 am #93689In reply to: Security Issue (Javascript Insertion)
_ck_
ParticipantOh frack, it’s bbcode-lite.
I run through post-text so the bbpress parser never fires.
Fortunately img is disabled by default but I bet people turn it on.
Working on a fix.
September 7, 2010 at 12:31 am #93686In reply to: Security Issue (Javascript Insertion)
zaerl
ParticipantI cannot reproduce the bug. The plugin is well written:
$tags['img'] = array('src' => array(), 'title' => array(), 'alt' => array());only
src,titleandaltattributes are allowed. Can you share a pastebin link with the exact rogue text?September 7, 2010 at 12:30 am #93738In reply to: Categories
Dakcenturi
MemberAh, thanks! The theme I was modifying didn’t have that bb-category code in it. Copying and pasting it over fixed the problem!
September 6, 2010 at 11:56 pm #93737In reply to: Categories
chrishajer
ParticipantThere is a class of
bb-categoryapplied to categories. You can style that however you want. In style.css, this is already present:tr.bb-category td {
background-color: #ddd;
}Just do whatever you want there.
September 6, 2010 at 10:31 pm #93684In reply to: Security Issue (Javascript Insertion)
Elias Schwerdtfeger
MemberBy default, bbPress does not allow using the
imgtag, it needs a plugin for this functionality. Of course, the given attributesstyleand any kind of JavaScript handler is highly unwanted, but it is a weakness in the plugin’s code, which has to be patched asap.September 6, 2010 at 10:12 pm #35275Topic: Security Issue (Javascript Insertion)
in forum Troubleshootingtom.mccabe
MemberHey everyone. I believe there’s a security flaw within BBPress that allows for any forum user to insert JavaScript into their posts. For instance, the following code replaces instances of “oldStuff” with “newStuff”:
[img]http://www.whatever.net/forums/bb-admin/images/blank.gi” style=”display:none;” onerror=”this.parentNode.parentNode.parentNode.parentNode.parentNode.innerHTML = this.parentNode.parentNode.parentNode.parentNode.parentNode.innerHTML.replace(/oldStuff|onerror/g,’newStuff’);[/img]
What are the patching instructions? Thanks.
September 6, 2010 at 9:31 pm #93601In reply to: Forum Software Benchmarks: http://bb-bench.com
_ck_
ParticipantAll your current benchmark proves is that bbPress will be slower for 20 concurrent connections over 1000 passes, where no-one is logged in and the content never changes.
What I am saying is that’s not how people run forums, you need a more realistic benchmark, which I know from experience is going to be tricky to code.
bbPress 0.9 will be faster than what you have shown by about 50% and then with content caching it will compete fairly against the others.
Apachebench is not dynamic enough to prove real-world usefulness and barebones bbpress out-of-the-box is certainly not setup for a large site. But with plugins it certainly can be. There are some reasonably large sites on the Top 100.
September 6, 2010 at 5:57 pm #93620In reply to: LInk BBPress to WordPress (forum to blog)
tpack
MemberI did this in my footer.php of my Kakumei theme.
Find your theme folder. E.g. /forums/bb-templates/YOUR-THEME/footer.php.
Edit footer.php code:
<div id=”footer” role=”contentinfo”>
<p><?php printf(__(‘%1$s is an online discussion site of the YOUR-DOMAIN.com‘), bb_option(‘name’), “http://YOUR-DOMAIN.com”) ?></p>
September 6, 2010 at 5:16 pm #93600In reply to: Forum Software Benchmarks: http://bb-bench.com
ckwalsh
MemberUm, wow. I’ll admit I’m quite astounded and I’m not quite sure what to say, but I’ll try.
Actually the PHP version kinda proved my point about content caching.
It’s taking 3-4 ms.
The front page index on most of those forums is taking 20-25ms
Uh… no they aren’t. http://bb-bench.com/benchmark/1#section_p_index
That’s impossibly fast, it definitely means content is not being regenerated. If the cache was defeated it would have to re-render the whole thing and the page time would be significantly higher.
No, it’s not impossibly fast. I have not perused the code of most systems, but I can guarantee phpBB does not cache the output of its pages. They are retrieved every page load. Sure, there is a caching system in place, but it doesn’t catch the output of a page, only stores a few variables that don’t even improve performance particularly. As for caching at the apache level, you would see a much bigger difference in speed than you do see. Without special configuration, apache should never cache the output of a php page, since that would entirely defeat the purpose of a dynamically generated page.
Caching page output is near impossible for forums in general, due to forum permissions and session specific information. It would be kind of bad if my “One private message unread” were cached for you. The only other form of caching is the sql cache, which is contained entirely within MySQL, and is automatically activated for all queries, regardless of software.
bbPress doesn’t even save the tag cloud between pages, it will re-render it each and every time, which is at least 1/4th of the page render time (that can be changed via a plugin).
Sounds like that’s a big area for bbPress to improve. But it still doesn’t make the result invalid: bbPress is slower.
So 265ms vs 78ms
bbPress 0.9 is “only” 187ms slower than statically served PHP.
Do your math again. It’s 260ms slower than a static page. It’s still damn slow, and if someone installs bbpress and *pick another board* side by side, the bbpress one will not perform better. While technically correct, it does nothing to affect the overall results.
@ckwalsh, Your benchmarks are incorrect this way. _ck_ is right about it
Can you please paraphrase what his arguments are, and perhaps add a little bit more? I’m getting the feeling that you posted here to support _ck_ since the results I found were unfavorable to bbPress, and you don’t have anything to add, or even understand the discussion. Not to say I only want to talk to experts, but blind bandwagonning always frustrates me on the internet.
Basically I’d want to see a simulated load with logged in users being served different content – ie. unread posts for different users
Certainly apache bench isn’t perfect, however, it does show the relative performance of those 3 pages, which are almost guaranteed to be responsible for the majority of requests to a forum. I have been considering how to build a better tool, but have not gotten a chance to do so yet.
But plugins can still do content caching themselves. For example I realized awhile back that the Hot Tag cloud that bbPress renders is taking at least 1/4th of the total page render time, and it does it each and every time, regardless if there are new tags added or deleted. So my Hot Tags Plus plugin caches the tag cloud as static html (as well as add many other features to it at the same time).
If you think that will drop load time, it seems to be something anyone can add – I’d certainly be willing to install it for my tests.
Overall, you seem to be upset that bbPress performed so badly, leading you to say the benchmark is wrong. While it isn’t perfect, what it does show it shows rather precisely. In the current state of forum software, bbPress does appear to have a long way to go. It doesn’t matter if it was rewritten. It doesn’t matter if it doesn’t have caching (if so, that is a failure of bbPress, not an unfair advantage to other software). When comparing the same functionality between software, those are the results, like them or not.
September 6, 2010 at 3:37 pm #93639In reply to: change wordpress blog that integrates bbpress
Ashish Kumar (Ashfame)
Participantthe new blog tables is just left as it is, you can delete that if you want.
you can even specify the user tables to be used while installing.
this is how it is done in
wp-config.php–define('CUSTOM_USER_TABLE','new_user_table');
define('CUSTOM_USER_META_TABLE', 'new_usermeta_table');those two lines should be in that WP whose user tables you want to change.
like my initial has a
wp_prefix, then in the new installation, which has something different (lets say wp1_ or anything), put the lines inwp-config.phpdefine('CUSTOM_USER_TABLE','wp_users');
define('CUSTOM_USER_META_TABLE', 'wp_usermeta');September 6, 2010 at 3:36 pm #93597In reply to: Forum Software Benchmarks: http://bb-bench.com
_ck_
Participantquick ‘n’ dirty test:
ab -c 20 -n 1000bbpress 1.1
. min mean[+/-sd] median max
Total: 46 458 117.9 453 1250bbpress 0.9 (with
$bb->load_options=true;). min mean[+/-sd] median max
Total: 46 275 90.6 265 890453ms vs 265ms (or 458 vs 275)
So, I’d expect I’d see around a 50% improvement on your box on 0.9
now – vs static cache content simulation:
bbPress 0.9 front page html saved as
static.phpand
<?php $test=1; ?>put at top to force PHP parser to turn on. min mean[+/-sd] median max
Total: 15 75 14.3 78 109So 265ms vs 78ms
bbPress 0.9 is “only” 187ms slower than statically served PHP.
In a nutshell:
. min mean[+/-sd] median max
bbpress 1.0: 46 458 117.9 453 1250
bbpress 0.9: 46 275 90.6 265 890
static PHP 15 75 14.3 78 109VirtualityStudio
MemberI think it is gravatar, although I uploaded a custom default gravatar that is local and the users avatars will be saved locally as well.
-
AuthorSearch Results
.