Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 25,026 through 25,050 (of 32,468 total)
  • Author
    Search Results
  • #70352
    rdsr
    Member

    Hey i got this working, the only problem is, when i log into WP or BBpress, it logs the other out. Its not a big deal but i was just curious if theres a way to fix this. :) Thanks

    #59346

    In reply to: Adding a new User Type

    timskii
    Member

    In 1.0 Release Candidate 1, roles change dramatically from 0.9.x. I appreciate there is Role Manager, but I wanted a simple fix for an existing tweak based on Fel’s original code.

    The code below creates a new role, adds capabilities that mimic the ‘member’ role, plus extra capabilities you specify.

    global $bb_roles; // Get the master list of roles
    $key = 'role_internal_name'; // Edit: Name of new role, as used internally by BBPress
    $name = __('Role Public Name'); // Edit: Name of new role, as shown in public
    $cap = array ( 'view_by_ip', ); // Edit: Add extra capabilities within this array. Must be pre-defined capabilities. Empty if you just wish to apply member capabilities.
    $r = new BP_Role(); // New role class
    $r->name = $key; // Assign the internal name
    $r->capabilities = $bb_roles->role_objects[ 'member' ]->capabilities; // Copies member capabilities to the new role
    foreach ( $cap as $add ) $r->capabilities[ $add ] = 1; // Adds extra capabilities
    $bb_roles->role_objects[ $key ] = $r; // Adds the new role to $bb_roles
    $bb_roles->role_names[ $key ] = $name; // Adds the new role to the list of role names

    Hooked using: add_action/add_filter( ‘bb_got_roles’, ‘my_function_name’ );

    I have no idea whether this is the most efficient way of doing this. So I’d welcome improvements.

    #73923
    Atsutane
    Member

    @johnhiler

    I want to correct something here. Bbpress latests discussion is a wordpress plugin, not a bbpress plugin. It should not conflict with any bbpress function. :-)

    #73920
    john500
    Member

    <bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘t posted was that when is Rugby Canada going to have a stadium policy. Are we go’ at line 1]

    INSERT INTO bb3_posts (topic_id,post_text,post_time,poster_id,poster_ip,post_status,post_position,forum_id) VALUES (’57’,”,’2009-06-01 05:18:02′,’13’,’24.80.235.218′,’0′,’4′,’2′)

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/a/l/e/alexander9999/html/forums/bb-includes/db-mysql.php:130) in /home/content/a/l/e/alexander9999/html/forums/bb-includes/pluggable.php on line 232>

    Here is message minus the post. The forum is on this site Canadianrugby.ca

    there doesn’t seem to be a problem with latest discussions but with postings on the Forum it seems that a long message and perhaps punctuation such as , or apostrophe can cause the error and the post not posting

    #73975
    citizenkeith
    Participant

    @windhamdavid Thanks! I’m familiar with the O’Reilly series (loved the CSS book) but didn’t know if this was good for absolute newbs. I’ll check it out. :)

    #73877
    chrishajer
    Participant

    Does *your* database, the one you’re using, support it though? Apparently, it does not, according to the error messages. Unless of course the error message is erroneous.

    You can do this from a MySQL command line or phpMyAdmin once you connect to your database:

    SHOW COLLATION LIKE 'utf8%';

    That will show you all collations that begin with utf8.

    #73914
    john500
    Member

    Can anyone help me with this issue. I knew that BBpress.org didn’t have paid support but I thought I could get some assistance from the forum or community. My developer can’t get it fixed and I need some assistance. Now the problem is that when you make a post it says that it is interfering with the topic header and the post is left blank. Here is the error message.

    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘t posted was that when is Rugby Canada going to have a stadium policy. Are we g’ at line 1]

    INSERT INTO bb3_posts (topic_id,post_text,post_time,poster_id,poster_ip,post_status,post_position,forum_id) VALUES (’57’,’

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/a/l/e/alexander9999/html/forums/bb-includes/db-mysql.php:130) in /home/content/a/l/e/alexander9999/html/forums/bb-includes/pluggable.php on line 232

    #73967
    _ck_
    Participant

    This would be a very good beginners plugin to write, it’s very simple (other than the admin interface).

    bbPress fetches stickies via a separate query (which I have always found to be a waste, except for this case) and you could manipulate the results before the final template is loaded.

    For example on the front-page if you looks at index.php

    you’ll see that

    $super_stickies = get_sticky_topics();

    and then there is

    do_action( 'bb_index.php', '' );

    so you hook the action bb_index.php

    and then you do a global on $super_stickies

    and then you manipulate the order of the array as desired.

    for forum pages it’s

    $stickies = get_sticky_topics( $forum_id, $page );

    and

    do_action( 'bb_forum.php', $forum_id );

    same concept

    That part would take less than an hour to write.

    and you’d store the order in the topicmeta

    But the part that will take much more time is the admin interface.

    Instead you could simply add an extra field on the post edit page that only admin would see and let them chose the topic stickiness priority.

    (this is not a plugin I will be writing)

    #73940
    michael3185
    Member

    1. Fixed. Finally got to tags.php (duh) after trawling through core files. Moral: don’t work past 2am.

    2. Not resolved. I’ve searched through CSS tutorials on various sites, but can’t find an easy test for the browser type without using php or javascript. Is there a way to set a font size in CSS at, say, 10pt for IE, and 11pt for any other browser?

    Also – for moderators – I’m not bumping deliberately. I’ve noticed others editing posts now and then, as I have, to say they don’t require help any longer. Can’t the allowed edit time be changed to 24 hours or something like that? Maybe even let members delete their post if it has no replies? It’d keep things tidier.

    [Edit]

    For the font size issue, could a different stylesheet be selected by browser type, based on something like the code _ck_ gave to stop IE8 messing up the header?

    function fix_ie8() {if (strpos($_SERVER,”MSIE 8″)) {header(“X-UA-Compatible: IE=7”);}}

    add_action(‘bb_send_headers’,’fix_ie8′);

    I can see how this works, but don’t know how to modify it to discover any IE browser version, and select style_ie.css, else select style.css – any ideas folks..?

    #73875
    chrishajer
    Participant

    Sounds like your database does not support uft8_general_ci collation? Maybe you need to set define('BBDB_COLLATE', ''); in your bb-config.php to something the server supports? Maybe you can look at the collation for the existing WPMU tables, and just use that in bb-config.php?

    Never seen this before, just guessing at a solution.

    #73874
    RWB
    Member

    I dleted the tables. I deleted the user files for bbpress.

    This is the error message I get now.

    The database failed to install. You may need to replace bbPress with a fresh copy and start again.

    SQL ERROR!

    >>> Database: lilienbr_wpmu (localhost)

    >>>>>> CREATE TABLE IF NOT EXISTS bb_forums (

    forum_id int(10) NOT NULL auto_increment,

    forum_name varchar(150) NOT NULL default ”,

    forum_slug varchar(255) NOT NULL default ”,

    forum_desc text NOT NULL,

    forum_parent int(10) NOT NULL default 0,

    forum_order int(10) NOT NULL default 0,

    topics bigint(20) NOT NULL default 0,

    posts bigint(20) NOT NULL default 0,

    PRIMARY KEY (forum_id),

    KEY forum_slug (forum_slug)

    ) DEFAULT CHARACTER SET ‘utf8’ COLLATE ‘uft8_general_ci’;

    >>>>>> Unknown collation: ‘uft8_general_ci’

    SQL ERROR!

    >>> Database: lilienbr_wpmu (localhost)

    >>>>>> CREATE TABLE IF NOT EXISTS bb_meta (

    meta_id bigint(20) NOT NULL auto_increment,

    object_type varchar(16) NOT NULL default ‘bb_option’,

    object_id bigint(20) NOT NULL default 0,

    meta_key varchar(255) default NULL,

    meta_value longtext,

    PRIMARY KEY (meta_id),

    KEY object_type__meta_key (object_type, meta_key),

    KEY object_type__object_id__meta_key (object_type, object_id, meta_key)

    ) DEFAULT CHARACTER SET ‘utf8’ COLLATE ‘uft8_general_ci’;

    >>>>>> Unknown collation: ‘uft8_general_ci’

    SQL ERROR!

    >>> Database: lilienbr_wpmu (localhost)

    >>>>>> CREATE TABLE IF NOT EXISTS bb_posts (

    post_id bigint(20) NOT NULL auto_increment,

    forum_id int(10) NOT NULL default 1,

    topic_id bigint(20) NOT NULL default 1,

    poster_id int(10) NOT NULL default 0,

    post_text text NOT NULL,

    post_time datetime NOT NULL default ‘0000-00-00 00:00:00’,

    poster_ip varchar(15) NOT NULL default ”,

    post_status tinyint(1) NOT NULL default 0,

    post_position bigint(20) NOT NULL default 0,

    PRIMARY KEY (post_id),

    KEY topic_time (topic_id, post_time),

    KEY poster_time (poster_id, post_time),

    KEY post_time (post_time),

    FULLTEXT KEY post_text (post_text)

    ) TYPE = MYISAM DEFAULT CHARACTER SET ‘utf8’ COLLATE ‘uft8_general_ci’;

    >>>>>> Unknown collation: ‘uft8_general_ci’

    SQL ERROR!

    >>> Database: lilienbr_wpmu (localhost)

    >>>>>> CREATE TABLE IF NOT EXISTS bb_terms (

    term_id bigint(20) NOT NULL auto_increment,

    name varchar(55) NOT NULL default ”,

    slug varchar(200) NOT NULL default ”,

    term_group bigint(10) NOT NULL default 0,

    PRIMARY KEY (term_id),

    UNIQUE KEY slug (slug),

    KEY name (name)

    ) DEFAULT CHARACTER SET ‘utf8’ COLLATE ‘uft8_general_ci’;

    >>>>>> Unknown collation: ‘uft8_general_ci’

    SQL ERROR!

    >>> Database: lilienbr_wpmu (localhost)

    >>>>>> CREATE TABLE IF NOT EXISTS bb_term_relationships (

    object_id bigint(20) NOT NULL default 0,

    term_taxonomy_id bigint(20) NOT NULL default 0,

    user_id bigint(20) NOT NULL default 0,

    term_order int(11) NOT NULL default 0,

    PRIMARY KEY (object_id, term_taxonomy_id),

    KEY term_taxonomy_id (term_taxonomy_id)

    ) DEFAULT CHARACTER SET ‘utf8’ COLLATE ‘uft8_general_ci’;

    >>>>>> Unknown collation: ‘uft8_general_ci’

    SQL ERROR!

    >>> Database: lilienbr_wpmu (localhost)

    >>>>>> CREATE TABLE IF NOT EXISTS bb_term_taxonomy (

    term_taxonomy_id bigint(20) NOT NULL auto_increment,

    term_id bigint(20) NOT NULL default 0,

    taxonomy varchar(32) NOT NULL default ”,

    description longtext NOT NULL,

    parent bigint(20) NOT NULL default 0,

    count bigint(20) NOT NULL default 0,

    PRIMARY KEY (term_taxonomy_id),

    UNIQUE KEY term_id_taxonomy (term_id, taxonomy),

    KEY taxonomy (taxonomy)

    ) DEFAULT CHARACTER SET ‘utf8’ COLLATE ‘uft8_general_ci’;

    >>>>>> Unknown collation: ‘uft8_general_ci’

    SQL ERROR!

    >>> Database: lilienbr_wpmu (localhost)

    >>>>>> CREATE TABLE IF NOT EXISTS bb_topics (

    topic_id bigint(20) NOT NULL auto_increment,

    topic_title varchar(100) NOT NULL default ”,

    topic_slug varchar(255) NOT NULL default ”,

    topic_poster bigint(20) NOT NULL default 0,

    topic_poster_name varchar(40) NOT NULL default ‘Anonymous’,

    topic_last_poster bigint(20) NOT NULL default 0,

    topic_last_poster_name varchar(40) NOT NULL default ”,

    topic_start_time datetime NOT NULL default ‘0000-00-00 00:00:00’,

    topic_time datetime NOT NULL default ‘0000-00-00 00:00:00’,

    forum_id int(10) NOT NULL default 1,

    topic_status tinyint(1) NOT NULL default 0,

    topic_open tinyint(1) NOT NULL default 1,

    topic_last_post_id bigint(20) NOT NULL default 1,

    topic_sticky tinyint(1) NOT NULL default 0,

    topic_posts bigint(20) NOT NULL default 0,

    tag_count bigint(20) NOT NULL default 0,

    PRIMARY KEY (topic_id),

    KEY topic_slug (topic_slug),

    KEY forum_time (forum_id, topic_time),

    KEY user_start_time (topic_poster, topic_start_time),

    KEY stickies (topic_status, topic_sticky, topic_time)

    ) DEFAULT CHARACTER SET ‘utf8’ COLLATE ‘uft8_general_ci’;

    >>>>>> Unknown collation: ‘uft8_general_ci’

    Database installation failed!!!

    Is bbpress compatible with wordpress or am I wasting my time?

    #14856
    onlined
    Member

    I worked through the screencast to integrate bbPress with wordpress and all seems to be working well.

    The thing is I can not figure out how to get bbPress to work within my theme, I want the wordpress theme to be a kind of ‘wrapper’ for the forum, putting just a link in the header to the forum, then for bbPress to come up on the page.

    Is there a simple code tag I can put on a page to make this happen or else how do I do it?

    #73930

    In reply to: Beginner

    lisanewton
    Member

    Thank you, Gentlemen. I was able to get the site up, but I’m not happy with the url. I still have lots of work to do…………………..:)

    jpmendoza
    Member

    I’ve tried this as well: if( !wp_validate_auth_cookie() )

    but haven’t had any luck.

    jpmendoza
    Member

    Hi guys,

    This is my first post here, but I’ve been building an wp/bb integrated site for a few weeks now, and I’ve come to the point where I think it’s time to write my first plugin. I want this plugin to redirect users to my WordPress login page if they are not logged in. It is important that the forums remain private and also that there is only one point of entry to the site for users, so as to avoid any confusion.

    I have _ck_’s Hidden Forums plugin set up to control access to forums, and that’s working fine, but I need some advice on how to handle an issue or two in the code I’ve written so far. Now, I don’t do a ton of programming, and this is my first attempt at anything like this, so bear with me if I’ve committed any cardinal sins.

    <?
    add_action('bb_init','login_redirect_init',300);
    function login_redirect_init()
    {
    global $bb_current_user;
    $id = (!empty($bb_current_user)) ? intval($bb_current_user->ID) : 0;
    if( $id < 1 )
    {
    $redirection = 'http://'.$_SERVER['SERVER_NAME'].'/caa/wp-login.php?redirect_to='.$_SERVER['REQUEST_URI'];
    if (function_exists('status_header'))
    status_header( 302 );
    header("HTTP/1.1 302 Temporary Redirect");
    header("Location:".$redirection);
    exit();
    }
    }
    ?>

    As it is now, accessing bbPress redirects to wp-login with the proper redirection URL (I’m using the WP Members Only plugin), but then logging in from there kicks me back to the wp-login page again. I’m thinking that perhaps bb_init is not the hook for me, as it appears that the login process is not getting a chance to do its thing, and thus I’m getting booted out. As a test, I tried bb_head, but of course the headers have been sent by then, and the redirect does not work.

    So, if this is in fact the issue, what hook should be using? Or am I going about this all wrong? I’d really appreciate any and all input into this. Thanks, guys.

    #73788

    @grmedsite

    Happy to help. Also change the topic status to “resolved” once the problem is solved. Thanks :)

    #73887
    timskii
    Member

    The most basic solution looks something like this:

    function wow_item( $text ) {
    $text = preg_replace('|(<item>)(.*?)(</item>)|', '<a href="http://www.wowhead.com/?search=s2">s2</a>', $text);
    return $text;
    }
    function wow_item_allowed_tags( $tags ) {
    $tags['item'] = array();
    return $tags;
    }
    add_filter( 'bb_allowed_tags', 'wow_item_allowed_tags' );
    add_filter( 'pre_post', 'wow_item' );

    (replace the s2 with $2)

    That would create <item> sudo-tags that link the name of the item to a Wowhead search. But that isn’t what you want: It just send a search query to Wowhead, without creating a tooltip.

    Instead, such a plugin needs to go and ask Wowhead’s OpenSearch/RSS for a result, then come back and write out a complete item URL. Fortunately that query only needs to be done once, when the topic is first posted, not every time the post is displayed. Posting would get delayed, put probably only by a second, and only where the item tag was used. So there’s no need to cache the result. And 90% of the same code would work for anything with a OpenSearch output (most major sites).

    This is something I’d like to have, and it’s been on my “to do” list for about a year… So, erm, soon! Maybe.

    #73818

    I use Bad-Behavior and I feel it’s worthwhile. Mind, I routed all registration through my WP side, where I have BB and hooked up StopForumSpam.com.

    Check https://bbpress.org/forums/topic/using-badbehavior-and-bbpress for info on BB and bb ;)

    #73895

    You mean to pull from you bbPress database to populate the members of your mailman list?

    In theory, anything that worked for WordPress to do that could be tweaked for bbPress. Just be careful that the default is to leave people NOT getting emails, so they can opt-in if they want. Otherwise you’re practically spamming :)

    #14846
    sumatra
    Member

    Hi,

    Does anyone know a good tutorial / documentation on how to use user’s meta data in bbpress? I assume, they are meant for storing user custom data.

    If there are no good tutorials on subject, can somebody point me to a good and simple plugin, which uses meta data for storing custom data? I could read the code and learn it by myself.

    Thanks!

    #73812

    I fixed it with the popular WP DB-Manager plugin. I just used the options “Repair DB” and then “Optimize DB”.

    Here are the plugins I use which IMO might have smth to do with posting:

    Post Edit Look Behind

    Live Comment Preview

    bbPress signatures

    Ajaxed Quote

    HTML Tag Attributes Validator

    Related Topics

    BBcode Buttons Toolbar

    Post Count Plus

    bbpress SEO tools

    bbPress Polls

    Post Notification

    bb Topic Views

    BBcode Lite

    BBVideo

    Forum Last Poster

    bbPress Smilies

    Things have been going fine for the last day so I hope it does not happen again :) And I’ve increased the backup frequency in case of an emergency.

    #73863
    thekmen
    Member

    Thanks for the help, hardcoding will work on the forum front page but when on a tag page or a forum page we would loose the redirection to the correct forum or tag after logging in.

    The problem seems to be with the :// part of the url, removing this, the page is found. Replacing it with %3A%2F%2F d does not work either.

    Any other ideas?

    #73886
    dawormie
    Member

    I have got it working by editing the header file, but would like a plugin version that also has an added bbcode for the item bbtag.

    #14844
    dawormie
    Member

    Just wondering if someone can build a plugin to support wow itemlinks on bbPress.

    See wowhead for what’s needed.

    http://www.wowhead.com/?powered

    Part of it would require the addition of a bbCode [item] [/item] for this purpose as well.

    #73881

    In reply to: bbPress Polls

    kingscast
    Member

    I suppose a link might have helped :-)

    The top post shows the box http://kingscast.net/forums/

Viewing 25 results - 25,026 through 25,050 (of 32,468 total)
Skip to toolbar