Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 25,226 through 25,250 (of 32,505 total)
  • Author
    Search Results
  • #73269
    johnhiler
    Member

    Just installed this on a live forum! A bit nervous, but everything seems to be working great so far. :-)

    A few questions/thoughts:

    * The Moderation Log lives under the Users tab… what do you think of putting it under the Plugins or Manage tab?

    * When a topic deletion is logged or marked as spam, the moderation log says, Username (key) deleted topic “Topic Name” which is great. It’s linked directly to the deleted topic though – maybe there could be an extra ?view=all appended to it?

    * Is it possible to also log when topics are closed and opened?

    This is super exciting – thanks for all of this!

    #72896
    deadlyhifi
    Participant

    The updated plugin has been working ok except it has major flaws :)

    1 – The user displayname is not being put into the database – therefore all new users appear as a blank when they post.

    2 – registration error messages aren’t displayed. (e.g. Invalid email)

    The fix was straightforward. The bb_new_user function needed updating as so:

    if (!function_exists('bb_new_user')) :
    function bb_new_user( $user_login, $user_email, $user_url, $user_status = 0 ) {
    global $wp_users_object, $bbdb;

    // is_email check + dns
    if ( !$user_email = bb_verify_email( $user_email ) )
    return new WP_Error( 'user_email', __( 'Invalid email address' ), $user_email );

    if ( !$user_login = sanitize_user( $user_login, true ) )
    return new WP_Error( 'user_login', __( 'Invalid username' ), $user_login );

    // user_status = 1 means the user has not yet been verified
    $user_status = is_numeric($user_status) ? (int) $user_status : 0;

    $user_nicename = $_user_nicename = bb_user_nicename_sanitize( $user_login );
    if ( strlen( $_user_nicename ) < 1 )
    return new WP_Error( 'user_login', __( 'Invalid username' ), $user_login );

    while ( is_numeric($user_nicename) || $existing_user = bb_get_user_by_nicename( $user_nicename ) )
    $user_nicename = bb_slug_increment($_user_nicename, $existing_user->user_nicename, 50);

    $user_url = bb_fix_link( $user_url );
    $user_registered = bb_current_time('mysql');
    $password = wp_generate_password();
    $user_pass = wp_hash_password( $password );

    $user = $wp_users_object->new_user( compact( 'user_login', 'user_email', 'user_url', 'user_nicename', 'user_status', 'user_pass' ) );

    if ( is_wp_error($user) ) {
    if ( 'user_nicename' == $user->get_error_code() )
    return new WP_Error( 'user_login', $user->get_error_message() );
    return $user;
    }

    $user_id = $bbdb->insert_id;
    $options = bb_get_option('approve_user_registration_options');
    bb_update_usermeta( $user_id, $bbdb->prefix . 'capabilities', array('waitingapproval' => true, 'member' => true) );
    approve_user_registration_send_pass( $user_id, $password );

    do_action('bb_new_user', $user['ID'], $user['plain_pass']);
    return $user['ID'];
    }
    endif;

    although I am using a fairly hacked together install with some bleeding edge stuff in there so you may need to experiment a little.

    #71642
    dmbware
    Member

    I am having the same problem ! i followed the video to a T and than added the HASH. No Cookie tie at all, but I do have DB Integration. My question for you is do we add these lines of code in both config files?

    define(‘COOKIE_DOMAIN’, );

    and define path ?

    #73285
    Ben L.
    Member

    bb-config.php

    #73292

    In reply to: Domain transfer fails

    Ben L.
    Member

    Remove index.php from the forum url in the files and the database.

    #73283
    Ben L.
    Member

    bbPress shouldn’t be tightly integrated with WordPress. There are too many things that won’t work. Try removing the line of code that includes WordPress into bbPress.

    #73268
    Ben L.
    Member

    /bb-admin/admin-base.php?plugin=bbpress_moderation_suite_modlog is the only place moderation logs are. I know the way I talk about it is a bit confusing. :P

    #72202
    superann
    Member

    Hi Citizenkeith, I just saw this now… you’d put the hack at the end of pm_new_message. So my function now looks like this:

    function pm_new_message( $id_receiver, $id_sender, $pmtitle, $message ){
    global $bbdb, $bb_table_prefix;

    $created_on = bb_current_time('mysql');
    $id_receiver = intval($id_receiver);
    $id_sender = intval($id_sender);

    $pmtitle=substr(strip_tags($pmtitle),0,64);
    remove_filter('pre_post', 'post_regulation');
    $message=substr($message,0,2048);
    $message=force_balance_tags($message);
    $message=apply_filters('pre_post',$message,0,0);
    $message=apply_filters('post_text',$message,0);

    $bbdb->query("INSERT INTO ".$bb_table_prefix."privatemessages
    (id_sender, id_receiver, pmtitle, message, created_on)
    VALUES
    ('$id_sender', '$id_receiver', '$pmtitle', '$message','$created_on')");

    $to = bb_get_user_email($id_receiver);
    $pm_link = bb_get_option('uri') . 'message.php?id=' . $bbdb->insert_id;
    $message = __("You have a new private message: %1$s nFrom: %2$s nn%3$s ");
    mail( $to, bb_get_option('name') . ':' . __('Private Message'),
    sprintf( $message, $pmtitle, get_user_name($id_sender), $pm_link ),
    'From: ' . bb_get_option('from_email')
    );

    }

    #73267
    johnhiler
    Member

    1. Ah thanks for adding that!! Boo for bbPress having no hook for moving topics…

    2. Ah so sorry to have missed that… :-)

    One last thought: what do you think of merging the various moderation logs into a single page? As a keymaster/mod, it’d be a lot easier to monitor what’s going on on the site if all the logs are on the same page.

    Or maybe as an alternative, the various moderation logs could all have convenient links to each other?

    ps I owe you a contribution – please email me at john at weddingbee dot com, and we can coordinate!

    #57164
    golan03
    Member

    If you don’t have backpress you can also modify your bb_mail function (in bb-includes/pluggable.php)

    just add the email you want as return-path.

    before ::

    $headers = trim(join(“rn”, $headers));

    after::

    $headers = trim(join(“rnReturn-Path: from@mydomain.comrn”, $headers));

    It is not elegant but it works.

    Remember it is hardcoded, you’ll have to change it manually if you want to change your from@mydomain.com later.

    #73073
    Ben L.
    Member

    With that code, the last sub forum already has bb-last-child, and if you change <td colspan="3"> to <td colspan="3" class="subsubforum">, subsubforums have a class.

    #7823

    Topic: HELP?

    in forum Installation
    alberto505
    Member

    Hi Alberto here,

    I need some help installing my Avatars and Upload Photos in my BBPress Forum. Can someone guide me on what to do?? Do I need to go into a template to add code to make the avatars display?

    #73260
    Ben L.
    Member

    Unfortunately, there are a lot of functions in the code that are 1.0-specific.

    Fortunately, WordPress 2.8 is being released in May, and I can’t see bbPress 1.0 being far behind.

    #73243
    Ben L.
    Member

    Okay, I’ve found the problem.

    Go to line 634 (it should say function bb_attachments_recount($post_id=0) { // update topic icon flag and sync attachment count for topic given a post_id)

    Right under that, add global $bb_attachments; on a new line.

    gmrtech
    Member

    Amazing. Fixed :) Thanks!

    Ben L.
    Member

    First of all, if you already had members on the forum that aren’t on the blog, integration will lose them.

    I suggest going into your database and running DELETE FROM bb_topicmeta WHERE meta_key=wp_table_prefix LIMIT 1 to remove the integration.

    #73071
    Ben L.
    Member

    I only partially understand the question. Do you want to add a last class to the last forum on the page?

    #73161

    In reply to: Frightmare Haunt Forum

    cldnails
    Member

    Interesting niche, good luck. Although, out of the box bbPress isn’t very scary looking. ;)

    #73199
    _ck_
    Participant

    Early in the morning on a shared box may mean your provider doesn’t know what they are doing and is not running the daily backup in “nice” mode, therefore overloading the server.

    Either that or you might have a misbehaving neighbor.

    bbPress doesn’t naturally cause that kind of problem, unless you are running an older alpha which uses more queries – and some of my plugins like hidden forums had a bug in a previous version that caused extra queries – you only used 10 queries so I think you are running 0.9

    If you know what you are doing, even on a shared host you can run a simple PHP program with cron checking the load every minute – the moment it starts to spike, say over 3.0, you can have it email you “ps aux” which will show you which neighbor is misbehaving, even on a shared host.

    See this:

    bb_init = 0.178 <<<


    bbpress’s core is completely loaded at this point,

    plugins, everything the amount of time is okay and acceptable – 50 to 100 files have been loaded

    bb_index.php_pre_db = 4.966 <<<—- this is kind of a lie, it’s not pre-db, there have been some queries…

    so in 4.5 seconds or so, here’s what’s been done:

    $forums = get_forums();
    $topics = get_latest_topics();
    $super_stickies = get_sticky_topics();

    it’s actually loaded all the forums and gotten the latest topics

    It’s using about 8-9 queries so 4.5 seconds is absolutely terrible, almost impossible if the server is working correctly.

    If your page time is normally under 1 second for that part, here’s what I think is happening.

    I think your host is running a backup at that hour OR one of your neighbors on the same box is doing a remote backup to/from the server, including mysql.

    That ties up the cpu and ties up mysql because the disk is thrashing and mysql is not caching at all.

    To prove my theory, see if it happen every day at the exact hour.

    Even more suspect would be if it happens on the hour or half hour.

    By the way, why do you assume it’s “your” mysql connections that have been exhausted – it’s actually the entire server’s pool on a shared host. I suspect you have a misbehaving neighbor who is accidentally making you think it’s you that’s the problem.

    #54704

    WooHoo! A plugin accomplishing that has been just released:

    https://bbpress.org/plugins/topic/wordpress-latest-post/ <— in plugin repository

    http://www.atsutane.net/2009/04/wordpress-inside-bbpress-part-1.html <— author’s blog with more info on usage

    Tested it and it works well on WP 2.7.1 and bbPress 0.9.4 :)

    #60227
    phishshticks
    Member

    if you edit the php file, you can manually specify your code where you see ‘##-#######-#’

    #73248
    johnhiler
    Member

    Yah I definitely agree! You have to be pretty computer literate to use bbPress… and there isn’t great support, other than us volunteers.

    But it’s like that quote from Churchill: “Democracy is the worst form of government except all the others that have been tried.”

    bbPress is the worst message board software ever – except for all the others I have ever tried. :-)

    #7817
    petertoshas
    Member

    Hellooo!

    Well, i recently change to bbpress (this rocks) and i’m trying to make a theme compatible with the current theme in my wordpress blog. It went pretty well, until i came across the post-form to create a new topic and i’m in blank…

    Let me explain: i’m using the theme kakumei, and instead off the hottags on the left, i’m going with a sidebar with other features (tags, the ‘fav this’ feature, link to main forum, etc…). This works well in the front-page, in the topic, profile, and other, but i’m having some problems put this working in the post-form.php !

    The way i use to style was: the sidebar in <div id=sidebar></div>, and the content (infobox, post, topic meta, etc) in <div id=”content”></div> just like the kakumei theme.

    My problem with the post-form.php is the function that is used in the functions.bb-template to the ‘pre_post_form’ and ‘post_post_form’. Using the <div id=”content”></div> in the post-form.php the <div> actually appears in the middle of the code of the form in the post-form and the content dont stay aligned. Putting the <div> in the functions.bb-template, just makes the <div> repeating in the others pages where the post-form is used, and the content dont stay aligned anyway.

    i’ll really appreciate if you could suggest me some ideas. tks :)

    #73247
    Cyndy Otty
    Participant

    I suppose this is a matter of opinion, really. Granted it’s not the most user-friendly software out there and it can be much more complex to customize, but it is also a project that is in development and such things do take time to perfect.

    However for what it is – a no-frills, basic forum software – it is actually exactly that right from the start. :)

    #73246
    bruinfelix
    Member

    Youre right! ;-)

Viewing 25 results - 25,226 through 25,250 (of 32,505 total)
Skip to toolbar