Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,226 through 23,250 (of 32,468 total)
  • Author
    Search Results
  • anaon
    Member

    Hello,

    I would like to display a link to the profiles of my WordPress website on the post.php file, just below the username and avatar.

    I tried a code that I found in the profile.php file : <?php echo get_user_display_name( $user->ID ); ?>

    But I can’t even make it work. Is it possible to get the Worpress user nicename to create this link? I did a complete WP/BBpress integration…

    Thanks a lot for your help

    #80038
    Mark
    Member

    It has to have my name and web site linked to somewhere on it. Then people will know my name. And my web site address. And that I’m super cool enough to be linked to from a theme that I didn’t make. :)

    #80025
    Jim R
    Participant

    Yes ashfame…THAT!!! That’s what I want. : )

    I’m using the guangzhou theme, as it best matches my WP theme. I’m just trying to find the part of the cod where I can manipulate that. Then if I need helping making sense of the code, I’ll be back, but at least I’ll try it on my own. : )

    I have added a Link Category menu from my WP to my bbPress menu if anyone is interested. It’s from the WP template tag system. If anyone is interested in that.

    #80023
    Peter A. Gebhardt
    Participant

    Have a look here (if you are using 0.9.0.5):

    https://bbpress.org/plugins/topic/forum-is-category/#post-1495

    I’m on my way to implement it for my forum and will report later, if the _ck_ proposed “Add Topic” patch does work – just kidding … ;-)

    #79864
    hpguru
    Member

    Find

    <h2><?php _e('Hot Tags'); ?></h2>
    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?></p>

    add

    <h2>Text</h2>
    <p>Text text text</p>

    =

    <h2><?php _e('Hot Tags'); ?></h2>
    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?></p>

    <h2>Text</h2>
    <p>Text text text</p>

    #79952

    @johnhiler

    Using the plugin to change roles of a member is overkill in my opinion. I am not in favor of hacking core files either. My method of adding a check for user logged in & then spitting out the code should be enough for the required functionality. Along with a user logged in check it should also check if current user is not an admin so that email addresses are not repeated for admins.


    @Kawauso

    I put your code in functions.php and it didn’t seem to work.

    With a normal user on my test setup, I wasn’t able to see the admin’s email id

    #79717
    Mark
    Member

    I think they should be nominated for an academy award. ;)

    #31872
    brad_langdon
    Member

    I’d just like to say thanks to all of the developers out there who make BB Press and all of it’s plugins possible. In particular I would like to thank Night Gunner who’s support in the last week or so has been incredibly helpful and very prompt.

    Remember people these guys ( and girls ) don’t have to help and I am sure they get very frustrated dealing with repetitive problems such as the ones that would arise here so giving them some thanks goes a long way.

    Cheers ;)

    #79964

    In reply to: removing tags

    Mark
    Member

    I made an oops. That code above doesn’t work, and I edited it earlier but I forgot to hit submit (I have so many tabs open it’s not even funny).

    The proper code is as follows;

    $id = ( isset($_GET['tag']) ) ? $_GET['tag'] : false;
    if ( ! $id || ! bb_get_tag( (string) $id ) )
    $permalink = bb_get_tag_page_link();
    else {
    global $tag, $tag_name;
    $tag_name = $id;
    $tag = bb_get_tag( (string) $id );
    $permalink = bb_get_tag_link( 0, $page ); // 0 => grabs $tag from global.
    }

    …with the code I originally posted, there’s no tag information passed on, so you get a whole wheelbarrow full of nothing.

    Trac filed, #1197… first time I’ve ever filed a trac, so I hope I followed etiquette/protocol properly. ;)

    #80012

    In reply to: Theme issue in Firefox

    chrishajer
    Participant

    What do you mean “shifts out of position” in Firefox? I viewed in FF 3.5.3 on Windows XP and it looked fine to me.

    One weird thing though. Even though the page comes up, the page is returned a 404 status code. Check it here:

    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.pctbc.com%2Fweb%2Fforum%2F

    Or view the headers in Firebug.

    Date: Wed, 30 Sep 2009 23:47:21 GMT
    Server: Apache/2.2.3
    X-Powered-By: PHP/5.2.6
    X-Pingback: http://www.pctbc.com/web/xmlrpc.php
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Last-Modified: Wed, 30 Sep 2009 23:47:21 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Keep-Alive: timeout=10, max=200
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8

    404 Not Found

    #31937

    Topic: buddybar

    in forum Troubleshooting
    MJ
    Member

    When I place this code to show the buddybar in my forum theaub.com/bbpress it blanks out and crashes. the buddybar doesnt show up and everything is duemed. CANT ANYONE HELP, I been going at it for two weeks.

    if

    ( !defined( ‘ABSPATH’ ) & !defined( ‘XMLRPC_REQUEST’ )) {

    define( ‘WP_USE_THEMES’, false );

    //

    // AND THIS CODE OR ONE OR THE OTHER //

    //

    include_once( ‘/hsphere/local/home/11111111/theaub.com/wp-blog-header.php’ );

    header( “HTTP/1.1 200 OK” );

    header( “Status: 200 All rosy” );

    }

    johnhiler
    Member

    It looks like you’re trying to install bbPress as a plugin within WordPress?

    It’s actually a separate program… you have to install it separately from WordPress. You can integrate the two, so that they have shared users. :-)

    #79962

    In reply to: removing tags

    Mark
    Member

    Looks like it’s bb_repermalink that’s choking and causing us to get that blank page.

    Submit to trac? You can modify the following in functions.bb-core.php, starting on line 737;

    $_original_id = $id;
    if ( !$id )
    $permalink = bb_get_tag_page_link();
    else {
    global $tag, $tag_name;
    $tag_name = $id;
    $tag = bb_get_tag( (string) $tag_name );
    $permalink = bb_get_tag_link( 0, $page ); // 0 => grabs $tag from global.
    }

    To;

    $_original_id = $id;
    $tag = bb_get_tag( (string) $id );
    if ( !$tag )
    $permalink = bb_get_tag_page_link();
    else {
    global $tag, $tag_name;
    $tag_name = $id;
    $permalink = bb_get_tag_link( 0, $page ); // 0 => grabs $tag from global.
    }

    And instead of returning that blank page, it will return the global tags page. Possibly not the most eloquent solution, but works nonetheless.

    #79998
    Mark
    Member

    Honestly when it comes to basic integration there’s absolutely no difference. WP and WPMU are the same codebase after all. The only real difference is whether or not you want your blog owners to be automatically added to your primary blog and by proxy as members of the forum.

    Deep integration is accomplished exactly the same on either platform too. Just stick with µ, eventually (as in anywhere from tomorrow to 2017) the two will merge anyways and if you install a second copy of standalone WP.org for your forums, you’re just going to wind up with two µ’s down the road. ;)

    I noticed you tagged this convo bbmu, just so you know (you probably do) but when you integrate bbPress with µ you don’t get bbPress µ as a result. When /bbpress is accessed, no matter the blog, the viewer will get the exact same forum.

    #64937
    kaz1844
    Member

    here’s what I did to get a page in wordpress in my navigation bar that redirects to the bbpress part of my site: set up a page template and made sure it was selected when I set up the forum page in wordpress – the template simply included redirection code:

    <?php

    /*

    Template Name: Forum Section

    */

    ?>

    <?php

    header( ‘Location: http://www.yourdomain.com/your-forum-name-directory&#8217; ) ;

    ?>

    #79961

    In reply to: removing tags

    chrishajer
    Participant

    I didn’t actually check the code, if it was 200 or 500. I just assumed the blank page was due to a 500 error. It would be nice to see “sorry that tag does not exist” or something on an error page.

    Try to browse a non-existent tag here and see what happens.

    Just checked here and it’s a 200 response with a blank page. My information about 500 error earlier was incorrect.

    #79960

    In reply to: removing tags

    Mark
    Member

    You might want to explore where that 500 is coming from, that probably shouldn’t happen. I did the same thing just to see if it was inherent to bbPress or maybe just bbPress.org, and it seems it might be just you. :) I got a blank page (would be nice to see that redirect somewhere else for non-existent tags) but it was showing a 200 ok, and not a 500.

    I just realized bbPress doesn’t have anywhere to view/edit tags in the administration panel. Is that coming down the road?

    #79951
    <?php

    function add_email_spec_meta( $arr ) {

    if( !bb_is_user_logged_in() || bb_current_user_can( 'edit_users' ) )
    return $arr;

    if( bb_get_location() != 'profile-page' || stripos( $_SERVER[ 'QUERY_STRING' ], 'tab=edit' ) !== false )
    return $arr;

    $arr['email_spec'] = $arr['user_email'];

    global $wp_users_object;

    $id = bb_get_current_user_info( 'id' );

    $meta_key = 'email_spec';

    $meta_value = bb_get_usermeta( $id, 'user_email' );

    $wp_users_object->update_meta( compact( 'id', 'meta_key', 'meta_value' ) );

    return $arr;

    }
    add_filter( 'get_profile_info_keys', 'add_email_spec_meta' );

    ?>

    #79995

    Technically its all feasible.

    a) you can override bbPress login functions with the ones matching with your portal

    b) that’s again feasible (I think CK was working on a plugin for this, try some searching)

    c) its feasible but I don’t have any idea of going about it

    d) which credentials? login credentials through GET? u gotta be kidding me

    #79948
    chrishajer
    Participant

    Maybe you could add that capability to the member role?

    https://bbpress.org/plugins/topic/role-manager/

    #79993
    chrishajer
    Participant

    If you want to reinstall, you also need to remove the database tables, in addition to bb-config.php.

    You can also edit your bb-config.php and add a line like this to override the configuration:

    $bb->uri = 'http://klikerlab.pl/forum/';

    Help! I renamed my bbpress file directory name…

    You have to rename the folder where you installed bbPress as well, from bbpress to forums. You can’t just make the configuration changes.

    #79992
    ailusia
    Member

    Update – now both urls show 404 error ;)

    #79945

    With what I understand, the thing is only functions in functions.bb-pluggable.php can be masked (plugged) as its the last file to look for undefined functions. Defining any function which is there overrides the definition in that file. But what if we need to change the behaviour of a function which is somewhere else?

    I would love to see someone prove me wrong.

    #79944

    On line 2368 of functions.bb-template under bb-includes dir of your bbPress resides the code you want to change.

    bb_current_user_can( 'edit_users' )

    Editing a core file is not recommended but I am unsure of how to mask it to call a custom function instead of the core function.

    If its unmaskable for now (architectural) and you want a fix, then either you can change that bb_current_user_can( 'edit_users' ) with bb_is_user_logged_in() but you will have to do it again when you upgrade (or till someone posts a recommended fix) or you can append this line in your profile.php after the call to the bb_profile_data()

    <?php
    if ( bb_is_user_logged_in() ) {
    echo $user->user_email;
    }?>

    [untested but should work]

    #79862
    hpguru
    Member

    Edit a themes front-page.php.

    Replace

    <h2><?php _e('Hot Tags'); ?></h2>
    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?></p>

    with…

    <h2><?php _e('Some Text'); ?></h2>
    <p>Text text text.</p>

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