Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,051 through 31,075 (of 32,432 total)
  • Author
    Search Results
  • #50129

    That version of the plugin should work fine, but the most recent version (Front Page Topics 0.8) is a bit more configurable.

    https://bbpress.org/plugins/topic/3

    #1405

    Topic: No Stylesheet

    in forum Troubleshooting
    marky
    Member

    I recently installed bbPress to localhost to experiment before I put it on a live site. Strangely, the stylesheet was being ignored. Looking at the source brought up this:

    <link rel="stylesheet" href="http://localhost#support/bb-templates/kakumei/style.css" type="text/css" />

    Edit: OK, I can’t seem to type a backslash here, but the # symbol in the above code snippet is actually a backslash (opposite of /)

    I have no idea why the slash after localhost is backwards. It appears correctly in all other locations. For what it’s worth, here is the relevant section of my config.php file:

    // If your bbPress URL is http://bbpress.example.com/forums/ , the examples would be correct.
    // Adjust the domain and path to suit your actual URL.
    // Just the domain name; no directories or path. There should be no trailing slash here.
    $bb->domain = 'http://localhost'; // Example: 'http://bbpress.example.com'
    // There should be both a leading and trailing slash here. '/' is fine if the site is in root.
    $bb->path = '/support/'; // Example: '/forums/'

    Any help?

    #54533

    In reply to: Step two errors

    “The database used was one from a bbpress install of over one year ago.”

    Are you trying to run the install script or the upgrade script? If you already have a database, you should be running the upgrade script:

    bb-admin/upgrade.php

    Is it a complete database, or did you only keep certain tables?

    In your PHPMyAdmin, what bb_ tables do you see before and after running the install/upgrade script?

    #1401
    intellivision
    Participant

    …like in WordPress? The additional use of “template” will tend to divide and confuse, no?

    Like how, across software, plugins are either “mods”, “modules”, “extensions” or “addons”.

    Now’s the time! We can still consolidate the concept into one term.

    I’m splitting hairs, I know ;-). bbPress is wonderful. Thanks so much to the developers. I’m a phpBB veteran (admin), and bbPress is so nice I want to cry.

    #54531

    In reply to: Step two errors

    chrishajer
    Participant

    I saw this in bb-admin/upgrade.php

    // Very old (pre 0.7) installs may need further upgrade utilities. Post to https://lists.bbpress.org/mailman/listinfo/bbdev if needed

    I wonder what version you were using? In bb-includes/functions.php, there is a section for version.

            case 'version' :
    return '0.73';
    break;

    Maybe that will help someone help the upgrade script for you.

    #54483
    jefgodesky
    Member

    Success! The Allow Images plugin does nearly the same thing I’m trying to do here. The “pre_post” hook applies the filter when the post is saved, and ideally I’d prefer if the filter were applied when the post is displayed instead, but this can manage all the same. I’ve had to make some changes to accomodate escaping of single quotes, and I’ve expanded the filter to also include aliases for “internal” links, so this will cover MediaWiki’s markup for:

    • Bolding
    • Italicizing
    • Basic internal links

      • With aliases
      • Not including template transclusion, image embedding, or anything fancy like that.

    • External links

      • External links without descriptions are numbered
      • Descriptions are handled

    So, fairly basic mockup, but already meeting all the most common usage. Here’s the working plugin in whole as I have it now. I’ve put in a request to include it in Subversion repository with the other plugins.

    <?php
    /*
    Plugin Name: MediaWiki Markup for bbPress
    Plugin URI: https://bbpress.org/forums/topic/713
    Description: Add a subset of MediaWiki markups to bbPress
    Version: 0.1
    Author: Jason Godesky
    Author URI: http://anthropik.com/
    */

    /* Copyright 2006 Jason Godesky (email : jason@anthropik.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    */

    /*
    These parameters specify the functioning of this plugin.
    Edit accordingly for your specific situation.
    */

    # Wiki root; "internal" links will point to the concatenation
    # of this root and the link specified.
    $mediawiki_filter_params["wiki"] = "http://en.wikipedia.org/wiki/";

    /*
    Stop editing; actual plugin functionality follows.
    */

    function bb_mediawikitext($text) {
    global $mediawiki_filter_params;
    // BASIC FORMATTING
    // Bold and italic
    $text = preg_replace("|(''''')(.*?)(''''')|",
    "<strong><em>2</em></strong>", $text);
    // Bold
    $text = preg_replace("|(''')(.*?)(''')|",
    "<strong>2</strong>", $text);
    // Italic
    $text = preg_replace("|('')(.*?)('')|",
    "<em>2</em>", $text);

    // LINKS
    // Internal links with aliases
    $text = preg_replace("|((.*?)()|",
    "<a href=".'"'.$mediawiki_filter_params["wiki"]."2".'"'.">3</a>",
    $text);
    // Internal links without aliases
    $text = preg_replace("|()(.*?)()|",
    "<a href=".'"'.$mediawiki_filter_params["wiki"]."2".'"'.">2</a>",
    $text);
    // External links with descriptions
    $text = preg_replace("|([)(.*?) (.*?)(])|",
    "<a href=".'"'."2".'"'.">3</a>", $text);
    // External links with no description
    $count = 1;
    $replace = TRUE;
    while ($replace) {
    $before = $text;
    $text = preg_replace("|([)(.*?)(])|",
    "<a href=".'"'."2".'"'.">[".$count."]</a>",
    $text, 1);
    if ($before==$text) { $replace = FALSE; }
    $count++;
    }

    // HEADINGS
    $text = preg_replace("|(======)(.*?)(======)|",
    "<h6>2</h6>", $text);
    $text = preg_replace("|(=====)(.*?)(=====)|",
    "<h5>2</h5>", $text);
    $text = preg_replace("|(====)(.*?)(====)|",
    "<h4>2</h4>", $text);
    $text = preg_replace("|(===)(.*?)(===)|",
    "<h3>2</h3>", $text);
    $text = preg_replace("|(==)(.*?)(==)|",
    "<h2>2</h2>", $text);

    // RETURN
    return $text;
    }

    add_filter('pre_post', 'bb_mediawikitext', 1);

    ?>

    The parameter array is overkill at the moment, but hopefully this plugin will continue to expand, and that array could become much more useful.

    Note: Heh, well, it looks like the formatting I needed to get the bold and italics to work got stripped out. What you need to do is to replace ”’ with \’\’\’ — it’s a Perl regex so that basically means ‘ which is what you’ll get from the escaped MySQL string.

    #54482
    jefgodesky
    Member

    I’ve yet to find any way of significantly improving on spencerp’s method, linked above. I am hoping to get them all to share a single login cookie, but I haven’t figured out how to do that yet. As far as a unified user table, though, spencerp’s solution really hits the spot; he also blogged the solution in full here. If I figure out the unified cookie problem, I’ll post it here and on spencerp’s thread

    The markup issue has me really frustrated with bbPress’ lack of documentation, though. I haven’t even been able to find the proper filter by looking through the source code. In terms of functionality, this should be a fairly straightforward filter, but it seems to be completely stuck on so simple a question as what the right hook is called…

    #1400

    Topic: Step two errors

    in forum Installation
    amsports
    Member

    Installation went smoothly thru step one.

    When the step two page came up it displayed the following errors.


    bbPress database error: [Incorrect table definition; There can only be one auto column and it must be defined as a key]
    ALTER TABLE bb_users ADD COLUMN ID bigint(20) unsigned NOT NULL auto_increment

    bbPress database error: [Key column 'ID' doesn't exist in table]
    ALTER TABLE bb_users ADD PRIMARY KEY (ID)

    1. Added index bb_users PRIMARY KEY (ID)

    bbPress database error: [Unknown column 'ID' in 'where clause']
    SELECT * FROM bb_users WHERE ID = 1

    bbPress database error: [Unknown column 'ID' in 'where clause']
    SELECT * FROM bb_users WHERE ID = 0

    I checked via MyphpAdmin and have been unable to determine how to correct the errors, or even understand what they are.

    Below the error list it appears as though step two partially worked, i.e. it displays a login link and user name and P-word.

    However the login link returns (paraphrased) “it appears you have not installed bbpress” and a link to the install page.

    The database used was one from a bbpress install of over one year ago.

    I also made a second, but new, database with the same results as described above.

    #54255
    mrpapasworld
    Member

    perhaps if i didnt already have a heavily modded theme from previous versions… seems I always get lots of experience modding core files 😉

    luckily I can work around code fine enough… just hope I dont have to do it too often before it gets formally included…

    #54520
    chrishajer
    Participant

    I will post it later today. Minor one, I think :)

    #1399
    cadre
    Member

    When I ran the update script to upgrade from 0.75 to 0.8 I got the following error:

    bbPress Database error: [Duplicate key name 'post_text']

    ALTER TABLE bb_posts ADD FULLTEXT KEY post_text (post_text)

    The install then finished and everything seems to be working correctly, I was just curious to know if this was something I should be concerened with or is it just a normal part of the upgrade procedure?

    I’m sure it obvious by now, but I’m completely new to bbpress so thanks in advance for any advice!

    #54518
    chrishajer
    Participant

    I have a wild guess. Looking at line 79 of bb-includes/akismet.php (in 0.80) shows this:

    'comment_author' => get_user_name( $user-ID ),

    and I think it’s missing a > between $user- and ID

    'comment_author' => get_user_name( $user->ID ),

    If that fixes it, I can file a trac ticket.

    #54512
    chrishajer
    Participant

    Martin, your webserver cannot send emails? Can you upload a file called mailer.php and put this into it: (if you don’t have command line access)

    <html>
    <body>
    <?php
    mail( 'you@yourdomain.com', "subject: test", "message: test", 'From: you@yourdomain.com');
    echo "Mail should have been sent, check your inbox";
    ?>
    </body>
    </html>

    Run that from your browser and check your inbox. I’ve never had it fail, so I don’t know what is displayed if the mail command fails. If you have a command line, you can just run the mail command:

    php -r 'mail( 'you@yourdomain.com', "subject: test", "message: test", 'From: you@yourdomain.com');'

    If you cannot send email from your server, then the patch you referred to would work, but I suspect that was for an older version (.73 maybe, since the post is so old.) You save that information to a file, call it mail.patch or something. You need a command line to patch the files, so if you don’t have that, you would need to download the files referenced in the patch, patch them locally (built in on Linux and OSX but I think you would need a 3rd party app on Windows.) To patch the files:

    1. cd to the installation directory
    2. run this command:
      patch -p0 < /path/to/mail.patch

    That makes the changes to the files referenced in the patch, and the user registration email will be displayed rather than being emailed.

    HTH

    #54108
    so1o
    Participant

    The code looks gr8 sam… go ahead and commit it to version 2.0

    #54006
    Null
    Member

    The code I gave you works fine here.

    Well since it does create the bb_menu table I suggest you fill it manually with phpma.

    Use these lines:

    INSERT INTO bb_menu VALUES (‘active’, ‘Forums’, ‘index.php’, ‘front-page’, 0)

    INSERT INTO bb_menu VALUES (‘active’, ‘Search’, ‘search.php’, ‘search-page’, 1)

    INSERT INTO bb_menu VALUES (‘available’, ‘Statistics’, ‘statistics.php’, ‘stats-page’, 0)

    But NOT all at once. Do them 1 by 1 so like:

    INSERT INTO bb_menu VALUES (‘active’, ‘Forums’, ‘index.php’, ‘front-page’, 0)

    presss Go

    Then enter line 2 etc etc

    I am in the final stage of releasing this for 0.8, but I still don’t know why your table isn’t filled like it should… :(

    #54386
    Sam Bauers
    Participant

    All the magic happens in bb_repermalink() in bb-includes/function.php but the real problem here is that get_path() splits by “/” to find out the topic/forum/user id.

    You could plugin to bb_repermalink() and change the value of $permalink that way.

    e.g. if your permalinks were of the form, forum-12, topic-34 etc. (already setup in your .htaccess file)

    You could make the following file…


    function my_pre_permalink() {
    $p = get_path(0);
    $p = split('-', $p);
    $p = $p[1];
    return $p;
    }

    add_action('pre_permalink', 'my_pre_premalink');

    Drop that into your plugins directory and it should work.

    Of course I haven’t tested this, but it should work in theory.

    #54509
    chrishajer
    Participant

    In your template, you use

    <small>Login to Send PM<small>br />

    .

    and you just keep opening the <small> tag, never closing it. (note, it’s not closed here.)

    It pays to validate your code occasionally at http://validator.w3.org/

    Good luck.

    #54508
    Sam Bauers
    Participant

    A code sample or URL would help.

    But you probably have a style somewhere like:

    #something div div {

    font-size: 0.8em;

    }

    …and maybe some missing closing tags somewhere in your template.

    #1394
    master5o1
    Participant

    It’s really annoying and it only happens in my recently updated Ubuntu Edgy … with Firefox 2.0 (ie, it only happens in firefox 2.0 for ubuntu edgy)

    I have no idea whether its something i did wrong with my Avatar adjustments to the style.css or whether “desmond” is just forcing me to take an eyetest.

    It’s annoying.

    oh yeah…if you haven’t noticed i am running 0.80 :)

    Trent, confirmed. The first time I just loging as a moderator.

    thanks a lot for your help and hard work. :)

    #54498
    Trent Adams
    Member

    Sorry to get back to you late. Copy this into a file and call it path-to-url.php and drop it into your /my-plugins/ folder. If you don’t have one, create it and drop that file into it.

    <?php

    function fix_bb_path_to_url( $url ) {
    return preg_replace( '|:/([^/])|', '://$1', $url );
    }

    add_filter( 'bb_path_to_url', 'fix_bb_path_to_url', 1, -1 );

    ?>

    It is an error that mdawaffe created that patch for at:

    https://trac.bbpress.org/attachment/ticket/575/path-to-url.php

    Trent

    #54095
    ardentfrost
    Member

    That sounds fine dude. One of these days I”ll get around to adding in an admin panel for it :)

    I also want to turn the web link into a pic in the next release so that spammers no longer break the size of the table

    #53597
    jenz
    Member

    Hello. I have a WordPress installation (2.1) at / and then the bbPress installation (0.8) at /forums/. I have followed the instructions: https://bbpress.org/documentation/integration-with-wordpress/ and still no go. The WordPress integration plugin is installed and activated in my WP install and I have defined the bbPress tables (bb_) prefix correctly in the plugin options.

    I have defined the options:

    $bb->wp_table_prefix = ‘wp_’; // WordPress table prefix. Example: ‘wp_’;

    $bb->wp_home = ‘http://test.com&#8217;; // WordPress – Options->General: Blog address (URL) // No trailing slash. Example: ‘http://example.com&#8217;

    $bb->wp_siteurl = ‘http://test.com&#8217;; // WordPress – Options->General: WordPress address (URL) // No trailing slash. Example: ‘http://example.com&#8217;

    in my config.php file, but do I need to add anything else? Right now, my WordPress users cannot log into the bbPress install, and the bbPress users cannot log into the WordPress install. Any help would be creatly appreciated.

    #54466
    Emre Erkan
    Member

    Thank you. :)

    #54094
    brampamp
    Member

    I’ve taken the bb_profile_data() function and incorporated it into bb-memberlist.php as bb_member_profile_data() – I’ve tweaked it just a little to incorparate the email address and take out length of membership but other than that it’s the same.

    I call it using

    bb_member_profile_data($member->ID);

    from within the table created in the memberlist.php file. I’ve left all the other code the same apart from removing some table columns that were not needed.

    Thanks again for your help and pointing me in the right direction.

    Let me know if you would like to see the exact code.

Viewing 25 results - 31,051 through 31,075 (of 32,432 total)
Skip to toolbar