_ck_ (@_ck_)

Forum Replies Created

Viewing 25 replies - 276 through 300 (of 2,186 total)

  • _ck_
    Participant

    @_ck_

    Trading insults is not very mature, therefore I think it’s time to close this topic.

    pagal, you just have to be flexible, you can’t always get what you want for free, so you either have to adjust and find another way to do it or hire a coder to make what you want.

    The fields in the user profile are unfortunately handled in a very inconsistent way, it doesn’t even use the same code on the registration page vs. the profile edit page vs the profile display page which is a symptom of the adhoc nature of how bbpress was built. But I don’t think even wordpress has that ability built in yet.


    _ck_
    Participant

    @_ck_

    I’ve decided this is not something I want to get into. Way too much work for one specific solution and multi-input fields like birthday are going to be very complicated.

    The sites you see this on already have full-time programmers while you don’t know how to code at all so you are going to constantly rely on begging for free help from others.

    Since you are using WordPress integrated I recommend you just use an existing plugin for it to do this instead.

    In reply to: function bb_auth

    _ck_
    Participant

    @_ck_

    1.x supports SSL so scheme can also be for SSL ‘secure_auth’

    I guess the idea is to use a different cookie than the one exposed via http.


    _ck_
    Participant

    @_ck_

    Plugins isn’t running akismet so it will probably happen more and more.

    I deleted them.


    _ck_
    Participant

    @_ck_

    Plugin: Allow additional or custom profile fields

    Adding Custom Profile Fields

    Add New Fields to User Profile?

    Customizing Profile Fields

    Help with Basic Command to Add New Profile Fields

    http://google.com/search?q=site%3Abbpress.org+extra+profile+fields

    Since bbPress doesn’t have a dropdown generator, it’s obviously going to need custom code. You can’t set it as a profile key because bbpress won’t properly handle the output/input.

    There is an action hook do_action( 'extra_profile_info', $user->ID );

    which appears at the end of the regular profile block.

    That’s where the data has to be shown.

    However the data will not be saved by bbpress because it’s not in the profile keys.

    What could be done is the profile keys could be unset when actually on the profile edit page, but exist otherwise – there is a sanitize filter that can be used:

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

    Or sanitization and saving could be done manually at do_action('profile_edited', $user->ID); by checking $_POST

    So it’s a non-trivial amount of work which is why dropdowns are not already done via a plugin.

    If I get through tomorrow without a migraine I might show you how to do a Male/Female dropdown.

    In reply to: How can I do this?

    _ck_
    Participant

    @_ck_

    Probably some kind of specialty forum.

    Just use sessions to do it.


    _ck_
    Participant

    @_ck_

    It’s probably available in your hosting control panel, I know cpanel has it.


    _ck_
    Participant

    @_ck_

    500 error might be from a looping redirect that never resolves.

    At this point if I was debugging it, I would put exit points in the code and find out exactly where it was failing. But it might take you hours to trace it that way.

    3.0 is so new and probably buggy, there could be a dozen reasons why it’s failing.


    _ck_
    Participant

    @_ck_

    Instead of every topic now turning into a fork discussion, could y’all please just make one fork topic and link to it instead?

    That way there will be far less repetition and the original topic subject will remain intact.


    _ck_
    Participant

    @_ck_

    This is just a complete guess in the dark but WP 3.0 is a memory hog and you might easily be running out of memory with deep integration. In theory you should get an error about the memory problem but maybe not.

    Try this in your config (probably wp-config.php and not bb-config)

    ini_set('memory_limit','64M');

    define('WP_MEMORY_LIMIT', '64M');

    also turn on all errors temporarily

    error_reporting(E_ALL);

    and make sure you try “view source” on that blank screen as there may be something you can’t see on the page.


    _ck_
    Participant

    @_ck_

    Hey don’t involve me. I said you can do whatever you want.

    I don’t want any of that responsibility or people whining at me.

    In reply to: Topic / Post count

    _ck_
    Participant

    @_ck_

    I have a post somewhere around here that shows how to do that.

    I think this is it:

    https://bbpress.org/forums/topic/counting-forums


    _ck_
    Participant

    @_ck_

    The WordCamp minute about bbPress is old news. I preserved it here so you don’t have to wade through the rest of the WP 3.0 stuff:

    http://bbshowcase.org/forums/topic/matt-on-bbpress-wordcamp-san-francisco-may-1st-2010

    Please note the plugin version of bbPress for WordPress will almost certainly be completely incompatible with all existing bbPress themes and plugins and all advice/knowledge to date will become useless.

    It will be essentially an entirely different program just using the same name and I hope Matt just renames it to something else to prevent massive confusion.

    In reply to: Working Member List?

    _ck_
    Participant

    @_ck_

    I’ve now cleaned up the plugin design a little and made the view and output functions separate so it’s easier to understand the flow.

    All anyone has to do now is just change the output to their desire near the very the bottom of the code.

    In reply to: Working Member List?

    _ck_
    Participant

    @_ck_

    Kevin, bbPress has a function to include a template.

    ie. bb_load_template( 'tags.php' );

    You can see it at the end of many of the files in the root

    But you may find the behavior unpredictable and may want to just use an include instead, in which case you’d have to calculate the current template folder yourself, which is difficult.

    In reply to: Working Member List?

    _ck_
    Participant

    @_ck_

    Here is a working mini example of the view with the user query.

    raw: http://pastebin.com/raw.php?i=xXant1dX

    fancy: http://pastebin.com/embed_iframe.php?i=xXant1dX

    download: http://bbshowcase.org/plugins/member-list.zip

    (download mirror): http://pastebin.com/download.php?i=xXant1dX

    It’s been made (much) more complex because of the pagination.

    But please ask questions if you want to learn more.

    You can now access any of these variables in the output section near the bottom, or you can use many internal bbPress API functions.

    $user->ID

    $user->user_login

    $user->user_pass

    $user->user_nicename

    $user->user_email

    $user->user_url

    $user->user_registered

    $user->user_status

    $user->display_name

    please note the GT thingie you are seeing above is really a greater than symbol

    Dig through the bbpress file “template-functions.php” if you want to see what other internal functions are available to you.

    Look for ones that accept $user_id as the variable and you can probably use it.

    Much more advanced topics would include overriding the internal pagination per page limit and changing/repeating the navigation but I am not going to cover right now.

    In reply to: Working Member List?

    _ck_
    Participant

    @_ck_

    Now we need a proper function to process/display the view output.

    Because we are essentially tricking bbPress into doing this view for us, we have to make sure we do all the output ourselves, like this mini-example

    function member_list($view='') {
    if (!empty($view) && $view!='member-list') {return;}
    bb_send_headers();
    bb_get_header();
    // do view stuff here
    bb_get_footer();
    exit;
    }

    first we make sure the view is for us, if so we send any http headers, then we send any bbPress html headers like in a normal page (meta, css, etc.) then we do our view, then we send the bbPress footer and we force PHP to stop afterwards.

    In reply to: Working Member List?

    _ck_
    Participant

    @_ck_

    Actually I guess I will jump ahead and show how to make this into a view because otherwise we won’t have a proper place for it and it will get awkward to test.

    This is the mashup I’ve come up with over the years as the “simplest way”. bbPress unfortunately requires a fake, wasted query for it’s views because the original designers wanted you to use their proprietary query method which only deals with topics, so we have to bypass it.

    add_action(‘bb_custom_view’,’member_list’);

    $fakequery=array(‘started’ => ‘>0′,’append_meta’=>false,’sticky’=>false,’topic_status’=>’all’,’order_by’=>1,’per_page’=>1), false);

    bb_register_view(“member-list”,”Member List”,$fakequery);

    So there we’ve registered a view called “Member List” that will use the url/tag “?view=member-list” or “view/member-list

    http://pastebin.com/embed_iframe.php?i=CbnYfKiy

    In reply to: Working Member List?

    _ck_
    Participant

    @_ck_

    First we need to gather the list of users who are not inactive or blocked.

    This unfortunately requires a much more complicated query because of how wordpress/bbpress stores the user status in the meta, and in a way that cannot be quickly queried.

    ie. this simple query is not good enough:

    $query=”SELECT ID FROM $bbdb->users WHERE user_status=0 ORDER BY user_registered DESC”;

    So the following will work up to mid-sized forums, if you have over 100k users, it’s probably a bad approach because it’s non-indexed in mysql and the query will require a complete table-scan.

    global $bbdb;
    $query="SELECT ID FROM $bbdb->users as t1 LEFT JOIN $bbdb->usermeta as t2 on t1.ID=t2.user_id WHERE user_status=0 AND (meta_key='$bbdb->prefix"."capabilities' AND NOT (meta_value LIKE '%inactive%' OR meta_value LIKE '%blocked%')) ORDER BY user_registered DESC";
    $results=$bbdb->get_col($query);

    (we’re going to deal with pagination later)

    $results will now contain all the active user IDs, newest members first (or false if the query failed for some reason).

    Since bbpress.org is screwing up code now, I’m putting it also here:

    http://pastebin.com/embed_iframe.php?i=t3BX3i10

    In reply to: Working Member List?

    _ck_
    Participant

    @_ck_

    It’s very easy to make a list of members and you can use some of the built in bbPress functions. I guess I’ll turn that into a lesson here in this topic.


    _ck_
    Participant

    @_ck_

    b) fork bbPress July 2010

    There is absolutely nothing legally or physically preventing you from forking bbPress right now or in July. You literally don’t need anyone’s permission, so go right ahead.


    _ck_
    Participant

    @_ck_

    Okay I think I found a fix – we simply have to bypass the malfunctioning secure_auth method in 1.x and just use the regular auth cookie. It’s what’s fighting us as soon as it detects SSL mode.

    So add this to the bottom of the plugin for 1.x

    function bb_validate_auth_cookie( $cookie = '', $scheme = 'auth' ) {
    global $wp_auth_object;
    return $wp_auth_object->validate_auth_cookie( $cookie, $scheme );
    }

    Test it carefully of course.

    view: http://pastebin.com/embed_iframe.php?i=wSYPsdjT

    download: http://pastebin.com/download.php?i=wSYPsdjT


    _ck_
    Participant

    @_ck_

    LOL, filing a bug in the bugtracker doesn’t magically get features working, there’s no-one to work on extra things like that these days.

    But I think the problem is that the admin section must be checking the base url somewhere for security that I am not catching and doesn’t like it, so it redirects it.

    My current guess is it’s happening in function bb_auth which I am examining now.

    Ah it’s probably because bbPress 1.x has the secure_auth cookie where 0.9 does not, makes things much more complicated since you have to be logged in under SSL as well.


    _ck_
    Participant

    @_ck_

    As rude and weird as this entire topic is, the reality is the form of bbPress that you have known up to now and through 1.1 (1.2?) from Automattic is over.

    Once bbPress stops being stand-alone, everything will change: all the advice on this entire forum will be mostly useless, the plugins and themes will be pointless for the WordPress plugin version of bbPress.

    In fact they should probably call the plugin something other than bbPress as it will only confuse people when they search for help and resources for the plugin.

    The turning point for bbPress was BackPress. The state we are in now is 100% the problem with that decision (made by Matt in January 2008, quite cavalierly IMHO).

    To be more specific, bbPress based on BackPress actually would have been almost acceptable, IF, and this is critical, IF WordPress had been also converted to use BackPress. But it wasn’t and now almost obviously never will be.

    So we are left with an orphaned product, not bbPress, but BackPress itself, which makes the 1.x line of bbPress a dead-end because of it’s dependency.

    I need to be very careful what I say next because some people immediately jump on every word as some kind of promise, which I am not making. All I can say is that I will attempt to maintain 0.9 in my own way as long as reasonably possible (years?) until a better solution emerges (which is unlikely, but we’ll see).

    Considering how it’s all up to Matt now, I’d be *more* polite to him, not less.

    In reply to: How/where to install?

    _ck_
    Participant

    @_ck_

    I would contact the same person that installed your WordPress and ask them for help as it’s obvious you did not install it yourself.

    You might also try an automated install but change your password afterwards and backup your database first:

    http://www.simplescripts.com/script_details/script:bbPress

Viewing 25 replies - 276 through 300 (of 2,186 total)