Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 20,101 through 20,125 (of 32,517 total)
  • Author
    Search Results
  • #93703
    _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).

    #93702
    RedBull
    Member

    I did the upgrade, but now the pics aren’t showing. Its just shows the complete file name with pic.jpg.

    #35294

    Topic: Login op Forum

    in forum Plugins
    Visulla
    Member

    I 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.

    #93149
    minervaa
    Participant

    @Michaelia

    You 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

    #93698
    Rich Pedley
    Member

    done, thanks ;)

    #85066
    Taeo
    Member

    Well 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).

    #34551
    Jeremy
    Member

    I’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 use bb_query? $bbdb_get_results()? Something else?

    Thanks.

    #93611
    _ck_
    Participant

    Of 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.

    #93610
    rafio
    Member

    Hey 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.

    #93697
    _ck_
    Participant

    Given 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.

    #35276
    _ck_
    Participant

    All 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.

    #93691
    _ck_
    Participant

    Okay 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 alt or title etc.

    Many thanks for reporting this Tom!

    #93690
    _ck_
    Participant

    Double 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)

    https://bbpress.org/plugins/topic/bbcode-lite/

    https://plugins-svn.bbpress.org/bbcode-lite/trunk/

    #93689
    _ck_
    Participant

    Oh 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.

    #93686
    zaerl
    Participant

    I cannot reproduce the bug. The plugin is well written:

    $tags['img'] = array('src' => array(), 'title' => array(), 'alt' => array());

    only src, title and alt attributes are allowed. Can you share a pastebin link with the exact rogue text?

    #93738

    In reply to: Categories

    Dakcenturi
    Member

    Ah, thanks! The theme I was modifying didn’t have that bb-category code in it. Copying and pasting it over fixed the problem!

    #93737

    In reply to: Categories

    chrishajer
    Participant

    There is a class of bb-category applied 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.

    #93684

    By default, bbPress does not allow using the img tag, it needs a plugin for this functionality. Of course, the given attributes style and any kind of JavaScript handler is highly unwanted, but it is a weakness in the plugin’s code, which has to be patched asap.

    #35275
    tom.mccabe
    Member

    Hey 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.

    #93601
    _ck_
    Participant

    All 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.

    #93620
    tpack
    Member

    I 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&#8221;) ?></p>

    #93600
    ckwalsh
    Member

    Um, 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.

    #93639

    the 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 in wp-config.php

    define('CUSTOM_USER_TABLE','wp_users');
    define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

    #93597
    _ck_
    Participant

    quick ‘n’ dirty test: ab -c 20 -n 1000

    bbpress 1.1

    .             min  mean[+/-sd] median   max
    Total: 46 458 117.9 453 1250

    bbpress 0.9 (with $bb->load_options=true;)

    .             min  mean[+/-sd] median   max
    Total: 46 275 90.6 265 890

    453ms 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.php

    and <?php $test=1; ?> put at top to force PHP parser to turn on

    .             min  mean[+/-sd] median   max
    Total: 15 75 14.3 78 109

    So 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 109

    #93676

    In reply to: avatars

    I think it is gravatar, although I uploaded a custom default gravatar that is local and the users avatars will be saved locally as well. :)

Viewing 25 results - 20,101 through 20,125 (of 32,517 total)
Skip to toolbar