Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'codes'

Viewing 25 results - 1,626 through 1,650 (of 1,693 total)
  • Author
    Search Results
  • smi1ey
    Member

    ashfame’s guide is pretty clear on the steps. For me, the key was going to http://YOURSITE/wp-admin/options, grabbing the AUTH keys there, then pasting them in the correlating section of the bbPress config.php file in the install. Once they both had the exact same cookie codes in their config files, it worked like a charm.

    #75681

    Sure… but be forewarned. i’m not familiar with php whatsoever and the bbPress structure. (so i’m sure i violated something) this is on 1.0. Not sure if this can be made into a plug-in or not, I have yet to read up on how to create those and the filter/hook stuff.

    (i have a small community ~1000 when all said and done – but some are savvy with firebug would just edit the form fields if disabled)

    profile-edit.php in the main root – everything labeled CHANGED

    // Instantiate the error object

    $errors = new WP_Error;

    if ( ‘post’ == strtolower($_SERVER) ) {

    $_POST = stripslashes_deep( $_POST );

    bb_check_admin_referer( ‘edit-profile_’ . $user_id );

    // Fix the URL before sanitizing it

    $user_url = bb_fix_link( $_POST );

    // Sanitize the profile info keys and check for missing required data

    foreach ( $profile_info_keys as $key => $label ) {

    $$key = apply_filters( ‘sanitize_profile_info’, $_POST[$key], $key, $_POST[$key] );

    if ( !$$key && $label[0] == 1 ) {

    $errors->add( $key, sprintf( __( ‘%s is required.’ ), esc_html( $label[1] ) ) );

    $$key = false;

    }

    }

    // Find out if we have a valid email address

    if ( isset( $user_email ) && !$user_email = is_email( $user_email ) ) {

    $errors->add( ‘user_email’, __( ‘Invalid email address’ ), array( ‘data’ => $_POST ) );

    }

    //CHANGED – added for duplicate email check on profile update

    if (isset( $user_email )) {

    if(changed_no_duplicate_email_update_user($user_email, $user->ID)) {

    $bad_input = true;

    $$key = false;

    $errors->add( ‘user_email’, __( ‘Email address already in use’ ), array( ‘data’ => $_POST ) );

    }

    }

    //ENDCHANGED

    // Deal with errors for users who can edit others data

    if ( bb_current_user_can(‘edit_users’) ) {

    // If we are deleting just do it and redirect

    if ( isset($_POST) && $_POST && $bb_current_id != $user->ID ) {

    bb_delete_user( $user->ID );

    wp_redirect( bb_get_uri(null, null, BB_URI_CONTEXT_HEADER) );

    exit;

    }

    // Get the user object

    $user_obj = new BP_User( $user->ID );

    // Store the new role

    $role = $_POST;

    // Deal with errors with the role

    if ( !isset($wp_roles->role_objects[$role]) ) {

    $errors->add( ‘role’, __( ‘Invalid Role’ ) );

    } elseif ( !bb_current_user_can( ‘keep_gate’ ) && ( ‘keymaster’ == $role || ‘keymaster’ == $user_obj->roles[0] ) ) {

    $errors->add( ‘role’, __( ‘You are not the Gate Keeper.’ ) );

    } elseif ( ‘keymaster’ == $user_obj->roles[0] && ‘keymaster’ != $role && $bb_current_id == $user->ID ) {

    $errors->add( ‘role’, __( ‘You are Keymaster, so you may not demote yourself.’ ) );

    }

    // Sanitize the profile admin keys and check for missing required data

    foreach ( $profile_admin_keys as $key => $label ) {

    if ( isset( $$key ) )

    continue;

    $$key = apply_filters( ‘sanitize_profile_admin’, $_POST[$key], $key, $_POST[$key] );

    if ( !$$key && $label[0] == 1 ) {

    $errors->add( $key, sprintf( __( ‘%s is required.’ ), esc_html( $label[1] ) ) );

    $$key = false;

    }

    }

    // Create variable for the requested roles

    foreach ( $assignable_caps as $cap => $label ) {

    if ( isset($$cap) )

    continue;

    $$cap = ( isset($_POST[$cap]) && $_POST[$cap] ) ? 1 : 0;

    }

    }

    // Deal with errors generated from the password form

    if ( bb_current_user_can( ‘change_user_password’, $user->ID ) ) {

    if ( ( !empty($_POST) || !empty($_POST) ) && $_POST !== $_POST ) {

    $errors->add( ‘pass’, __( ‘You must enter the same password twice.’ ) );

    } elseif( !empty($_POST) && !bb_current_user_can( ‘change_user_password’, $user->ID ) ) {

    $errors->add( ‘pass’, __( “You are not allowed to change this user’s password.” ) );

    }

    }

    // If there are no errors then update the records

    if ( !$errors->get_error_codes() ) {

    do_action(‘before_profile_edited’, $user->ID);

    //CHANGED – did we reset the email?

    $changed_do_email_reset = false;

    //ENDCHANGED

    if ( bb_current_user_can( ‘edit_user’, $user->ID ) ) {

    //CHANGED- if user updates email address – generate new password and email

    if ($user->user_email != $user_email) {

    $changed_do_email_reset = true;

    $changed_old_email = $user->user_email;

    }

    //ENDCHANGED

    // All these are always set at this point

    bb_update_user( $user->ID, $user_email, $user_url, $display_name );

    // Add user meta data

    foreach( $profile_info_keys as $key => $label ) {

    if ( ‘display_name’ == $key || ‘ID’ == $key || strpos($key, ‘user_’) === 0 )

    continue;

    if ( $$key != ” || isset($user->$key) )

    bb_update_usermeta( $user->ID, $key, $$key );

    }

    }

    if ( bb_current_user_can( ‘edit_users’ ) ) {

    if ( !array_key_exists($role, $user->capabilities) ) {

    $user_obj->set_role($role); // Only support one role for now

    if ( ‘blocked’ == $role && ‘blocked’ != $old_role )

    bb_break_password( $user->ID );

    elseif ( ‘blocked’ != $role && ‘blocked’ == $old_role )

    bb_fix_password( $user->ID );

    }

    foreach( $profile_admin_keys as $key => $label )

    if ( $$key != ” || isset($user->$key) )

    bb_update_usermeta( $user->ID, $key, $$key );

    foreach( $assignable_caps as $cap => $label ) {

    if ( ( !$already = array_key_exists($cap, $user->capabilities) ) && $$cap) {

    $user_obj->add_cap($cap);

    } elseif ( !$$cap && $already ) {

    $user_obj->remove_cap($cap);

    }

    }

    }

    //CHANGED – send confirmation emails, log them out

    if ($changed_do_email_reset) {

    $send_key_result = bb_reset_email( $user->user_login );

    if ( is_wp_error( $send_key_result ) )

    $error = $send_key_result->get_error_message();

    if ($changed_old_email) {

    $mail_result = bb_mail( $changed_old_email, bb_get_option(‘name’) . ‘: ‘ . __(‘Email Address Updated’), “Your email address has been updated and a confirmation message has been sent. Thanks!” );

    if (!$mail_result) {

    new WP_Error(‘sending_mail_failed’, __(‘The email notifying an email address change could not be sent.’));

    }

    }

    //kill their current session and break the password so they can’t log in until a reset.

    if ( bb_get_current_user_info( ‘ID’ ) == $user->ID ) {

    changed_break_password( $user->ID );

    bb_clear_auth_cookie();

    }

    //ENDCHANGED

    } else if ( bb_current_user_can( ‘change_user_password’, $user->ID ) && !empty($_POST) ) {

    $_POST = addslashes($_POST);

    bb_update_user_password( $user->ID, $_POST );

    if ( bb_get_current_user_info( ‘ID’ ) == $user->ID ) {

    bb_clear_auth_cookie();

    bb_set_auth_cookie( $user->ID );

    }

    }

    do_action(‘profile_edited’, $user->ID);

    //CHANGED – lets fire off a message on the template page to explain what we did

    if ($changed_do_email_reset) {

    wp_redirect( add_query_arg( ’emailupdated’, ‘true’, get_user_profile_link( $user->ID ) ) );

    //ENDCHANGED

    } else {

    wp_redirect( add_query_arg( ‘updated’, ‘true’, get_user_profile_link( $user->ID ) ) );

    }

    exit;

    }

    }

    then two helper functions

    function changed_no_duplicate_email_update_user($email, $id) {

    if ($email && $id) {

    global $bbdb;

    if ($bbdb->get_row($bbdb->prepare("SELECT ID FROM $bbdb->users WHERE user_email = %s AND ID <> %d ", $email, $id))) {

    return true;

    } else {

    return false;

    }

    }

    }

    function changed_break_password( $user_id ) {

    global $bbdb;

    $user_id = (int) $user_id;

    if ( !$user = bb_get_user( $user_id ) )

    return false;

    $secret = substr(bb_hash( ‘changed_break_password’ ), 0, 13);

    if ( false === strpos( $user->user_pass, ‘—‘ ) )

    return $bbdb->query( $bbdb->prepare(“UPDATE $bbdb->users SET user_pass = CONCAT(user_pass, ‘changed’, %s) WHERE ID = %d”, $secret, $user_id) );

    else

    return true;

    }

    #15212
    taboo
    Member

    Hi,

    I started investigating possibilities of translation bbPress to Polish. This language along with quite a few non-germanic languages has quite complex plural forms (3 forms instead of just 2). Not getting into much detail, because of the way functions.bb-core.php hardcodes seconds, hours, days… names it’s hard to do a proper translation.

    To do it right I’d need a function that uses “%d month” and not just “month” or “months” as defined here:

    // array of time period chunks

    $chunks = array(

    array(60 * 60 * 24 * 365 , __(‘year’) , __(‘years’)),

    array(60 * 60 * 24 * 30 , __(‘month’) , __(‘months’)),

    array(60 * 60 * 24 * 7, __(‘week’) , __(‘weeks’)),

    array(60 * 60 * 24 , __(‘day’) , __(‘days’)),

    array(60 * 60 , __(‘hour’) , __(‘hours’)),

    array(60 , __(‘minute’) , __(‘minutes’)),

    array(1 , __(‘second’) , __(‘seconds’)),

    );

    Any help would be very much appreciated.

    #75649

    that is true. i modified the main register.php page (not the template – as i have a special flow for registration outside the standard bbpress way) and checked against the profile_info_keys and registered the error. But I guess one could override bb_new_user and throw a new error for a duplicate too

    But, i’m not sure how one would go about handling the updating of a profile, on the main profile-edit.php page, i see this hook but its after the error codes have been checked. So I guess one could hack this page for the time being for a duplicate email and handle appropriately

    if ( !$errors->get_error_codes() ) {
    do_action('before_profile_edited', $user->ID);

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

    #64729
    technotip
    Participant

    This doesn’t solve the other problems like.. Underlining, Stricking the text, font size increasing etc. And in the links that we add using TinyMCE editor gives an extra quote in the resulting form content link!

    I am using bbpress 1.0 and there is a file by name functions.bb-forums.php inside bb-includes folder. I opened it and saw these codes

    function bb_allowed_tags() {
    $tags = array(
    'a' => array(
    'href' => array(),
    'title' => array(),
    'rel' => array()),
    'blockquote' => array('cite' => array()),
    'br' => array(),
    'code' => array(),
    'pre' => array(),
    'em' => array(),
    'strong' => array(),
    'ul' => array(),
    'ol' => array(),
    'li' => array()
    );

    I added 'p' => array(), to solve the <p> tag problem.

    But all other problems regarding underline, stricking the text, adding image also doesn’t work(I have installed allow-image plugin), font size increasing also doesn’t work.

    Please help.. and if possible get back to me at satish at technotip DOT org [ Its .ORG and not .COM ].

    Thanks

    #15116
    Burakhan
    Member

    Hi everyone,

    I want to disable HTML codes in posts. I am using “BBcode Lite for bbPress” and I dont need html codes to edit my post. When my member want to add a HTML code that is useful to forums the code works and havent seen properly. How can I disable?

    #74728
    the_Wish
    Member

    This, however, is still true. Has anyone else encountered this trouble?

    Trying to determine if it’s a plugin in need of update, or if it’s an error on my part, or an actual issue in RC3.

    Ok, so I’ve just revisited the additional code issue for my forum and it is indeed the “Allow Images” Plugin that triggers this behaviour. Not only does it scramble your IMG codes, but all other codes as well. It didn’t do this up to RC1 though.

    It’s working now for me and I used the chance to also upgrade my custom theme to Kakumei RC3 Standards which, yes, involved the deactivation of the external Page Links plugin.

    Works good now.

    #15040
    ebalchev111
    Member

    Hello!

    I am looking for parnter to create together plugin for buddypress.

    Script already works http://sinfulopening.com/search/

    – script takes names and desriptions of all caustomers fields from buddypress and create form

    – in this form you can check fields used in search and what kind of search

    – script generats search form

    – you can install this form on the page and search users.

    With this plugin easy to create, for example, dating service with buddypress.

    In future I want to create search for distance with zipcodes.

    I don’t know buddypress good and don’t have expirience to create plugins.

    Please, help.

    Hi

    I have actiavated BBcode Buttons Toolbar and entered text like below and selected Bold.

    ( BB Button is not working when I am trying bold , Itallic, etc ) , but my text after i posted it is not appearing in BOLD and again my text is showing like above with codes () etc. none of the tool bar options are working expect smile symbols.

    Please look into this.

    Thanks,

    -Vikram.

    #74415
    chrishajer
    Participant

    Ahh. You want to extend the registration form then.

    This plugins do something similar, maybe you could use one as a starting point?

    https://bbpress.org/plugins/topic/bbsocialize/

    https://bbpress.org/plugins/topic/gaming-codes/

    https://bbpress.org/forums/topic/plugin-allow-additional-or-custom-profile-fields

    Also, there has been some discussion recently in these forums of just how to do this, but I can’t find it right now.

    #73724
    Ramoonus
    Member

    it seems i have no secure_auth_salt listed in options.php :S

    @byles; ive replaced all security codes a few times

    #71737
    kinkythought
    Member

    How exactly do you go about redirecting? Can it be done through a plugin or does one have to hard-code files? Which files need to be edited? I am trying to do the same thing, (almost… I’d like profiles, etc. to be managed through bbpress, but registration through wp only since I use invite codes).

    #72935
    zeronix
    Member

    I tried to include my Header.php content (some codes of it) to my bbpress header.php but always got trouble with the scripts.

    It seems the codes are different and wont work together.

    Maybe someone can help us because i am a beginner too.

    Maybe there´s a way to create a new Page in WP and include bbPress there?

    I hope so.

    edlvg
    Member

    Hello, so how’s the code if we’d like to add posteb by… in …

    I get the topic and forums list but’d like to show the author.

    Tried the codes at the beginning but doesnt seem to work, fatal errors :S

    thanks in advance

    ernesto

    #72631
    wpitn2shape
    Member

    I get the same error with that code, too. Is it supposed to be that short? I’m a tad confused, sorry.

    If you thought I said the whole file was blank, I did not mean that. The line is, and it’s after that code.

    What’s different between the two codes?

    Thanks for trying to help! Hope we can fix this. :-)

    #4998

    I tried integrating them but messed up a lot. So trying a different approach what I want to achieve in my project.

    I need WP as CMS, bbPress as forum script and custom php code which will create a member’s area. I want site-wide login sync.

    Tried _ck_’s plugin but can’t make it to working even after using 0.0.3 version and I dont want to use Ann’s method of downgrading cookie of what WP 2.7.1 uses. Just because this project won’t be under me for long, so will opt a method which is more future proof. So I am thinking of directing all the login requests of WP & bbPress to my custom login page which will be the only means of login & logout on the site. I want to use plugins for both WP & bbPress so as to maintain future compatibility. I can always update those custom codes or can i have a plugin for that too.

    I may be running wild here but it seems quite easily feasible too.

    Waiting for your suggestions!

    #4682

    I’m having trouble getting bb codes to work, via plugin buttons or otherwise. I even hard coded a link to a podcast on one of my other blogs, and url code isn’t working. Any idea what the problem is?

    #71180

    In reply to: wp function error

    cre8tivexjs
    Member

    i tried switching my mt’s Grid server to php5 and the errors are gone …

    if you can switch your server into php5 as well that should fix the MBCS error problem.

    be careful though as some php4 codes may not work in php5

    #4605
    wakish
    Member

    Hi,

    I would like to know the reason of filtering every ouput, even after being sanitized, with the following statement: return apply_filters(‘sanitized_string’, $string, $original_string, $context);

    I can’t understand the purpose of this (surplus?) filtration..

    And the “apply_filters” also have another sister function like “merge_filters” and “remove_filters”.

    I would be glad to know the purpose of these, thanks!


    Function details:

    1) found in file ./bb-includes/wp-functions.php as from line 579

    2) the function:

    function apply_filters($tag, $string) {

    global $wp_filter, $merged_filters;

    if ( !isset( $merged_filters[ $tag ] ) )

    merge_filters($tag);

    if ( !isset($wp_filter[$tag]) )

    return $string;

    reset( $wp_filter[ $tag ] );

    $args = func_get_args();

    do{

    foreach( (array) current($wp_filter[$tag]) as $the_ )

    if ( !is_null($the_) ){

    $args[1] = $string;

    $string = call_user_func_array($the_, array_slice($args, 1, (int) $the_));

    }

    } while ( next($wp_filter[$tag]) !== false );

    return $string;

    }

    #4590
    Daniel Juhl
    Participant

    Hi,

    I’ve just tested an upgrade of my bbPress 0.8.2.1 forum. The upgrade goes to bbPress 0.9.0.4, but after the upgrade has finished and the upgrade/installation script has asked, and been given permission, to upgrade the database, it seems like theres some problems with special characters. The forum is in danish, and therefore æ, ø and å is very common, but after the upgrade they just show up as their respective UTF8 codes. I can’t figure out, and but the header and my browser is set to UTF8.

    I can tell, that the forum was and still are in UTF8, but the collation on the database tables is latin1_swedish_ci

    Anyone with an idea of the problem?

    #70659
    Ganzuelo
    Participant

    I got alpha to work,. I then installed both bbpress plugins for wordpress. I went back to change user options in the bbpress admin panel and error messages came up.. goto http://willclan4food.net for details.. The error codes are popping up there

    #4376

    I got to thinking, maybe we’re doing it all wrong.

    Rather than try to work WordPress into bbPress, why not just include the bb-config.php file inside the wp-config.php file instead.

    Viola, from what I can tell, everything works like a charm. CK, your bbCode plug-in breaks some of the WordPress tags/shortcodes though, [caption] etc…

    This way, bbpress can be directly referenced inside the entire website, and WordPress can use it’s functions AND the ones from bbPress to micromanage the login situation.

    I really need to investigate this more, but I think that I might be on to something with this whole integration issue.

    A simple plug-in could be made to include the core WordPress queries inside bbPress for pages, categories, etc… Without having to duplicate load everything inside the header, etc…

    Okay, so I just did this like 20 minutes ago and I’m a little giddy about the idea, and I’m sure there’s a myriad of reasons why this won’t work, but I think it’s a neat idea…

    #69411
    _ck_
    Participant

    bbPress Plugin Index, A – M

    A

    B

    C

    D

    E

    F

    G

    H

    I

    L

    M

    #67236
    Tom Lynch
    Participant

    I have investigated some more it seems that new users of mu which own blogs get assigned as inactive on bbpress, dispite the role map being set to give them member level or higher for all levels on the role map.

    Any suggestions, theres no error codes it just plain doesn’t like wpmu’s role map

Viewing 25 results - 1,626 through 1,650 (of 1,693 total)
Skip to toolbar