Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,801 through 26,825 (of 32,466 total)
  • Author
    Search Results
  • #67883
    chrishajer
    Participant

    It’s hard to tell if there’s an error in an edited bb-config.php. I have seen where the secret keys are not properly escaped, and that creates a PHP problem. As you’ve posted it (edited) it works fine.

    I just did an svn checkout of r1736 and that included backpress r153, which is what’s available at the URL you posted.

    Mine installed cleanly. I did not integrate with WordPress. You can see a one minute video of the installation here:

    http://www.chrishajer.com/bbpress/1736/

    I suspect a problem with the secret keys in the bb-config.php. Or some other syntax problem with the bb-config.php. If you have a command line with php you can run

    php -l bb-config.php

    to check that file for syntax errors. That’s “php dash el”, l for Lint.

    #67882
    cabal79
    Member

    Well I used yesterdays Trunk Release (1736) and the Backpress folder from here: http://svn.automattic.com/backpress/trunk/includes/

    Is there anything else I’d have to add to the Trunk that I possibly missed?

    I don’t really think that the bb-config syntax is wrong because it’s working with the Alpha just fine.

    Anyways, the code for what it’s worse:

    <?php
    // ** MySQL settings ** //
    define('BBDB_NAME', 'xxxxx'); // The name of the database
    define('BBDB_USER', 'xxxxx'); // Your MySQL username
    define('BBDB_PASSWORD', 'xxxxx'); // ...and password
    define('BBDB_HOST', 'localhost'); // 99% chance you won't need to change these last few

    define('BBDB_CHARSET', 'utf8'); // If you are *upgrading*, and your old bb-config.php does
    define('BBDB_COLLATE', ''); // not have these two contstants in them, DO NOT define them
    // If you are installing for the first time, leave them here

    // Change each KEY to a different unique phrase. You won't have to remember the phrases later,
    // so make them long and complicated. You can visit https://www.grc.com/passwords.htm
    // to get phrases generated for you, or just make something up. Each key should have a different phrase.
    // If you are integrating logins with WordPress, you will need to match each key to
    // the value of their equivalent keys in the WordPress file wp-config.php
    define('BB_AUTH_KEY', 'xxxxx'); // Change this to a unique phrase.
    define('BB_SECURE_AUTH_KEY', 'xxxxx'); // Change this to a unique phrase.
    define('BB_LOGGED_IN_KEY', 'xxxxx'); // Change this to a unique phrase.

    // If you are running multiple bbPress installations in a single database,
    // you will probably want to change this.
    $bb_table_prefix = 'bb_'; // Only letters, numbers and underscores please!

    // Change this to localize bbPress. A corresponding MO file for the
    // chosen language must be installed to bb-includes/languages.
    // For example, install de.mo to bb-includes/languages and set BB_LANG to 'de'
    // to enable German language support.
    define('BB_LANG', '');

    ?>

    Thanks for helping out!

    Rob

    sowmithrii
    Member

    no.. its not a wp blog. it’s my own site completed coded by me…

    is there any way??

    or if can i know about the type of encryption wordpress is using for encrypting the password. I am having the wordpress software , but unable to debug all the pages……

    sowmithrii
    Member

    Hi, Am new to this site and hope am posting this query in right place.

    I recently downloaded bbpress forum software . The integration was successfull with wordpress . But I want the users in my website to access the forum without need of registering in it again.

    I dint find any means of achieving this. Can anyone help…

    I tried changing the forum code., but i think it is not a good idea.

    CHeeRS,

    sowmithrii

    #67771

    In reply to: replacing page title

    Olaf Lederer
    Participant

    Hi Thanks for helping.

    it doesn’t work :(

    this is the function I use (stripped the other code)

    function my_title($title) {
    return 'PHP Scripts Development Forum';
    }

    function create_meta() {
    if (is_front()) {
    remove_filter('bb_title', 'bb_get_title');
    add_filter('bb_get_title', 'my_title');
    // code to create the meta data
    } else {
    // do something else
    }
    }
    add_action('bb_head','create_meta');

    maybe it doesn’t work because I add the filter within that “action”?

    #4044
    M.K. Safi
    Member

    I think I’m asking for theme integration.

    I have seen other WordPress forums where you create a page, insert a one line HTML(?) code, and the forum will appear in that page. I was wondering if something similar can be done with bbPress, so that I can make it appear within my theme, here. Thanks,

    keress
    Member

    Another note, the Internal Server Error yesterday was fixed by correcting the .htaccess file.

    At present it reads:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    #67828

    In reply to: Get Current Forum ID?

    iuxc
    Member

    Thanks for the suggestion. It didn’t fix what I am trying to do.

    Basically, while the php is executing the while ( bb_forum() ) : loop, I need to check the current forum against the forum it is writing to the menu.

    If there are 4 forums in the while loop, I need it to check the current forum id against each forum id as it is writing it to html. If the current forum id matches the forum id it’s writing, then it would add the class="on" attribute to the li tag.

    #4041

    Topic: Get Current Forum ID?

    in forum Plugins
    iuxc
    Member

    I’m attempting to create a side nav of all the forums on my site. When a user is viewing a certain forum, I want that “tab” to be highlighted using CSS.

    All I need is to assign a class=”on” attribute to the forum [li] [/li] tag if it is the current forum being viewed. Anyone know how I can check the current forum against the forum id?

    Here’s the code for my menu creation:

    <?php if ( bb_forums() ) : ?>
    <h3><?php _e('Forums'); ?></h3>
    <ul>
    <li <?php if ( is_front() ) : ?>class="on"<?php endif; ?>><a>">Overview</a>
    <?php while ( bb_forum() ) : ?>
    <li><a>"><?php forum_name(); ?></a></li>
    <?php endwhile; ?>
    </ul>
    <?php endif; // bb_forums() ?>

    #67476

    In reply to: Accents in username

    myu
    Member

    Thanks for reply.

    Me, I personally don’t mind using alphabet for username, but have to think of target audience. Got me worried a bit. :)

    I hope in the future version there’s some sort of conversion mechanism for people that’s already registered using utf-8 encoded username. (pretty please..)

    #67798
    chrishajer
    Participant

    @sambauers – but we’re used to WordPress where they’re pretty easy to change in the admin. :D

    #67651
    Sam Bauers
    Participant

    We aren’t including Snoopy, only WP_Http (which is only around 24k of code if you discount the comments)

    The cron job is triggered by pageviews and then only if there are jobs to run.

    So on a visit to the site, the cron job list is checked (just an option in the meta table) then if there is something there to do, bbPress sends an HTTP request to itself, which the user doesn’t need to wait for.

    #67785
    Sam Bauers
    Participant

    @hempsworth

    You need to add the same SALT and KEY settings in bbPress config file…

    define('BB_AUTH_KEY', '');
    define('BB_AUTH_SALT', '');
    define('BB_SECURE_AUTH_KEY', '');
    define('BB_SECURE_AUTH_SALT', '');
    define('BB_LOGGED_IN_KEY', '');
    define('BB_LOGGED_IN_SALT', '');

    .

    Of course you need to actually set values in them to match your WPMU install.

    #67797
    Sam Bauers
    Participant

    @chrishajer

    They are called permalinks for a reason :)

    #67649
    Mark Barnes
    Member

    The blog says, “To enable cron I’ve included the very new WP_Http class in BackPress.” This class is documented here: https://codex.wordpress.org/Version_2.7#HTTP_API which I read as providing exactly what you suggested – URL fetching to do a pseudo multi-task.

    #67769

    In reply to: replacing page title

    John Blackbourn
    Participant

    Oh hang on, that’s not right either. Use add_filter(). Try this:

    function my_title( $title ) {
    return 'PHP Scripts Development Forum';
    }

    add_filter('bb_get_title', 'my_title');

    #67768

    In reply to: replacing page title

    John Blackbourn
    Participant

    The second parameter in apply_filters() needs to be a function that returns the text to be displayed in the title. Eg:

    function my_title( $title ) {
    return 'PHP Scripts Development Forum';
    }

    apply_filters('bb_get_title', 'my_title');

    #4033
    fandangoflip
    Member

    Hey,

    I’ve recently begun to play with bbpress in conjunction with wordpress.

    I’ve figured out how to include an RSS feed of a bbpress post & author to display as “author on “title of the post”” by using the following code:

    <?php include_once(ABSPATH . WPINC . ‘/rss.php’); wp_rss(‘http://example.com/bbforum/rss.php&#8217;, 5); ?>

    Does anyone know how to include an excerpt of the post, time and change the formatting.

    Basically I’m aiming for the feed to create something like this….

    …Alternativly, is there an easier way to include or embed bbpress or any other forum into wordpress?

    Any advice is very much appreciated :)

    #4023
    Alex
    Member

    I’m trying to integrate WPMU 2.6.1 and bbPress 1.0 alpha, and I’m having some troubles. Here’s how the installation process went for me:

    Database details were fine.

    The bbPress salt etc details were left blank as this is usually added later in the WordPress integration area.

    In the integration area I inserted the WPMU address into the two URL textfields. For the keys I used the following from the wp-config.php file in my WPMU root:

    WordPress "auth" cookie key -> AUTH_KEY
    WordPress "auth" cookie salt -> SECRET_SALT
    WordPress "secure auth" cookie key -> SECURE_AUTH_KEY
    WordPress "secure auth" cookie salt -> SECURE_AUTH_SALT
    WordPress "logged in" cookie key -> LOGGED_IN_KEY
    WordPress "logged in" cookie salt -> LOGGED_IN_SALT

    I then selected ‘Add user database integration settings’ and left WP_ as the prefix.

    This went through fine.

    In the Site Settings area I added the site name and URL, but something struck me right here – it was asking for ‘key master’ account details, previously this has already been the site admin for the WordPress install.

    I added the username of the admin user, ‘admin, and that failed saying the account already existed. I tried the install again, and changed the ‘key master’ to another username, and this time it failed but said ‘The key master could not be created. You may need to replace bbPress with a fresh copy and start again.’

    Am I doing something wrong, or is this a bbPress issue?

    I’m guessing WordPress and WordPress MU integration is planned for the final 1.0 release?

    Thanks,

    Alex

    #67780
    meitershaker
    Member

    1.0 alpha (actual trunk) :)

    #67472

    In reply to: Accents in username

    meitershaker
    Member

    my problem is already here :( little help please :p

    #4022
    meitershaker
    Member

    Hi,

    i have a problem with this plugin: http://bbpress.org/plugins/topic/bb-smilies/

    i don’t see the smilies’s toolbar on edit-post pages :( (but it’s works great with a new topic or new post for example)

    why?

    byeee.

    #67646
    _ck_
    Participant

    Off the top of my head this looks like a very bad idea performance-wise:

    AND NOT p.topic_id IN (SELECT t.topic_id FROM bb_topics
    AS t WHERE t.topic_status <> '0')

    Though mysql may optimize it on the fly. Technically there could be thousands of deleted topics on an active site which makes quite a few items to search for (though in your case, there are NO deleted topics, yet, so this won’t be problem early on). However I think topic_status has an index? If not, it’s even worse.

    Alternatively you could “over-search” the results (ie. ask for 100 instead of 30) and reverse the check of the 100 topic_id’s to make sure topic_status=0.

    Since you’d end up using two queries, you could merge the two needs, to check titles AND to check topic status for the previously returned list of posts.

    You’re dead right about pagination becoming insanely complicated in this case. This could be solved by limiting result lengths to just 100 items max, and then use my “over-query” idea to ask for 200 just incase it hits alot of deletions.

    #67645
    Mark Barnes
    Member

    Full text search is of course still quicker and getting rid of the GROUP BY helps even further. 66% quicker in my case. I’m going to use the following query as my search.

    SELECT p . * , MATCH (p.post_text) AGAINST ('test') AS
    search_score FROM bb_posts AS p WHERE MATCH
    (p.post_text) AGAINST ('test') AND p.post_status = '0'
    AND NOT p.topic_id IN (SELECT t.topic_id FROM bb_topics
    AS t WHERE t.topic_status <> '0') ORDER BY search_score
    DESC LIMIT 30;

    The downside is that it doesn’t include topic titles in the search. You can solve this adding this search to a temporary table, running another search on topic_title, and merging the two tables together. You need quite a bit of PHP code to manage this (particularly getting the NEXT buttons to work correctly), but it’s quite possible.

    #67644
    Mark Barnes
    Member

    @sambauers: Let me just give you a couple of observations. Firstly, regarding the first search performed.

    SELECT p.*, 0 AS search_score, MAX(post_time) AS post_time FROM bb_posts AS p JOIN bb_topics as t ON ( t.topic_id = p.topic_id ) WHERE p.post_text LIKE '%test%' AND p.post_status = '0' AND t.topic_status = '0' GROUP BY t.topic_id ORDER BY p.post_time DESC LIMIT 5;

    The first thing that can be done here is remove the join and replace it with a sub-query. This way the sub-query can be cached, and speed is much improved. Here’s the idential query without the join:

    SELECT p.*, 0 AS search_score, MAX(post_time) AS post_time FROM bb_posts AS p WHERE p.post_text LIKE '%test%' AND p.post_status = '0' AND NOT p.topic_id IN (SELECT t.topic_id FROM bb_topics AS t WHERE t.topic_status <> '0') GROUP BY p.topic_id ORDER BY p.post_time DESC LIMIT 5

    That cuts execution time by 55% on my setup. If you have lots of deleted topics this might not apply, but if you have a huge database you ought to be cleaning the deletes out of it regularly anyway.

    _ck_ is also right that ordering by post_id is quicker than by post_time. 17% quicker in my case.

Viewing 25 results - 26,801 through 26,825 (of 32,466 total)
Skip to toolbar