Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,776 through 26,800 (of 32,466 total)
  • Author
    Search Results
  • #67830

    In reply to: Get Current Forum ID?

    iuxc
    Member

    Thanks! Worked perfectly. :)

    #67513

    In reply to: Plugin suggestions

    _ck_
    Participant

    WP-Syntax should take all of 10 minutes to port to bbPress:

    http://bbshowcase.org/forums/topic/syntax-highlighter-plugin

    I have a “Syntax-Lite” plugin in development that is less than 1k and uses PHP’s built-in (high speed) highlighter but only works with PHP code of course. It also won’t be available for quite awhile as I don’t have time for bbPress projects these days.

    #4071
    ikailo
    Member

    This was originally going to be an “It’s not working!” post, but I made some progress. Now it’s “Is what I did ok?” post.

    I kept getting a”This Topic is Closed” error every time I tried to create a new topic. Traced it back to the insert statement in ‘bb_insert_topic’ in functions.php. The database was responding with the error of “The value ‘ ‘ is not a valid integer for column ‘topic_id’. (I am paraphrasing, I don’t have the exact response in front of me)

    I suspected it had something to do with the fact that the topic_id value is being supplied to MySql, but it is set to be an auto-increment / not null field.

    So, I commented out in the $default array definition in ‘bb_insert_topic’:

    // 'topic_id' => false, // accepts ids or slugs

    and I changed this line:

    unset( $default, $defaults );

    to this:

    unset( $args, $defaults );

    Did the same thing under the ‘bb_insert_post’ function in the same file, but for the ‘post_id’ variables.

    Presto. Everything seems to work OK now.

    Could this issue be specific to my version of MySql? Although it is strange, because the original query works just fine using a third party tool (SQLyog).

    Has anyone encountered this issue before? Or – can anyone comment on the validity of my changes, and if they might cause issues going forward?

    Finally – should this be logged as a bug?

    Thanks!

    WP 2.6, BB 1.0, IIS 6.

    #67972
    Olaf Lederer
    Participant

    as a work arround, I use this value for the hidden field “re”:

    <?php
    if ($re == 'http://#postform') {
    echo $_SERVER['HTTP_REFERER'].'#postform';
    } else {
    $re;
    }
    ?>

    #67512

    In reply to: Plugin suggestions

    Olaf Lederer
    Participant

    I’m sorry Vadi,

    I thought a long time about what the best solution for posting code tutorials.

    Actually it’s better to use drupal for this kind of content :(

    #67971
    Olaf Lederer
    Participant

    just checked the code and it seems to me that this function is not 100% fine:

    function new_topic( $args = null ) {
    $defaults = array( 'text' => __('Add New &raquo;'), 'forum' => 0, 'tag' => '' );
    if ( $args && is_string($args) && false === strpos($args, '=') )
    $args = array( 'text' => $args );

    $args = wp_parse_args( $args, $defaults );
    extract( $args, EXTR_SKIP );

    if ( $forum && $forum = get_forum( $forum ) )
    $url = get_forum_link( $forum->forum_id ) . '#postform';
    elseif ( $tag && ( ( is_numeric($tag) && $tag = bb_get_tag( $tag ) ) || $tag = bb_get_tag_by_name( $tag ) ) )
    $url = bb_get_tag_link( $tag->tag ) . '#postform';
    elseif ( is_forum() || is_bb_tag() )
    $url = '#postform';
    elseif ( is_topic() )
    $url = get_forum_link() . '#postform';
    elseif ( is_front() )
    $url = add_query_arg( 'new', '1', bb_get_option( 'uri' ) );

    if ( !bb_is_user_logged_in() )
    $url = add_query_arg( 're', urlencode($url), bb_get_option( 'uri' ) . 'bb-login.php' );
    elseif ( is_forum() || is_topic() ) {
    if ( !bb_current_user_can( 'write_topic', get_forum_id() ) )
    return;
    } else {
    if ( !bb_current_user_can( 'write_topics' ) )
    return;
    }

    if ( $url = attribute_escape( apply_filters( 'new_topic_url', $url ) ) )
    echo "<a href='$url' class='new-topic'>$text</a>n";
    }

    this part is not good and result im some error:

    elseif ( is_forum() || is_bb_tag() )
    $url = '#postform';

    what is your adbvice to fix that? rewriting the function / adding a filter as a kind of plugin?

    #4068
    #67510

    In reply to: Plugin suggestions

    Olaf Lederer
    Participant

    A syntax highlighter in wordpress/bbpress is always a hard to do.

    Geshi and tinyMCE = forget it

    I have finally a parser in WP but need to work in code view only.

    #4067
    thion
    Member

    I would like to disable ‘BBcode Buttons’ automatic placement, and put the toolbar manually – I tried to place bbcode_buttons() in the post.php but nothing shows – any tips?

    #67961
    eschen
    Member

    Thanks chrishaje, but I have tried the one line “Options +MultiViews” and the code from “/bb-admin/rewrite-rules.php” and a few others variations in the .htaccess, didn’t make any difference. I just tired again, same result, doesn’t work.

    Can someone tell me if this sounds like a cookie problem?

    thanks

    #4065
    eschen
    Member

    I installed bbPress 0.9.0.2 and tried to integrate with WP 2.5 site. The two are at http://www.my-site/forum and http://www.mysite/blog under the root directory. I have two issues:

    First is with permalinks set to the default (/forum.php?id=1), no problem, I can view profiles and posts within bbPress. However if I use either of the other settings for a permalink, when I click on any profile or post topic within admin control panel or site view, I only get a blank page, no error. Example: the post should be at “forum/post-name”, which is exactly where the link takes me but a blank page exists. However I can view the user profiles registered at bbPress within the WP admin area, so I believe the two are at least partially integrated.

    The host is GoDaddy and there are no problems with WP permalinks. I have tried the using the following htaccess code with the /forum directory:

    # BEGIN bbPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /forum/

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /forum/index.php [L]

    </IfModule>

    Also just having one line:

    Options +MultiViews

    Also the exact code generated at bb-admin/rewrite-rules.php

    Second issue is after login to bbPress, a simple link to the WP admin requests me to login again. Does this take more than a simple link to “…/blog/wp-admin/”? I have checked the cookies and both look identical.

    Thanks for any help

    #4049
    #66102
    blankpoint
    Member

    I’m having some trouble and am smacking my head against the wall… I hope someone can help me.

    I’ve got WordPress 2.6.2 installed at http://www.blahblah.com/

    and bbPress 1.0 alpha at http://www.blahblah.com/forum

    They are in two databases sharing the user tables.

    My problem is that the user must Log OUT from the site that he/she logged IN from. If they logged in at the bbPress login form, then they will be logged in properly on the wordpress site, but if they try to logout there, they will get kicked back to the main page, but STILL BE LOGGED IN. They will only be able to properly log out from bbPress. And the same is true in reverse — if they login from wordpress, they will be logged to the bbPress too, but they will have to log out from wordpress.

    A second, less severe problem, but maybe it will help point to the reason for the above problem, is that if i sign in on wordpress, I will not be able to access the admin panel on the bbpress. I will be logged in as admin, and can perform admin functions on the site, but I cannot go to /bb-admin — I get kicked back out. However, if I sign in on bbPress, I CAN access my wordpress admin section.

    Any ideas? My wp-config and bb-config files have the definitions for SECRET_KEY, AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY (with BB_ prefixed for the bb-config ones).

    They also both have

    define('COOKIE_DOMAIN', '.blahblah.com');

    define('COOKIEPATH', '/');

    Is this correct? It should be the same for both?

    One thing that might be the root of the problem, or at least I was not sure about, is the setting for “WordPress “secure auth” cookie salt ” in the WordPress integration settings in bbPress. I have left this blank because I have no such entry on my options.php page in WordPress. I did fill in the other two “salt” items, though. I confess that I don’t really understand what this salt stuff is for, but any advice would be appreciated.

    I’m on 1&1 hosting, if that makes any difference.

    #4054
    vadi
    Member

    How can a user change their avatar on a new bbPress installation?

    I failed to find options for this :-/

    #3965
    thion
    Member

    I haven’t found such topic, and I think it might be useful (if no, please throw me into oblivion heh). Do you need some additional functionality but you can’t find a plugin and you can’t code? Post ideas here, maybe someone will “code your idea”.

    #67268
    Sam Bauers
    Participant

    You have too much code. You have duplicated the function by the looks of things. Filters don’t work that way.

    Try this documentation on the plugin API for more info:

    https://codex.wordpress.org/Plugin_API

    #67267
    meitershaker
    Member

    up :(

    #66743

    In reply to: Sitemap generator

    martin2008
    Member

    Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w009804c/gruenderstipendium/bb-plugins/bbpress-sitemap-generator/bbpress_sitemap.php:1) in /www/htdocs/w009804c/gruenderstipendium/bb-includes/pluggable.php on line 228

    :(

    after open new topic

    #67479

    In reply to: Accents in username

    meitershaker
    Member

    it works! =p thanks ;)

    #67775

    In reply to: replacing page title

    Sam Bauers
    Participant

    The problem with your code was that you were adding a filter to bb_title via an action run when the title was already written to the browser. You should have added the filter at bb_init or just left it on it’s own in the plugin.

    Also, I don’t think there is particularly a need to remove the existing filter on bb_title in your case.

    #67879
    Sam Bauers
    Participant

    This works fine for me using trunk, but it does depend on your email client as well (I was using mail.app on Mac OS X).

    There are lots of places that character encoding could fail along the way, PHP could be the culprit, so could the email server that the message is first sent through. Perhaps the mail client you are looking at it in doesn’t support or isn’t setup to view utf-8.

    We have replaced the email sending code in Trunk, and that might be the difference too.

    It would be good to see exactly what’s happening, can you post a link to your forum so we can try signing up to see what happens?

    #67876
    Sam Bauers
    Participant

    They are doing it somehow over at edublogs.org but I think that is a highly customised bit of code where they are sharing one bbPress install amongst multiple blogs in WPMU.

    bbPress doesn’t offer this out of the box, no.

    #67829

    In reply to: Get Current Forum ID?

    Sam Bauers
    Participant

    Untested and YMMV:

    $current_forum_id = get_forum_id();

    while ( bb_forum() ) {
    $class = '';
    if ($current_forum_id == get_forum_id()) {
    $class = 'on';
    }
    }

    #67478

    In reply to: Accents in username

    Sam Bauers
    Participant

    @ meitershaker

    There was a bug in the display name implementation. First, update to the very latest trunk. There is a chance that you might have a user meta item for some users called ‘display_name’. This will be stomping on the real setting in the user table. Use this SQL query to clear out the bad data.

    DELETE FROM bb_usermeta WHERE meta_key = 'display_name';

    Once you’ve updated to the latest trunk and done that, you should be able to use any UTF-8 character in display names.

    #67899
    chrishajer
    Participant

    If you have a tool like phpMyAdmin, I think you should be able to log in there and change the site URL.

    You used to be able to define the site URL in the bb-config.php as well. This is what used to be in that file:

    // The full URL of your bbPress install
    $bb->uri = 'http://www.truediy.com/';

     

    Maybe if you put that second line in your bb-config.php maybe that will override the database settings? (Actually, I’m fairly certain that will work. Then you can update the settings in the admin.)

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