Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,701 through 23,725 (of 32,570 total)
  • Author
    Search Results
  • #78006
    kirpiit
    Member

    It works!

    :-)

    Thank you!

    By the way, the “This topic is resolved” sentence at the top of this thread should be reversible. I could not find a way to “reopen” it though.

    #78005

    @kirpi.it Try .post img { max-width: 100%; overflow: hidden; }, probably the missing overflow: hidden bit

    Yay for finding this thread though, so much cleaner than the JS solution I was using :)

    #78862

    The edit equivalent hook is edit_form

    #78004
    kirpiit
    Member

    My theme is a very slightly edited Kakumei.

    The very last lines in style.css read

    #thread .post img {

    max-width: 100%;

    }

    Yet posted images do not resize as they are expected to.

    Please see http://www.kirpi.it/r/topic/limit-width-of-images as an example.

    What could it be, please?

    Puzzled

    :-|

    #78418

    All but the top three post links of the Relevant Posts section seem fine for me. That makes absolutely no sense, since they’re all using the same link function though. It implies that somehow, $bb_post = bb_get_post( get_post_id( $post_id ) ); (line 1638, functions.bb-template.php) isn’t being set properly for those… so yes, I’m guessing it’s either a bug or something’s wrong with some posts in your database. Could you confirm whether that’s consistently happening on other posts in searches too?

    #78501
    Olaf Lederer
    Participant

    Since this topic is open and I think very important:

    BUMP

    or I need to write custom code :(

    #78781

    In reply to: comments_popup_link

    Something like:

    function posts_number( $id = 0, $zero = false, $one = false, $more = false ) { // Port of WP's comments_number
    $topic = get_topic( get_topic_id( $id ) );
    $number = $topic->topic_posts;

    if ( $number > 1 )
    $output = str_replace('%', bb_number_format_i18n($number), ( false === $more ) ? __('% Posts') : $more);
    elseif ( $number == 0 )
    $output = ( false === $zero ) ? __('No Posts') : $zero;
    else // must be one
    $output = ( false === $one ) ? __('1 Post') : $one;

    echo apply_filters('posts_number', $output, $number);
    }

    should work I think. Misread the original question slightly.

    guyom
    Member

    Thx johnhiler

    That’s what I try to do but it doesn’t work, I have a white page and no access to the admin page after the upgrade

    I try to upgrade carefully twice and the result is the same :(

    you can see that here : http://www.basketsession.com/forum/bb-admin/

    #31688
    Olaf Lederer
    Participant

    Hi,

    I use

    add_action('post_form','add_content_post_form', 1);

    to add fields to the post form at the end of most pages. (above the add to favorites option)

    If I edit some post I need to add the fields inside the template file. Is there some hook to add the field via some plugin?

    #78848
    Olaf Lederer
    Participant

    Most functions using globals, I think you need a class based forum script or you need to build your own bbpress objects

    #78847

    Yes, indeed it is OFF, I thought it was the input class but it’s not … nvm …

    #78784

    In reply to: Installing bbPress

    You don’t need any integration plugins if you’re using WP 2.8.4 with bbP 1.0.2.

    I’m afraid I don’t quite understand what you mean by it not uploading as a folder though? As long as you keep the basic structure (so you still have bb-admin, bb-includes, bb-plugins and bb-templates folders), you’ll be fine.

    To access bbPress as an admin, you need to log into bbPress using the admin account and then a link will be displayed to the Admin panel.

    #78780

    In reply to: comments_popup_link

    http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-includes/comment-template.php.source.html

    In WordPress, comments_popup_link() takes three arguments that tell it how to format the output based on how many comments are present and runs a sprintf() with the appropriate output after retrieving the comment count.

    The equivalent to get_comments_number in bbPress would be get_topic_posts, the rest of the function is either WordPress-specific or would need slight tweaking (like what the posts page would actually be).

    #78846

    register_globals is a gaping security flaw that’s been turned off in every recent PHP version. If you have it on, PHP takes anything passed by $_GET, $_POST, $_COOKIE and $_SERVER and turns them into global variables (i.e. ?book=1 in the $_GET array becomes $book = 1). I’d recommend turning it off ASAP.

    The edit link turns itself off after a while, it’s not just limited to if anyone else has posted :)

    Ah, and good luck integrating bb-load.php, I could never get it to even play nice with WordPress.

    #78845

    couldn’t find the edit button :

    I didn’t fix this issue yet but I got a hint.

    the CodeIgniter’s input class (automatically loaded) destroys all global variables in the event register_globals is turned on.

    hope someone else might find this useful …

    #31685

    Hi,

    I’m trying to integrate a bbpress forum into an existing codeigniter application. (which basically just means integrating the login/logout/update/register functions and syncrhonizing the databases).

    I managed to do so by loading bbpress (simply including bb-load.php) on top of codeigniter and just calling the usual bb_login(), bb_logout() functions whenever needed.

    However, I just realised that loading it that way drastically decrease performances (went from ~200 req/sec to ~10).

    I now try to load bbpress just when I need it, but some strange things happend when bb-load.php is included AFTER codeigniter itself.

    e.g, if bb-load.php is included anywhere before codeigniter/CodeIgniter.php, it works, if included after, it won’t load.

    Basically what happened is that variables instantiated in the included scripts (like bb-load.php, or bb-settings.php for instance), are then ‘lost’ when reused as global variables elsewhere in bbpress files.

    (for now the variable that cause me troubles if $bbdb, which is fine while still in settings.php, but is empty in others files/functions …)

    I guess it may not only been related to bbpress but that’s the first time I see this … Anyone got this problem before ? Didn’t have much luck with Google …

    Thanks in advance,

    #78825
    Mark
    Member

    In the meantime you can pass new configuration settings to bb_topic_admin() to change the way this looks.

    Current configuration options default to:

    array(
    'id' => 0,
    'before' => '[',
    'after' => ']',
    'delete_text' => false,
    'undelete_text' => false,
    'redirect' => true
    );

    Change before to ” and after to ‘ – ‘ and instead of the brackets, you just have an extra dash floating around. Or you can edit bb_get_topic_move_dropdown() and just remove $before and $after from $r. ;)

    #78712
    thekmen
    Member

    If you don’t have a functions.php in tour theme folder, just create one & add the above code, just make sure to include the opening & closing functions, so it would look like

    <?php
    function bb_reset_newpostlink() {
    global $link, $topic_id;
    $link = get_topic_link( $topic_id );
    }
    add_action( 'bb-post.php', 'bb_reset_newpostlink' );
    ?>

    #31674
    johnnydoe
    Member

    i’m looking for a way to use the same output like in wp for the comments like:

    <?php comments_popup_link('no comments', 'one comment', ' % comments'); ?> instead of <?php forum_topics(); ?> <?php _e('post(s) or comment(s)'); ?> .

    so is there a php pendant in bbpress to count comments or posts the wordpress way?

    thank’s in advance

    #78690
    johnnydoe
    Member

    i see i see! i have a lot to learn.

    ok thank’s kawauso and olaf, it’s been a pleasure… as always :)

    #78806
    <?php if ( !bb_current_user_can('manage_options') ) : ?>
    GOOOOOGLE :)
    <?php endif; ?>

    or

    <?php if ( !bb_current_user_can('manage_options') ) { ?>
    GOOOOOGLE :)
    <?php } ?>

    bbPress/WordPress have a boolean function for pretty much everything

    #77666
    Mark
    Member

    It’s actually a pretty simple hack, though I caution you that I worked it out in the last five minutes.

    First, modify the following three lines of your bbpress .htaccess;

    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /bbpress/forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^forum/([^/]+)/?$ /bbpress/forum.php?id=$1 [L,QSA]
    RewriteRule ^forum/?$ /bbpress/ [R=302,L,QSA]

    change ^forum/ to whatever you want the permalink to be, such as ^sub/ or ^purplepolkadots/, whatever works for you. Then open functions.bb-template.php and go to line 711 inside function get_forum_link() (line numbers may vary). It should look something like:

    $link = bb_get_uri('forum/' . $forum->$column . $page, null, $context);

    …and change ‘forum/’ to whatever you put in your .htaccess – this seemed to work for me immediately, however as I mentioned, I haven’t done any thorough testing of it.

    #78723
    pixelgirl
    Member

    #2: Good idea with the nav, resolved this one, thanx! :) I only need to know where bb_topic_admin(); leads to…

    #1: This is not supposed to happen, unless my integration went wrong, but that is a different topic.

    Again, thanx for your help guys! :D

    pxlgirl.

    #78722
    gerikg
    Member

    pixelgirl #1, I wrote a similar question but a user told me; if it’s deep integration then there is no difference between bbpress and wp

    I had to just write <a href=" it out without generating it, just plain html. and put the class=”selected” in the BB header. Since the header is not use for anything other than Forum it will always be selected, if that makes sense.

    #2, sorry I know it’s <?php bb_topic_admin(); ?> but exactly where it pulls it from beats me.

    #78405

    If you’re trying to get the forum list on the front page visible without anything else, just put something like:

    <?php if( !isset( $_GET[ 'forumsonly' ] ) ) : ?> after <?php if ( $forums ) : ?> in front-page.php, then before <?php if ( bb_forums() ) : ?> put <?php endif; // forumsonly ?>.

    That would allow you to put ?forumsonly in the URL to turn off the extra bits of the front page.

    The other option would be to copy index.php into a new file and change the template it loads to something else and take out the parts you don’t want in there, but if bbPress changes anything in index.php in a new version, you’d miss out on the changes.

Viewing 25 results - 23,701 through 23,725 (of 32,570 total)
Skip to toolbar