Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,501 through 24,525 (of 32,432 total)
  • Author
    Search Results
  • #75207
    thekmen
    Member

    Nothing special to be done if you are using bbPress 1.0 as position-1 will be added as a div id to the first post in each thread.

    So you only need to add something like

    #position-1 .threadpost { background: #FF9; }

    to your theme css file to style the first post.

    #75480
    Marcomail
    Member

    it’s more simple using static html :)

    #75528
    _ck_
    Participant

    Some plugins attach to the “Manage” admin menu, which was skipped over in 1.0

    This will emulate the slot so the plugins become visible again.

    (do not click “Manage” directly or you’ll get a 404, unfortunately it has to be that way because of how 1.0 was changed)

    <?php
    /*
    Plugin Name: Legacy Plugin Fixes
    */

    add_action('bb_admin_menu_generator', 'admin_manage_menu', 1);
    function admin_manage_menu() {global $bb_menu; $bb_menu[165] = array( __( 'Manage'), 'moderate', 'content.php', 'bb-menu-manage' );}

    ?>

    #61978

    Rather than editing or removing core files, I wrote this simple plugin:

    <?php
    /*
    Plugin Name: Disable Registrations
    Description: This plugin disables access to registration.php and blocks any registrations.
    Plugin URI: http://simonwheatley.co.uk/bbpress/disable-registrations
    Author: Simon Wheatley
    Author URI: http://simonwheatley.co.uk/
    Version: 0.1
    */

    // Fires every time bbPress inits, a bit ick but it's super quick string ops
    // (which is what PHP is good at).
    function da_disable_registrations()
    {
    // Shame there isn't a hook to grab before the new user is registered on register.php
    // In the absence of that, we will check whether we're on register.php
    if ( ! da_str_ends_with( strtolower( $_SERVER[ 'PHP_SELF' ] ), 'register.php' ) ) return;
    // We are on register.php? Stop executing (with a message).
    bb_die( "Registration is not allowed on this website. Please contact the site administrators." );
    exit; // Never reached, unless bb_die fails for some freaky reason
    }

    // Checks whether string a ends with string b
    function da_str_ends_with(& $str, $end)
    {
    return ( substr( $str, - strlen( $end ), strlen( $end ) ) == $end );
    }

    add_action( 'bb_init', 'da_disable_registrations' );

    ?>

    #75471

    Use bb_is_user_logged_in()

    #75447
    Ryan Hellyer
    Participant

    ps. the 2.0 branch of WordPress was it’s best version ;-),

    No prizes for guessing who likes stable software then!

    I’m quite used to the WP upgrade system now. I didn’t like the frequent upgrades in the beginning, but I’ve slowly realised that as long as I keep my plugins/themes up to date with the latest WP recommended approaches that any new updates are highly unlikely to affect them.

    I also never liked the 0.9 branch very much. But I get the impression some of you are happy to keep using it for quite some time yet. I guess if someone can be bothered maintaining it then they may as well. I’ve had clients request for support for ancient WP plugins before and I try as hard as possible to get them to upgrade. Supporting out of date software is generally at the absolute bottom of my priority list.

    #75445
    johnhiler
    Member

    bbPress has several fathers. :-) Matt did a lot of the early work… and Michael (mdawaffe) took over for a while too:

    https://trac.bbpress.org/report/6

    #75444
    michael3185
    Member

    It seems to me that what we have here, albeit with lots of talented helpers, is a ‘marriage in code’ between Sam and _ck_. He built the house, she makes it pretty. Almost all of the useful plugins are _ck_ home grown or have contributions from her. I can’t contribute in any hugely useful way, but love your baby nonetheless.

    Seems to me like it’s essentially up to the two of you, when it comes down to it.

    #75508

    In reply to: Navigation error

    taboo
    Member

    Thanks, but it didn’t help… :(

    After activating the plugin it looks just the same.

    smi1ey
    Member

    So was this issue supposed to have been resolved in the 1.0 final release? I just installed it and am having the exact issue. When I login to bbPress, it logs me out of WordPress. I have searched several posts, and ensured that the cookie AUTH keys are all the same in WP and bbPress config files. The home site URL is the same as well. I even installed the WP bbPress Integration plugin as recommended, and added their extra code to the wp-config file.

    Anyone else still experiencing thing? I hate to bring up an old topic, so if it’s been resolved somehow, lemme know! :)

    #75521
    clarklab
    Member

    Ah, I am using 1.0 final. Is there a master list of template tags / functions somewhere like they’ve got for WP? In WP any time I need something I can usually just go track it down in their codex but with bbPress I always feel lost. I see on that page it says to use the topic page links function. Where can I get some info on that?

    #15168
    Marcomail
    Member

    How can i show gravatar in the front-page topic loop

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>

    #15167
    taboo
    Member

    Navigation on the front page is screwed (I use CSS modified kakumei): when I go to page 2 (/page/2) the link attached to text “page 1” is the very same page 2 (/page/2) and not “/” as it should be.

    the code:

    <?php bb_latest_topics_pages( array( 'before' => '<div class="nav">', 'after' => '</div>' ) ); ?>

    Any clues please?`

    #75332

    In reply to: bbPress 1.0 released

    bb-gian
    Member

    Hi, I waited for so long for this version to be released!

    I got a running WP site and a bbBress integrated forumin it.

    WP is 2.7.1

    bbPress is 1.0-alpha-6

    In WP I use the bbPress Integration (1.0-rc-2) plugin

    Did the necessary integration routine (with AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, etc.)

    Now, I want to upgrade WP to 2.8 and bbPress to 1.0, what’s the best procedure?

    (Of course, I will backup files and database of both installation).

    Should I upgrade WP to 2.8 first or bbPress to 1.0? (About bbPress, don’t even seem to know HOW upgrading, since I guess there isn’t an upgrading button, right?).

    And what about integration? Now that those 2 version support seamlessly integration, should I delete the AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY in bb-admin.php?

    And should I also delete the bbPress Integration plugin, or is it still necessary?

    Well, I thought I’d ask before adventuring in the process.

    Thanks to anyone who will answer…

    ;-)

    #15160
    Marcomail
    Member

    I’m trying this code but doesn’t work

    <?php if ( bb_is_profile() )
    echo "hi";
    ?>

    i’d

    #75439
    _ck_
    Participant

    I actually said December, not November, at the soonest for my plugins to start supporting 1.0 officially.

    I think 0.9 should have security releases indefinitely, at least for another year.

    December 2010 would be a good retire date IMHO.

    But I certainly don’t expect 0.9 to be given new features at this point.

    Some people simply won’t be able to use 1.0 on shared hosts with several plugins. Their host will terminate their account for excessive resource use if there are bursts of activity at certain times of the day. So 0.9 will be their only option (or switching to lighter software).

    ps. the 2.0 branch of WordPress was it’s best version ;-)

    #75479
    michael3185
    Member

    Hi Marco. I’m no expert at this (one or two will be along shortly…) but I’ve found that in playing around with PHP and CSS I’ve been able to do a lot more than I thought I would.

    The code you’ve posted would display not just the forum names, but most of your front-page info. I’m wondering if putting the forum names in a < div > with a class name you’ve defined in the stylesheet to format the fornt, placing, width, etc., would do it. This is a rough ide from my front-page;

    <div id="my_side_bar">
    <?php if ( bb_forums() ) : ?>
    <table id="forumlist">
    <?php while ( bb_forum() ) : ?>
    <tr<?php bb_forum_class(); ?>>
    <td><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><br />
    </td></tr>
    <?php endwhile; ?>
    </table>
    <?php endif; // bb_forums() ?>

    The table definition could probably be removed too, and it should(?) give a list of links with just forum names. Blind leading the blind here, but it might give you some ideas.

    #15163
    Marcomail
    Member

    How can i show the forums in the sidebar ?

    I’m trying this code but doesn’t work

    <ul>
    <?php while ( bb_forum() ) : ?>

    <li>
    <a href="<?php forum_link(); ?>"><?php forum_name(); ?></a>
    (<?php forum_topics(); ?>) (<?php forum_posts(); ?>)
    <?php endwhile; ?>
    </ul>

    #75067
    michael3185
    Member

    I’ve ‘unresolved’ this thread again, as I’d like to get it working in 0.9.0.5

    By Display Name, am I right in assuming you guys mean the ‘Custom Title’ in a member’s profile? If I set this, then the link under the avatar changes (obviously), but also, bbPM in creating its ‘PM this user’ link replaces the Display Name with what it should be. Changing the link ‘manually’ by altering the template causes bbPM to make a mess of the link, or not replace it at all, thereby creating 3 links; my hard-coded on, the expected profile link, and the ‘PM this user’ link.

    OKTeaRoom
    Member

    Hi,

    I just recently installed bbpress 1.0 rc3 and today upgraded to 1.0.

    I believe I have either set something up wrong or there is something wrong with my database and I’m hoping someone help point me to a solution.

    First, the forum is at http://www.oktearoom.com/forum

    Ok…problems:

    1. bbPM – When I hit send on a PM I get:

    Forbidden

    You don’t have permission to access /forum/my-plugins/bbpm/pm.php on this server.

    2. BBcode Buttons Toolbar

    Not showing up at all and and there is no change if this plugin is activated or deactivated.

    3. bbPress Smilies

    All of the smilies appear as ?’s even though I believe i installed this plugin correctly.

    I just thought I’d give you all the details of the problems I’m having since they are all plugin related and thank you in advance if there is any advice you can give me.

    Happy 4th of July to the American and to everyone else I hope you’re having a great weekend!

    Thanks for taking the time to read my newb post. ;)

    #15154
    Dreamcolor
    Participant

    bbPress 1.0 Simplified Chinese Translation.

    You can download it in URL below.

    http://wpcn.googlecode.com/files/bbPress.1.0.Simp.Chinese.pack.only.v1-wpcng.zip

    There maybe still have some translation bugs. So please let me know and I will fix it.

    #75066
    chrishajer
    Participant

    In the 1.0 release it’s something like this, isn’t it?

    <a href="<?php user_profile_link( $user_id ); ?>"><?php echo get_user_display_name( $user_id
    ); ?></a>

    That would link the Display Name to the user’s profile. You’d have to have the $user_id first to use this, I think.

    #73616

    Here is the latest integration rundown. I first lay out some helpful hints to those out there looking for them, and toward the bottom I point out something which the integration plug-in does not properly handle. That is the HTTPS secure cookie upon logging out. Depending on your setup this may cause issues. Most of the time you’ll be ok. If your like us and have added a proprietary layer of security for internal use only, you like to make sure when your secure cookies expire they expire asap and are completely gone.

    I recommend maybe, just a suggestion as I’m not privy to the dev’s stream of intentions to query if ‘BB_FORCE_SSL_xxx…’ is set. This is probably a much better indication of scheme than relying on the database option only. I know your busy Sam and that wpmu integration is like the last thing on your list. However, some of the code base is already merging.

    Noteables: Step #6, Step #7

    But before you continue:

    1.) Disable Your Cache Server (Varnish/Squid). Go straight to your webserver (Eliminate other causes.)

    2.) Get Integration working on plain http first. DO NOT define any force SSL/Admin anywhere on either wpmu/wp/bbpress.

    3.) Go back and integrate if you can’t get #2 done. Some helpful hints that work:

    3a.) Install wp/wpmu

    3b.) Install bbpress

    3c.) Install integration plugin for wp. In the option where it says complete URL, that means “http://mysite.com&#8221; and not “mysite.com”. If your _only_ (meaning 100% of the time) ever going to use HTTPS then go ahead and define HTTPS.

    3d.) I made sure all key/salts were setup in wp first, and then mirrored them into bb-config prepending BB_ in front of each Define. I defined manually: AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY, AUTH_SALT, LOGGED_IN_SALT, AND SECURE_AUTH_SALT (7 in total defines).

    Once you have HTTP squared away Proceed with SSL:

    4.) The integration plugin will try do some things for you in the backend, it will actually try to do all the cookie work for you. However it works off values you set via the integration option page and your wpmu site options.

    To take control of a few options, go ahead and define MANUALLY the following: (just as the plug-in suggests and more sometimes):

    COOKIEHASH, COOKIE_DOMAIN, SITECOOKIEPATH, and COOKIEPATH.

    5.) Add to wp-config.php:

    define(‘FORCE_SSL_LOGIN’, true);

    define(‘FORCE_SSL_ADMIN’, true);

    6.) Add to bb-config.php:

    define(‘BB_FORCE_SSL_USER_FORMS’, true);

    define(‘BB_FORCE_SSL_ADMIN’, true);

    7.) The kicker for me since I’m using MU Subdomains, i HAD to put into my bb-config:

    $bb->cookiedomain=’.mydomain.com’ //Yes, with the dot before the domain.

    (This is literally the only direct access object config I set in my PHP file. All the rest is handled by ‘DEFINE’ )

    Up to this point you should have integration with HTTP and HTTPS. Back and forth, forth and back, every which way. You should have it done without any manual speed up accessors. If it works, go ahead and add them but make sure you set them correctly. If your fanatical about security then cross the line, otherwise go get a beer, woman or pillow whatever.


    The Line


    8.) Log into BBpress. Goto your main blog, and wp will see you have a ‘logged_in’ cookie. Will display the site_admin link. Just go ahead and click log out.

    9.) Logging out will log you out, except a few cookies are left over. This is because the integration plug-in never inspects the HTTPS scheme properly. It will always look for HTTP. Test this by editing line 182 in the plugin file to read:

    $secure = true; //Don’t forget to change me back to false (default).

    10.) Repeat, and you’ll notice your cookies (the ones which matter) get blown away.

    Notes:

    – If you install WPMU 2.8 Alpha/Beta/Etc… you must _NOT_ enable

    define( ‘WP_AUTH_COOKIE_VERSION’, 1 )

    as the plugin suggests.

    – I DID NOT use any of the “speed up” manual configs which the bbpress integration tool points out. If you can’t get it working without these settings, adding them may not help at all and masks your real issue which is some other settings are screwed.

    – you NEED to make sure your URLs are correct. That means every single URL defined in your database in any meta table, options etc… Especially the case with the integration plugin.

    #75205
    thekmen
    Member

    Thanks Sam, just tried adding this to the css

    #position-1 .threadpost {
    background: #FF9;
    }

    on the 1.0 release & it works perfectly…

    #75399
    _ck_
    Participant

    Gravatars should be done 100% via a plugin and not integrated into WordPress/bbPress in the first place. I never did understand why they were hardcoded in, except perhaps a push by Matt after they bought the service.

    It should be done exactly like akismet and bozos.

Viewing 25 results - 24,501 through 24,525 (of 32,432 total)
Skip to toolbar