Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,926 through 26,950 (of 32,467 total)
  • Author
    Search Results
  • #67441
    _ck_
    Participant

    “Cannot modify header information – headers already sent”

    is one of those errors that will fool you by distraction because it’s an indication of another error, that happened before it, it’s not the actual primary error.

    “headers already sent” means one of the following (among other possibilities)

    1. You have whitespace at the start of end of a plugin (or template) BEFORE or AFTER the <?php ?> (usually after the end. Whitespace means new lines or spaces.

    OR

    2. Another plugin or configuration error has occured and sends a text message, which causes the headers to be sent. To find out what the real problem is, you typically can do a “VIEW SOURCE” on the page (from your browser menus) and you’ll see in plain text at the top of the page the real error before the “headers sent” error.

    #3949
    lstelie
    Member

    Hello,

    I wrote this for my own use, in case it could be of some use for someone, here it is :

    http://pastebin.com/f35e5dcbe

    This allow to put some html code in header (or example metatags) and footer (for example counter code)

    There is no admin part for two reasons :

    1) I’m learnig how it works

    2) I’m not sure it would be a great idea to have a DB request for a code that never change

    So for instance you’ll have to edit manually the plugin file

    Why use a plug in instead of a direct ad in the template ? because for alpha release the default template (my own is based on kakumei) sometimes change, so keeping the personal code updated each time can be tedious.

    Luc

    #67398

    In reply to: Server Overload

    _ck_
    Participant

    By the way, once you are done with this, we’ll install eAccelerator and that will give your PHP a nice boost too.

    Let me know how the MySQL cache mod goes.

    If you don’t want to wait and feel comfortable trying it right away, try downloading and using this script to auto-install eAccelerator on Cpanel:

    wget http://tutorials.medialayer.com/cPanel/eaccelerator.sh
    chmod 700 eaccelerator.sh
    ./eaccelerator.sh

    Once it is done, you might have to restart apache

    service httpd restart

    and you should definitely notice another speed boost.

    #67435

    In reply to: expired topics

    _ck_
    Participant

    Untested. auto-closes a topic on-the-fly when someone visits it and it’s last post is 90 days old (adjustable)

    add_action('bb_head','auto_close_topic');
    function auto_close_topic() {
    global $topic;
    if (is_topic() && $topic->topic_open===1) {
    $old=time()-3600*24*90; // 90 days default
    if (strtotime($topic->topic_time)<$old) {
    bb_close_topic($topic->topic_id);
    $topic->topic_open=0; // just in case the cache doesn't clear
    }
    }
    }

    #67395

    In reply to: Server Overload

    _ck_
    Participant

    Okay, carefully edit your /etc/my.cnf (ask if you don’t know how to edit) and REPLACE what’s in there with this:

    [mysqld]
    max_connections = 400
    key_buffer = 16M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 1024
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 1000
    connect_timeout = 10
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 16M
    query_cache_type = 1
    tmp_table_size = 16M
    skip-innodb
    [mysqld_safe]
    open_files_limit = 8192
    [mysqldump]
    quick
    max_allowed_packet = 16M
    [myisamchk]
    key_buffer = 32M
    sort_buffer = 32M
    read_buffer = 16M
    write_buffer = 16M
    [mysqlhotcopy]
    interactive-timeout

    After you edit it you’ll need to restart the mysql engine by typing this in the ssh:

    service mysql restart

    (optionally there’s also a mysql restart in cpanel)

    Then do a couple of refreshes on your bbPress pages and it should seem a bit zippier.

    #67392

    In reply to: Server Overload

    lstelie
    Member

    _ck_

    In latest bb-config.php there is no /* Stop editing */

    Do I put $bb->load_options = true; at the end of the file ?

    #65186
    meitershaker
    Member

    same problem here :)

    #67382
    meitershaker
    Member

    $hidden_forums=array(10); // hide these forums, list by comma seperated number

    $hidden_forums=array(‘keymaster’,’administrator’,’moderator’); // these roles can always see ALL forums regardless

    $hidden_forums[500]=array(‘administrator’,’moderator’); // exact formal role name, *not* ability

    $hidden_forums[501]=array(‘administrator’,’moderator’); // exact formal role name, *not* ability

    $hidden_forums=array(1); // these users can always see ALL forums regardless

    $hidden_forums[500]=array(5432,7654); // list of users by number

    $hidden_forums[501]=array(5432,7654); // list of users by number

    $hidden_forums=””; // text, html, css or image to indicate hidden forums/topics, make it =””; if you don’t want any label at all

    #67381
    _ck_
    Participant

    Well it works for me.

    Show me your configuration inside hidden-forums.php and how many forums do you have?

    Are those queries happening on the front-page, forum-page or topic-page?

    #56181

    In reply to: Quote Plugin Weirdness

    cartmanffc
    Member

    Where exactly should I put this code in post-form.php?

    <textarea name=”post_content” cols=”50″ rows=”8″ id=”post_content” tabindex=”3″>

    <?php if (function_exists(‘bb_quote_post’)) bb_quote_post(); ?>

    </textarea>

    #3943
    cartmanffc
    Member

    I thought it might be helpful; I tried the following popular plugins with the latest release of bbPress and they seem to work perfectly:

    – bb-smilies

    – bbcode-buttons

    – mini-track

    – my-views

    – post-count-plus (with some minor changes)

    – support-forum

    – bb-reputation (to some extent)

    – bb-signatures

    – bb-topic-views

    – bbcode-lite

    – hidden-forums

    – report-post

    – unread-posts

    what is missing most is the working plugin for quotes…

    #67389

    In reply to: Server Overload

    _ck_
    Participant

    Show me your mysql configuration by doing this in your shell (ssh)

    cat /etc/my.cnf

    and copy what it returns to a post here or into pastebin.com

    I suspect we can improve it. MySQL cache is very important to bbPress performance.

    #67388

    In reply to: Server Overload

    _ck_
    Participant

    You (and everyone) needs to make sure this is in your bb-config.php

    $bb->load_options = true;

    make sure you put it BEFORE /* Stop editing */

    #67387

    In reply to: Server Overload

    _ck_
    Participant

    Running bbPress on a server with 128mb of ram would be very difficult unless it’s a very light setup with low use.

    256mb should be doable if that is real, permanent memory and not burst memory. It’s also important if you don’t have alot of overhead like cpanel running.

    #1 problem on most small VPS is you either don’t have the mysql cache turned on or it’s too small of a cache

    #2 problem is you almost certainly don’t have a PHP opcode cache like eAccelerator installed

    #3 problem on almost all VPS is bad neighbors.

    On a shared host, you can easily tell when you have bad neighbors who are overloading the server (node). On a VPS they are hidden. If you have an inexperienced host, they may have a hard time tracking down the offender, or may not even care. If they tell you that your neighbors can’t affect you, that’s an outright lie or plain ignorance.

    If you are running bbPress 1.0 alpha it has several problems generating far too many mysql queries and that could be causing you some headaches. If you are using bbPress 0.9, definitely stick with that, but you need to fine tune your settings.

    WordPress has some nice caching plugins like wp-super-cache. No such creature exists yet for bbPress, so all pages must be rendered each time by the engine, making it use more overhead than WordPress.

    #67415

    In reply to: Multiple-level forums

    darnit
    Member

    I found the answer myself, 26 mins. later, LOL: you simply need to go to Manage -> Forums -> click on a forum and set its parent forum.

    That way you’ll have multiple subforums on any forum on your bbPress installation.

    Heh. Next time, I’ll get acquainted with the features of bbPress BEFORE asking for help ^_^

    #3941
    darnit
    Member

    Hello bbpress world!

    I would like to congratulate you all for developing such a steadfast, easy-to-use forum software known as bbPress. I love(s) it :)

    Secondly — yeap, it’s an issue — I would like to know if it is possible to have a forum-forum-topic structure instead of the current forum-topic one.

    For example, we currently have:

    Webmasters Forum – [all the topics go here]

    while we would want to have:

    Webmasters Forum – Italian Webmasters Forum / American Webmasters Forum – [all the topics from the Italian / American go here]

    Would such a structure be possible?

    Thank you for your time and for your replies.

    #3935
    meitershaker
    Member

    Hi,

    i have a serious bug: when i’m not login, i have 610 mysql query, and there is a one query repeat:

    # 416 : 0.0004 seconds

    SELECT meta_key, meta_value FROM bb_meta WHERE object_type = 'bb_topic' AND object_id = 37 /* bb_append_meta */

    # 417 : 0.0005 seconds

    SELECT * FROM bb_topics WHERE topic_id = 37 AND topic_status = 0 AND forum_id NOT IN (10)

    # 418 : 0.0004 seconds

    SELECT meta_key, meta_value FROM bb_meta WHERE object_type = ‘bb_topic’ AND object_id = 37 /* bb_append_meta */

    # 419 : 0.0005 seconds

    SELECT * FROM bb_topics WHERE topic_id = 37 AND topic_status = 0 AND forum_id NOT IN (10)

    # 420 : 0.0005 seconds

    SELECT meta_key, meta_value FROM bb_meta WHERE object_type = ‘bb_topic’ AND object_id = 37 /* bb_append_meta */

    # 421 : 0.0005 seconds

    SELECT * FROM bb_topics WHERE topic_id = 37 AND topic_status = 0 AND forum_id NOT IN (10)

    # 422 : 0.0005 seconds

    SELECT meta_key, meta_value FROM bb_meta WHERE object_type = ‘bb_topic’ AND object_id = 37 /* bb_append_meta */

    # 423 : 0.0005 seconds

    SELECT * FROM bb_topics WHERE topic_id = 37 AND topic_status = 0 AND forum_id NOT IN (10)

    why?

    when i’m login at admin, i have no this!!

    i use mini track, bb_topic_wiews, bb_benchmark and topic_icons plugin

    please help me

    #60770

    In reply to: PHPBB3 Converstion

    bryan868
    Member

    So what was the outcome from the Summer of Code? Did we get a phpBB 3.0 converter?

    #3493

    Topic: bb benchmark question

    in forum Plugins
    meitershaker
    Member

    hi, how to give the possibility of all users to see the report in the source code, please?

    bye

    #58899
    Sonika
    Member

    Detective, thanks a lot!!!

    It solved my problem ( wp 2.5.1, bbpress 0.9.0.2)

    Bo Fiddlesticks, you should save code in set-default-role.php file, put it in bb-plugins and activate

    <?php
    /*
    Plugin Name: bbpress wpmu default role
    Plugin URI: https://bbpress.org/forums/topic/yet-another-integration-bug-no-role-set-on-registration?replies=5
    Description: Sets a default WPMU role for all new bbpress users.
    Author: Detective
    Author URI: http://www.ryuuko.cl/
    */

    function wpbb_add_user_role_rk($user_id) {
    $user = new WP_User($user_id);
    $user->set_role(get_option('default_role'));
    }
    add_action( 'bb_new_user', 'wpbb_add_user_role_rk');
    ?>

    #67370
    brad_langdon
    Member

    I think for the target audience I have that is not ideal.

    It’s for a jet boating forum so the majority of my users are very outdoorsy and not that computer savvy.

    They are used to uploading pics on other forums and having them show up straight away. It makes sense. Why would you go to all of that trouble when other forums do it for you automatically.

    Is there a way to modify the plugin code?

    When you click insert it must do something so cant we just take that code and put it in the appropriate place ao that it does it straight after uploading?

    Sorry if that is a stupid question, I am far from an expert.

    #3931
    Jens Wedin
    Member

    Here is a function list for the v1.0 alpha one. As the developers do not add any documentation I found this on the net. You can you this by your own if you have an older or newer version of bbPress by doing this command in the terminal (linux or mac):

    grep -oe ^function.*) bb-includes/template-functions.php | sort > functions.txt

    This idea is Tims (http://timjoh.com), I used updated his idea.


    function _bb_list_tag_item( $tag, $args )
    function _bb_parse_time_function_args( $args )
    function _bb_time_function_return( $time, $args )
    function allowed_markup( $args = '' )
    function alt_class( $key, $others = '' )
    function bb_active_theme_uri()
    function bb_admin_link( $args = '' )
    function bb_current_user_info( $key = '' )
    function bb_feed_head()
    function bb_forum()
    function bb_forum_bread_crumb( $args = '' )
    function bb_forum_class( $args = null )
    function bb_forum_dropdown( $args = '' )
    function bb_forum_pad( $pad, $offset = 0 )
    function bb_forum_posts_rss_link( $forum_id = 0, $context = 0 )
    function bb_forum_topics_rss_link( $forum_id = 0, $context = 0 )
    function bb_get_active_theme_uri()
    function bb_get_admin_link( $args = '' )
    function bb_get_current_user_info( $key = '' )
    function bb_get_footer()
    function bb_get_forum_bread_crumb($args = '')
    function bb_get_forum_dropdown( $args = '' )
    function bb_get_forum_is_category( $forum_id = 0 )
    function bb_get_forum_posts_rss_link( $forum_id = 0, $context = 0 )
    function bb_get_forum_topics_rss_link( $forum_id = 0, $context = 0 )
    function bb_get_header()
    function bb_get_location()
    function bb_get_logout_link( $args = '' )
    function bb_get_post_delete_link( $post_id = 0 )
    function bb_get_post_edit_link( $post_id = 0 )
    function bb_get_post_ip_link( $post_id = 0 )
    function bb_get_post_time( $args = '' )
    function bb_get_posts_rss_link($context = 0)
    function bb_get_profile_link( $args = '' )
    function bb_get_stylesheet_uri( $stylesheet = '' )
    function bb_get_tag_heat_map( $tags, $args = '' )
    function bb_get_tag_link( $tag_name = 0, $page = 1 )
    function bb_get_tag_link_base()
    function bb_get_tag_name( $id = 0 )
    function bb_get_tag_page_link()
    function bb_get_tag_remove_link( $args = null )
    function bb_get_tag_rss_link( $tag_id = 0, $context = 0 )
    function bb_get_template( $file )
    function bb_get_theme_uri( $theme = false )
    function bb_get_title( $args = '' )
    function bb_get_topic_close_link( $args = '' )
    function bb_get_topic_delete_link( $args = '' )
    function bb_get_topic_pagecount( $topic_id = 0 )
    function bb_get_topic_sticky_link( $args = '' )
    function bb_get_topics_rss_link($context = 0)
    function bb_get_user_email( $id )
    function bb_get_user_id( $id = 0 )
    function bb_get_view_rss_link($context = 0)
    function bb_head()
    function bb_is_topic_lastpage( $topic_id = 0 )
    function bb_language_attributes( $xhtml = 0 )
    function bb_list_tags( $args = null )
    function bb_load_template( $file, $globals = false )
    function bb_location()
    function bb_logout_link( $args = '' )
    function bb_new_topic_forum_dropdown()
    function bb_post_admin()
    function bb_post_template()
    function bb_post_time( $args = '' )
    function bb_profile_admin_form( $id = 0 )
    function bb_profile_base_content()
    function bb_profile_data( $id = 0 )
    function bb_profile_data_form( $id = 0 )
    function bb_profile_link( $args = '' )
    function bb_profile_password_form( $id = 0 )
    function bb_related_tags_heat_map( $args = '' )
    function bb_sort_tag_heat_map( &$tag_counts )
    function bb_stylesheet_uri( $stylesheet = '' )
    function bb_tag_heat_map( $args = '' )
    function bb_tag_link( $id = 0, $page = 1 )
    function bb_tag_link_base()
    function bb_tag_name( $id = 0 )
    function bb_tag_page_link()
    function bb_tag_remove_link( $args = null )
    function bb_tag_rss_link( $id = 0, $context = 0 )
    function bb_template_scripts()
    function bb_title( $args = '' )
    function bb_topic_admin( $args = '' )
    function bb_topic_labels()
    function bb_topic_pagecount( $topic_id = 0 )
    function bb_topic_search_form( $args = null, $query_obj = null )
    function edit_form()
    function favorites_link( $user_id = 0 )
    function favorites_pages()
    function favorites_rss_link( $id = 0, $context = 0 )
    function forum_description( $args = null )
    function forum_id( $forum_id = 0 )
    function forum_link( $forum_id = 0, $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function forum_name( $forum_id = 0 )
    function forum_pages( $forum_id = 0 )
    function forum_posts( $forum_id = 0 )
    function forum_topics( $forum_id = 0 )
    function full_user_link( $id = 0 )
    function get_allowed_markup( $args = '' )
    function get_alt_class( $key, $others = '' )
    function get_favorites_link( $user_id = 0 )
    function get_favorites_rss_link( $id = 0, $context = 0 )
    function get_forum_description( $forum_id = 0 )
    function get_forum_id( $forum_id = 0 )
    function get_forum_link( $forum_id = 0, $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function get_forum_name( $forum_id = 0 )
    function get_forum_parent( $forum_id = 0 )
    function get_forum_position( $forum_id = 0 )
    function get_forum_posts( $forum_id = 0 )
    function get_forum_topics( $forum_id = 0 )
    function get_full_user_link( $id = 0 )
    function get_page_number_links($page, $total)
    function get_post_author( $post_id = 0 )
    function get_post_author_id( $post_id = 0 )
    function get_post_author_title( $post_id = 0 )
    function get_post_author_title_link( $post_id = 0 )
    function get_post_id( $post_id = 0 )
    function get_post_ip( $post_id = 0 )
    function get_post_link( $post_id = 0 )
    function get_post_text( $post_id = 0 )
    function get_profile_tab_link( $id = 0, $tab, $page = 1 )
    function get_topic_author( $id = 0 )
    function get_topic_deleted_posts( $id = 0 )
    function get_topic_id( $id = 0 )
    function get_topic_last_post_link( $id = 0 )
    function get_topic_last_poster( $id = 0 )
    function get_topic_link( $id = 0, $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function get_topic_posts( $id = 0 )
    function get_topic_rss_link( $id = 0, $context = 0 )
    function get_topic_start_time( $args = '' )
    function get_topic_time( $args = '' )
    function get_topic_title( $id = 0 )
    function get_user_delete_button()
    function get_user_display_name( $id = 0 )
    function get_user_link( $id = 0 )
    function get_user_name( $id = 0 )
    function get_user_profile_link( $id = 0, $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function get_user_title( $id = 0 )
    function get_user_type( $id = 0 )
    function get_user_type_label( $type )
    function get_view_link( $_view = false, $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function get_view_name( $_view = '' )
    function is_bb_admin()
    function is_bb_favorites()
    function is_bb_feed()
    function is_bb_profile()
    function is_bb_search()
    function is_bb_stats()
    function is_bb_tag()
    function is_bb_tags()
    function is_forum()
    function is_front()
    function is_topic()
    function is_view()
    function login_form()
    function manage_tags_forms()
    function new_topic( $args = null )
    function post_anchor_link( $force_full = false )
    function post_author( $post_id = 0 )
    function post_author_avatar( $size = '48', $default = '', $post_id = 0 )
    function post_author_avatar_link( $size = '48', $default = '', $post_id = 0 )
    function post_author_id( $post_id = 0 )
    function post_author_link( $post_id = 0 )
    function post_author_title( $post_id = 0 )
    function post_author_title_link( $post_id = 0 )
    function post_author_type( $post_id = 0 )
    function post_del_class( $post_id = 0 )
    function post_delete_link( $post_id = 0 )
    function post_edit_link( $post_id = 0 )
    function post_form( $h2 = '' )
    function post_id( $post_id = 0 )
    function post_ip( $post_id = 0 )
    function post_ip_link( $post_id = 0 )
    function post_link( $post_id = 0 )
    function post_text( $post_id = 0 )
    function profile_menu()
    function profile_pages()
    function profile_tab_link( $id = 0, $tab, $page = 1 )
    function search_form( $q = '' )
    function tag_form( $args = null )
    function tag_pages()
    function topic_author( $id = 0 )
    function topic_class( $class = '', $key = 'topic', $id = 0 )
    function topic_close_link( $args = '' )
    function topic_delete_link( $args = '' )
    function topic_id( $id = 0 )
    function topic_last_post_link( $id = 0 )
    function topic_last_poster( $id = 0 )
    function topic_link( $id = 0, $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function topic_move_dropdown( $id = 0 )
    function topic_noreply( $title )
    function topic_pages( $id = 0 )
    function topic_pages_add( $id = 0 )
    function topic_posts( $id = 0 )
    function topic_posts_link( $id = 0 )
    function topic_rss_link( $id = 0, $context = 0 )
    function topic_show_all_link( $id = 0 )
    function topic_start_time( $args = '' )
    function topic_sticky_link( $args = '' )
    function topic_tags()
    function topic_time( $args = '' )
    function topic_title( $id = 0 )
    function user_delete_button()
    function user_favorites_link($add = array(), $rem = array(), $user_id = 0)
    function user_link( $id = 0 )
    function user_profile_link( $id = 0 , $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function user_title( $id = 0 )
    function user_type( $id = 0 )
    function user_type_label( $type )
    function view_link( $_view = false, $page = 1, $context = BB_URI_CONTEXT_A_HREF )
    function view_name( $view = '' ) { // Filtration should be done at bb_register_view()
    function view_pages()


    #66704

    In reply to: bbPress 1.0 alpha

    wiseacre
    Member

    @Thion – I think 2018-2019 ;)

    bbpress needs all (all current and all “release critical”;) bugs at least) bug fixes … and 3-4 relatively small enhancements.

    I think regular (every 4-5 weeks) alfa-s will be useful.

    #67357
    _ck_
    Participant

    The login form is so low because you specified position bottom -200px and that means for it’s parent element.

    .login {
    position: absolute;
    bottom: -200px;

    If you wanted it 200px from the bottom of the header, that means either the header is not being closed properly or the header needs a position:relative;

    #header {position:relative;}

    or you could just change it to position from the top:

    .login {
    position: absolute;
    top: 20px;

    I am also concerned that it takes nearly half a minute for a page to completely load on your site.

    #66070
    chrishajer
    Participant

    The wp-config-sample.php for WordPress 2.5.1 most DEFINITELY has that constant (line 13). Maybe you upgraded and used an old wp-config.php. You would never see the new constants unless you updated a wp-config-sample.php with your old database details.

    // Change SECRET_KEY to a unique phrase.  You won't have to remember it later,
    // so make it long and complicated. You can visit https://api.wordpress.org/secret-key/1.0/
    // to get a secret key generated for you, or just make something up.
    define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase.

Viewing 25 results - 26,926 through 26,950 (of 32,467 total)
Skip to toolbar