Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,076 through 26,100 (of 32,495 total)
  • Author
    Search Results
  • #70819
    macron
    Member

    @wordpressfan

    I got the same error Warning: cannot yet handle MBCS in html_entity_decode()! in …/bb-includes/wp-functions.php on line 113

    I switch from php4 to php5 and it works fine now. I’m hosted on MT GS.

    #70817
    wordpressfan
    Member

    Arg! I cannot install bbpress no matter what download link I use. The link for the stable version 0.9.0.4 gives me this error when trying to install:

    Warning: cannot yet handle MBCS in html_entity_decode()! in /home3/wifirepo/public_html/wpmatrix/forum/bb-includes/wp-functions.php on line 113

    The download link for the unstable 1.0.5 alpha give me a fatal error that is said to be fixed in the “trunk” version, but there is no download link (only reference to an svp – no zip file.

    I want to install a working version of bbpress but all attempts have been thwarted.

    #70812
    sbouazza
    Member

    About the “backpress_get_option” error : I don’t even know if it’s the best way, but you can edit functions.core.php and add this :

    include "functions.bp-options.php";

    It works for me :-)

    #70680
    virginiagirl
    Member

    I figured out what the problem was, although I’m not sure how to fix it (I’m still learning PHP). The problem is this PHP code which I have in an include (along with all my code for the site’s navigation):

    <?php

    // Extracts the file name from the file name

    $path = $_SERVER;

    $page = basename($path);

    $page = basename($path, ‘.php’);

    ?>

    The code extracts the the file name from the file to select the current tab in my navigation. When I remove this section of code, the Reply form appears and works as normal. Is the problem having PHP code in an include file?

    #70804
    jivany
    Member

    @segwayinfo: Last night was supposed to be “Install WPMU, BudyPress and bbPress” night for me. Oh well. :)

    #70802

    Also, when I register a new user through WordPress as per normal, that user is still not assigned a role in bbPress. Not when they login, not when they hit the forum for the first time. Not ever.

    My Steps:

    1. I used a Chrome browser window to register a new user through WordPress
    2. Logged in via WordPress
    3. Hit the forum
    4. User could not post, looks like has no role
    5. Logged out via WordPress
    6. Used FireFox to login as admin to check new user role
    7. No Role Assigned
    8. Used Chrome to login through bbPress
    9. Hit the forum
    10. User could not post, looks like has no role
    11. Used Firefox admin to edit Test user
    12. Received typical error message (noted below)

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /forums/bb-includes/functions.bb-template.php on line 2009

    Basically it looks like the exact same error message as before, with the same circumstances.


    Round two using alpha 5 trunk from the SVN went exactly the same way, only this time when I logged in via bbPress, the above Warning went away, but that user is still marked as Inactive by default when they should be a Member according to the role map.


    When registering through bbPress, the new user still is not assigned a Role on the WordPress side either.


    Sam, can you explain to me what was supposed to be different in alpha5? Maybe I misunderstood…

    #70800

    When I renamed my old config file, I actually received the same error.

    Fatal error: Call to undefined function backpress_get_option() in /forum/bb-includes/backpress/functions.core.php on line 412

    So I renamed my config file back, visited the forum, and then it prompted me for upgrade.

    Is there a specific upgrade page to visit now rather than just hitting the root of the forum?


    Sam, it seems this only happens when I upgrade from alpha4 to alpha5. I was running a trunk version, and received no errors and wasn’t even prompted to upgrade from trunk to 5.

    #70756

    In reply to: List of Hooks/Actions?

    Ben L.
    Member

    Most of the filters are in defaults.bb-filters.php or default-filters.php before 1.0.

    #70268
    Ben L.
    Member

    Untested code below:

    <?php $bb_post = $posts[0]; unset($posts[0]);   $del_class = post_del_class();?>
    <div id="post-<?php post_id(); ?>"<?php alt_class('post', $del_class); ?>>
    <?php bb_post_template(); ?>
    </div>
    <h6>Responses</h6>
    <ol id="thread" start="<?php echo $list_start; ?>">
    <?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>
    <li id="post-<?php post_id(); ?>"<?php alt_class('post', $del_class); ?>>
    <?php bb_post_template(); ?>
    </li>
    <?php endforeach; ?>
    </ol>

    #70675

    A demo would be nice. :)

    #70774
    _ck_
    Participant

    There’s no official documentation or codex yet.

    A few people have done phpxref for bbpress but I find that kind of output fairly useless.

    If you have access to linux shell you can do a grep to get a function list in the template include like so (or install the grep for windows)

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

    modifying that you can also get the filters/actions

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

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

    If you use the grep for windows, leave out the escapes (backslashes) or it won’t work.

    _ck_
    Participant

    >> The same performance gain is achieved using the existing forum_time index.

    Ah so in that case, no ALTER required and there is zero extra storage required and the plugin can be used like this:

    <?php
    /*
    Plugin Name: Topic Time Index
    */
    add_filter('get_latest_topics_join','topic_time_index',99999);
    function topic_time_index($join) {return " $join USE INDEX(forum_time) ";}
    ?>

    Sam Bauers
    Participant

    Here’s the result on WordPress.com’s English support forum:

    41,990 total rows

    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)

    Showing rows 0 - 24 (25 total, Query took 0.2102 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2062 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2037 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2031 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2060 sec)

    #4551
    enfotoad
    Member

    Hi there!

    I am sorry if someone else has already created a post on this.

    I have a website (powered by wordpress) that has a bunch of how-to windows tech articles. I need to get a forum for my site users. Which one would be better? My users will need the capability of uploading files, pasting code and images. Which forum program would put less pressure on my servers and hopefully keep the running a little faster?

    Thank you ahead of time for any help.

    _ck_
    Participant

    One possible way to benchmark the performance is to run these two queries in phpmyadmin (via SQL tab)

    SELECT SQL_NO_CACHE t.* FROM bb_topics AS t   USE INDEX(topic_time)  WHERE t.topic_status = '0' AND t.topic_sticky != '2'   ORDER BY t.topic_time DESC LIMIT 25

    vs.

    SELECT SQL_NO_CACHE t.* FROM bb_topics AS t  WHERE t.topic_status = '0' AND t.topic_sticky != '2'   ORDER BY t.topic_time DESC LIMIT 25

    On my setup the one with the forced index takes half the time of the one without, however we are talking 0.0026 sec vs 0.0013 sec so that is almost meaningless. What we need is someone with 10,000 topics and then you’ll know for certain.

    _ck_
    Participant

    Not extensively tested but this will do it without a core hack

    (once ALTER TABLE bb_topics ADD INDEX (topic_time) is done)

    <?php
    /*
    Plugin Name: Topic Time Index
    */
    add_filter('get_latest_topics_join','topic_time_index',99999);
    function topic_time_index($join) {return " $join USE INDEX(topic_time) ";}
    ?>

    _ck_
    Participant

    This is the SQL query to use if others want to add such an index:

    ALTER TABLE bb_topics ADD INDEX (topic_time)

    But that in itself is not enough, bbPress has to be forced to use the index.

    I am trying to figure out a way to do this without hacking the core, via a mini-plugin instead.

    anotherdan
    Member

    I have just re-launched a site containing about 43000 topics and over 300000 posts…

    I had severe performance issues on all sites using the get_latest_topics functionality (the frontpage was severe because it is using more than once in my custom theme).

    Because of the “index” design it file-sorting because it’s sorting on topic_time and is mysql is hitting the stickies index.

    The solution was to create a new index only with the topic_time field in it. However I was unable to force this index in the query without touching the core files.

    This is what i did:

    Could there be a filter there so I could move this out into a plugin?

    BB_Query::generate_topic_sql function:

    $index_append = '';
    switch ($this->query_id) {
    case 'get_latest_topics':
    $index_append = ' FORCE INDEX (topics_time_order) ';
    break;
    }

    $this->request = $this->_filter_sql( $bits, "$bbdb->topics AS t $index_append" );

    I guess I will find more places where I could do some index optimization that fit’s my install… I can’t be the first running into this issue?

    #67459
    walkerevans
    Member

    Thanks for the links, Chris. As bad as the search is in BBPress, it’s still better than phpBB2 (which I’m migrating from). ;)

    And John, I saw the Super Search, but didn’t want to use it since it’s in super-alpha mode and I need something that will also search WP posts, and it doesn’t seem like that plugin does that. At least not yet. So for now I’m using the WP search plugin: https://bbpress.org/plugins/topic/wp-search/

    Just wondered if there was any way to get Tags/Titles in the existing forum search. Hrm.

    #4544
    JesperA
    Member

    Hi!

    I want to use a couple of WordPress function so i tried to include wp_blog_header in bb_config like this:

    “require_once(‘../wp-blog-header.php’);”

    This works well if i am in the forum section but as soon as i go into bb-admin i get the terrible feared:

    Warning: require_once(/wp-blog-header.php) [function.require-once]: failed to open stream: No such file or directory in C:wampspeedrevisionforumbb-config.php on line 49

    Fatal error: require_once() [function.require]: Failed opening required ‘/wp-blog-header.php’ (include_path=’.;C:php5pear’) in C:wampspeedrevisionforumbb-config.php on line 49

    This worked great in 0.9.0.3 but in the latest unstable version 1 A4 it does this, why?

    And why does it say that a forum is locked when i am trying to make a post?

    Would really appreciate some help ;)

    #68510

    In reply to: Mass user delete

    dkulchenko
    Member

    A kind of hackish, but simple way:

    Log into your MySQL database with php_myadmin, go to the <db-prefix>_users table, go to Browse view, and simply select each user you want to delete with a checkbox, then press the X at the bottom of the screen. phpmyadmin lists the username, real name, id, and so on of the user, so that you can quickly delete by names.

    NOTE: Of course, only do this if you know what you’re doing. Using phpmyadmin, you can do anything from change one letter of someone’s username to trash your entire installation. Do not use this tool if you’re a noob. :)

    Also, this only works if the user accounts do not have any posts associated with them. If they do, this may cause very unpredictable behavior. Before doing this, delete all the posts associated with the user accounts from bbPress, or by deleting posts from the bb_posts table. Then, you can safely delete the users using the steps above.

    #4540
    dcole07
    Member

    I used: add_filter('get_profile_info_keys', 'get_profile_info_keys_personal'); to add more fields to the registration. But I don’t know how or can’t seam to find a way to get this data.

    I thought I could use $user = new BB_User($user_id); and then use $user["new_field"], but after I did var_dump($user), I couldn’t find it in there. But it does appear in that user’s profile!

    How can I access the new values in get_profile_info_keys for a particular user?

    #70667
    marcoapaulo
    Member

    Thank you. Will try that ;)

    #70663
    Ganzuelo
    Participant

    Tried to reinstall, deleted config first, no luck., deleted entire bbpress install., no luck.. I will try and fix tomorrow. =(

    #70299
    chrishajer
    Participant

    I just watched the basic integration screencast and tried integration again. I ran into some of the same problems mentioned above so I did a little testing.

    1. Sam, thanks for the screencast.

    2. Using a subdirectory of forums, and then making a WordPress Page called “Forums” with a slug of “forums” works just fine. The page will show up in your WordPress page menu like any other Page, but the real ‘forums’ subdirectory you installed bbPress into is what is displayed to visitors, NOT the content of the WordPress Page called “Forums.” I used to install a redirect plugin at WordPress to redirect the “Forums” Page to the http://example.com/forums/ real subdirectory, but I guess this works just fine like this. Good to know.

    3. When using PHP4 (4.4.9) I encountered the “Forum could not be created!” error mentioned above. I thought it was possibly the MySQL version (which was 4.0.27 I believe) but it turned out that by using PHP5 (5.2.6) it installed fine, into the same database. I added this to my .htaccess file in the site root (for WordPress and bbPress):

    AddType x-mapp-php5 .php

    That forced .php files to be processed as PHP5. I did that before installing WordPress. I confirmed with phpinfo that PHP5 was being used for both the blog and the forum. The 2nd time through (actually, the 3rd time, but that’s a different story), using PHP5, the forum was created properly.

    After that, following the screencast pretty closely resulted in an installation where I can log in as Admin (key master) at either bbPress or WordPress, and I am logged in on the other side, as expected. Logging out of one logs me out of both. It’s what I expect user integration to be.

    Waiting for the next screencast, Sam. Thanks.

    p.s. Did I miss it, or is the NONCE key for bbPress never set in the video? I have one in wp-config.php, since the keys were generated by the WordPress.org API, but did I miss setting that in bbPress? Should I just make it the same as it is in bbPress? Will not having it prevent me from administering the forum or something? I didn’t test any functionality of the forum, just the logins.

Viewing 25 results - 26,076 through 26,100 (of 32,495 total)
Skip to toolbar