Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 30,276 through 30,300 (of 32,191 total)
  • Author
    Search Results
  • #50832

    In reply to: Avatars

    Trent Adams
    Member

    I use this plugin for MyBlogLog avatars, but looking at the code it seems to be already setup for Gravatars as well! Maybe take a look at it!

    https://bbpress.org/plugins/topic/36?replies=6

    Trent

    #1674
    archasek
    Member

    http://kmr.nazwa.pl/forum/topic.php?id=3&page&replies=1#post-6

    i want to translate headers like this “reply” and

    [Delete entire topic] [Close topic] [Stick topic (to front)]
    Move this topic to the selected forum:

    and

    dodano 2 hour temu

    where can i do this?

    fel64
    Member

    As long as you integrated from the start, no? Are you using the same database for WP and bb? In your config.php, did you add details for these settings:

    bb->wp_table_prefix
    bb->wp_home
    bb->wp_siteurl

    Another way to tell is, did it use your WordPress name for your admin account when you installed?

    #56390
    fel64
    Member

    Might be worth making a trac ticket for it here: https://trac.bbpress.org/ Log in with the details you use here. :)

    #50829

    In reply to: Avatars

    Atsutane
    Member

    U can put that code as a plugin.

    #1667
    davetropeano
    Member

    I recently did my first bbpress install on localhost and it went miserably. I used the latest download from today.

    Checking on this forum I had the same path seperator issues and stylesheet issues others had, etc.

    My $bb->domain and $bb->path were fine. The fresh install just didn’t work properly under xampp and then again a retry on easyPHP.

    This is the solution and findings I found:

    1. The first issue is because in config.php and bb-load.php dirname(__FILE__) is used to get the base path for BBPATH. This is not a good thing on localhost Windows based installs.

    2. There are a number of attempted workarounds to this that I’ve read about in this forum. All of them that I saw didn’t work. Focusing on the issue with the stylesheet href not being correct I noticed that there was logic in the bb_get_active_theme_folder() function.

    By default, the installer does NOT create an option entry ‘bb_active_theme’ in the database table topicmeta. The code logic doesn’t make the correct uri.

    To fix this, do an install and then add a database field bb_active_theme in the topicmeta table.

    For example, I set mine to:

    http://localhost/dev/bbpress/

    Playing regular expression games to change x: and in general is not worth it. This seemed to be simple and worked right out of the box.

    #56348
    tegolino
    Member

    it doesn’t work :(

    #55894
    fel64
    Member

    Thanks for this Sam, looking at it I also made a plugin using the Simple Onlinelist which will highlight any new posts made since the last time someone logged in. :) Waiting to have it approved as a plugin so I can upload.

    fel64
    Member

    You will have to make changes to some core files to make this work properly, as they are in different subdomains.

    Find your bbPress config.php file and add these lines:

    //try to sync cookies
    $bb->cookiedomain = '.mpm.org.au';
    $bb->cookiepath = '/';

    Now go to your wordpress folder, open wp-settings.php.

    #line 190

    FROM

    define('COOKIE_DOMAIN', false);

    TO

    define('COOKIE_DOMAIN', '.mpm.org.au');

    Make sure that you make note of this change to wp-settings.php. Every time you upgrade wordpress this change will be overriden and you will have to make this change again.

    #56345
    tegolino
    Member

    ops sorry for the swiching! I’m doing a tests!

    I have my-templates folder, but I want the same theme of my blog http://www.motiongraphics.it . When I switch to MW theme the error is

    Fatal error: Call to undefined function: get_settings() in /web/htdocs/www.motiongraphics.it/home/forum/

    my-templates/mw1.1/themetoolkit.php on line 331

    :((((

    #56343
    chrishajer
    Participant

    I just created a login at http://www.motiongraphics.it/forum/ and everything worked fine. I was able to do login and create a topic just fine.

    The really weird thing is that the forum initially looked like a standard bbPress install (kakumei or whatever that theme is called) then, after I created a topic, it switched over to what looks like this bbpress.org forum theme. It was so disorienting, I thought I posted on bbpress by mistake!

    So, unless you were messing with the templates, something weird is going on. However, I did not see the error you mentioned, I just had the weirdness with the differing templates.

    Sorry for my Italian :)

    #50827

    In reply to: Avatars

    thegunman
    Member

    You say this is bbpress code but after searching through every file I couldn’t find any reference to avatar in any of the code. Where exactly is this block of code placed?

    #56297

    In reply to: config.php

    archasek
    Member

    Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-includes/pluggable.php on line 166

    when i login. i don’t have print_r funciton.

    edit:

    ok, everything seem to be working ok. thank ya ! :)

    #56296

    In reply to: config.php

    Sam Bauers
    Participant

    I accidentally left a print_r() command in the first upload of the patch. Check line 64 of db-mysli.php, if it has print_r($server); on it, just remove that line completely.

    print_r() forces output, which may explain the errors. Sorry about that.

    #52212
    Trent Adams
    Member

    I am sure they both are not the same as this forum! I just copied across the stylesheets and then moved a few things around. If I get a chance I might take a closer look at it this weekend, but I was really getting something of a basic template for others to use, not quite 100% perfection as I did it in about 20 minutes…..;)

    Trent

    #56087
    fel64
    Member

    At a wild guess from memory it’ll be in /bb-includes/formatingfunctions.php :)

    #56295

    In reply to: config.php

    chrishajer
    Participant

    The error “Warning: Cannot modify header information – headers already sent by” is generally caused by white space before the <?php or after the ?> in a file you edited. Check for that and I think you will find your problem.

    Thanks Sam for submitting that patch :)

    #50826

    In reply to: Avatars

    cweb
    Member

    It works for me, just had to change your variable name $usermail because it’s supposed to be $email – so the code looks like this:

    function get_avatar() {

    global $bbdb;

    $id = get_post_author_id();

    $user = bb_get_user( $id );

    $email = $user->user_email;

    $default = "http://eastcoastwahines.com/images/gravatar.gif"; // Put your default avatar link

    $size = 40;

    $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email)."&default=".urlencode($default)."&size=".$size;

    echo "<img src="$grav_url" alt="Gravatar" width="$size" height="$size" />";

    }

    #56086
    wittmania
    Member

    Sorry, but I wanted to bump this to the front to see if anyone could help me out.

    Where is it in the post/edit routine that BBP converts line breaks to <br> tags and double-line breaks to <p> tags. If someone could point me in the right direction, I’m sure I could just add that routine to the private message post/edit plugin so it would work the same way as normal posts do.

    Thanks in advance for any help you can give.

    #56176

    In reply to: Quote Plugin Weirdness

    AphelionZ
    Participant

    Sorry, citizenkeith… we still havent solved the problem :(

    #52210
    thegunman
    Member

    Excellent it works many thanks to you and great template. :)

    —-edit


    Take a look at a minute it apears as though the search button is in the wrong place, and it shows like that in IE and FireFox.

    #56175

    In reply to: Quote Plugin Weirdness

    citizenkeith
    Participant

    You guys are way over my head. :D

    #56173

    In reply to: Quote Plugin Weirdness

    fel64
    Member

    Not sure what black magic you just haxed up there (MySQL I am fairly clueless about), I just did this:

    $quoted = bb_get_user( $row->poster_id );

    My full modifications are:

    function bb_quote_message() {
    global $bbdb, $topic;
    $post_id = (int)$_GET['quote'];
    if ($post_id) {
    $row = $bbdb->get_row("SELECT * FROM $bbdb->posts WHERE post_id={$post_id} AND topic_id={$topic->topic_id} AND post_status=0");
    $//row->post_text = preg_replace( '(|
    )', '', $row->post_text );
    $row->post_text = preg_replace( '/<blockquote>.*</blockquote>/', '', $row->post_text );
    $row->post_text = str_replace( '', '', $row->post_text );
    $row->post_text = str_replace( '
    ', '', $row->post_text );
    $quoted = bb_get_user( $row->poster_id );
    $quotesince = bb_since( $row->post_time );
    $quotesince = ' - ' . $quotesince . ' ago ';
    $quotelink = get_post_link( $row->post_id );
    $quotelink = '<a href="' . $quotelink . '">&nbsp;&raquo;&nbsp;</a>';
    if ($row) echo htmlentities('<blockquote><cite>'.$quoted->user_login . $quotesince . $quotelink . "</cite>n".$row->post_text.'</blockquote>', ENT_COMPAT, 'UTF-8');
    }
    }

    function fel_addcitetag( $tags )
    { $tags['cite'] = array();
    return( $tags ); }

    add_filter( 'bb_allowed_tags', 'fel_addcitetag' );

    You can see my regex attempt to get rid of blockquotes, although for some reason despite it being marked as code the b-quote tags were still removed.

    I also switched from regexing the paragraph tags tostr_replaceing them, which is apparently much faster. Again, though, they’re filtered out.

    #52807

    In reply to: Plugin: Summon user

    AphelionZ
    Participant

    I added some pizazz to this plugin – If you have the Simple Online list and Posts Since Last Visit Plugin you can run the query on the bb_online table and populate the summon list with only users that have actually logged in. I trimmed about 80 users out of the select list with this, and it still works:

    function summon_get_users() {
    global $bbdb;
    // maybe cached in future versions.
    $users = $bbdb->get_results("SELECT * FROM <code>bb_online</code> INNER JOIN wp_users ON bb_online.user_id = wp_users.ID WHERE 1 ORDER BY <code>wp_users</code>.<code>user_login</code> ASC LIMIT 0 , 30");

    return $users;
    }

    #56172

    In reply to: Quote Plugin Weirdness

    AphelionZ
    Participant

    Regex’s are a mystery to me, but I did end up doing something pretty cool with it – I added an INNER JOIN to the sql to grab the username of the quoted..

    function bb_quote_message() {
    global $bbdb, $topic;
    $post_id = (int)$_GET['quote'];
    if ($post_id) {
    $row = $bbdb->get_row("SELECT * FROM $bbdb->posts INNER JOIN wp_users ON bb_posts.poster_id = wp_users.ID WHERE bb_posts.post_id={$post_id} AND bb_posts.topic_id={$topic->topic_id} AND bb_posts.post_status=0");
    $row->post_text = preg_replace( '(<p>|</p>)', '', $row->post_text );
    if ($row) echo htmlentities('<blockquote>"'.trim($row->post_text).'"<br /><strong>- '.$row->user_login.'</strong></blockquote>', ENT_COMPAT, 'UTF-8');
    }
    }

Viewing 25 results - 30,276 through 30,300 (of 32,191 total)
Skip to toolbar