Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,701 through 26,725 (of 32,481 total)
  • Author
    Search Results
  • #68433
    eagano
    Member

    musnake –

    I think this must be a big source of the problem for MU and getting it to work with bbPress. And why some get integration to work (standalone) and other can’t (wpmu).

    In the WP standalone install, it does indeed appear to be there (is that where you got the code above?).

    In WPMU 2.6.2 (https://mu.wordpress.org/latest.zip) wp-settings.php, line 317:

    // Used to guarantee unique hash cookies
    $cookiehash = '';
    /**
    * Used to guarantee unique hash cookies
    * @since 1.5
    */
    define('COOKIEHASH', '' );

    $wpdb->hide_errors();
    if( defined( 'MUPLUGINDIR' ) == false )
    define( 'MUPLUGINDIR', 'wp-content/mu-plugins' );

    if( is_dir( ABSPATH . MUPLUGINDIR ) ) {
    if( $dh = opendir( ABSPATH . MUPLUGINDIR ) ) {
    while( ( $plugin = readdir( $dh ) ) !== false ) {
    if( substr( $plugin, -4 ) == '.php' ) {
    include_once( ABSPATH . MUPLUGINDIR . '/' . $plugin );
    }
    }
    }
    }

    Want to know the funny part? I actually debugged it instead of going to the source in WP standalone. At least I came to the same conclusion. This should probably be reported as an MU bug – I’ll let Donncha know.

    #68449

    Ok, I just reinstalled using seperate db’s this time (+WP integration). The installation process is very, very smooth with good feedback at every stage.

    Again, I believe the install was successful.

    Cache cleared etc. but numb ‘Add Forum’ button issue persists.

    I am using the same filebase (with no PHP errors in logs) though.

    The only blank spot I have in the install is:

    >>>>>> WordPress "secure auth" cookie salt not set. which appears to be an acceptable state based on the doc’s.

    The 6 session cookies are all suffixed with COOKIEHASH.

    I am unable to create new fora as keymaster or Admin.

    Can I provide any useful data?

    #68432

    Hey eagno,

    In WP2.6.2 wp-settings.php line 297…

    Doesn’t this block of code get executed whenever one is not installing, i.e. usually. Isn’t COOKIEHASH usually generated?

    if ( ! defined('WP_INSTALLING') ) {
    // Used to guarantee unique hash cookies
    $cookiehash = md5(get_option('siteurl'));
    /**
    * Used to guarantee unique hash cookies
    * @since 1.5
    */
    define('COOKIEHASH', $cookiehash);
    }

    #68427

    It’s in a couple places

    In the profile.php, obviously, there’s the bit for managing them. Also in topic.php there’s a lot of code checking to see it a topic is your favorite.

    I suspect on topic.php you could comment out this:

    <li<?php echo $class;?> id="favorite-toggle"><?php user_favorites_link(); ?></li>

    And then on profile.php comment out this:

    <p><?php printf(__('You can also <a href="%1$s">manage your favorites</a> and subscribe to your favorites’ <a href="%2$s"><abbr title="Really Simple Syndication">RSS</abbr> feed</a>.'), attribute_escape( get_favorites_link() ), attribute_escape( get_favorites_rss_link() )); ?></p>

    That’s all theory, mind.

    #68448

    Caught wearing my underwear on the outside. It doesn’t make me immune to cosmic cookie rays?

    This was a cherry install so I didn’t have any experience with bbPress and its issues etc. The ‘add forum’ button issue existed before I added the quick fix…I found it on my first pass through the support forums trying to see how other WP2.6 success stories started out…

    Did I mention that I have the bbPress files located in a subdomain called ‘forum’ i.e. mydomain.org/forum/ ?

    I’ve just gone through the phpbbb vs SMF review again, just so I can get something going while these small things get cooked off, but I think I’ll stry bbPress as a stand-alone in its own db and integrate later…Do you see any drama with that path?

    I just noticed that I didn’t add the SECRET_KEY value from wp-config.php (sic) to wp-settings.php as per a comment in that file…but it turns out that’s an artifact. Strike that.

    These are some of the cookies that FireBug reports:

    wordpress_logged_in_f004625b18565e7c579076261d01b3a5
    myDomain.org 105 B /forum/ Session

    wordpress_f004625b18565e7c579076261d01b3a5
    myDomain.org 95 B /wp-content/plugins Session

    wordpress_f004625b18565e7c579076261d01b3a5
    myDomain.org 95 B /wp-admin Session

    wordpress_f004625b18565e7c579076261d01b3a5
    myDomain.org 95 B /forum/my-plugins Session

    wordpress_f004625b18565e7c579076261d01b3a5
    myDomain.org 95 B /forum/bb-plugins Session

    wordpress_f004625b18565e7c579076261d01b3a5
    myDomain.org 95 B /forum/bb-admin Session

    wordpress_test_cookie
    myDomain.org 36 B / Session

    I’m checking…

    #60775

    In reply to: PHPBB3 Converstion

    yazerty
    Member

    Oh, it seems this will take a very long time to have a convertor for phpbb 3 :'(.

    Is there another way to convert a phpbb 3 to bbpress (tutorial ?) :) ?

    #4171
    eagano
    Member

    I have seen lots of posts with folks having trouble getting integration to work. I am on 2.6.1 and 1.0-alhpa-2 and I have everything working with no problems.

    The one gotcha that I found that I have not seen mentioned: COOKIEHASH in the wp-settings.php file. It currently ships empty in WP, and probably most people left it blank like me:

    define('COOKIEHASH', '' );

    The hash is calculated in bb-settings.php:

    define('BB_HASH', $bb->wp_cookies_integrated ? md5($bb->wp_siteurl) : md5($bb->uri));

    Since bbPress is hardcoded to use an MD5 hash of the domain appended to all cookies (when you are integrating), you need to have the matching hash appended to your WP cookies.

    The hash is added to the cookie to make it unique, like

    wp_logged_in_user_3ffce08ac7419977b5ab9d68969a4cd0

    To fix this to match bbPress, set it up like this in wp-settings.php:

    define('COOKIEHASH', md5(get_option('siteurl')));

    Or even better calculate it once to avoid the get_option overhead and hard code it.

    define('COOKIEHASH', '3ffce08ac7419977b5ab9d68969a4cd0');

    Bonus points for anyone who can guess the hash above. Yes, it’s md5 and one-way, but on this forum, the answer should be pretty obvious.

    The form of the url passed to md5 should be ‘http://mysite.com&#8217; with no trailing slash.

    One more cool thing: I do not allow registration on the support forum, only through the main WP site. In order to enable posting in the forum from the moment of signup, add a plugin in you mu-plugins directory containing the following:

    function enable_forum_new_user( $user_id )  {
    update_usermeta($user_id, 'bb_capabilities', array('member' => true));
    return;
    }
    add_action('wpmu_new_user', 'enable_forum_new_user');

    Now your users can hit the forum and post the second they click their confirmation email. Cool, huh?

    #68376

    In reply to: Problem deleting posts

    but in reality, administrators should be deleting the whole topic, not the only post in that topic. When you delete the only post of a topic, what are you expecting to be left over?

    Yes, it’s a case of user-error finding a bug that should be caught. The code should say ‘hey, this is the only post, he must mean delete topic’ and move on, or the ‘delete post’ option shouldn’t even be there if it’s the only post in a topic. You’re both right :) Code should know better, user should read more (and FWIW, I made the same error when I was testing bbpress).

    #68379
    nekita
    Member

    Nice concept.

    I’m away from WoW for 2 years now but it’s interesting to see that people still raid Naxxramas. ;)

    #4168
    assbear
    Member

    How do I remove the option ‘Add this topic to you favorites’ from the topic.php page?

    I’ve been digging through the bbPress scripts for two days now –

    but I just can’t seem to locate the code creating the html for this feature.

    Please help, the bbPress Forum is awesome, but I really need to disable this feature.

    regards the AssBear

    #68411

    In reply to: Page 63 of 1

    chrishajer
    Participant

    This is sort of interesting in your footer too:

    1949 posts in 139 topics over 473 months by 26 of 23 members.

    #68375

    In reply to: Problem deleting posts

    chrishajer
    Participant

    I don’t think the problem is with deleting a whole topic when there’s only one post in it. The problem as I understand it is that when deleting the only post in a topic, this error occurs.

    I just verified that this occurs on a trunk installation (r1794) if you try to delete the only post of a topic.

    Warning: Invalid argument supplied for foreach() in /homepages/46/d93980635/htdocs/trunk/bb-includes/functions.php on line 527

    That was my point a couple posts ago. bbPress should handle this, or remove the option to delete the post if it’s the only post on a topic, but in reality, administrators should be deleting the whole topic, not the only post in that topic. When you delete the only post of a topic, what are you expecting to be left over?

    The post is gone, and the thread no longer shows up in the front page forum list, but I think bbPress or the administrator could be smarter about how to accomplish what we’re really trying to do here.

    #65321
    Burt Adsit
    Member

    @createiveherb , @xlarge

    function modifyTopicLabelClosed($label) and

    function modifyTopicLabelSticky($label) need their sprintf substitutions changed from $1%s to %1$s

    ‘<img src=”$1%ssupport-forum-$1%s.png”…

    should be

    ‘<img src=”%1$ssupport-forum-%2$s.png”…

    for all 4 substitutions.

    @xlarge you might have gotten a quicker reply with kinder words. :D

    Burt

    #68296
    Sam Bauers
    Participant

    @bharatk

    There was a syntax error in the code you copied from the other topic. I’ve edited it there if you want to grab it again.

    #4158
    stormbasiat
    Member

    I installed BBForums to my site and installation went fine ;) I gone to http://mbrogs.sc11.co.uk/forum/ and it’s just a blank page.

    Any ideas?

    #68367

    In reply to: Double Posts

    Bharat Karavadra
    Participant

    the WITH replace code does not seem to appear corectly – I think because it had not spaces. here it is again:

    <input type=hidden id=hidden1><input type=”submit” id=”postformsub” onclick=”this.disabled=true; hidden1.name=this.name; hidden1.value=this.value; this.value=’Please Wait…’; this.form.submit();” name=”Submit” value=”<?php echo attribute_escape( __(‘Post Message’) ); ?>” tabindex=”4″>

    #4160
    mojorob
    Member

    I’ve followed the installation instructions, including saving bb-config-sample.php as bb-config.php with the correct values (although it doesn’t say to do this in the bbpress installation instructions). When I go to the intended URL of the bbpress site I get the following error:

    Fatal error: Call to undefined function: wp_kses_no_null() in /homepages/45/d144276697/htdocs/mysite.net/news/forum/bb-includes/pluggable.php on line 240

    I have a wordpress installation in /news/ of the domain, and attempting to put bbpress into /news/forum/

    WordPress: 2.6.2

    bbPress: 0.9.0.2

    Any thoughts?

    #68391

    In reply to: CSS files. . .

    tdrinker
    Member

    Thank you for your help.

    I have set everything right, except I can’t find how to increase the size of three fonts:

    the font used when a person is in the process of typing a post

    and the tiny little font for for “posted # days ago”

    the “send post” font

    I want to make the font large enough for geriatric eyes

    I am comfortable going into all the templates files and fooling around with them. my site, http://www.bookofmatthew.org demonstrates the extent of the rough surgery

    I do wish I could keep a sign giving credit to bbPress, but unfortunately I was unable. perhaps there is a nice graphic saying bbPress I can put somewhere? I cannot write the code to put a sign at the bottom saying, “powered by bbPress”

    I would like to cut out the “member” etc. designations given below the name of the poster

    How can I tell how large to make the font and page?? It would seem to depend on the setting of the person’s computer, which is variable. On a Mac, if you hit command+ or command-, everything is enlarged or decreased

    #4157
    tdrinker
    Member

    I know where the CSS code is for my bbPress site, but what parts are relevant for the following simple adjustments?

    larger font size throughout

    more narrow margins and a wider text area

    taking out tags and other things like that

    maybe even adding a big announcement at the head of my page?

    taking away titles such as “member”

    replacing the text ‘be brief and descriptive’

    many thanks to anyone who can tell me

    #67236
    Tom Lynch
    Participant

    I have investigated some more it seems that new users of mu which own blogs get assigned as inactive on bbpress, dispite the role map being set to give them member level or higher for all levels on the role map.

    Any suggestions, theres no error codes it just plain doesn’t like wpmu’s role map

    #68382
    chrishajer
    Participant

    Your users probably want to mark a topic as a favorite if they want an email when there is a reply. A topic created by a member does not automatically subscribe them to it as a favorite (I think in some versions of phpBB that’s how it works.)

    For buttons, you probably want one of these two plugins:

    https://bbpress.org/plugins/topic/bbcode-buttons/

    https://bbpress.org/plugins/topic/quicktags-4-bbpress/

    You’ll find with bbPress that most of the things you want to do can be accomplished with plugins.

    #52354
    grenoli-dk
    Member

    I am having problems with the phpbb2bbpress converter (http://www.iteisa.com/phpbb2bbpress/).

    When I run the file I just get this message. There isnt a sql-file to download or a file created on my server.

    1: I downloaded the file from: http://www.iteisa.com/phpbb2bbpress/

    2: I edited the lines I have written in bold.

    Code:
    define(‘DB_PHPBB_USERNAME’, ‘[strong]databasename[/strong]’);
    define(‘DB_PHPBB_PASSWORD’, ‘[b]databasepassword[/b]’);
    define(‘DB_PHPBB_DATABASE’, ‘[b]databasename[/b]’);
    define(‘DB_PHPBB_TABLEPREFIX’, ‘phpbb_’);

    define(‘DB_BBPRESS_HOSTNAME’, ‘localhost’);
    define(‘DB_BBPRESS_USERNAME’, ‘[b]databasename[/b]’);
    define(‘DB_BBPRESS_PASSWORD’, ‘[b]databasepassword[/b]’);
    define(‘DB_BBPRESS_DATABASE’, ‘[b]databasename[/b]’);
    define(‘DB_BBPRESS_TABLEPREFIX’, ‘bb_’);

    I only have one database on my server, so the databasename and password is the same on the phpbb and bbpress part

    Code:
    define(‘EXPORT_TO_FILE’, true); // Should the converted DB be exported to a file ?
    define(‘FILENAME’, ‘/tmp/phpbb_imported.sql’); // Which one ? (Ensure this path is writeable by the server)
    define(‘AUTO_IMPORT_EXPORTED_DATA’, false); // Should the script automagically import the converted DB ?

    3: I created the folder tmp at the root and used chmod on it.

    4: I uploaded the file to the root and tried to open it but I couldnt. So I removed the s in .phps and it worked. But i only got this message – but nothing really happened. I cant download a file, and there is nothing on my server. What am I doing wrong?

    Q! wrote:
    phpBB to bbPress database converter

    This script can convert a PhpBB 2.0.X (www.phpbb.com) forum database to bbPress “Bix” 0.73 (www.bbpress.org) format.

    Developed by Jaime GÓMEZ OBREGÓN from ITEISA, based on the previous work of Bruno Torres and The phpBB Group.

    The latest version of this file can be found on http://www.iteisa.com/phpbb2bbpress/.

    Starting conversion

    1.

    Connected to the phpBB database host

    2.

    Selected the phpBB database

    3.

    Exporting forums…

    4.

    Exporting users…

    5.

    Exporting user metadata…

    6.

    Exporting topics…

    7.

    Exporting posts…

    8.

    Sending all your database e-mails to all major world-wide spam sending mafias…

    ‘strong’dsfgds’strong’

    #68083
    chrishajer
    Participant

    No.

    Kakumei is a theme (WordPress terminology) or a template (bbPress terminology) and controls the display of the content on your site. Any modifications you make to your site should be done in these template files, never in the core. Changing core files makes it hard to upgrade to newer releases: you lose your changes with every upgrade. So, if you make the changes in a template file, you can maintain them between releases.

    Also, by default, the stock kakumei theme is used and it’s in the bb-templates directory. I recommend creating a new directory called my-templates (if it’s not there already) at the same level as bb-templates. So, in a directory listing, they’d be at the same level. Then, inside there, create a directory called mytheme or some other name that is descriptive for your forum. This directory name does not matter. (The my-templates one DOES matter.)

    Now that you have a my-templates directory, and inside that a new directory with a name you choose, copy everything from inside the bb-templates/kakumei/ directory to this new directory you created. Then, open up style.css and change the header to give this new template a unique name on line two. You will see this there:

    Theme Name: Kakumei

    Change that to “Theme Name: My Cool New Theme” or whatever you want. Then refresh your admin panel, and you will see a new theme. You can change the rest of the lines in that header as well, to things that are meaningful to you. Be sure not to modify the text before the colon, just change the text after, to your values.

    Now, modify the php and css files in this directory to change the look of your forum. You can switch back and forth between themes here. If you break something, just choose the default theme until you fix the one you were working on.

    #68081
    chrishajer
    Participant

    If you just want to delete the display of the information below the post form, don’t remove that from a core file. What you want to do does not require any modification of core files. Stay out of there.

    You want to be in a template folder, by default bb-templates/kakumei/ but if you created a custom template, you may have a my-templates/yourtemplatename/. In that folder, there should be a file post-form.php and edit-form.php. In the 0.9.0.2 version, you want to look at

    ./edit-form.php line 19

    /post-form.php line 31

    Those lines contains the code to display “Allowed markup” below the post form. Remove that line completely and the text will no longer appear under your post form. Remove it in edit-form.php as well, and it won’t appear below that form either.

    If you don’t have those files in your template, or those lines in your template files, then I don’t know what to say. That’s where the text comes from in a stock installation.

    #68080
    beernews
    Member

    Got around to trying this in version 0.9.0.2 / template: bbOrg

    I didnt see those files you mentioned but searched a bunch of files and all I found was this strip of code in the includes/template-functions.php file:

    function allowed_markup( $args = '' ) {
    echo apply_filters( 'allowed_markup', get_allowed_markup( $args ) );
    }

    // format=list or array( 'format' => 'list' )
    function get_allowed_markup( $args = '' ) {
    $args = wp_parse_args( $args, array('format' => 'flat') );
    extract($args, EXTR_SKIP);

    $tags = bb_allowed_tags();
    unset($tags['pre'], $tags['br']);
    $tags = array_keys($tags);

    switch ( $format ) :
    case 'array' :
    $r = $tags;
    break;
    case 'list' :
    $r = "<ul class='allowed-markup'>nt<li>";
    $r .= join("</li>nt<li>", $tags);
    $r .= "</li>n</ul>n";
    break;
    default :
    $r = join(' ', $tags);
    break;
    endswitch;
    return apply_filters( 'get_allowed_markup', $r, $format );
    }

    Would that get rid of the markup stuff underneath the posting area WITHOUT disrupting my BB Code Buttons functionality?

    Thanks!

Viewing 25 results - 26,701 through 26,725 (of 32,481 total)
Skip to toolbar