Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,551 through 23,575 (of 32,481 total)
  • Author
    Search Results
  • #79035

    In reply to: IPB3 to bbPress

    I’d have a go at it if IPB wasn’t paid software :/ kind’ve hard to develop for something you don’t have really, which might be why it’s difficult to find a viable converter. Do you know if there are any formats it will export to natively?

    #79019
    benbeltran
    Member

    Yeah… apparently add_action('bb_tag_added', 'status_tags_update',100,3); won’t work. I don’t think the action is running. Which is odd.

    I’ll keep on looking, any new help is appreciated. And thanks for the tip.

    #31725
    Greg
    Participant

    The Google webmaster tools are showing my forum pages as 404 (Not Found), but if I browse to the pages they seem fine in the browser.

    So I went to http://web-sniffer.net/ and found that all of my forum pages are returning HTTP status code 404, but the correct page content (?!).

    I tried a simple static page in the forum folder, and that works fine.

    Any ideas as to what might be going on here?

    #79010
    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><?php topic_page_links(); ?> <a href="<?php post_link($topic->topic_last_post_id); ?>">Latest</a></td>
    <td class="num"><?php topic_posts(); ?></td>
    <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></td>

    Just change the word Latest to whatever you like :)

    #79009
    DKB
    Participant

    It works but i get it on the wrong row.

    Here is the code:

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><?php topic_page_links(); ?></td>
    <td class="num"><?php topic_posts(); ?></td>
    <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></td>

    how can i get it after the topic pages and can i add i image instead of latest?

    #79037
    fifthhouse
    Member

    Thank you for responding to my post :)

    #79041
    Tomcraft1980
    Member

    COOL!

    That was all! Thx so much! ;-)

    #79040

    There’s no such thing as bb_print_scripts. bbPress is partially integrated with WordPress functions (BackPress), so in bbPress it remains wp_print_scripts.

    @johnnydoe: In your theme’s register.php, before the line if ( is_array($profile_info_keys) ) : (above the <?php tag before that), put:

    <?php unset( $profile_info_keys['user_url'], $profile_info_keys['from'], $profile_info_keys['occ'], $profile_info_keys['interest'] ); ?>

    That will take out the extra fields in the register form. What you did was take out the part that outputs all the form fields :D

    I can’t see the “to participate” part either, did you manage to get hold of the bbPress.org template? ;)

    #78956

    In reply to: Displayname check

    How fun, your install is ignoring a exit (die) command :D got a link to your forum?

    That or 1.0.2 is radically different in how it structures when that function is called D:

    #79061

    In reply to: Enhance your 404 page

    <?php
    $redirect_301 = array(
    '/ddd/' => '/forum/newlocation',
    );

    list( $request, $query ) = explode( '?', $_SERVER['REQUEST_URI'], 2);
    $request = rtrim( $request, '/' );

    $forum = dirname( $_SERVER['PHP_SELF'] );

    foreach( $redirect_301 as $from => $to ) {
    $from = $forum . '/' . trim( $from, '/' );
    if( $from != $request )
    continue;
    if( !empty( $query ) )
    $to .= '?' . $query;
    wp_redirect( bb_get_uri ( $to ), 301 );
    exit();
    }

    ?>

    That might support IIS, the native WP function doesn’t use the Location: header so I guess that’s an issue?

    http://support.microsoft.com/kb/q176113/

    @chandersbs: It’s nice :D I tidied it up to support trailing slashes no matter what and query strings amongst other things. I think. That or it’ll break :D

    I dropped the need to have the forum directory included in the $redirect_301 array as well, that’s automatically added now. Just change bb_get_uri ( $to ) to $to if you need to point the redirect outside the forum directory or use ..

    #79042

    Easy enough to do

    <?php if (40 <= $topic->topic_posts) : ?>I'M ON FIRE<?php endif; ?>

    Put that in your front-page.php and/or forums.php somewhere inside the parts that say foreach( $something as $topic ), probably best before <?php bb_topic_labels(); ?>. Change 40 to whatever you want the topic to change at and the on fire bit to something… fiery.

    #31716

    Topic: Logo?

    in forum Themes
    #79008

    Slightly lighter version <a href="<?php post_link($topic->topic_last_post_id); ?>">Latest</a>

    #78833
    kirpiit
    Member

    After a few days, the “error” repeated: I posted a couple of things which, later, showed as “anonymous”. See here http://www.kirpi.it/r/

    What could it be done to prevent this, please?

    What should I check?

    Could there be any flaw to look for/after, please?

    I admit that such a behaviour scares me a bit :-|

    #79018

    Doing a quick var_dump of the passed argument, it’s just a string of the tags passed by the user (commas and all) and before checks are made to see if they’re existing tags. I think you’d want to use bb_tag_added which passes $tt_id, $user_id, $topic_id as each tag is added (if you register the action function as taking as many variables).

    #31723
    mujtaba
    Member

    hi fellows,

    iam running this blog http://www.embtrans.com , my hosting is running on Windows IIS and it doesnt allow mod_rewrite functionality.

    i have managed to configure the pretty permalinks for WordPress using custom 404. here is its code

    <?php

    $qs = $_SERVER;

    $_SERVER = substr($qs, strpos($qs, ‘:80’)+3);

    $_SERVER = $_SERVER;

    include(‘index.php’);

    ?>

    i would like to know if there is some custom 404 code for bbpress on Windows IIS to make pretty permalinks work.

    thanks in advance

    #31711
    benbeltran
    Member

    Hello bbpress community.

    I’m trying to write a plugin that checks certain actions and saves them to a “status feed” so they appear in a friendfeeed-ish manner.

    eg.

    User made a new post

    User started a topic

    User tagged a topic

    etc.

    bb_new_post and bb_new_topic return the post and topic id respectively so it’s easy to grab it… But I’m using add_action('bb_add_topic_tags', 'status_tags_update'); to check the tags. The thing is, it seems to break tagging.

    I checked bb_add_topic_tags and it returns tt_ids, which I assumed was an array of the inserted tag ids. But I’m probably wrong. I don’t understand very well what $tt_ids = $wp_taxonomy_object->set_object_terms( $topic->topic_id, $tags, 'bb_topic_tag', array( 'append' => true, 'user_id' => $user_id ) ); is supposed to do. So I don’t understand what’s being returned. I’m trying to get either the tag id, or preferably the topic id.

    Any of you plugin-savvy users have any idea/help?

    #31720
    chandersbs
    Member

    The default 404 page doesn’t have much of value to offer a visitor that stumbles your website via an organic search result. This is why I have enhanced mine 404 page a bit and I would like to share that with you guys.

    Add 301 redirect for 404 pages

    Pages that have been removed to a different URL, will show a 404 page. Add a 301 redirect to your 404 page that will redirect the user to its new address.

    Suppose you had an address domain/old-url this got moved to domain/new-address, add the follow code to your 404.php (located in your bb-templates folder). Add this to the top of the page.

    <?php

    $redirect_301 = array(

    '/old-url/' => '/new-url',

    '/another-old-url' => '/another-new-url'

    );

    $request = $_SERVER;

    if (array_key_exists($_SERVER, $redirect_301)) {

    header(“HTTP/1.1 301 Moved Permanently”);

    header(‘Location: http://www.yourdomain.com&#8217; . $redirect_301[$request] );

    die();

    }

    ?>

    Also you can change the default text:

    <p><?php _e('I'm sorry, but there is nothing at this URL.'); ?></p>

    Into something more nice, like:

    <p><?php _e('The page you are looking for can not be found or it has been removed. You can always just browse the website or even use the search form below to try another search.'); ?></p>

    <?php search_form(); ?>

    What do you guys think? :D

    #79036
    Mark
    Member
    #78866
    chandersbs
    Member

    Try this code instead, this is what I’m using on my own forums:

    <?php printf( __('Posted on %s'), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?>

    #79005

    In reply to: Spam Registration

    Vietson
    Member

    Thanks guys, especially code012! After installing reCAPTCHA, spambot stop completely!!

    #78951

    In reply to: Displayname check

    Check for an extra line or space after the closing ?> tag, seems to be a common problem copying from the forums. Or an extra line or space before the <?php tag.

    #78940

    Argh it ate part of it. Check the link and copy the line opening $text from there instead. There’s meant to be $1 in-between the spaces before target.

    #31710

    Topic: theme integration?

    in forum Themes
    fifthhouse
    Member

    Hello all. I am starting a new wordpress site with bbpress installed in a subdirectory. I am not very tech savy and don’t know how to do code, but I am wondering how difficult it would be to have my bbpress forums inside my wordpress blog theme.

    In other words, is it possible to have the same look and menu structure from my blog appear when in the forums?

    From what I can find in the forums this is called deep integration. I have viewed the posts on that, but I am wondering if there is any further development that would help me, because I don’t have the ability to do the tasks as they are presented in those posts.

Viewing 25 results - 23,551 through 23,575 (of 32,481 total)
Skip to toolbar