Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 57,351 through 57,375 (of 64,430 total)
  • Author
    Search Results
  • #64867
    mrhoratio
    Member

    I’ve tried mod_rewrite, but running into problems with the wp_redirect functions in bbPress redirecting the page after the URL has been rewritten, so that the URL changes back to the longer form.

    For example, this mod_rewrite rule:

    RewriteRule ^profile/username forums/profile/username [L]

    will rewrite:

    http://www.example.com/profile/username

    to:

    http://www.example.com/forums/profile/username

    Except, that after its been rewritten, bbPress forces a redirection, causing the URL in the browser window to change to the longer form.

    #64826
    _ck_
    Participant

    Be sure to add it to the plugin browser so more people will see it:

    https://bbpress.org/plugins/requests/

    #64820

    In reply to: User languages?

    _ck_
    Participant
    #64702
    _ck_
    Participant
    #64855
    _ck_
    Participant
    #64854
    chrishajer
    Participant

    It made sense to me, but I didn’t think it would be happening any time soon. Since WordPress just got this functionality in 2.5, I figured it would be a while until bbPress got it since it’s not quite to version 1 right now. The projects they took on for the Google Summer of Code were related to import/export, not anything like this, that I know of.

    https://codex.wordpress.org/GSoC2008#Web_Forums_Export.2FImport_Standard_and_Tools

    #64851

    In reply to: Reply Bug

    gerikg
    Member

    maybe it’s bb-attachment plugin??

    line 97

    // insane bbPress workaround – adds multipart enctype to the new post form via uri patch

    function bb_attachments_enctype() {add_filter( ‘bb_get_option_uri’,’bb_attachments_uri’,999);}

    function bb_attachments_uri($uri) {remove_filter( ‘bb_get_option_uri’,’bb_attachments_uri’,999);

    return $uri. ‘bb-post.php” enctype=”multipart/form-data” hack=”‘;}

    let me contact the maker.

    #64716
    Sam Bauers
    Participant

    @isaacgreen

    You guessed right. :)

    #64862
    mrhoratio
    Member

    It looks like it indeed breaks something. If you comment out wp_redirect in the functions.php, you will be able to use mod_rewrite to rewrite a URL to a bbPress page. However, this breaks authentication, and causes bbPress to think you are not logged in, even if you are. Not sure how to fix this.

    #64664
    Sam Bauers
    Participant

    @ mykes

    What version of WordPressMU?

    I’m not sure that the latest version is compatible with bbPress yet. The recent Release Candiadte is though.

    #64861
    mrhoratio
    Member

    It looks like the culprit is the wp_redirect function() which includes the header() function. This function appears in several bbPress files. I’m not exactly sure what the intent of them are.

    In the functions.php file, I commented out lines 2061 and 2062 in the bbPress functions.php file:

    if ( $check != $uri && $check != str_replace(urlencode($_original_id), $_original_id, $uri) ) {
    //wp_redirect( $permalink );
    //exit;
    }

    This seems to be helping with the problem. Not sure if it’s going to break something else though.

    #64860
    mrhoratio
    Member

    I did some digging, and although I have not found a solution. I believe the conflict with mod_rewrite and bbPress is that bbPress is using the header() function to send raw HTTP headers to the client. I notice that two files contain header() functions that send a “Location:” header to the browser:

    • bb-load.php

    • pluggable.php

    These seem to be forcing bbPress to redirect the URLs, even after a mod_rewrite rule executes.

    I’m a total php novice, so I’m not really sure how to fix this.

    #3346
    mrhoratio
    Member

    I have bbPress installed in a directory called “forums” on my web server. I have Pretty Permalinks enabled and working. To view the profile of a member, I can go to this URL:

    http://www.example.com/forums/profile/membername

    However, I would like the url to be:

    http://www.example.com/profile/membername

    I’ve tried writing a mod_rewrite rule which rewrites the latter to the former. However, instead of rewriting it, it redirect and exposes the URL. For example. Typing this into the browser:

    http://www.example.com/profile/membername

    Redirects to this, instead of rewriting it:

    http://www.example.com/forums/profile/membername

    Here is the mod_rewrite I am using:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    Options +FollowSymlinks
    RewriteRule ^profile/membername$ /forums/profile/membername [L]
    </IfModule>

    If I change the rule to rewrite the URL to a simple text file, it rewrites properly and masks the URL. For example, this works:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    Options +FollowSymlinks
    RewriteRule ^profile/membername$ /forums/textfile.txt[L]
    </IfModule>

    Another example, I wrote this rule, as a test, to rewrite a URL to the rewrite-rules.php file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    Options +FollowSymlinks
    RewriteRule ^profile/membername$ /forums/bb-admin/rewrite-rules.php [L]
    </IfModule>

    I type in this url into my browser:

    http://www.example.com/profile/membername

    And it redirects to ths instead:

    http://test.doublebad.com/forums/

    If I replace all the text in the rewrite-rules.php file with “test text”, then the URL rewrites properly.

    So it seems that when you are rewriting and URL to a bbPress php file, it will always redirect instead of rewriting, which is quite annoying. I’m trying to trace in the bbPress functions and settings where this is occuring. But I’m having no luck.

    Any suggestions?

    #60386
    mrhoratio
    Member

    I just found a blog post about this, where the author has made the code into a plugin. It’s available for download here:

    How to remove forum and topic keyword from bbpress url

    The author lists two minor issues here, which hopefully someone here can suggest a fix for:

    • The Link to BBpress admin board link does not work from main site. It redirects to home page. You will need to manually type the link to go inside.

    • In case you type something which does not exists as http://sitename.com/<bbpress-directory>/sdaksda it returns http://sitename.com/<bbpress-directory&gt:// . An extra slash.

    #56471
    mrhoratio
    Member

    Chris, you have a point. However the URL structure of forums and topics always begin with “forum” or “topic”. As in:

    http://www.example.com/bbpress/forum/pets-discussions/

    http://www.example.com/bbpress/topic/my-sweet-dog

    So it would seem that it should be possible to remove the “bbpress” from the URL without interfering with a WordPress installation.

    Having said that, I think the solution proposed in the thread I referred to in my last post (https://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done) is a much more elegant solution for shortening the bbPress URLs.

    #56470
    chrishajer
    Participant

    It could work like that I think if there were no website (like WordPress) in the www root. Otherwise, how does the server know it’s a bbPress page vs. a WordPress page?

    If you are running a forum only on a domain, then it would be silly to have it in any sort of directory at all. Otherwise, if you have a website in the root, you have to put bbPress into some sort of directory to prevent confusion.

    #56469
    mrhoratio
    Member

    Just found an earlier thread which hits on a similar problem with shortening the bbPress URL:

    nicer slug url rewrite plugin (done!)

    In the thread’s example. In shows you how to shorten a url like:

    http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog

    to:

    http://www.example.com/bbpress/pets-discussions/my-sweet-dog

    Now, if it could also be shortened to:

    http://www.example.com/pets-discussions/my-sweet-dog

    That would be even better.

    #64586
    Shagalaga
    Member

    Any theme changes to do?

    #64585
    javalizard
    Member

    wp_validate_auth_cookie has an error. When hashing for the key

    $key = wp_hash($username . $expiration);

    WordPress and BBPress do it differently thus nullifying the ability to integrate the cookies of the two.

    The problem is that this in bbpress pluggable.php:

    $key = wp_hash($username .’|’. $expiration);

    should be this:

    $key = wp_hash($username . $expiration);

    There are a few other places where this needs to be fixed too

    #64785
    _ck_
    Participant

    I am getting better at routines to find non-english bbPress sites and have now added a few hundred more sites!

    (bbPress is being used in at least two dozen countries!)

    #56464
    mrhoratio
    Member

    Hi bobby, I tried out your hack in bbPress 0.9, and it doesn’t seem to work. Here’s what I did:

    I have my bbPress directory installed in a directory called “forums” in the root web directory. So the URL to access the forums’ home page is:

    http://www.example.com/forums

    and accessing a forum titled “test forum” is at this URL:

    http://www.example.com/forums/forum/test-forum

    a topic titled “test topic” is at this URL:

    http://www.example.com/forums/topic/test-forum

    I implemented your hack, and changed “forum” to “board” in the template-functions.php. I copied the rewrite rules from rewrite-rules.php and placed them into .htaccess file in the root web directory. I also added the two lines of code you suggested in that file:

    RewriteRule ^board/(.+)/page/([0-9]+)$ /forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^board/(.+)/?$ /forum.php?id=$1 [L,QSA]

    I also tried adding this to the rewrite-rules.php:

    RewriteRule ^board/([^/]+)/page/([0-9]+)/?$ <?php bb_option( 'path' ); ?>topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^board/([^/]+)/?$ <?php bb_option( 'path' ); ?>topic.php?id=$1 [L,QSA]

    When I go to this URL:

    http://www.example.com/board/test-forum

    I get a 404 error.

    However, when I go to this url:

    http://www.example.com/forums/forum/test-forum/

    It redirects and changes the URL in the address bar in the browser window changes:

    http://www.example.com/forums/board/test-forum/

    That also brings up a 404 page.

    Also, when I go this URL:

    http://www.example.com/topic/test-topic

    The URL works, but it redirects and changes the URL in the address bar in the browser window changes to:

    http://www.example.com/forums/topic/test-forum

    I am a little perplexed as to what is going on.

    #64840
    bobbyh
    Member

    Thanks Chris! All my PHP scripts were OK (no syntax errors), but eliminating one more possible cause is always helpful. :-)

    It turns out that this Email Notifications plugin (https://bbpress.org/forums/topic/plugin-post-notification?replies=44) was causing the problem. After disabling that plugin, there are no “delays in posting” and there is never a 500 error. There must be a scaling problem with the plugin that started after the tables hit a certain size…

    Thanks again for your help, Chris! :-)

    #56460
    mrhoratio
    Member

    Hey, I’m trying to figure this out also. Anyone figured out a way to remove the first “forum” in http://www.example.com/forum/forum/forum-name. So that the URL is shorter? I tried doing it with mod_rewrite, but having some issues with bbPress automatically redirecting.

    #3343
    gerikg
    Member

    On WordPress, the plugin area it will show:

    There is a new version of “PLUGIN” available. Download version X.X here or upgrade automatically.

    when there is an upgrade.

    Can someone make that for BBPress?

Viewing 25 results - 57,351 through 57,375 (of 64,430 total)
Skip to toolbar