Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 19,001 through 19,025 (of 32,499 total)
  • Author
    Search Results
  • #94995
    ch8rt
    Member

    Any ideas on pulling users favourite/created/subscribed topics somewhere other than the users page?

    This is the code for created from the users page which shows 0 results elsewhere, presumably because it doesn’t know what user I want.

    <?php bbp_set_query_name( 'bbp_user_profile_topics_created' ); ?>

    <?php if ( bbp_get_user_topics_started() ) :

    get_template_part( 'loop', 'bbp_topics' );

    else : ?>

    <p><?php bbp_is_user_home() ? _e( 'You have not created any topics.', 'bbpress' ) : _e( 'This user has not created any topics.', 'bbpress' ); ?></p>

    <?php endif; ?>

    <?php bbp_reset_query_name(); ?>

    I’ve had success going the custom post types route with…

    <?php query_posts( 'post_type=bbp_topic&posts_per_page=5&author_name=' . $username ); ?>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    " title="<?php the_title(); ?>"><?php the_title(); ?>

    <?php endif; ?>

    Which works, if all I want is the title, but not the correct way I’m guessing :)

    #99496
    Ben L.
    Member

    https://bbpress.org/plugins/topic/nospamuser/ :)

    bbPress doesn’t store IP addresses of users when they register. The Project Honey Pot plugin will block the spammers from every page on your forum, including the login page, so there’s no reason to worry.

    #104596
    Ben L.
    Member

    https://bbpress.org/plugins/topic/nospamuser/ :)

    bbPress doesn’t store IP addresses of users when they register. The Project Honey Pot plugin will block the spammers from every page on your forum, including the login page, so there’s no reason to worry.

    #37575

    Topic: emoticons question

    in forum Plugins
    Yukon Cornelius
    Participant

    Hi,

    Apologies, because i know there are lots of posts out there on the subject, but I am kind of new to bbpress, and I’m a little confused.

    My client wants emoticons installed on his bbpress installation (1.02), but the only plugins I can find seem to work only up to around bbpress 0.9.

    Even the forum topics discussing the need for emoticons and smilies seem to tail off around 2009. Weird.

    Did emoticons get integrated into bbpress core around that time? If so, I can’t seem to find any options for it.

    Did emoticons become so uncool people stopped using them?

    Or is there a way to implement them into bbpress 1.02???

    If anyone can point me in the right direction, I’d be really grateful ;-) [insert giant cheesy winking emoticon here]

    Jimmmy

    #37574
    [removed]
    Participant

    Hey all,

    I’m trying to intercept certain (pre-defined bbPress) queries and filter a few results out. I figured I’ll need to register an action on ‘bb_query’, but I can’t seem to modify the actual query.

    Say I want to filter all topics by myself from the recent posts view, I registered the following:

    add_action('bb_query', 'filter_query');

    And then the code:

    function filter_query(&$obj) {

    if($obj->type == 'topic' && $obj->query_id == 'get_recent_posts') {

    //ADD "AND topic_author != 'Litso'" to the query here
    }
    }

    Can anyone point me in the right direction?

    #37573
    Sredna
    Member

    Hello

    I’m trying to fit my Superbold bbpres style to my modified Twenty10 WordPress style. Basically I would like to copy the navigation bar of the Twentyten to the bbpress forum. Any idea on how to do that?

    My wordpress http://krusty.dk/

    My forum http://krusty.dk/forum/

    Any help is greatly appreciated :D

    Sredna

    #99466
    Pomy
    Participant

    @zaerl

    I’m sorry but I can’t help you further, I’m pretty busy right now.

    Ahh Ok, But I’m not able to hire someone for “complete” help.

    Any way thanks for your help.

    @Ben L. – I tried

    if ( $forum->forum_slug == 'myforum' ) {
    bb_load_template( 'forum-myforum.php' );
    return;
    }

    It works, can I use this method removing $forum = bb_get_forum(); ??

    Is it secure?

    #104566
    Pomy
    Participant

    @zaerl

    I’m sorry but I can’t help you further, I’m pretty busy right now.

    Ahh Ok, But I’m not able to hire someone for “complete” help.

    Any way thanks for your help.

    @Ben L. – I tried

    if ( $forum->forum_slug == 'myforum' ) {
    bb_load_template( 'forum-myforum.php' );
    return;
    }

    It works, can I use this method removing $forum = bb_get_forum(); ??

    Is it secure?

    #97894
    Ben L.
    Member

    https://trac.bbpress.org/browser/trunk/bb-load.php#L25 – here’s an even better solution.

    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); allows us to avoid new error messages if PHP adds new error types in the future.

    #102994
    Ben L.
    Member

    https://trac.bbpress.org/browser/trunk/bb-load.php#L25 – here’s an even better solution.

    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); allows us to avoid new error messages if PHP adds new error types in the future.

    #94993
    mark_corbin
    Member

    Thanks JJJ!

    One more thing’s been bugging me: I want anyone to be able to register on the forum, but no ‘register’ link appears on the bbpress log-in widget, or for example after links that say ‘sorry, need to be signed in to post comments’ .

    There seems to be a template file for a bbp registration form, and I’ve tried guessing but I can’t work out the link to it!

    So

    1. Is this by design, have I got an option wrongly ticked somewhere?

    2. Could you let me know the link to a registration form if there is one – otherwise I could use the standard wp registration link

    3. Is it worth me searching through the code trying to add in a few links in the right places, is there one quick-win place to this? I guess priority for me is to get the link in the sign-in widget.

    I’m tempted to try to create or use a lightbox registration/log-in process anyway, but I need a much shorter term solution (small numbers of people might register from Friday)

    Thanks for your help folks, love this software

    Mark

    #37570

    Hi,

    I’m using bbPress for a website I’m building and I’m experiencing a kind of weird thing. I’m using the following code to get the last topic title on the forum page:

    topic_title(forum_last_topic_id());

    It works well except for the first Subforum..

    Here’s a link:

    http://venvnvs.nl/bbpress/

    #97893
    sontru
    Participant

    Most of the deprecation is to do with =& assignments.

    According to this http://www.php.net/manual/en/language.references.php#93292

    All that need doing is to remove the &

    Is it safe to do so. Has anyone done this? Is there any recursive tree loops in the code?

    #102993
    sontru
    Participant

    Most of the deprecation is to do with =& assignments.

    According to this http://www.php.net/manual/en/language.references.php#93292

    All that need doing is to remove the &

    Is it safe to do so. Has anyone done this? Is there any recursive tree loops in the code?

    #94990
    Pr1me
    Member

    Could someone tell me what the code is to display the recent forum entries in the sidebar? (without using the widget system)

    #99189

    In reply to: WPMimic V.1

    llny
    Member

    :)

    #104289

    In reply to: WPMimic V.1

    llny
    Member

    :)

    #37566

    Topic: SQL error!

    in forum Installation
    jzp820927
    Member

    SQL error!

    >>> database:bbpress (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’;

    >>>>>> 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 ‘TYPE = MYISAM DEFAULT CHARACTER SET ‘utf8” at line 16

    #99465
    zaerl
    Participant

    What you’re asking for involve hooking the “bb_get_active_theme_directory” filter (or similar):

    function custom_dir($directory)
    {
    // do something
    // append the slug for example
    global $forum;
    $directory .= $forum->forum_slug . '/'
    }

    if(special case described in my last post) add_filter( 'bb_get_active_theme_directory', 'custom_dir');

    I’m sorry but I can’t help you further, I’m pretty busy right now.

    #104565
    zaerl
    Participant

    What you’re asking for involve hooking the “bb_get_active_theme_directory” filter (or similar):

    function custom_dir($directory)
    {
    // do something
    // append the slug for example
    global $forum;
    $directory .= $forum->forum_slug . '/'
    }

    if(special case described in my last post) add_filter( 'bb_get_active_theme_directory', 'custom_dir');

    I’m sorry but I can’t help you further, I’m pretty busy right now.

    #99464
    Pomy
    Participant

    Hi Zaerl, Thanks for your interest in this topic :)

    I also tried your method, but I’m sorry its little bit different.

    its shows content from “whatever-you-want.php” when slug is “this” but the forum structure remain same.

    something like

    **************Forum Template**************

    — Default Header

    — Default latest discussion

    — Default forums

    — Default Footer

    — Custom content from whatever-you-want.php

    ********************************************

    But I’m searching, that when forum slug is “this” then i can handle every thing from scratch from “whatever-you-want.php”

    like

    *************Forum Template***************

    — My Custom Header for forum slug “this”

    — My Custom latest discussion

    — My Custom forums categories

    — My Custom style for footer

    *******************************************

    Keep in mind that this is a rude approach and that everything can be packed in a plugin.

    I’m afraid what you are talking about. Is this not a secure method?

    Can you please pack this code into a plugin, I’ll really appreciate your kindness. Thanks

    #104564
    Pomy
    Participant

    Hi Zaerl, Thanks for your interest in this topic :)

    I also tried your method, but I’m sorry its little bit different.

    its shows content from “whatever-you-want.php” when slug is “this” but the forum structure remain same.

    something like

    **************Forum Template**************

    — Default Header

    — Default latest discussion

    — Default forums

    — Default Footer

    — Custom content from whatever-you-want.php

    ********************************************

    But I’m searching, that when forum slug is “this” then i can handle every thing from scratch from “whatever-you-want.php”

    like

    *************Forum Template***************

    — My Custom Header for forum slug “this”

    — My Custom latest discussion

    — My Custom forums categories

    — My Custom style for footer

    *******************************************

    Keep in mind that this is a rude approach and that everything can be packed in a plugin.

    I’m afraid what you are talking about. Is this not a secure method?

    Can you please pack this code into a plugin, I’ll really appreciate your kindness. Thanks

    #94988

    Try bbp_is_forum() :)

    Otherwise, because of other plugins like BuddyPress it’s hard to know exactly if we’re in *any* bbPress page without running through all the _is_ functions first. I have it set ‘bbPress’ as the body class if a bbPress page is detected, but that happens pretty late in the game. Would be better off checking for a specific _is_ and going from there.

    #99463
    zaerl
    Participant

    No no no.

    /forum.php, near the end:

    $template = 'forum.php';
    if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
    else if($forum->forum_slug == 'that') $template = 'something-else.php';

    bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );

    /topic.php, near the end:

    $template = 'topic.php';
    $forum = bb_get_forum($topic->forum_id);
    if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
    else if($forum->forum_slug == 'that') $template = 'something-else.php';

    bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );

    Keep in mind that this is a rude approach and that everything can be packed in a plugin.

    #104563
    zaerl
    Participant

    No no no.

    /forum.php, near the end:

    $template = 'forum.php';
    if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
    else if($forum->forum_slug == 'that') $template = 'something-else.php';

    bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );

    /topic.php, near the end:

    $template = 'topic.php';
    $forum = bb_get_forum($topic->forum_id);
    if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
    else if($forum->forum_slug == 'that') $template = 'something-else.php';

    bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );

    Keep in mind that this is a rude approach and that everything can be packed in a plugin.

Viewing 25 results - 19,001 through 19,025 (of 32,499 total)
Skip to toolbar