Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,826 through 28,850 (of 32,499 total)
  • Author
    Search Results
  • #61247
    livibetter
    Member

    I have no idea which file you meant. Please just paste the code about how you query for something from your database and how you process the data for the visitors.

    #61250
    livibetter
    Member

    You don’t have to check the existence of the table you need

    http://dev.mysql.com/doc/refman/4.1/en/create-table.html

    Just create a table with IF NOT EXISTS.

    #61245
    livibetter
    Member

    Could you paste your test.php?

    #61248
    livibetter
    Member

    Here is an example for deactivation hook

    //bb_register_deactivation_hook(__FILE__, 'GADeactivate'); // Bug in bbPress 0.8.3, do same thing using next line
    add_action('bb_deactivate_plugin_' . bb_plugin_basename(__FILE__), 'GADeactivate');

    just remove “de” from above, that should work. For example,

    bb_register_activation_hook(__FILE__, 'hook_fct');

    However, I haven’t used activation hook, therefore I don’t know is there a problem with it.

    #61287
    livibetter
    Member

    Sorry, my mistake

    <?php
    echo '(<a href="' . get_profile_tab_link(bb_get_current_user_info('id'), 'edit') . '">edit</a>)';
    ?>

    login_form() uses logged-in.php of current active theme if current user is logged in.

    #61284
    lookfab
    Member

    Thanks livibetter. I just realized that the profile field doesn’t show any fields that are not populated, so in my case there was no information to show until I added the website a few minutes ago.

    Not my brightest moment :-|

    #61285
    livibetter
    Member

    You can put this at proper place in your logged-in.php

    <?php
    echo '(<a href="' . get_profile_tab_link(0, 'edit') . '">edit</a>)';
    ?>

    #61269
    jazbek
    Member

    thanks man. :)

    #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.

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