mikelothar (@mikelothar)

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • In reply to: Several domains

    mikelothar
    Member

    @mikelothar

    Exactly. :)

    In reply to: Several domains

    mikelothar
    Member

    @mikelothar

    Thanks for the reply. I think i didn’t explain myself too good.

    I want users who come from domainA to stay at domainA, and users from domainB to stay at domainB, and so on (got quite an amount of domains actually).

    I need bbPress to somehow get the domain from the browser, and use this domain instead of the one saved under the ‘uri’ or ‘BB_HOST’ variable.

    In reply to: Several domains

    mikelothar
    Member

    @mikelothar

    I’m assuming i have to change something here:

    // Set the URI and derivitaves
    if ( $bb->uri = bb_get_option('uri') ) {
    $bb->uri = rtrim($bb->uri, '/') . '/';

    // Not used in core anymore, only set here for plugin compatibility
    if ( preg_match( '@^(https?://[^/]+)((?:/.*)*/{1,1})$@i', $bb->uri, $matches ) ) {
    $bb->domain = $matches[1];
    $bb->path = $matches[2];
    }
    unset($matches);
    } else {
    // Backwards compatibility
    // These were never set in the database
    if ( isset($bb->domain) ) {
    $bb->domain = rtrim( trim( $bb->domain ), '/' );
    }
    if ( isset($bb->path) ) {
    $bb->path = trim($bb->path);
    if ( $bb->path != '/' ) $bb->path = '/' . trim($bb->path, '/') . '/';
    }
    // We need both to build a uri
    if ( $bb->domain && $bb->path ) {
    $bb->uri = $bb->domain . $bb->path;
    }
    }

    If someone knows what exactly i need to change, please reply :)

    In reply to: Theme editing problem

    I hate to bump this, but i’m kinda stuck at the moment with the coding until this issue is solved. Alternatively, where would i expect to be able to find this code in the core files?

    I’m not sure i’m doing it right. The idea is good, but nothing seems to happen. Here’s what i have:

    In the plugin:

    function fel_indicatenew($title)
    {
    global $topic, $bb_current_user;
    if ( bb_is_user_logged_in() )
    {
    $feluser = bb_get_user($bb_current_user->ID);
    if( ($topic->topic_time > $feluser->last_visit) && ( $topic->topic_last_poster != $feluser->ID ) )
    {
    //$title = '<span style="color: #9d0a0e;">' . $title . '</span>';
    $topic->new = true;
    }
    }
    return($title);
    }

    .. and in the theme’s front-page.php:

    <?php if( $topic->new ) : ?>
    blah
    <?php endif; ?>

    I’ve also tried:

    <?php if( $topic->new ) { ?>
    blah
    <?php } ?>

    .. but none of these seem to do anything.

    Then i’m Jerry.

    Fel, i think you misunderstood me with the new-post class. I wanted it away from the title, as a new variable of some sort. I guess this plugin is only for the topic text, and can not be modified to my wishes.

    I have never coded sql, but i agree for some unknown reason that i don’t think it’s difficult to code. I’m just curious as to why noone ever did so before. In my opinion, this is the only obstacle in bbPress.

    If anyone should decide to give this a go and try to make the plugin, i just have one (more?) request.. and that is that the plugin also indicates a new topic in the forums part, and not only in the latest discussions. The Indicate New Posts plugin fails to do this.

    Who do i have to sleep with to get this plugin? :D

    Hi fel.

    I already modified the -strong- part, to some <span style=”color: #123456;”>, but i have to admit that i have never heard of the content-before tag for CSS.

    I looked at google, i guess the tag looks like :before (or :after), but i also found this page:

    http://www.quirksmode.org/css/contents.html

    .. which states that it doesn’t work in IE browsers. FreekinĀ“ Microsoft..

    Good idea though, but unfortunately IE is too popular.

    In my theme i have a table, with two columns. First column is the one i would like to be able to modify (even if only with a CSS tag), second column holds the title of the topic.

    Do you know if it would be possible to modify the plugin to differentiate between a .no_new_topic and a .new_topic class, for use in CSS instead?

Viewing 8 replies - 1 through 8 (of 8 total)