Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,451 through 24,475 (of 32,432 total)
  • Author
    Search Results
  • #75612
    _ck_
    Participant

    $page will be greater than 1 if you are on a paginated set of pages for any kind of view, topic, etc.

    so do a

    global $page;

    and then if ($page>1) { blah }

    but search engines like google are already aware of bbPress and index it well

    #75462
    johnhiler
    Member

    Ah ok, I was just wondering if there was an implication that 0.9 doesn’t have a working integration with WordPress! Thanks for clarifying. :-)

    I definitely agree that it’s not as seamless as it could be…

    #74325
    _ck_
    Participant

    My point exactly about access. On a single server setup you might as well give more resources to mysql, it’s much more practical. The idea is to try to eliminate the bottleneck to mysql when you have contention among many clients. You won’t likely get that in a single server setup if mysql is done right.

    The memcache layer in wp/bbpress is only one step above the mysql layer and the only thing you are saving is a few cpu cycles from when it decodes the serialized data from mysql to memory. It certainly doesn’t help at all the fact that bbPress 1.0, like WP, now does a gazillion copies of an object in memory as it references data, instead of using pointers like 0.9 does – all those copies add up, you can actually time the 50% decrease in performance on each ROW when displaying the front page with 25 topics and it gets magnified with each plugin used.

    http://www.mysqlperformanceblog.com/2006/08/09/cache-performance-comparison/

    Cache Type Cache Gets/sec
    Array Cache 365000
    APC Cache 98000
    File Cache 27000
    Memcached Cache (TCP/IP) 12200 <<<<====---
    MySQL Query Cache (TCP/IP) 9900
    MySQL Query Cache (Unix Socket) 13500 <<<<===---
    Selecting from table (TCP/IP) 5100
    Selecting from table (Unix Socket) 7400

    Maybe someone should write an interface into the wp/bbpress memcache object manager to use APC/eaccelerator shared memory instead on single server systems. Apparently that would be significantly faster.

    #64730
    Satish
    Participant

    I see that TinyMCE editor adds <p> </p> tags after each line. How can I convert <p></p> tag to <br /> tag ?

    If this has been solved in any other threads, then please give me the link. I searched a lot before posting it here.

    Please help…its very urgent.

    #75602
    ArnyVee
    Member

    Understood. Thank you ck :)

    #75601
    _ck_
    Participant

    The people who have them working under 1.0 are likely using an older theme, either from a previous version of bbPress or a 3rd party template.

    #75595

    In reply to: post_form() h2 woes

    r-a-y
    Participant

    Ugly hack for now…

    I commented out two lines in functions.bb-template.php:

    Line 272:

    if ( empty( $h2 ) && false !== $h2 ) {

    Line 280:

    }

    Would be nice to get a better workaround that doesn’t require hacking a core file.

    #75561
    clarklab
    Member

    d’oh! this works:

    <?php global $topic; echo "$topic->forum_id"; ?>

    should’ve mentioned I was on a topic page

    #75560
    clarklab
    Member

    I tried inserting

    <?php global $forum_id; echo $forum_id; ?>

    just to test if I could grab the value and I could not. I tried it in a few places with no luck. What am I doing wrong?

    Also thanks for all the plugins. I’ve got like a dozen of them running on my install.

    #75600
    ArnyVee
    Member

    That’s strange. I didn’t deviate from the instructions, but they still aren’t showing. Darn, those are two very important plugins that I wanted to work. I guess I’ll just have to be patient until December.

    #75599

    both worked fine for me on 1.0 out of the box, no edits.

    #75598
    r-a-y
    Participant

    BBCode Buttons and BBPress Smilies work on bbPress 1.0 for me.

    I’m having trouble with one of _ck_’s plugins, but I’m not exactly sure if it has to do with her plugin, bbPress or our server.

    #75597
    _ck_
    Participant

    Many of my plugins (and others) meant for bbPress 0.9 will not work under 1.0

    I do not intend to address this until December as there will likely be additional changes to bbPress.

    Those that want to use my plugins should use bbPress 0.9 and not 1.0, you can always upgrade later.

    #15190
    ArnyVee
    Member

    Hello there,

    I’m a complete newb when it comes to bbPress, so bear with me. :)

    I’ve installed about 6 to 8 of ck’s great plugins and they’ve all worked with no issues on the latest release (think it was on July 3rd when it was released or something?) of bbPress. Now, I understand that ck has warned everyone about the possibility of the plugins not working on 1.0, but I was wondering if anyone has these working or what I might be able to do to temporarily tweak them.

    All of the plugins, except for BBCode Buttons and BBPress Smilies are working. These two are not showing up in the default theme. Any suggestions on what I might’ve missed or something that I should do to see why they’re not working?

    BBCode Buttons

    I have the bbcode-lite plugin active and working, so it’s not an issue there. I have bbcode-buttons directly in the my-plugins directory, so seems fine there.

    BBPress Smilies

    I uploaded the full bb-smilies directory to the my-plugins directory and then activated it in the admin panel. But, nothing is showing in the post boxes.

    So, I could use some suggestions for those of you that found some work arounds. Thank you!

    #15189
    r-a-y
    Participant

    I just installed bbPress 1.0 to my dev server today and something strange is happening.

    Instead of “Reply” or “New Topic in this Forum” for the h2 class “post-form”, I am now getting the string “Array”.

    Any idea why?

    Funny thing is this isn’t happening on my localbox where I installed bbPress 1.0 from 1.0 alpha 6 exactly the same way.

    I just went into functions.bb-template.php to do a var_dump of the $h2 variable in the post_form() function and this is what I get:

    array(1) { ["h2"]=> array(1) { ["h2"]=> array(1) { ["h2"]=> *RECURSION* } } }

    Any idea why the $h2 variable is an array when it should be outputting one of the strings “Reply”, “New Topic in this forum” or “Add New Topic”?

    #75536
    r-a-y
    Participant

    I just installed bbPress 1.0 to my dev server today and something strange is happening.

    Instead of “Reply” or “New Topic in this Forum” for the h2 class “post-form”, I am now getting the string “Array”.

    Any idea why?

    Funny thing is this isn’t happening on my localbox where I installed bbPress 1.0 from 1.0 alpha 6 exactly the same way.

    [EDIT]

    I’m going to open a new thread because my post is diverting from the original intent of this post.

    #75559
    _ck_
    Participant

    To learn how bbPress works, I would suggest browsing the source of the top level files in the bbPress root.

    is_forum simply checks the url and does not know which forum it is in

    but it can be used before repermalink happens (similar to wordpress)

    to get the current forum, in theory you should be able to

    global $forum_id;

    And then the $forum_id is the current forum number. You can then use the api to get the forum name, etc. if desired.

    This may not work in all cases as bbPress has some nasty code in some places that even in 1.0 still does not reset the counter after loops. For example a forum page that has some sub-forums, the $forum_id might very well be the last sub-forum displayed (if the bug has not been fixed yet).

    You also cannot fetch $forum_id before repermalink happens which is after bb_init is triggered. Shouldn’t be a problem unless you are trying to execute code while a plugin is loading vs. after init

    ps. is_forum is deprecated in 1.0, use bb_is_forum

    #74322
    _ck_
    Participant

    Memcache is going to be an absolutely useless suggestion for 95%+ of bbPress users.

    Most won’t have the knowledge or resources to set it up and the performance boost will be trivial, almost non-existent for a single server setup (on a shared host it won’t even be a possibility). A proper mysql cache, opcode cache, and local disk cache will come within the same single digit performance gains of memcache.

    Memcache is only beneficial for multi-server systems, it’s why it was invented in the first place.

    The way to cache forums properly is to cache parts of the pages and build the page based on each user on demand. This allows much more dynamic content.

    Large forums usually have an additional problem with several bots crawling them at once at any given time which is why caching every single page in a page cache (like wp super cache) can be a problem. The bots will fill the cache with many one-time hits which have to be purged very soon after they are created.

    #75362

    In reply to: bbPress 1.0 released

    _ck_
    Participant

    Speaking of .htaccess I want to express how I simply cannot disagree more with the suggestion during bbPress 1.0 install to make it writeable by bbPress.

    Opening .htaccess to writes by PHP is an INCREDIBLY bad idea security-wise.

    Never, ever, make any part of your bbPress (or WordPress) install write-able or you are just begging to be hacked sooner or later. Always use FTP and replace it yourself.

    If you are on a shared server, the vulnerability is magnified many more times.

    Directories used for caching and uploading that simply must be writable should always be “above” the web-root so that an attacker cannot easily execute files they just uploaded or modified.

    One day bbPress will have a template editor like WordPress and I will have to recommend deleting it and never chmod’ing the template directory as well.

    #75514

    In reply to: Navigation error

    taboo
    Member

    I don’t use Hidden Forums plugin. I also tried disabling all the plugins – still the same navagation issue.

    Then I disovered that if I use “none” permalink structure (/forums.php?id=1) everything works fine. If I use either “numeric” or “name based” (my preference) the problem is back.

    Really noone faces such an issue?

    my .htaccess looks like that now:

    # BEGIN bbPress

    Options -MultiViews

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteRule ^page/([0-9]+)/?$ /index.php?page=$1 [L,QSA]
    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]
    RewriteRule ^forum/?$ / [R=302,L,QSA]
    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [L,QSA]
    RewriteRule ^topic/?$ / [R=302,L,QSA]
    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /tags.php?tag=$1&page=$2 [L,QSA]
    RewriteRule ^tags/([^/]+)/?$ /tags.php?tag=$1 [L,QSA]
    RewriteRule ^tags/?$ /tags.php [L,QSA]
    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/?$ /profile.php?id=$1&tab=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&tab=$2&page=$3 [L,QSA]
    RewriteRule ^profile/([^/]+)/?$ /profile.php?id=$1 [L,QSA]
    RewriteRule ^profile/?$ /profile.php [L,QSA]
    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /view.php?view=$1&page=$2 [L,QSA]
    RewriteRule ^view/([^/]+)/?$ /view.php?view=$1 [L,QSA]
    RewriteRule ^rss/?$ /rss.php [L,QSA]
    RewriteRule ^rss/topics/?$ /rss.php?topics=1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/topics/?$ /rss.php?forum=$1&topics=1 [L,QSA]
    RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/topics/?$ /rss.php?tag=$1&topics=1 [L,QSA]
    RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile=$1 [L,QSA]
    RewriteRule ^rss/view/([^/]+)/?$ /rss.php?view=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ /index.php [L]
    </IfModule>

    # END bbPress

    #75535
    #75534

    Submit a trac enhancement, would be nice if if what you say is true.

    #75552

    As per me, its not easy as it sounds. You will need place in db to hold those comments like in WP. How about picking the code from WP itself? Post id can be replaced with user id and like..

    #75544

    Yeah! I think I got it. Thanks _ck_ !

    I will try it and get back if I need more help. :)

    #75457

    Ending things at a year end is much more tidy than the middle when many more people are away.

    Except I feel that more people are off on Winter vacation in December ;) But I’m not all that hung up on summer v. winter showdowns. I suspect the same volume of people will be away in December as July, so why not pull a GeoCities and shut down Oct 26th ;)

    The only real reason I can see for stopping 0.9 support is that it’s time consuming in a direction that’s no longer being followed (see _ck_’s explanation). And that’s fair, y’know :)

    0.9 IS stable. It’s more tested than 1.0. But I agree with johnhiler, in that this doesn’t need to be a WarGames, zero-sum thing. There are always reasons to stay a couple revs back. Anyone who runs a server knows that. You want to upgrade to get new things, but you also end up holding off because it works as it, and you don’t want to mess with what works. But. There’s a point where holding off will cause you more pain when you have to upgrade.

    Thankfully, we’re not there yet!

    Sez Sam:

    As long as bbPress 0.9 is maintained some time will have to be spent maintaining the 0.9 branch, mostly with regards to security fixes. I don’t see this as particularly burdensome, but I don’t want to be doing it forever.

    12 to 18 months is long enough, IMO, for that. Pick one, carry on. A set in stone date is good so people can’t say they weren’t warned :)

Viewing 25 results - 24,451 through 24,475 (of 32,432 total)
Skip to toolbar