Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,701 through 28,725 (of 32,481 total)
  • Author
    Search Results
  • #61650

    In reply to: Suggestions and misc

    vafaaaan
    Member

    Im getting these lines in the middle of the admin page: wp-admin/post-new.php

    Error:
    Warning: Missing argument 2 for bb_bozo_pre_post_status() in D:xxxxxbb-includesbozo.php on line 173

    Warning: Missing argument 3 for bb_bozo_pre_post_status() in D:xxxxxbb-includesbozo.php on line 173

    then.. i get when i post..

    Warning: Missing argument 2 for bb_bozo_pre_post_status() in D:xxxxxbb-includesbozo.php on line 173

    Warning: Missing argument 3 for bb_bozo_pre_post_status() in D:xxxxxbb-includesbozo.php on line 173

    Warning: Cannot modify header information - headers already sent by (output started at D:xxxxxbb-includesbozo.php:173) in D:xxxxxwp-includespluggable.php on line 391

    #61643
    Null
    Member

    Okay chris, now try this:

    Make a clean php file.

    Now add that code you mentioned

    Make the php page a plugin and activate it.

    Now go to your admin -> pluginpage and you’ll see an empty ddlb too :)

    It works in your PNG image example, cause you just copied the code in the same page. It will always work that way, but not in a clean file…

    _Null

    #53524
    Null
    Member

    Tried this, it aint working :(

    #61640
    livibetter
    Member

    @Null: of course, you get all roles’ data. I meant you can get each role’s name from the returning result of $bb_roles->get_roles() (I thought you was going to do something special). However chrishajer has told you the useful information for all your need, you just need to read from https://trac.bbpress.org/browser/trunk/bb-includes/template-functions.php#L1296 to 1311. If you really want to do something with bbPress, you have to read the source of bbPress.

    #61639
    Null
    Member

    Hi guys,

    Sorry ddlb = drop down listbox

    @ chris: yes i did try that one already, but it gave me a empty ddlb (proberbly because the user’s role couldn’t be defined) .

    @livibetter: din’t try it but that will give (I think) all roles, but not in a ddlb.

    For forums there is a function: bb_forum_dropdown, but I couldn’t adapt it to get user roles, so I think a whole new function must be written to put it in the plugin I am working on. I have the feeling all the pieces are there, but I have no idea how to put them together :)

    Thx,

    Null

    #61649

    In reply to: Suggestions and misc

    vafaaaan
    Member

    Now .. ive managed to make WP and bbp share same theme. Dont know if its god but it works.. im running right now.

    wp-content/theme/header.php

    <?php
    include(ROOT . '/theme/header-start.php');
    ?>
    <title><?php bloginfo('name'); ?> - <?php if ( is_single() ) { ?> &raquo; Archive <?php } ?> <?php wp_title(); ?></title>
    <?php
    wp_head();
    include(ROOT . '/theme/header-end.php');
    ?>
    <body>
    <?php
    wp_head();
    include(ROOT. '/theme/body-start.php');
    ?>

    my-themes/theme/header.php

    <?php
    include(ROOT . '/theme/header-start.php');
    ?>
    <title>MyWebsite - <?php bb_title() ?></title>
    <?php
    bb_feed_head();

    if ( is_topic() && bb_is_user_logged_in() ) : ?>
    <script type="text/javascript">
    var lastMod = <?php topic_time( 'timestamp' ); ?>;
    var page = <?php global $page; echo $page; ?>;
    var currentUserId = <?php bb_current_user_info( 'id' ); ?>;
    var topicId = <?php topic_id(); ?>;
    var uriBase = '<?php bb_option('uri'); ?>';
    var tagLinkBase = '<?php bb_tag_link_base(); ?>';
    var favoritesLink = '<?php favorites_link(); ?>';
    var isFav = <?php if ( false === $is_fav = is_user_favorite( bb_get_current_user_info( 'id' ) ) ) echo "'no'"; else echo $is_fav; ?>;
    </script>
    <?php
    bb_enqueue_script('topic');
    endif;

    bb_head();
    include(ROOT. '/theme/header-end.php');
    ?>
    <body id="<?php bb_location(); ?>">
    <?php
    include(ROOT . '/theme/body-start.php');
    if ( is_bb_profile() ) profile_menu();
    ?>

    my-themes/theme/footer.php

    <?php
    do_action('bb_foot', '');
    include(ROOT . '/theme/body-end.php');
    ?>

    wp-content/theme/footer.php

    <?php
    include(ROOT . '/theme/body-end.php');
    ?>

    theme/header-start.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head profile="http://gmpg.org/xfn/11">

    theme/header-end.php

    <link rel="stylesheet" href="<?php echo URL; ?>/theme/default.css" type="text/css" title="Default style" media="screen" />
    <link rel="alternate" href="<?php echo URL; ?>/?feed=rss2" type="application/rss+xml" title="RSS Feed" />
    <link rel="pingback" href="<?php echo URL; ?>/xmlrpc.php" />
    <link rel="EditURI" href="<?php echo URL; ?>/xmlrpc.php?rsd" type="application/rsd+xml" title="RSD" />
    <link rel="wlwmanifest" href="<?php echo URL; ?>/wp-includes/wlwmanifest.xml" type="application/wlwmanifest+xml" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta name="generator" content="WordPress 2.3.1" />
    </head>

    theme/body-start.php

    <div id="wrapper">
    <?php
    get_sidebar();
    // Etc...
    ?>

    theme/body-end.php

    <?php
    // Etc...
    wp_footer();
    ?>
    </div>
    </body>
    </html>

    Hope its all there.. ;)

    URL and ROOT is defined in wp-config.php

    Edit: you can of course cut BODY to include different sidebar wp / bbp :)

    #61638
    livibetter
    Member
    #61637
    chrishajer
    Participant

    I don’t believe the roles are stored in the database, I think they’re all stored and defined in bb-includes/capabilities.php. So, I don’t believe you can pull them from anywhere other than there. Maybe I missed it and they are defined in the database somewhere, but I don’t think so.

    There is already a drop down of roles in the admin section, when you go to edit a user’s profile, you can mark them member, inactive, blocked, etc. Take a look at lines 1309 – 1317 in bb-includes/template-functions.php

    <tr>
    <th scope="row"><?php _e('User Type:'); ?></th>
    <td><select name="role">
    <?php foreach( $roles as $r => $n ) : ?>
    <option value="<?php echo $r; ?>"<?php if ( array_key_exists($r, $user->capabilities) ) echo ' selected="selected"'; ?>><?php echo $n; ?></option>
    <?php endforeach; ?>
    </select>
    </td>
    </tr>

    Will that do what you want?

    #61547

    In reply to: How Do I Do This?

    chrishajer
    Participant

    For WP header and navigation, or the logo and navigation back to WP, everything you need is in the theme files and the stylesheets. I would make a copy of the default template (create a new folder of a different name, then copy all the files from the stock theme into that new folder, and open style.css and change the Theme Name: Kakumei to Theme Name: ChgoGrrl99), then make your modifications in those files. If you break it, just revert to the stock theme.

    But, adding links, adding the WP header and navigation, can all be done in the theme files.

    #61648

    In reply to: Suggestions and misc

    vafaaaan
    Member

    hmm seems working .. have wp cats and stuff to the right .. same theme :)

    forum root is.. ehh.. root :( cant find where to change that to forums.php

    Update: Found at the top in my-templates/topic.php and forum.php .. changed <?php bb_option(‘uri’); ?> to forums.php and it works fine :) i feel happy

    Update2: changed in my-templates/footer.php. Removed almost all code

    <?php do_action('bb_foot', ''); ?>
    <?php wp_footer(); ?>
    <?php
    include($_SERVER['DOCUMENT_ROOT'] . '/myname/wp-content/themes/themename/footer.php');
    ?>
    </body>
    </html>

    So it runs with my WP theme footer :)

    Need to slice up my WP header so i can do the same

    Im just hacking and testing so if there is something i can do better say it ;)

    Looks a bit weird to have two admin/logins at my top right corner :D

    Update3: Since i had forums.php i change in config.php

    // What are you going to call me?

    $bb->name = ‘Forum index’;

    Looks better :)

    Keep up the good work developers!

    #61647

    In reply to: Suggestions and misc

    vafaaaan
    Member

    Hey.. wtf .. think it works .. im havin wp and bbp in the same dir, root dir .. just renamed bbp´s index.php to forums.php ..bbl with a report :)

    #2624
    #60983
    scottdavis
    Member

    Tracked down the problem in Use Display Name. Basically, it’s a bit overzealous in replacing the user name with the display name throughout the code… including for a function that’s used to check for capabilities. Since the name doesn’t match, the capability check fails.

    Quick partial fix: comment out the following line in display-name.php:

    // add_filter( ‘get_user_name’, ‘bb_use_display_name’, 1, 2 );

    The Display Name will now be used instead of the User Name in some places, but not in others.

    A more complete fix:

    1. In display-name.php, replace:

    add_filter( ‘get_user_name’, ‘bb_use_display_name’, 1, 2 );

    WITH

    add_filter( ‘get_display_name’, ‘bb_use_display_name’, 1, 2 );

    2. In template-functions.php, add the following function:

    function get_display_name( $id = 0 ) {

    $user = bb_get_user( bb_get_user_id( $id ) );

    return apply_filters( ‘get_display_name’, $user->user_login, $user->ID );

    }

    3. In template-functions.php, find function bb_get_title(), replace the call to get_user_name() with get_display_name()

    4. In template-functions.php, find function get_full_user_link(), replace both calls to get_user_name() with get_display_name()

    5. In profile.php, replace the call to get_user_name() with get_display_name()

    Enjoy :-)

    — scott

    #61625
    chrishajer
    Participant

    Not sure I follow your problem description. mod_rewrite rules are in the .htaccess file normally. You set the option to use mod_rewrite true, false or slugs in config.php. Are you asking where in the code the links are created based on those choices in config.php?

    #61634
    Trent Adams
    Member

    It is for the benefit of others. OK with me :)

    Trent

    #2622
    refueled
    Member

    A little bit of self-promotion here…

    (mods: delete if not allowed)

    I just wrote an article on how to install bbPress locally.

    You can read it here: http://www.refueled.net/install-bbpress-locally/

    For those experts out there: if there are any errors within the article, I would appreciate if you could let me know. :)

    Hope it’s useful.

    #61389
    Sam Bauers
    Participant

    Yes, by design of the system… :)

    #61631
    livibetter
    Member

    Try forum_name($topic->forum_id);

    #57096

    In reply to: Code backtick bug

    livibetter
    Member

    Try my plugin: http://www.livibetter.com/it/topic/plugin-html-tag-attributes-validator

    It supports Image <img>, YouTube and Google Video embedding.

    #2621
    intellivision
    Participant

    On front-page.php I’d like the “first poster” column to show the users’ display_name (bbPress is synced with WP).

    I’ve tried this

    <td class="num"><?php echo(get_author_name(topic_author())); ?></td>

    which calls this

    function get_author_name( $auth_id ) {
    $authordata = get_userdata( $auth_id );
    return $authordata->display_name;
    }

    but it still shows “user_login” which tend to have ugly underscores etc.

    #57095

    In reply to: Code backtick bug

    fel64
    Member

    You have the allow images plugin installed, don’t you?

    If my guess is right, turning it off will make backticks work again. But that may not be worth it to you.

    #57094

    In reply to: Code backtick bug

    Arlo
    Member

    I still have this problem. Anyone?

    #2618
    dss
    Member

    I’ve got Windows XP users saying they can’t post in my install of bbPress

    they get this error:

    Error 403
    We're sorry, but we could not fulfill your request for /esprit/topic/102?replies=6#post-356 on this server.

    You do not have permission to access this server.

    Your technical support key is: 5246-fa61-dfd9-b1ad

    You can use this key to fix this problem yourself.

    The only way they are able to successfully post is to hit the ‘back button’ after the error and find they have indeed successfully posted.

    I searched and didn’t find this error.

    What could it be?

    #61542

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    Yes! That’s it. Thanks for the code.

    Chris…thanks as always and Fel…thanks for the encouragement…I’m figuring this stuff out…with a lot of help of course.

    Thanks again all.

    #2616
    Doobus
    Member

    I’ve tried installing it on xampp and wamp and I get the same warnings. When I go ahead and install with the warnings I can’t log in. I don’t get why it is reading ODBC@localhost instead of the DB name I provided which is bbp1. I’m 99.9% sure I set up config correctly, but just in case I didn’t here it is:

    // ** MySQL settings ** //

    define(‘BBDB_NAME’, ‘bbp1’); // The name of the database

    define(‘BBDB_USER’, ‘root’); // Your MySQL username

    define(‘BBDB_PASSWORD’, ”); // …and password

    define(‘BBDB_HOST’, ‘localhost’); // 99% chance you won’t need to change these last few

    define(‘BBDB_CHARSET’, ‘utf8’); // If you are *upgrading*, and your old config.php does

    define(‘BBDB_COLLATE’, ”); // not have these two contstants in them, DO NOT define them

    // If you are installing for the first time, leave them here

    // Change the prefix if you want to have multiple forums in a single database.

    $bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!

    // The full URL of your bbPress install

    $bb->uri = ‘http://localhost/bbpress&#8217;;

    // What are you going to call me?

    $bb->name = ‘bbpress’;

    // This must be set before you run the install script.

    $bb->admin_email = ‘blah@blah.com;


    The Warnings


    Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user ‘ODBC’@’localhost’ (using password: NO) in C:wampwwwbbpressbb-includesdb-mysqli.php on line 80

    Warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in C:wampwwwbbpressbb-includesdb-mysqli.php on line 80

    Warning: Cannot modify header information – headers already sent by (output started at C:wampwwwbbpressbb-includesdb-mysqli.php:80) in C:wampwwwbbpressbb-admininstall.php on line 10

    Warning: Cannot modify header information – headers already sent by (output started at C:wampwwwbbpressbb-includesdb-mysqli.php:80) in C:wampwwwbbpressbb-includesfunctions.php on line 1898

Viewing 25 results - 28,701 through 28,725 (of 32,481 total)
Skip to toolbar