Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'codes'

Viewing 25 results - 1,601 through 1,625 (of 1,678 total)
  • Author
    Search Results
  • #77788
    chandersbs
    Member

    I really love bbPress, but still wished some features existed by default. I know it’s doable via plugins, but default features are more cool, you can always turn it off. I really dislike the fact that some of the solutions I have seen on this forum, are related to “integrate your forum with WordPress, and use this plugin and it will work”, no, I don’t like that. bbPress should be able to do stuff on its own, without WordPress.

    I don’t want to install WordPress for the sake of making some things work. I have been a WordPress user for so many years already, but still I refuse to do that. I have managed to convert my forum, which was originally SMF into bbPress (SMF > phpBB > bbPress), that was a lot of work, but I’m really happy I did that.

    bbPress is by default very EMPTY, very very very empty. I was not used to a forum, with so less features and options. My users didn’t like it. I managed to add a lot of features via plugins. Now my users are a bit happy, I’m also very happy.

    The best part I love so far is, that making changes not always is so difficult compared to SMF or phpBB. phpBB is the last forum software on this planet I’d want to use, OMG so difficult to make changes. SMF is one of the best out there, but has some limits due to their copyright system.

    Some things I’d really love to see happening anytime very soon:

    1. A codex page, with detailed instruction about the codes, just like its big brother WordPress has, at least a start, so we, the webmasters, can do more cool stuff

    2. More features by default, such as:

    a. Private message

    b. Avatar upload

    c. Memberlist

    d. Quote option in topics

    e. Smilies

    These are some very basic options.

    I’m sure bbPress will be one of the most professional forum software out there one day, it’s not so far yet, but I see it happen.

    That’s why I’m a proud user of this software.

    #78106

    In reply to: Bavatars doesn't work!

    Marius-
    Member

    Again, I have no clue about permissions and codes and stuff. I just upload files to my server. And no, that directory does not exist. Atleast not as I can see.

    Marius-
    Member

    Thanks man. Can I post both codes without them conflicting each other?

    Both border radius and mozilla codes?

    And using border-radius, do you have input each of the four corners, like in the Moz-code? Or can you just specify one line like the one you gave me?

    #56568
    anandasama
    Member

    Somehow both of your codes doesnt work.

    #76617
    Gautam
    Member

    Create a functions.php file in your theme folder, and write this in it:

    <?php
    function get_post_teaser($chars = 200){
    global $bbdb;
    $topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
    $first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
    $content = substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0, $chars); //gets the first 200 chars of the post
    return $content;
    }
    ?>

    Then at the front page, put this where you need to display the post text (it should be inside the loop):

    <?php echo get_post_teaser(200); ?>

    You can change that 200 to anything, any number of letters you want. Default is 200.

    I think, this should work.

    #75196
    Gautam
    Member

    Can you give me the current source of the plugin you have made?

    You can get the post text (of the first post of the topic) by:

    global $bbdb;

    $topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic

    $first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");

    $content = urlencode(substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0,300));

    $content = str_replace('+','%20', $content);

    $content = str_replace("’","'", $content);

    $post_summary = stripslashes($content);

    #76122

    I meant show code in the forums.

    This is code, it's preformatted
    so that I can space things out funny.

    AdSense For bbPress seems to be broken with bb 1.0.1, but seeing as the plugin tells you to edit your theme, you’re probably going to be best off just putting in your codes into your theme template files.

    #76121
    birdy404
    Member

    oh and in your response you’d mentioned something about wanting to show codes…no, i don’t want to show the codes. All i want is for the ads to show on the pages i want them to.

    thanks!!

    #76118
    birdy404
    Member

    i downloaded the plugins ADSENSE FOR BBPRESS and GOOGLE ADSENSE CONFIGURATION. The former gives an option to insert codes but when i put in my OpenX code nothing shows up. The latter, however, displays my OpenX ads, only problem is it shows up in the footer when i want it in the header and between posts. i tried inserting the html codes directly in my themes but it shows as html codes and not as an ad. am i doing something wrong? please let me know.

    Also, can any of you please help me configure it to not only show up in the footer? here’s the coding for that plugin:

    <?php

    /*

    Plugin Name: Simple Google Adsense

    Plugin URI: http://www.strapontins.org/people/rentendre/simple-google-adsense-bbpress/

    Description: Add Google Adsense code in your bbPress forum, in the footer :) All users are welcome to improve on it :p

    Author: Frédéric Petit

    Author URI: http://www.strapontins.org/

    Version: 0.2

    License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/

    */

    add_action(‘bb_admin_menu_generator’, ‘bb_gad_configuration_page_add’);

    add_action(‘bb_admin-header.php’, ‘bb_gad_configuration_page_process’);

    function bb_gad_configuration_page_add() {

    bb_admin_add_submenu(__(‘Google Adsense Configuration’), ‘use_keys’, ‘bb_gad_configurtion_page’);

    }

    function bb_gad_configurtion_page(){?>

    <h2><?php _e(‘Google Adsense Configuration’); ?></h2>

    <form class=”options” method=”post” action=””>

    <fieldset>

    <label for=”ga_key”>

    <?php _e(‘Google Adsense User Id:’) ?>

    </label>

    <div>

    <textarea class=”text” name=”ga_key” id=”ga_key” value=”<?php bb_form_option(‘ga_key’); ?>” ></textarea>

    <?php _e(‘Put your adsense code, without the code of the script pagead2.googlesyndication.com/pagead/show_ads.js’); ?>

    </div>

    </fieldset>

    <fieldset>

    <?php bb_nonce_field( ‘ga-configuration’ ); ?>

    <input type=”hidden” name=”action” id=”action” value=”update-ga-configuration” />

    <div class=”spacer”>

    <input type=”submit” name=”submit” id=”submit” value=”<?php _e(‘Update Configuration »’) ?>” />

    </div>

    </fieldset>

    </form>

    <?php

    }

    function bb_gad_configuration_page_process() {

    if ($_POST == ‘update-ga-configuration’) {

    bb_check_admin_referer(‘ga-configuration’);

    if ($_POST) {

    $value = stripslashes_deep( trim( $_POST ) );

    if ($value) {

    bb_update_option(‘ga_key’, $value);

    } else {

    bb_delete_option(‘ga_key’ );

    }

    } else {

    bb_delete_option(‘ga_key’);

    }

    $goback = add_query_arg(‘ga-updated’, ‘true’, wp_get_referer());

    bb_safe_redirect($goback);

    }

    if ($_GET) {

    bb_admin_notice( __(‘Configuration saved.’) );

    }

    }

    // Bail here if no key is set

    if (!bb_get_option( ‘ga_key’ ))

    return;

    function createGAdCode($accountId) {

    $code .= ‘<div class=’bbpress_adsense’>’ . “n”;

    $code .= ‘ ‘ . $accountId . ‘ ‘ . “n”;

    $code .= ‘<script type=’text/javascript’ src=’http://pagead2.googlesyndication.com/pagead/show_ads.js’></script>&#8217; . “n”;

    $code .= ‘</div>’ . “n”;

    return $code;

    }

    function insertGAdCode() {

    $accountId = bb_get_option(‘ga_key’);

    if ($accountId != ”) {

    echo createGAdCode($accountId);

    }

    }

    add_action(‘bb_foot’, ‘insertGAdCode’);

    ?>

    #15321
    birdy404
    Member

    Hello,

    so i’m VERY new to bbpress so i need all the help i can get. I’m trying to find a way to insert ads (NOT google ads) in my forum but every ad plugin i see on here seems to be designed for google ads. Can someone please tell me which plugin to use to get my ads to work in the forums? I already have ad codes from OPENX, all i need is the right plugin to use.

    thanks a bunch!

    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

Viewing 25 results - 1,601 through 1,625 (of 1,678 total)
Skip to toolbar