Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,326 through 23,350 (of 32,481 total)
  • Author
    Search Results
  • #79669
    InvTrdr
    Member

    Just an ad on TV. Saw the post. How many tags are posted by default? Or without the code all tags show up by default.

    Thanks.

    #79460

    I guess that's what do_action() does when it doesn't have any arguments?

    do_action() must be called with which action to do. no?

    $bb_table_prefix already takes care of different table prefixes. I didn’t get your point.

    #78802
    Mark Kehn
    Member

    I found out after a couple hours more searching on the web that you can use this code below to hide php errors, enable a private log of the errors, and also protect the error log from outsiders.

    # suppress php errors from showing publicly

    php_flag display_startup_errors on

    php_flag display_errors on

    php_flag html_errors on

    # enable PHP error logging

    php_flag log_errors on

    php_value error_log ../PHP_errors.log

    # prevent access to PHP error log

    <Files PHP_errors.log>

    Order allow,deny

    Deny from all

    Satisfy All

    </Files>

    @SharpMouth – was this what you were referring too? Is this what you used to stop the error messages from showing? This would hide the error messages but it doesn’t fix the actual problem. Can you tell me if you ever got the actual problem fixed, and if so, how?

    Much appreciated.

    #31863

    I just recently upgraded to WP 2.8 and am facing this problem again. It’s happened before and I fixed it because values in both WP and BB were different, however this time they’re the same. I can only be logged into one script at a time, either WP or BB. Logging into WP logs me out of BB and vice-versa. My auth and all those things are set as the same in each respective config file, and I have the proper code inserted into my wp-config file from the bbIntegration plugin, so I don’t know the problem.

    If anybody can help, here’s the forum: http://scrawlfx.com/forum

    #78801
    Mark Kehn
    Member

    I have this exact same problem as Sharpmouth in his first post up top here. EXACT, same error messages, same line numbers everything. DITTO for the second image he posted.

    I also did the integration with wordpress during the install of bbpress and I followed it exactly, I had no trouble whatsoever, I skipped nothing but after clicking the final button to finish the installation I got the message it installed, but with errors.

    @ ashfame you said, “Possibility is that you missed out something as the tutorial works flawlessly.”

    I think your comment was snarky in my opinion. The tutorial got me through the installation but it doesn’t mean it worked flawlessly because following the instructions still ended up with results at end of install. Truth is I don’t think these errors have anything to do with the documentation on how to install, it has to do with the bbpress code itself. The code is broke regardless what a piece of paper (the tutorial) says about it.

    @SharpMouth – your final message says you got it to work but to me it only sounds like a bandaid but the issue is still there even though you figured a way to hide the messages. You said you fixed it, does that mean you can click on the links to go to the bbpress Admin area or to LogOut, LogIn without getting the “headers already sent out” garbage?

    How did you turn off error reporting? Better yet, what steps exactly did you take to fix everything to finally get it all to work? Remember, I am having the exact same results as you after the install, so please tell me what you did to get everything to work for you. Much appreciated, thanks.

    Here are some extra screenshots, ones that SharpMouth didn’t post himself when he was having issues.

    This first one was barely visible it had the error messages as white text on white background so I selected all the text so you could read it.

    http://www.flickr.com/photos/16731818@N00/3948343005/sizes/l/

    These next two are just showing the installation log. I blacked out personal info not needed by you.

    http://www.flickr.com/photos/16731818@N00/3948343007/sizes/o/

    http://www.flickr.com/photos/16731818@N00/3948343009/sizes/o/

    For the screenshot below – As you see here in the red message box it says it completed but with minor errors. It isn’t referring to the error messages I highlighted in the first screenshot it is referring to the error about keymaster email not going out.

    http://www.flickr.com/photos/16731818@N00/3948343013/sizes/o/

    #79422

    Whoops, I need to use more test data next time.

    Change:

    foreach ($current_tags as $tag_key => $tag ) {
    if( in_array( $tag->name, $allowed_tags ) )
    unset( $allowed_tags[ $tag_key ] );
    }

    to

    $allowed_tags = array_flip( $allowed_tags ); // CHANGE PLACES!
    foreach( $current_tags as $tag ) {
    if( isset( $allowed_tags[ $tag->name ] ) )
    unset( $allowed_tags[ $tag->name ] );
    }
    $allowed_tags = array_flip( $allowed_tags ); // CHANGE PLACES!

    The closing ?> isn’t really important if there’s no non-PHP data after it

    #79421

    You, sir, are awesome.

    As soon as I can test this out, I will. One question: for the plugin, should I add a ?> to the end of the chunk of code you’ve put there?

    #79674

    In reply to: target=blank in Topic

    It’s target="_blank", make sure you have the underscore. Otherwise, got an example? Are you using __ck__’s plugin to add _blank?

    #79420
    <?php
    /*
    Plugin Name: Restrict Topic Tags
    Description: Restricts tags to a pre-defined list.
    Author: Kawauso
    Version: 0.1
    */

    $allowed_tags = array(
    'test',
    'test2',
    );

    function restrict_topic_tags_form( $args = null )
    {
    $defaults = array( 'topic' => 0, 'submit' => __('Add ยป'), 'list_id' => 'tags-list' );
    $args = wp_parse_args( $args, $defaults );
    extract( $args, EXTR_SKIP );

    if ( !$topic = get_topic( get_topic_id( $topic ) ) ) {
    return false;
    }

    if ( !bb_current_user_can( 'edit_tag_by_on', bb_get_current_user_info( 'id' ), $topic->topic_id ) ) {
    return false;
    }

    global $page, $allowed_tags;

    $current_tags = bb_get_topic_tags( $topic->topic_id );
    foreach ($current_tags as $tag_key => $tag ) {
    if( in_array( $tag->name, $allowed_tags ) )
    unset( $allowed_tags[ $tag_key ] );
    }

    if( is_array( $allowed_tags ) && !empty( $allowed_tags ) ) { ?>
    <form id="tag-form" method="post" action="<?php bb_uri('tag-add.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_ADMIN); ?>" class="add:<?php echo esc_attr( $list_id ); ?>:">
    <p>
    <select name="tag" id="tag">
    <option value=""><?php _e("Select a tag")?></option>
    <?php foreach( $allowed_tags as $tag ) { ?>
    <option value="<?php echo $tag?>"><?php echo $tag?></option>
    <?php } ?>
    </select>
    <input type="hidden" name="id" value="<?php echo $topic->topic_id; ?>" />
    <input type="hidden" name="page" value="<?php echo $page; ?>" />
    <?php bb_nonce_field( 'add-tag_' . $topic->topic_id ); ?>
    <input type="submit" name="submit" id="tagformsub" value="<?php echo esc_attr( $submit ); ?>" />
    </p>
    </form>
    <?php
    } // End if

    } // End function

    function restrict_topic_tags( $tag ) {

    global $allowed_tags;

    // if( !in_array( $tag, $allowed_tags ) )
    // return array();

    return array($tag);
    }

    add_filter( 'bb_add_topic_tags', 'restrict_topic_tags' );

    Then in your theme’s topic-tags.php, change <?php tag_form(); ?> to:

    <?php
    if( function_exists( 'restrict_topic_tags_form' ) )
    restrict_topic_tags_form();
    else
    tag_form();
    ?>

    #79666
    johnhiler
    Member

    Here you go:

    https://bbpress.org/forums/topic/hot-tags#post-16484

    Btw – I don’t really know all this stuff… I’m just using Google to search the bbpress forums! :-)

    #79647

    In reply to: Admin Link in Sidebar

    There are template function lists if you Google around, but I don’t know if any are up-to-date for 1.0.2

    I think bb_admin_link() and get_bb_admin_link() would do what you’re trying to do.

    #31856

    Topic: Admin Link in Sidebar

    in forum Themes
    mantraofdoom
    Member

    Hi everyone, I just started a site that uses WP and BBP together, and aside from a few outstanding issues, things are working out nicely.

    I built a theme for the forum that matches the WP theme, and it has a sidebar. When the user is logged in, it shows Welcome [username] and shows the avatar, a link to edit profile, my favorites, and log out.

    How can I have if the keymaster/admin/mod is logged in, a link to the dashboard? I tried some code from the default template, but nothing really seems to give me a direct link to admin. Is there a templates tag list for bbpress like the one for wordpress?

    #79614
    Peter A. Gebhardt
    Participant

    When trying to tackle the “Deprecated” warning, by using a similar functions as an “one-to-one” replacement instead of say “eregi()” in below code, an error is returned:

    Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in ....htdocsversambb-versbb-includes[em]gettext.php on line 295[/em]

    I’m not a php-programmer, but I start to wonder how much coding effort would be needed to switch to the required new php-functions?

    Could somebody provide a matchmaking list eventually (or point to helpful further info), of what should (can) be replaced by what function? The php docs – when looking up the functions in question – are not of much help describing the transition issues.

    TIA

    #79636
    chrishajer
    Participant

    Using display:none just hides it from display. If you want to remove it, remove the code from your template file. In the 1.0 versions it’s in header.php. Remove this stuff:

    <div class="search">
    <?php search_form(); ?>
    </div>

    That will remove the search box.

    #79581
    Jim R
    Participant

    Ok…after further testing and striking out, here is what a guy helping me and I have found out. We go through the ‘deep integration’ process, requiring the wp-load.php file in bb-config.php. Then we change all the bb_get_header(); with get_header();. That passes through the Hybrid News header’s style information but not the navigation.

    When you link directly to the front-page.php, it shows the whole header, which is navigation, a banner ad I have in the header, everything. The same applies when you link directly to any of the affected pages in bbPress. However, it stops executing from there. So you just have the header and that’s it. There aren’t any errors showing up either.

    So using my limited knowledge of PHP and my only slightly more developed since of deduction, one thing we can think which is different is we are bypassing:

    path to bbpress / index.php

    Here is that code:

    <?php

    require('./bb-load.php');

    bb_repermalink();

    $bb_db_override = false;
    do_action( 'bb_index.php_pre_db' );

    if ( isset($_GET['new']) && '1' == $_GET['new'] ) :
    $forums = false;
    elseif ( !$bb_db_override ) :
    $forums = bb_get_forums(); // Comment to hide forums
    if ( $topics = get_latest_topics( false, $page ) ) {
    bb_cache_last_posts( $topics );
    }
    if ( $super_stickies = get_sticky_topics() ) {
    bb_cache_last_posts( $super_stickies );
    }
    endif;

    bb_load_template( 'front-page.php', array('bb_db_override', 'super_stickies') );

    ?>

    This has to be easy (for those who really know PHP and WP). Right? Sadly, I’m not that kind of guy. It’s a bummer to have this kicka$$ WP theme and not have it be able to merge thematically with bbPress.

    #79635

    @Kawauso

    Is using display:none; fine as per SEO? It violates the rule of showing different content to the users than the bot.

    #79633

    Add to your theme’s stylesheet:

    .search { display: none; }

    #31853

    The search box makes my forum look cluttered and as it will be a small forum I doubt it will ever be used. Therefore I would like to delete it, i’m quite new to web technologies and am having trouble working out what bits I need to delete to get rid of it! I’m sure this would be an easy question for someone more knowledgeable to answer, so help please! :)

    #31850
    harakiri1
    Member

    Hi,

    Can anyone help me how to add a new radio button ( male and female ) in register form and make it display in their profile ? with below code, i can change some text field but i cant create a dropbox or radio button to chose , for example : sex … it is too difficult :(

    function get_profile_info_keys_personal() {

    return array(‘user_email’ => array(1, __(‘Email’)), ‘user_url’ => array(0, __(‘Website’)), ‘from’ => array(0, __(‘Location’)), ‘occ’ => array(0, __(‘Occupation’)), ‘interest’ => array(0, __(‘Interests’)));

    }

    add_filter(‘get_profile_info_keys’, ‘get_profile_info_keys_personal’);

    #79552
    johnhiler
    Member

    We should be ok. Best case scenario, Automattic will bring on someone to continue developing bbPress. Worse case scenario, we can fork the code from bbPress and continue development on our own… :-) Since WordPress is open source, maintaining cookie/user integration is definitely possible.

    But we can discuss all that in a separate thread… mostly just wanted to express appreciation for Sam in this thread! He wrote a huge amount of code and chimed in a lot of threads here on the forum – thanks again!

    Sam, I hope the team at Automattic appreciates how hard you worked, and just how much they lost when you stepped down!

    #78775
    annejan
    Member

    I fixed it! :)

    It was the WP-o-Matic plugin…

    #79551
    chandersbs
    Member

    I really don’t hope that too.

    Wow, really hope development doesn't stop on bbPress.

    #79603

    In reply to: Member List with BBPM

    brad_langdon
    Member

    Even if someone can show me the code snippet to insert a dropdown list of the current members that would be great! :)

    #79548

    Thanks for some great code Sam :)

    #79505
    gerikg
    Member

    here’s another way of forming my question….

    this

    <h2>Latest Forum Discussions</h2>
    <ul>
    <?php
    global $wpdb;
    $query="SELECT * FROM bb_topics WHERE topic_status=0 ORDER BY topic_time DESC LIMIT 10";
    $results=$wpdb->get_results($query);
    foreach ($results as $result) {
    echo "<li><a href='/forums/topic.php?id=".$result->topic_id."'>".$result->topic_title."</a></li>";
    }
    ?>
    </ul>

    gets the Latest Forum Discussions, how do I get a USER SPECIFIC Latest Forum Discussions?

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