Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,751 through 26,775 (of 32,466 total)
  • Author
    Search Results
  • #68184
    satranc
    Member

    Hi all,

    When i want to install

    i got this error:

    Fatal error: Call to undefined function bb_glob() in xxxxxxxxxx/bb-admin/class-install.php on line 322


    svn trunk revision: 1789

    #68179
    ear1grey
    Member

    I have the code managed through svn and after a quick svn switch http://svn.automattic.com/bbpress/tags/1.0-alpha-2 (followed by an svn update for good measure) everything appears normal.

    (+1 beer on Sam et al next visit)

    #68130
    Sam Bauers
    Participant

    I’ve added the ability to do this to the development trunk. If you want to backport this to an older bbPress, you can follow the changes here:

    https://trac.bbpress.org/changeset/1786

    Then drop the function <?php bb_latest_topics_pages(); ?> wherever you want it in the front-page template to show pagination.

    #68039
    qlister
    Member

    ok thanks chrishajer for the specific instructions, I will try it out and let you know of the outcome

    thanks, really appreciate it :)

    #4097
    epiphone
    Member

    Im going to intergrate my WordPress Theme into my bbPress forum, so I need to make sure that functions like Header and Sidebar can be used in bbPress. So I’ve been reading up and found out that you need to place this code in the bb-config.php:

    require_once(‘path/to/wp-blog-header.php’);

    However when I place the code. I suddenly can’t log into the bbPress forum anymore. When I click login nothing happens the page will load but not display links like Username –> Admin —> Log out just the normal page as if a guest was browsing the forum.

    I am placing the code below the first <php line? Am I doing something wrong?

    Additional Info:

    WordPress Version: 2.6.2

    bbPress Version: 0.9.2

    #67247

    In reply to: about sessions

    meitershaker
    Member

    but how to display the admin menu (admin link) in the header of my wordpress, when i’m connected to bbpress?

    thanks :)

    #68020

    In reply to: Viewing User IPs

    chrishajer
    Participant

    I think maybe it’s a bug. I just modified bb-admin/view-ip.php line 11, from this:

    $post_query = new BB_Query( 'post', array( 'ip' => $ip, 'per_page' => 30 ) );

    to this:

    $post_query = new BB_Query( 'post', array( 'poster_ip' => $ip, 'per_page' => 30 ) );

    Basically change ‘ip’ to ‘poster_ip’ and then it works. Not sure how long that’s been broken. I have a 0.9.0.2 installation that does not work, then the alpha r1637 also does not work.

    If this works for you, I can file a bug to trac bringing it to the developers attention.

    #4082
    irr1449
    Member

    My site currently does not have a user management system where people can register etc. I’m looking for a system to integrate that I can just piggyback off of and access the users table to do my own development.

    Would bbPress be a good fit here? I played around with the code a little bit and I just included “bb-load.php” and I was able call functions like ” bb_get_current_user_info( ‘id’ )” without actually displaying anything related to the forum.

    The only downside is that it added about .2 seconds to my average php render times.

    #4092
    kuroir
    Member

    I’m wondering if there’s a way to change the default Permalink structure and prefixes.

    For example :

    http://www.exolimpo.com/foro/topic/post-de-prueba

    I would like to change topic for something else.

    and

    http://www.exolimpo.com/foro/forum/anime

    I would also like to change Forum, since Foro already means forum in spanish.. so “Forum Forum” is reiterative.

    If there’s a way to do this tell me, I don’t mind editing a little bit of code in the core, I just need a little bit of direction.

    #68050
    Sam Bauers
    Participant

    The display of that empty option is suppressed in 1.0 when it isn’t available.

    It’s only ever visible to admins anyway, so it wasn’t a huge deal.

    Turns out there is an error in 0.9 that stops the “throttle_time” option from being set.

    If you run this raw SQL on your database it should set the option to 30 seconds which will force a checkbox to show up in that form.

    INSERT INTO bb_topicmeta VALUES (NULL, '0', 'throttle_time', '30');

    #4090
    cralor
    Member

    Here is how to correctly install Avatar Upload.

    The “Additional Info” is not too detailed.

    Here is the instructions on how to get the plugin (currently) on your bbPress site:

    1. Download and upload the plugin to your bbPlugins directory.

    2. Activate the plugin in the bbPress Admin section.

    3. Follow the file movement instructions:

    In the “additional-files” folder (inside this Avatar Upload plugin directory) there is several files. These need to be moved elsewhere.

    • Move the entire “avatars/” folder to your bbPress root directory. (Including the “default.png” inside.)
    • Move the “avatar-upload.php” to the bbPress root directory.
    • Move the “avatar.php” (inside the “my-templates” folder) to your template(s) (theme(s)). Example: Move “my-templates/avatar.php” to “forums/bb-templates/kakumei/” (So it is like “forums/bb-templates/kakumei/avatar.php”.)

    I hope this helps someone :D

    #4089

    When I use my keymaster account, and try to edit a user, there’s a part of the administration section that says, “Allow this user to” but there’s no form, text box or anything else to fill in after it. This line appears between “User Type” and “Custom Title”.

    So what’s the point of the “Allow this user to” line? Looking at the code, it’s supposed to be for specifying specific user capabilities (like whether they can add posts, edit posts etc.) but it doesn’t seem to be fully functional yet. Is this expected?

    If it helps I have the latest bbpress version, it’s 0.9.0.2.

    Thanks.

    fandangoflip
    Member

    nice tool… very useful :)

    fandangoflip
    Member

    Thanks mate, well spotted :)

    #4084
    qlister
    Member

    I’m using WordPress 2.6 and I was trying to install bbPress 0.9.0.2 and integrate it and it came up with this error at the end of the installation:

    “Duplicate key name ‘user_nicename’

    >>> User tables will already exist when performing a database integrated installation.”

    My forum got installed, however when I try to click on the topics or the forums or tag, it doesn’t open anything, I can’t get to read any of those. It just stays on the same page.

    The only function I am able to use is the add topic, but I can’t get to read anything I click.

    What should I do? Any advice is greatly appreciated :)

    #67800

    In reply to: Cooking forum

    fandangoflip
    Member

    nice :)

    #67515

    In reply to: Plugin suggestions

    Detective
    Member

    I would like to code a plugin to prevent double posting in a certain period of time. For example, i’m adding this reply to this topic, and in 5 minutes i could add another. This plugin would take the second reply and append it to the first one, instead of making a new post (if no one else replied in those 5 minutes).

    It should be straightforward to do, but i don’t have the time :'(

    #67919
    andersson
    Participant

    Well then this problem may just be locally for me then, but when running the alpha 1.0, for a topic for instance, runing _CK_’s excellent admin tool you’ll see about 50-60 queries that does something like this:

    # 51 : 0.0195 seconds
    SELECT * FROM bb_users WHERE ID = '6526'

    # 52 : 0.0122 seconds
    SELECT meta_key, meta_value FROM bb_usermeta WHERE user_id = '6526' /* WP_Users::append_meta */

    # 53 : 0.0004 seconds
    SELECT * FROM bb_users WHERE ID = '5605'

    # 54 : 0.0003 seconds
    SELECT meta_key, meta_value FROM bb_usermeta WHERE user_id = '5605' /* WP_Users::append_meta */

    # 55 : 0.0014 seconds
    SELECT user_id, meta_key, meta_value FROM bb_usermeta WHERE user_id IN (365,1325,267,1088,2295,1106,94,1259,1225,1210,2230,3055,7,4566,3869,2992,1894,5690,2713,5873,6526,5605) /* WP_Users::append_meta */

    As you can see, it has run over 50 queries that simply does what is done correctly in query 55 (the last query). It seems it runs this for every post it displays (I display 30 posts per page).

    Like I said, maybe this is something that is just happening for me but I seem to remember someone having this problem with the first page also, but that time it was the topic meta I think.

    Any help is much appreciated.

    #68007
    chrishajer
    Participant

    Sounds like you have the mobile browser agent stuff figured out with the Tera-WURFL library. So, when you detect a mobile browser, you want to display your forum using the1col_fixed theme? Looks like it checks for a match to a mobile browser like this:

    $matched = $wurflObj->getDeviceCapabilitiesFromAgent($_SERVER['HTTP_USER_AGENT']);

    // see if this client is on a wireless device (or if they can't be identified)
    if(!$matched || !$wurflObj->getDeviceCapability("is_wireless_device")){
    echo "<h2>You should not be here</h2>";
    }

     

    So, instead of the <h2> message they are displaying, you could use a theme switcher plugin to set the theme and direct someone to that URL. How about something like this:

    https://bbpress.org/plugins/topic/bbpress-theme-switcher/

    That plugin says it uses cookies to persist the theme choice.

    #66819

    In reply to: admin link not working

    Jimmy B.
    Participant

    This a very good thread, might even want to sticky it. I’ve tested this and it works and is needed if you really want true cookie sharing :)

    #66104
    eschen
    Member

    Something I could not find in this or any other thread concerning integration of 0.9.0.2 with wp 2.5. Problem is that a login to either bbPress or WordPress will log a user OUT of the other, can not be logged into both at same time. Common problem but different question. Several people have suggested adding the following to the bb-config.php:

    $bb->usercookie = ‘wordpressuser’;

    $bb->passcookie = ‘wordpresspass’;

    Questions: are these really needed, should the full hash number (wordpressuser_full.hash.number) also be included and if so, where do I find the hash code? Using Firefox, the I see two cookies when logged into either bb or wp:

    wordpress_test_cookie

    wordpress_cabxxxxxxxxxxxx

    The Secret keys are identical for both bb and wp config files. Also I have:

    In bb-config file:

    $bb->wp_table_prefix = ‘wp_’;

    $bb->user_bbdb_name = ‘xxxxxxxxxx’;

    $bb->user_bbdb_user = ‘xxxxxxxxxx’;

    $bb->user_bbdb_password = ‘xxxxxxx’;

    $bb->user_bbdb_host = ‘xxxxxxxxxxx’;

    $bb->custom_user_table = ‘wp_users’;

    $bb->custom_user_meta_table = ‘wp_usermeta’;

    $bb->authcookie = ‘wordpress_cabxxxxxxx’; //identical to what is shown in Firefox cookie

    $bb->cookiedomain = ‘.alleventsadviser.com’;

    define(‘COOKIE_DOMAIN’, ‘.alleventsadviser.com’);

    $bb->cookiepath = ‘/’;

    define(‘COOKIEPATH’, ‘/’);

    $bb->sitecookiepath = ‘/’;

    In wp-config:

    $table_prefix = ‘wp_’;

    $wp->cookiedomain = ‘.alleventsadviser.com’;

    define(‘COOKIE_DOMAIN’, ‘.alleventsadviser.com’);

    $wp->cookiepath = ‘/’;

    define(‘COOKIEPATH’, ‘/’);

    $wp->sitecookiepath = ‘/’;

    define(‘SITECOOKIEPATH’, ‘/’);

    A registered user is shown in both bb and wp.

    Thanks for any help.

    #67973
    Sam Bauers
    Participant

    The only real problem you have is that the Warning is being printed to screen. On a production site you shouldn’t print PHP errors on the screen.

    The warning in that case should be dealt with though and I will do so in trunk for 1.0. If you want to modify the bb_safe_redirect() function then use the below code for a plugin to rid you of the warning.

    <?php
    /*
    Plugin Name: Suppress bb_safe_redirect Warnings
    Plugin URI:
    Description:
    Author:
    Author URI:
    Version: 0.1
    */

    function bb_safe_redirect($location, $status = 302) {

    // Need to look at the URL the way it will end up in wp_redirect()
    $location = wp_sanitize_redirect($location);

    // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
    if ( substr($location, 0, 2) == '//' )
    $location = 'http:' . $location;

    $home = bb_get_uri(null, null, BB_URI_CONTEXT_HEADER);

    if ( !$lp = @parse_url($location) )
    return wp_redirect($home, $status);

    $wpp = parse_url(bb_get_uri());

    $allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : '');

    if ( isset($lp['host']) && !in_array($lp['host'], $allowed_hosts) )
    return wp_redirect($home, $status);

    return wp_redirect($location, $status);
    }
    ?>

    #67890
    Sam Bauers
    Participant

    The filter will only be passed one argument by default, so you need to change your add_filter() call to this:

    add_filter('get_user_profile_link', 'ss_get_user_profile_link', 10, 2);

    .

    The third parameter is the priority, the second is the number of arguments to pass.

    #4075
    finigan
    Member

    Hi,

    I’ve successfully integrated WordPress 2.5.1 with bbPress 0.9.2, but I’ve encountered some issues with registering (display_name, multiple sign-ups with same email, etc.).

    What I’m trying to do now is redirect all registration to the WordPress register page. My main questions are:

    (1) how/where do I change the bbPress code to point to the WordPress register page.

    (2) is there a way for the system to know where a user came from (forums or blog) and redirect the user appropriately after sign-up?

    Thanks.

    #67514

    In reply to: Plugin suggestions

    thion
    Member

    Been there, tried that – it’s definitely more than 10 minutes :P

Viewing 25 results - 26,751 through 26,775 (of 32,466 total)
Skip to toolbar