Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,026 through 24,050 (of 32,468 total)
  • Author
    Search Results
  • #76215

    In reply to: Closed registrations

    grosbouff
    Participant

    I have mydomain.com

    My bbpress is at

    mydomain.com/bbpress

    but I use a subdomain

    forums.mydomain.com which redirects on it.

    I put an .htaccess file inside /bbpress with this content

    Redirect 301 /register.php http://www.mydomain.com/wordpress/wp-login.php?action=register

    Redirect 301 /bb-reset-password.php http://www.mydomain.com/wordpress/wp-login.php?action=lostpassword

    But it does nothing. Chmodd is 755.

    I try too with

    Redirect 301 /bbpress/...

    and

    Redirect 301 (no start slashes)

    and it does not work either.

    Any idea ?

    Thanks !

    Any idea ?

    #76630
    batrachoid
    Member

    @Ipstenu, I knew there had to be a reason no one else had suggested it. :

    #77770
    DennisH
    Member

    At this point I’ll take 1 out of 3. :)

    I’m not talking about plugins. I’m talking about having to hack almost every bbpress php file to include the wp header and footer or having to hack the config files.

    The phpbb solution at the time (a year ago)was a HUGE F@#*ING HACK, but now that phpbb has a automod (or whatever they are calling it) it’s basically as easy as a plugin.

    I’m not looking for the login form (I’m building a lightbox for that), I’m talking about:

    “Welcome, _ck_ ! View your profile (Admin | Log Out) 5 New Private Messages”

    As far as Avatars I’m using the wp-united on the live site (phpbb avatars). For BB I have not found a solution yet that will work or integrate into both BB and WP.

    #77769
    _ck_
    Participant

    “Easy integration with your blog” <- if that’s the biggest problem you have with what bbpress promises, you are doing great. I actually have a problem with two of the three words in the upper right hand corner of every page on bbpress.org due to 1.0

    Why is it hard to put a bbpress login box in wp? Pull up the bbpress login page in your browser, view the source and copy everything between <form... </form> and paste it into WP wherever you’d like and add a little bit of PHP code to detect if the user is logged in or not to offer them the form. 10 minutes tops.

    What are you using now for avatars in WP?

    Plugins are not hacks. Hacks are when you hack the core.

    Is the phpbb solution a clean copy of phpbb with plugins or is it’s core heavily hacked, hence cannot keep up with upgrades/security fixes easily?

    #16072
    grosbouff
    Participant

    Hi, I’ve written a custom plugin to convert my old bbcode syntax myurl to myurl>.

    It worked for a large amount of posts but I still get a lot (also) of errors.

    Here’s a query error :

    UPDATE bb_posts SET post_text ='Bon c'est sur que si on compare :rolleyes:nnimg-1933139bpys.jpgnnimg-1933292biwg.jpg' WHERE post_id = 114958

    As you see, the url tags have not been updated neither.

    My function :

    function replace_bbcode_urls() {

    global $bbdb;

    $regex=”#[url ?=([^[]*) ?] ?([^]]*) ?[/url]#”;

    $sql = “SELECT post_id, post_text FROM bb_posts WHERE post_text LIKE ‘%[url=%'”;

    $results = $bbdb->get_results($sql);

    foreach($results as $row){

    $new_monchamp = preg_replace($regex, “\2“, $row->post_text);

    $sql2 = sprintf(“UPDATE bb_posts SET post_text =’%s’ WHERE post_id = “.$row->post_id, mysql_real_escape_string($new_monchamp));

    if ($bbdb->query( $bbdb->prepare($sql2) )) {

    //echo $row->post_id.”
    “;

    }else {

    //echo “error processing post “.$row->post_id.”
    “;

    echo $sql2.”
    “;

    exit;

    }

    }

    }

    Help would be appreciated.

    Thanks !

    #77767
    _ck_
    Participant

    As far as I know, bbPress adds no special abilities or requirements to BuddyPress, it’s simply able to use the usertable directly, so you in theory should be able to use your phpbb solution with BuddyPress too.

    You have to understand bbPress was never designed originally to deeply integrate into WordPress, only use the user-table. Deep integration was an afterthought – years after it was originally released and a mish-mash of legacy was established. Matt had a 180 degree turnaround on that process with bbPress 1.0 being rewritten to use BackPress instead. If WordPress ever is redesigned to use BackPress itself (don’t hold your breath, it could be years) deep integration could be even easier and much lighter weight.

    I’m not saying this to be mean or unfair, but very simply, if you don’t like something you see in bbPress 1.0, don’t adopt it now thinking it will change sometime soon, it won’t and you’ll only be very disappointed. bbPress development is quite obviously NOT developed around user requests, it’s developed around Automattic requirements. It’s the exact same thing for WordPress and nothing new policy-wise. Everything else is left to plugin developers.

    That said, I would stop using bbPress in heartbeat if they started throwing in many of the features that people are demanding be included as built in. I already have a big enough problem with many of the hardcoded “features” already.

    _ck_
    Participant

    I just realized today if you are using a bunch of plugins that have their options stored in the bbpress meta, your query count has jumped on every page in bbPress 1.0.x

    Apparently 1.0 now has a reserved list of option names that are pre-loaded, instead of *all* of them like 0.9 could. Plugins have to add their desired names to the pre-caching option, which of course 100% of all pre-exisiting plugings are not aware of, so they all cause an extra query in 1.0

    This isn’t a magic bullet by any means but you can at least fix this behavior. There isn’t any flag you can turn on to cache all (that would be far too easy) but you can fool the routine by loading all the options before it gets around to it.

    Simply make the below into a mini-plugin, or right click here

    and save as _load-options.php in your my-plugins/ directory

    I strongly suggest you save it with a leading underscore so it auto-loads.

    <?php
    /*
    Plugin Name: Load Options
    */

    global $bbdb;
    $results = $bbdb->get_results( "SELECT meta_key, meta_value FROM $bbdb->meta WHERE object_type = 'bb_option' ");
    foreach ( $results as $options ) {
    wp_cache_delete( $options->meta_key, 'bb_option_not_set' );
    wp_cache_set( $options->meta_key, maybe_unserialize( $options->meta_value ), 'bb_option' );
    }
    ?>

    #77763
    johnhiler
    Member

    A lot of those features do exist… although you’re not going to have much luck getting all those features/plugins to work on bbPress 1.0. bbPress 1.0 is a very new release, and most of the plugins won’t be upgraded until later this year.

    That said, I get the feeling that you would like WordPress and bbPress to interoperate more? I don’t just mean integrated signins – some of your points suggest that plugins would ideally work on both systems interchangably… I don’t think that’s on their product map. Even having more interoperability between the two themes systems seems pretty low on the bbPress priority list.

    It’s all good to have concerns about bbPress! I have many concerns myself. :-) I’m staying on bbPress for now, because it is the only option for a lightweight forum with a plugin model. I’m very concerned about the 1.0 path though, and am starting to think through whether or not I want to stay on the bbPress platform in the long term. So I especially appreciate hearing your concerns. :-)

    #77762
    DennisH
    Member

    @gardenfl: My main complaint would be that sifting through this site for solutions it is sometimes difficult to figure out version compatibility.

    Yes, searching for solutions is really frustrating. Like most people trying to decide if they should jump in I looked trough the plugins and other mods only to find out later many/most are out of date. Installing a older version of BB isn’t a real option when you want a forward looking cms. This is of course no ones fault (at least not the plugin developers), I am very thankful for what is there.

    @chrishajer: bbPress is not right for some people, but it’s just fine for a lot of others.

    But how do we define “a lot of others?” I think there are huge numbers of users out there looking for a truly integrated solution. I don’t see many people using bbPress as a stand alone community forum. There are other forum platforms that fulfill that need. I believe most of the adapters of BB will be users that want to integrate a forum into their current site. BB may be good for someone that just wants a support forum (or something along those lines), but the true market is site owners that want to add more community features…. and that means true integration.

    @johnhiler: I agree that bbPress lacks many social features… but that’s not really the scope of the project, which is more focused on forums? If there’s a specific feature you’d like to see, let us know in the forums!

    A forum is a “social feature.” Now that does mean it has to be Facebook, but it should have some basic features.

    These are some of the features I would love to see some day (I know some can be done with plugins and hacks, but I would like to see more “stable” solutions):

    bbPress “login box” in WP (with new private messages and profile link).

    Integrated bbPress in a WP page that strips out the bbPress header and footer (theme integration)

    Integrated Avatars

    Blog Comments listed in bbPress profile

    Current forum topics/replies in WP

    Integrated bbcode in WP comments

    Facebook Connect, Twitter, OpenID etc.

    I’m sure I can think of more, but those are the ones that come to mind.

    Here is a good list of features I would like to see:

    http://www.wp-united.com/features/

    The reason i decided to post this is to help voice concerns that may one day lead to a better BB and that will in turn lead to more developers and users. Not yet being knowledgeable enough to create these add-ons myself my voice is all I can currently contribute. Although, I soon hope to share how I overcame some of these issues and provide some inspiration and tips for others. :)

    #77818
    Detective
    Member

    I use this on my site to login via wpmu and get redirected to bbpress:

    add_action('bb_init', 'bp_redirect_registration');
    function bp_redirect_registration() {
    if (strpos($_SERVER['REQUEST_URI'], 'bb-login.php') !== false) {
    $ref = wp_get_referer();
    wp_redirect('http://ryuuko.cl/wp-login.php?redirect_to=' . urlencode($ref));
    }

    if (strpos($_SERVER['REQUEST_URI'], 'register.php') !== false)
    wp_redirect('http://ryuuko.cl/register');

    if (strpos($_SERVER['REQUEST_URI'], 'profile.php') !== false) {
    if (bb_is_user_logged_in() && isset($_GET['id']) && isset($_GET['tab'])) {
    $user = bb_get_current_user();
    if ($_GET['tab'] == 'edit' && $_GET['id'] == $user->ID)
    wp_redirect('http://ryuuko.cl/members/' . $user->user_login . '/profile/edit');
    //TODO: see how to handle moderators editing user profiles

    }

    }
    }

    of course, it’s not complete yet (check out the TODO). But it works OK.

    #76628

    Yes, but modding core files is bad :) Makes upgrades a PITA.

    #76626
    johnhiler
    Member

    Role Manager only works on version 1.0 and up…

    _ck_ just wrote a plugin last week that removes the ability for moderators to see IPs anywhere in bbPress:

    https://bbpress.org/forums/topic/how-do-i-remove-the-posters-ip-address-from-the-post-display#post-55575

    Just stick it in a plugin information wrapper:

    https://codex.wordpress.org/Writing_a_Plugin#Standard_Plugin_Information

    And you should be good to go!

    #77811

    Okay, so take your totals and divide by 365 :) The numbers appear to be correct.

    #77815

    Put this in your forum’s .htaccess for a simple way:

    Redirect 301 /forums/register.php http://yourdomain.com/wordpressmu/wp-login.php?action=register
    Redirect 301 /forums/bb-reset-password.php http://yourdomain.com/wordpressmu/wp-login.php?action=lostpassword

    I’m using it on my WP/BB and WPMU/BB/BuddyPress sites :)

    #77758
    Detective
    Member

    I have the same problem, I solved it by filtering the display names:

    add_filter( 'get_user_display_name', 'rk_display_name' );
    function rk_display_name($name, $ID = 0) {
    if ( !seems_utf8( $name ) )
    return utf8_encode( $name );
    return $name;
    }

    Put this inside a plugin.

    #31442

    Topic: date and time

    in forum Troubleshooting
    DKB
    Participant

    Hi, I want to change the time and date format to Dutch. I saw this code for it

    ‘<?php topic_time(); ?>`

    in post.php:

    ` <?php printf(__(‘Posted %s ago’,’rag’), bb_get_post_time()); ?> <a href=”<?php post_anchor_link(); ‘

    #72251
    bhujhangi
    Member

    resolved hadn’t had to delete my wordpress install but have to check whether the integration works or not :)

    well it is due to the keys character support may not be the problem but keys surely are because of

    1. wrong defining of salt key

    2. mismatch of keys

    had defined secure auth key salt longer than the secure auth key cookie and wordpress LOGGED IN salt was not matching the bbPress LOGGED IN salt cookie, this wasn’t the root but wrong definition might have been.

    advice:

    while filling up these keys be patient and double check them.

    i am currently facing Fatal error: Call to undefined function in almost every file virtually :)

    that i think is due to functions integration with wordpress

    this all is due to this little function:

    require_once(‘path/to/wp-blog-header.php’);

    https://bbpress.org/documentation/integration-with-wordpress/

    thanks for the help

    #77705
    Rohan Kapoor
    Member

    Well, I deep integrate most sites I end up installing so the page makes sense as a link to the forums, :P

    #31431
    Oxhorn
    Member

    So my bbpress is broken, and I don’t know how to fix it.

    I built my site with wordpress in a sub directory. I integrated my bbpress with my wordpress and it worked great!

    Then I decided that I wanted my URL to look like its own domain, instead of a subdomain. My wordpress went from being

    brandonmdennis.com/oxhorn

    to

    oxhorn.com

    I saved my pagelinks and presto, everything is snazzy. I went to check my forum, however, and it was broken. My forum was missing, but I still saw the admin section. So no sweat, I logged into the dashboard and proceeded to change the URL in settings from

    brandonmdennis.com/oxhorn/forum

    to

    oxhorn.com/forum

    Thinking that this would solve the issue. I clicked update, and got to an “oops! page not found” screen. But now I can’t even log into my bbpress install dashboard. Everything I do now sends me to an “oops” error page.

    I tried uninstalling bbpress by removing the folder and removing the wordpress bbpress integration plugin. I tried doing a new, clean installation of bbpress, but when I get to step two I see the message “Woops! Looks like you already have bbpress installed” and it wont let me go further. I even tried installing it in a different subdirectory and got the same problem. My questions are:

    1) How do I re-install bbpress?

    2) Is there some code I need to remove from my wordpress installation?

    3) How do I re-integrate my bbpress with wordpress so that they share the same database? I had it working splendidly until I changed my WordPress domain name.

    WordPress site:

    oxhorn.com

    Bbpress installation:

    brandonmdennis.com/oxhorn/forums

    Thanks all!

    #77704

    Then you can create a PAGE in wordpress called Forums and it will link to the forums folder automatically.

    That entirely depends on your permalink structure. You shouldn’t need to make a page for ‘forums’ at all, if WP is set up correctly, even as a subfolder under the main wordpress folder. I never do :)

    jurasiks
    Participant

    don’t works with google translate http://translate.google.com/translate?hl=en&sl=en&tl=ru&u=

    works only at main page

    _ck_
    Participant

    It’s PHP 101

    $_SERVER['REQUEST_URI']

    jurasiks
    Participant

    Hello, i need to use current page link for some code, how to get it from bbpress?

    bb_uri(); returns main page link, but i need to get link where is user now.

    it’s possible?

    bbpress 1.0.2

    thank you

    upd1: found after 1 min: <?php bb_location(); ?> don’t works (returns only current name of page, etc: topic-page, forum)

    #77688
    hpguru
    Member

    Thank you. Works to me. :)

    #77686
    _ck_
    Participant

    I’ve put a ticket into Trac for you. If Sam agrees, it might show up in 1.1

    If you simply must have it now, you can try making a plugin:

    <?php
    add_action( 'bb_admin_notices' , 'forums_started');
    function forums_started() {printf('<p>'.__('Forums started %s ago.').'</p>', bb_get_inception()); }
    ?>

Viewing 25 results - 24,026 through 24,050 (of 32,468 total)
Skip to toolbar