Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,826 through 28,850 (of 32,491 total)
  • Author
    Search Results
  • #60314
    akhater
    Member

    fel64 WOW this is nice :) we learn every day don’t we :)

    I will add your link to my mod it will help ppl

    #60313
    fel64
    Member

    Nice, akhater. Just for simplicity and maintainability, you don’t actually have to copy and paste the member capabilities, you can simply duplicate them through code. (For example)

    #61194

    In reply to: Plugin: Gravatar

    livibetter
    Member

    New Version, 0.2. Download the zipped file.

    • Two Gravatar Email Source

      • Use registered email
      • Use additional Gravatar Email field

    • Email Verification – Users need to verify Gravatar Emails which they input
    • Options page (screenshot)
    • Default Image – Supports displaying Default Image

      • Also supports displaying different Default Image based on user’s role

    • Display Name – Shows Display Name instead of Login name if available
    • Customize Size, Rating of avatar
    • Complete Deactivation – Removes options and data in usermeta

    Plugin’s page

    #58181

    In reply to: bbSync

    jazbek
    Member

    hey fel et al.,

    found another issue which i just spent way too much time trying to figure out.. why is it that anywhere bb_get_option is called, it returns nothing? somehow the bb_get_option function doesn’t have access to the $bb object. I placed the following 2 lines of code in my bbpress functions.php, at the top of the bb_get_option function (after the line that reads global $bb;:

    print_r($bb);
    echo " $option ";

    and i got:

    akismet_key mod_rewrite use_cache active_plugins usercookie usercookie page_topics

    — notice, the requested option names are being echoed, but there’s no output from print_r($bb). why isn’t $bb set in the bb_get_option function?

    this issue is causing bbrepliestext() to output:

    Warning: Division by zero in /httpdocs/discuss/bb-includes/functions.php on line 1465

    if the “Do you want me to load bbPress whenever to make things like links nicer?” option is checked in Options > bbSync. To be specific, the error comes from line 500 in bbsync.php

    #60809
    livibetter
    Member

    Use this code as a plugin.

    function Hook_get_profile_info_keys($keys) {
    unset($keys['interest']);
    return $keys;
    }

    add_filter('get_profile_info_keys', 'Hook_get_profile_info_keys');

    #61271
    mrwonderr
    Member

    Thanks, it works. :D

    #2551
    lookfab
    Member

    Is there a simple way (i.e. not involving a plug-in) to change the title of a view? For example, if I wanted the view “Topics with no replies” to say “Threads with no replies”, how can I do this?

    I do see that the views are set up in default-filters.php, so I guess I’m asking whether there is an easy way to override these view definitions using code in the theme.

    Thanks.

    #61193

    In reply to: Plugin: Gravatar

    bigmumu
    Member

    Thanks guys, great job :)

    #61270
    fel64
    Member

    Include bb in wp-config.php like so:

    require_once('path/to/bb-load.php');

    #61268
    livibetter
    Member

    I checked 0.8 in svn. You can simply comment out or remove those capabilities in capabilities.php.

    #61267
    jazbek
    Member

    thanks, yeah, i am not using bbpress + wordpress on the installation i’m trying to disable posts and registration on.. that’s the old one that’s getting moved to the new site that has wordpress.

    0.8 doesn’t have plugin activation, i guess everything’s just enabled by default (someone correct me if i’m wrong). i’ll have to check out capabilities.php tomorrow (i’m off to a halloween party!). thanks for the help. :)

    #61266
    livibetter
    Member

    Did you activate it? and did you use a normal user to try posting? (keymaster remains all permissions)

    I noticed you probably use WP and bbPress together (by your recent posts), I have no idea if this code can work under that condition.

    * Sorry! I just realized that you meant 0.8. Well, I started to use bbPress from 0.8.3, so I don’t know is this compatible to 0.8. You need to check capabilities.php if available in 0.8.

    #2549
    mrwonderr
    Member

    I want to have one universal sidebar in my website for both WP and BB, but I can’t because I need a few BB Functions for it, particularly login_forms(). Is there a way to use login_forms() in WP?

    #61265
    jazbek
    Member

    Do you know if the Changes Roles Stuff plugin is compatible with bbpress 0.8? i installed it, but it doesn’t seem to be getting called. I have, in my-plugins/custom-roles.php:

    <?php
    /*
    Plugin Name: Changes Roles Stuff
    Plugin URI: http://www.livibetter.com/it/
    Description: Changes Roles Stuff
    */

    function ChangesRolesStuff($roles) {
    // Changes Key Master Role's display name to 'The Boss'
    $roles['keymaster']['name'] = 'The Boss';

    $roles['member']['capabilities'] = array('read' => true);
    $roles['moderator']['capabilities'] = array('read' => true);
    $roles['administrator']['capabilities'] = array('read' => true);
    return $roles;
    }

    add_filter('get_roles', 'ChangesRolesStuff');
    ?>

    but people can still post.

    #56763

    In reply to: Plugin: Avatar Upload

    mrwonderr
    Member

    To fix any odd problems regarding permissions, you can CHMOD it using PHP.

    Add the code above line 128 where it says "$success_message = "Your avatar has been uploaded.";

    chmod("/PATH/TO/FORUMS/".$config->avatar_dir . $user_filename, 0666);

    #61257

    In reply to: Show login name

    livibetter
    Member

    Replace line 194 in bb-avatar-upload.php

    $felidenticon = $identicon->identicon_build( $user->user_login, '', false, '', false );

    with

    $felidenticon = $identicon->identicon_build( (($user->display_name) ? $user->display_name : $user->user_login), '', false, '', false );

    PS. Just a quick guessing solution and I haven’t used this plugin.

    #61236
    livibetter
    Member

    Have you tried to search one in Extend?

    If you find no plugin and you can do code, I think you can check line 18 in /bb-post.php, line 479 in /bb-includes/capabilities.php.

    You need to check current user’s is allowed to start a new topic in specific forum or not in your filter hook.

    Just thoughts, but should work.

    PS. I think it’s better not to do too much that bbPress can’t by default, or you could suffer more after upgrading unless you completely know what you do.

    #61263
    livibetter
    Member

    1. remove /register.php or redirect it to somewhere, or replace it with your page (tell visitors your forum temporarily doesn’t accept new registrations) then you can skip step 2.

    2. remove register link from your login-form.php in you template folder.

    3. Use this. You may need these

    $roles['member']['capabilities'] = array('read' => true);
    $roles['moderator']['capabilities'] = array('read' => true);
    $roles['administrator']['capabilities'] = array('read' => true);

    #2548
    jazbek
    Member

    Hi,

    I am about to migrate my current bbpress site over to a new server and would like to freeze posting and registration so that the databases don’t get out of sync. I don’t really want to take the whole forum offline, though.. I’d like visitors to still be able to read through the existing posts. Does anyone know of a quick way to do this?

    TIA :)

    #2547
    honewatson
    Member

    I set up an integrated BBPress and MU WordPress on Nginx. There may be a better way of doing the rewrites but these work well for me.

    Here are the BBPress Nginx rewrites:

    location /forums/ {

    root /home/YOURDIRECTORY/public_html/forums;

    index index.php;

    if (!-e $request_filename) {

    rewrite ^/forums/topic/(.*)$ /forums/topic.php?q=$1 last;

    rewrite ^/forums/forum/(.*)$ /forums/forum.php?q=$1 last;

    rewrite ^/forums/profile/(.*)$ /forums/profile.php?q=$1 last;

    rewrite ^/forums/view/(.*)$ /forums/view.php?q=$1 last;

    rewrite ^/forums/tags/(.*)$ /forums/tags.php?q=$1 last;

    rewrite ^/forums/rss/(.*)$ /forums/rss.php?q=$1 last;

    rewrite ^/forums/bb-admin/ /forums/bb-admin/index.php last;

    rewrite ^/forums/ /forums/index.php last;

    break;

    }

    }

    Here’s a full write up here:

    http://dev.honewatson.com/bbpress-wordress-mu-integration-nginx-pretty-urls-rewrites/

    #61255
    bssfi
    Member

    Hi again

    I am just trying to post the banners in a thread.

    The plugin is already enabled, so that’s not the problem. Most of the banner codes seem to have the closing backslash missing in the closing img tag. It seems that bbpress is particularly fussy when it comes to this type of code.

    #2545
    bssfi
    Member

    This is a regular problem on my forum. bbpress seems to remove the image part of the banner as there is missing code. Usually I can work out where the missing tag goes. In the case of the following TradeDoubler code, I can’t! Any suggestions much appreciated.

    <script type=”text/javascript”>

    var uri = ‘http://impgb.tradedoubler.com/imp?type(img)g(16463372)a(1422608)&#8217; + new String (Math.random()).substring (2, 11);

    document.write(‘<img src=”‘+uri+'” border=0>‘);

    </script>

    #61192

    In reply to: Plugin: Gravatar

    suzkaw
    Member

    Here is a link to mine: http://www.68kb.com/2007/10/25/bbpress-plugin-68-gravatars/

    From browsing your code mine is way way basic. :) Just one function and one call. Also mine only uses the posters registered email as well.

    #61243
    livibetter
    Member

    echo make_clickable($content);

    If you pull posts from database, then trying to make it possible to use template functions may be a better solution.

Viewing 25 results - 28,826 through 28,850 (of 32,491 total)
Skip to toolbar