Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,726 through 28,750 (of 32,499 total)
  • Author
    Search Results
  • #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

    #61612
    Trent Adams
    Member

    About time I chime in here. There is a plugin by Louisdale called Avatar Upload that allows users to upload their own avatar and save it on the server. I have been meaning to pick that plugin apart as to use the “uploading” code in another plugin.

    I am sure that if you understand a bit of code you can pick out that portion of the plugin and use it with the current “allow images” plugin. I might have time later to look at it, but if someone wants a place to start, that might be it!

    Trent

    #54858

    In reply to: file attachments….

    tbronson
    Member

    You Guys can have such a limited sense of humor… :)

    Sorry, I started a new topic for this, which I should’ve done from the beginning…

    (fel64: I simply want to allow forum users to have the option of uploading images and then displaying those images in a post.)

    #2614
    tbronson
    Member

    Seeking a simple solution that allows logged in users to upload and include images in their posts.

    All I’ve come up with is the Allow Images plugin, which adds a button to the editing form that helps paste an IMG tag so you can link to an external image.

    I was told in another thread that it’s far from trivial to create a file attachments plugin for bbPress: “A major problem right now is lack of per-post metadata. Even if that were present, this would not be a trivial task.” I’m not sure of the terminology here, but if “attachment” means embedding an image in a post, that’s what I want to do.

    ImageShack was suggested, a web service that lets people upload images which they serve for free. You can embed their upload form in your site, upload, then grab the preformatted image URL and paste it into your bbPress post. This kinda works, but it’s distracting because you get an ImageShack mini-ad, and have to go to their site to copy the link (cool service, though)…

    I thought of trying a simple uploader script that would upload files completely outside of bbPress and present the URL for cutting and pasting into the post. Kinda like the ImageShack procedure minus…ImageShack. Dunno, this is probably beyond me, though I may try with a canned script…

    I’m using 2.3.1 integrated with 0.8.3 via bbSync and WordPress integration. It works great!

    Any ideas?

    (I noticed that Allow Images is the #1 most downloaded plugin, 7x more popular than #2, WordPress Integration, so I imagine the MASSES are craving simple image upload… :)

    Thanks!

    #61541

    In reply to: How Do I Do This?

    livibetter
    Member

    Is this? screenshot1

    The structure of forums: screenshot2

    Modification for Kakumei theme:

    Find <?php if ( bb_forums() ) : ?> to <?php endif; // bb_forums() ?> (Total: 19 lines) in front-page.php.

    Replace them with:

    <?php
    if ( bb_forums() ) :
    global $bb_forums_loop;
    $_loop =& $bb_forums_loop;
    bb_forum();
    while ($_loop) :
    if ($_loop->walker->depth == 1) {
    ?>
    <h2<?php bb_forum_class?>><?php forum_name(); ?></h2>
    <table id="forumlist">
    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php
    }
    else {
    ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php
    }
    bb_forum();
    if ($_loop === null || $_loop->walker->depth == 1)
    echo '</table>';
    endwhile; ?>
    <?php endif; // bb_forums() ?>

    #61540

    In reply to: How Do I Do This?

    fel64
    Member

    It may not be obvious to you, but your so-called categories are identical to parent forums with some different display code. Just make your forums, add your child forums, and then modify the template so that it’s no longer a link and has column headings instead of data of its own. It’s functionally identical.

    > You should know, I’m new to this. I’m learning, but re-writing too much code and messing too much with the database probably isn’t a good idea just yet.

    Yeah, okay. Don’t worry about it. You’ll learn.

    #54857

    In reply to: file attachments….

    fel64
    Member

    Hehe, yeah Chris, couldn’t agree more with you there. I was thinking much the same thing. ^_^

    So, tbronson, I don’t understand. Did you want *attachments*? Or just for people to be able to upload images somewhere? And what script did you end up using? I think now that you can even integrate imageshack into your site, but using their servers to host the images; their api looks made just for that.

    #54856

    In reply to: file attachments….

    tbronson
    Member

    Thanks for ImageShack, that looks quick. I don’t need the whole file attachment bit (I realize I’m a little off-topic for this thread, but it’s kinda close).

    The red flags make sense if you’re developing software… :)

    I also found this “Asynchronous image file upload without AJAX” PHP script that looks like it might work for, um, what I want right away. I’ll give it a try and see what happens…

    Thanks again!

Viewing 25 results - 28,726 through 28,750 (of 32,499 total)
Skip to toolbar