Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 16,526 through 16,550 (of 32,520 total)
  • Author
    Search Results
  • #43494
    The Newb
    Member

    Welp, I really liked the way this plug in looked but after 2 weeks (part time) of messing with this thing, I give up.

    And all I see on these boards is complaining and unanswered questions including mine.

    The nerve to call this simple lolol.. no offence but geeeez, c’mon ..if you dont want to give instructions on how to set this up then why bother?

    It’s anything but easy.

    I would love to hand you guys a milk crate with a ripped apart transmission and say …”no worries, its easy, just bolt it all together” and walk away.

    just because its easy for me!!

    This is not to say I dont appreciate the work that goes into this stuff..but surely you guys can get someone to write a manual, I cant find a single answer to anything..just a few stupid YT videos made from someone with a mouth full of marbles on a laptop in a cave! great!

    gonna go cry in my beer now, thanks :(

    #112502

    Unfortunately we don’t get paid to help out here, we are purely volunteers.

    There is one of two things going on here – A) a plugin/theme is conflicting with something or B) your install is doing something weird (eg are you on multisite).

    I would start from bottom and see if you can figure out what is throwing a wrench in everything.

    It literally could be about anything, which is hard for my to give you solid instructions on what to do next :(

    #112501
    areaphoto
    Member

    I know this isn’t your fault but this is frustrating. I’m trying the new theme and giving it another go. I have installed the plugin, created some forums and topics. As soon as I login it shoots me out to the site’s homepage. As soon as I navigate back to the forum it auto logs me out!?! At this point, I’m wondering if I should start the site from scratch and install 1 thing at a time to see what seems to be the problem. This is where code geniuses get paid for helping idiots like me! :D What do you think? I will put more time into the TwentyTen theme. I really like everything we have done already with the current theme which would suck if I lost it all.

    #112496

    By simply going that page, your permalinks are automatically flushed. So once you pull it up that’s all you needed to do :)

    #112506

    From bbp-common-template.php:

    * Display all of the allowed tags in HTML format with attributes.
    *
    * This is useful for displaying in the post area, which elements and
    * attributes are supported. As well as any plugins which want to display it.

    The filter you are hooking into doesn’t do anything but show the user what tags are available.

    Check out http://ottopress.com/2010/wp-quickie-kses/

    #43493
    Adam
    Participant

    I found that I had to add these to the kses.php file in wordpress include, which you should NEVER do in order for them to show up. can some one tell me why this code isnt working and adding these tags to the available tags usable for non admin based users?

    I have tried with the add_filter above and or bellow, like you see it now, the function.

    I have this in my themes function.php file. Not in the bbpress theme function file because I am using my current wordpress theme as the theme for the bbpress theme (if that makes sense)

    Thoughts?

    function extraTags($tags)
    {
    $tags['a'] = array(
    'href' => array(),
    'title' => array(),
    'class' => array()
    );

    $tags['div'] = array(
    'class' => array()
    );

    $tags['img'] = array(
    'src' => array(),
    'width' => array(),
    'height' => array(),
    'alt' => array(),
    'title' => array()
    );

    $tags['ol'] = array();
    $tags['ul'] = array();
    $tags['li'] = array();
    $tags['pre'] = array(
    'class' => array()
    );

    $tags['h1'] = array();
    $tags['h2'] = array();

    return $tags;
    }

    //Add a new filter.
    add_filter('bbp_allowed_tags', 'extraTags');

    Canned as spam, carry on :)

    #43491

    I’m fairly certain this is disabled because it’s a big security issue. You wouldn’t want users to have access to all your shortcodes.

    Similar thread https://bbpress.org/forums/topic/shortcodes-from-other-plugins

    This is mentioned in that thread and is probably what you will want https://wordpress.org/extend/plugins/bbpress2-shortcode-whitelist/

    #112492

    Reading through the code is actually a great way to learn.

    Having a giant list of functions doesn’t help explain what they do or where they are called.

    If you happen to be using bbP 2.1 beta then you can use this plugin and it will neatly show you all the hooks available.

    https://wordpress.org/extend/plugins/bbpress-visual-hooks/

    #112419

    Use a plugin like Members to lock the forum to members only. Works fine :D

    #112491
    cookiebear
    Member

    so frustrating working blind.

    am having to resort to hook sniffer plugin.

    please just put a link to functions somewhere on this site

    should not have to read thru all the code to use it.

    #112456
    Millen
    Participant

    I might have been a bit unclear with what my question’s was…

    Is there something wrong with the code I added to my functions.php file?

    Is this the reason why some of my css simply wont stick?

    Should the css be added/edited in my-theme/css/bbpress.css?

    Or should I copy all the css form my-theme/css/bbpress.css to my own themes style.css?

    I’m having a hard time finding any sort of documentation on how to do this. If anyone got some information or links on how I can continue from here I would be very glad.

    Thanks guys!

    #112437

    If you don’t have a forum yet, now isn’t the time to worry about if it will scale.

    Scaling is about spreading the pain around. As you outgrow one technology (or set of technologies) you upgrade to another as needed, not as predicted or as planned.

    This isn’t to say you shouldn’t have a plan, but it’s awful early to know if it’s worth the time spent worrying about.

    If you’re 100% certain that you’ll have +1million posts a year with billions of hits a month, then you wouldn’t be asking this question because you’d already know the answer: no, it won’t scale out of the box; you’ll need caching, memcached, and countless servers and data centers to manage it all.

    The short answer, don’t be afraid to start out small. When it’s time to grow, you can pretty easily export specific post types with WordPress’s export tool and shard it across multiple multi-site blogs if you wanted; shard the database(s) across multiple servers; whatever you need to do to get by.

    If your forums grow quickly and you find performance gains, it’d be great to have them contributed back to the project. It’s true that moving from bbPress standalone to plugin traded some performance for convenience, but it’s been the # 1 most requested feature since it’s introduction.

    Also, there’s nothing *wrong* with bbPress 1.1. If you’re more comfortable using something purpose built from the ground up as a simple forum, you can still use it. Just know that nothing but fairly significant code changes or bug fixes are actively going in.

    #112469

    You should be able to filter the login form using bbp_wp_login_action.

    Check out bbp-common-template.php starting at line 837. bbp_wp_login_action is what the login/registration forms use.

    #112466
    jamieskella
    Member

    Yeah, I am using the bbPress register shortcode on a page.

    #112476

    In reply to: Change forum color

    Unfortunatly I can’t give you a 100% complete answer, but what you are trying to do is definitely the right direction.

    Here is something to get you started:

    .forum a { color: white !important; }

    .bbp-forum-info { color: black !important; }

    .bbp-forum-topic-count { color: black !important; }

    .bbp-forum-reply-count { color: black !important; }

    .bbp-forum-freshness { color: black !important; }

    .bbp-forums,

    .bbp-topics {

    border: 1px solid rgba(125, 125, 125, .5);

    color: white !important;}

    .bbp-forums a { color: white !important; }

    table.bbp-forums th, table.bbp-topics th, table.bbp-topic th, table.bbp-replies th {

    background-color:black;

    color: white !important;

    }

    table.bbp-forums thead tr {

    border-top: 1px solid rgba(125, 125, 125, .5);

    }

    #content table tbody tr.odd td {

    background-color:#222;

    color: white !important;

    }

    #content table tbody tr.even td {

    color: white !important;

    background: #111;

    }

    #content table.bbp-forums tfoot td, #content table.bbp-topics tfoot td, #content table.bbp-topic tfoot td, #content table.bbp-replies tfoot td, #content table.bbp-replies tr.bbp-reply-header td, #content table.bbp-topic tr.bbp-topic-header td {

    background: black;

    color: #fff !important;

    }

    #112472

    Unfortunately there isn’t a shortcode for this at the moment.

    bbPress by default puts the “new topic” form at the bottom of your topics listings. You could probably create a new template that uses this code for its own dedicated page, but it would require likely creating a custom plugin and some php knowledge.

    #43469

    I would like to have a “Create new topic” link in my sidebar, that links to a page where the user can create a new topic. What is the URL of this page, if it even exists? I do not want to create a WP page with a shortcode, since I’m using a forum specific sidebar.

    Thanks!

    #112465

    Are you having them register via a registration form generated from the bbp-register shortcode?

    #43456
    Millen
    Participant

    I have run into some problems while theming bbp-twenty ten on my site. BBpress is installed, The forum fits within my custom theme after changing the template files. But some CSS does not seem to stick and my forum got issues with padding/margins and width or height at many places.

    Some guidance would be much appreciated!

    Here is my forum: http://www.fruitpickingjobs.com.au/forums

    I started with copying all files from bbp-twenty ten folder to my own wp theme folder. I have also changed all template files so the forum fits within my theme with sidebar.

    I have also added nesecery code to functions.php

    like instructed here: http://www.youtube.com/watch?v=lB2Oodx2GJw

    This is how my functions.php file looks like:

    // bbpress functions below this line

    add_theme_support( ‘bbpress’ );

    /**

    * Functions of bbPress’s Twenty Ten theme

    *

    * @package bbPress

    * @subpackage BBP_Twenty_Ten

    * @since Twenty Ten 1.1

    */

    // Exit if accessed directly

    if ( !defined( ‘ABSPATH’ ) ) exit;

    /** Theme Setup ***************************************************************/

    if ( !class_exists( ‘BBP_Twenty_Ten’ ) ) :

    /**

    * Loads bbPress Twenty Ten Theme functionality

    *

    * Usually functions.php contains a few functions wrapped in function_exisits()

    * checks. Since bbp-twenty-ten is intended to be used both as a child theme and

    * for Theme Compatibility, we’ve moved everything into one convenient class

    * that can be copied or extended.

    *

    * See @link BBP_Theme_Compat() for more.

    *

    * @since bbPress (r3277)

    *

    * @package bbPress

    * @subpackage BBP_Twenty_Ten

    */

    class BBP_Twenty_Ten extends BBP_Theme_Compat {

    /** Functions *************************************************************/

    /**

    * The main bbPress (Twenty Ten) Loader

    *

    * @since bbPress (r3277)

    *

    * @uses BBP_Twenty_Ten::setup_globals()

    * @uses BBP_Twenty_Ten::setup_actions()

    */

    public function __construct() {

    $this->setup_globals();

    $this->setup_actions();

    }

    /**

    * Component global variables

    *

    * @since bbPress (r2626)

    * @access private

    *

    * @uses plugin_dir_path() To generate bbPress plugin path

    * @uses plugin_dir_url() To generate bbPress plugin url

    * @uses apply_filters() Calls various filters

    */

    private function setup_globals() {

    global $bbp;

    // Theme name to help identify if it’s been extended

    $this->name = ‘bbPress (Twenty Ten)’;

    // Version of theme in YYYMMDD format

    $this->version = ‘20110921’;

    // Setup the theme path

    $this->dir = $bbp->themes_dir . ‘/bbp-twentyten’;

    // Setup the theme URL

    $this->url = $bbp->themes_url . ‘/bbp-twentyten’;

    }

    /**

    * Setup the theme hooks

    *

    * @since bbPress (r3277)

    * @access private

    *

    * @uses add_filter() To add various filters

    * @uses add_action() To add various actions

    */

    private function setup_actions() {

    // Add theme support for bbPress

    add_action( ‘after_setup_theme’, array( $this, ‘add_theme_support’ ) );

    // Enqueue theme CSS

    add_action( ‘bbp_enqueue_scripts’, array( $this, ‘enqueue_styles’ ) );

    // Enqueue theme JS

    add_action( ‘bbp_enqueue_scripts’, array( $this, ‘enqueue_scripts’ ) );

    // Enqueue theme script localization

    add_filter( ‘bbp_enqueue_scripts’, array( $this, ‘localize_topic_script’ ) );

    // Output some extra JS in the <head>

    add_action( ‘bbp_head’, array( $this, ‘head_scripts’ ) );

    // Handles the ajax favorite/unfavorite

    add_action( ‘wp_ajax_dim-favorite’, array( $this, ‘ajax_favorite’ ) );

    // Handles the ajax subscribe/unsubscribe

    add_action( ‘wp_ajax_dim-subscription’, array( $this, ‘ajax_subscription’ ) );

    }

    /**

    * Sets up theme support for bbPress

    *

    * Because this theme comes bundled with bbPress template files, we add it

    * to the list of things this theme supports. Note that the function

    * “add_theme_support()” does not /enable/ theme support, but is instead an

    * API for telling WordPress what it can already do on its own.

    *

    * If you’re looking to add bbPress support into your own custom theme, you’ll

    * want to make sure it includes all of the template files for bbPress, and then

    * use: add_theme_support( ‘bbpress’ ); in your functions.php.

    *

    * @since bbPress (r2652)

    */

    public function add_theme_support() {

    add_theme_support( ‘bbpress’ );

    }

    /**

    * Load the theme CSS

    *

    * @since bbPress (r2652)

    *

    * @uses wp_enqueue_style() To enqueue the styles

    */

    public function enqueue_styles() {

    // Right to left

    if ( is_rtl() ) {

    // TwentyTen

    wp_enqueue_style( ‘twentyten’, get_template_directory_uri() . ‘/style.css’, ”, $this->version, ‘screen’ );

    wp_enqueue_style( ‘twentyten-rtl’, get_template_directory_uri() . ‘/rtl.css’, ‘twentyten’, $this->version, ‘screen’ );

    // bbPress specific

    wp_enqueue_style( ‘bbp-twentyten-bbpress’, get_stylesheet_directory_uri() . ‘/css/bbpress-rtl.css’, ‘twentyten-rtl’, $this->version, ‘screen’ );

    // Left to right

    } else {

    // TwentyTen

    wp_enqueue_style( ‘twentyten’, get_template_directory_uri() . ‘/style.css’, ”, $this->version, ‘screen’ );

    // bbPress specific

    wp_enqueue_style( ‘bbp-twentyten-bbpress’, get_stylesheet_directory_uri() . ‘/css/bbpress.css’, ‘twentyten’, $this->version, ‘screen’ );

    }

    }

    /**

    * Enqueue the required Javascript files

    *

    * @since bbPress (r2652)

    *

    * @uses bbp_is_single_topic() To check if it’s the topic page

    * @uses get_stylesheet_directory_uri() To get the stylesheet directory uri

    * @uses bbp_is_single_user_edit() To check if it’s the profile edit page

    * @uses wp_enqueue_script() To enqueue the scripts

    */

    public function enqueue_scripts() {

    if ( bbp_is_single_topic() )

    wp_enqueue_script( ‘bbp_topic’, get_stylesheet_directory_uri() . ‘/js/topic.js’, array( ‘wp-lists’ ), $this->version );

    if ( bbp_is_single_user_edit() )

    wp_enqueue_script( ‘user-profile’ );

    }

    /**

    * Put some scripts in the header, like AJAX url for wp-lists

    *

    * @since bbPress (r2652)

    *

    * @uses bbp_is_single_topic() To check if it’s the topic page

    * @uses admin_url() To get the admin url

    * @uses bbp_is_single_user_edit() To check if it’s the profile edit page

    */

    public function head_scripts() {

    if ( bbp_is_single_topic() ) : ?>

    <script type=’text/javascript’>

    /* <![CDATA[ */

    var ajaxurl = ‘<?php echo admin_url( ‘admin-ajax.php’ ); ?>’;

    /* ]]> */

    </script>

    <?php elseif ( bbp_is_single_user_edit() ) : ?>

    <script type=”text/javascript” charset=”utf-8″>

    if ( window.location.hash == ‘#password’ ) {

    document.getElementById(‘pass1’).focus();

    }

    </script>

    <?php

    endif;

    }

    /**

    * Load localizations for topic script

    *

    * These localizations require information that may not be loaded even by init.

    *

    * @since bbPress (r2652)

    *

    * @uses bbp_is_single_topic() To check if it’s the topic page

    * @uses is_user_logged_in() To check if user is logged in

    * @uses bbp_get_current_user_id() To get the current user id

    * @uses bbp_get_topic_id() To get the topic id

    * @uses bbp_get_favorites_permalink() To get the favorites permalink

    * @uses bbp_is_user_favorite() To check if the topic is in user’s favorites

    * @uses bbp_is_subscriptions_active() To check if the subscriptions are active

    * @uses bbp_is_user_subscribed() To check if the user is subscribed to topic

    * @uses bbp_get_topic_permalink() To get the topic permalink

    * @uses wp_localize_script() To localize the script

    */

    public function localize_topic_script() {

    // Bail if not viewing a single topic

    if ( !bbp_is_single_topic() )

    return;

    // Bail if user is not logged in

    if ( !is_user_logged_in() )

    return;

    $user_id = bbp_get_current_user_id();

    $localizations = array(

    ‘currentUserId’ => $user_id,

    ‘topicId’ => bbp_get_topic_id(),

    );

    // Favorites

    if ( bbp_is_favorites_active() ) {

    $localizations = 1;

    $localizations = bbp_get_favorites_permalink( $user_id );

    $localizations = (int) bbp_is_user_favorite( $user_id );

    $localizations = __( ‘favorites’, ‘bbpress’ );

    $localizations = __( ‘?’, ‘bbpress’ );

    $localizations = __( ‘This topic is one of your %favLinkYes% [%favDel%]’, ‘bbpress’ );

    $localizations = __( ‘%favAdd% (%favLinkNo%)’, ‘bbpress’ );

    $localizations = __( ‘×’, ‘bbpress’ );

    $localizations = __( ‘Add this topic to your favorites’, ‘bbpress’ );

    } else {

    $localizations = 0;

    }

    // Subscriptions

    if ( bbp_is_subscriptions_active() ) {

    $localizations = 1;

    $localizations = (int) bbp_is_user_subscribed( $user_id );

    $localizations = __( ‘Subscribe’, ‘bbpress’ );

    $localizations = __( ‘Unsubscribe’, ‘bbpress’ );

    $localizations = bbp_get_topic_permalink();

    } else {

    $localizations = 0;

    }

    wp_localize_script( ‘bbp_topic’, ‘bbpTopicJS’, $localizations );

    }

    /**

    * Add or remove a topic from a user’s favorites

    *

    * @since bbPress (r2652)

    *

    * @uses bbp_get_current_user_id() To get the current user id

    * @uses current_user_can() To check if the current user can edit the user

    * @uses bbp_get_topic() To get the topic

    * @uses check_ajax_referer() To verify the nonce & check the referer

    * @uses bbp_is_user_favorite() To check if the topic is user’s favorite

    * @uses bbp_remove_user_favorite() To remove the topic from user’s favorites

    * @uses bbp_add_user_favorite() To add the topic from user’s favorites

    */

    public function ajax_favorite() {

    $user_id = bbp_get_current_user_id();

    $id = intval( $_POST );

    if ( !current_user_can( ‘edit_user’, $user_id ) )

    die( ‘-1’ );

    if ( !$topic = bbp_get_topic( $id ) )

    die( ‘0’ );

    check_ajax_referer( ‘toggle-favorite_’ . $topic->ID );

    if ( bbp_is_user_favorite( $user_id, $topic->ID ) ) {

    if ( bbp_remove_user_favorite( $user_id, $topic->ID ) ) {

    die( ‘1’ );

    }

    } else {

    if ( bbp_add_user_favorite( $user_id, $topic->ID ) ) {

    die( ‘1’ );

    }

    }

    die( ‘0’ );

    }

    /**

    * Subscribe/Unsubscribe a user from a topic

    *

    * @since bbPress (r2668)

    *

    * @uses bbp_is_subscriptions_active() To check if the subscriptions are active

    * @uses bbp_get_current_user_id() To get the current user id

    * @uses current_user_can() To check if the current user can edit the user

    * @uses bbp_get_topic() To get the topic

    * @uses check_ajax_referer() To verify the nonce & check the referer

    * @uses bbp_is_user_subscribed() To check if the topic is in user’s

    * subscriptions

    * @uses bbp_remove_user_subscriptions() To remove the topic from user’s

    * subscriptions

    * @uses bbp_add_user_subscriptions() To add the topic from user’s subscriptions

    */

    public function ajax_subscription() {

    if ( !bbp_is_subscriptions_active() )

    return;

    $user_id = bbp_get_current_user_id();

    $id = intval( $_POST );

    if ( !current_user_can( ‘edit_user’, $user_id ) )

    die( ‘-1’ );

    if ( !$topic = bbp_get_topic( $id ) )

    die( ‘0’ );

    check_ajax_referer( ‘toggle-subscription_’ . $topic->ID );

    if ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {

    if ( bbp_remove_user_subscription( $user_id, $topic->ID ) ) {

    die( ‘1’ );

    }

    } else {

    if ( bbp_add_user_subscription( $user_id, $topic->ID ) ) {

    die( ‘1’ );

    }

    }

    die( ‘0’ );

    }

    }

    /**

    * Instantiate a new BBP_Twenty_Ten class inside the $bbp global. It is

    * responsible for hooking itself into WordPress where apprpriate.

    */

    if ( ‘bbPress’ == get_class( $bbp ) ) {

    $bbp->theme_compat->theme = new BBP_Twenty_Ten();

    }

    endif;

    ?>

    chuckingit
    Participant

    Hi – i’m using bbPress 2.02 on a Multisite install but am a bit bummed to see that there is no easy way to include media in forum posts – e.g., audio, video, images …

    based on the Trac, it appears the next version will allow for oEmbed thus videos might be able to be included but my question is what about MP3 audio files ..??..

    i have tried several audio plugin players that work fine in my WP Posts but bomb when i try the same shortcode syntax in bbPress forums – e.g., [audio:http://www.my-domain.com/audio/some-file.mp3%5D

    [audio src="http://www.my-domain.com/audio/some-file.mp3"]

    in using other forum solutions, e.g., Simple:Press – they have option to allow or not allow WP shortcodes in their forum admin … thus my audio shortcode works as well as other private vs public content shortcodes with Simple:Press …

    accordingly, is there a way to enable WP shortcodes in bbPress ..??..

    thanks in advance for any pointers that can be shared … cordially, chuck scott

    #112387
    Rambomst
    Member

    I worked it out.

    add_action( 'user_profile_update_errors', 'validate_steamid_field' );

    function validate_steamid_field(&$errors, $update = null, &$user = null)
    {
    if (!preg_match("/^STEAM_[0-5]:[01]:d+$/", $_POST['_bbp_steamid']))
    {
    $errors->add('empty_steamid', "<strong>ERROR</strong>: Please Enter a valid SteamID");
    }
    }

    neosin
    Participant

    I’ve got bbpress as the forum for my wordpress installation on localhost.

    I’ve created a new page and inserted the bbcode to show the forum index in that page (page name is “forums”).

    In my navigation I have “Forums” and when i click it and it is the active page, it does not receive a “current_page_item” class from the navigation.

    How can I make it have the “current_page_item” class when it is selected?

    While I am using Buddypress, I do not have a page associated in buddypress with my bbpress forums because it causes the forums to not function when i do associate a page.

    In the default Buddypress template header this is the menu code:

    <div id=”navigation” role=”navigation”>

    <?php wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ‘bp_dtheme_main_nav’ ) ); ?>

    </div>

    #106183
    villagora
    Participant

    Hi everyone,

    I read the beginning of the topic cause I am very interested in building compatibility between my theme (a child theme of buddypress) and bbpress (indeed I installed the buddypress plugin and the bbpress one).

    I don’t know if this has already be given as a solution (or even if it actually one :). I copied the bbp-twentyten theme and personnalized it. Then I redefined it as the default bbpress theme, in order it is the one used instead of bbp-twentyten.

    What I wrote in the functions.php of my theme:

    if ( class_exists('bbPress') && file_exists(%FUNCTIONS_PHP_OF_MY_BBPRESS_THEME%) ) {
    require_once %FUNCTIONS_PHP_OF_MY_BBPRESS_THEME%;
    } else {
    add_action('admin_notices', 'message_if_my_bbpress_theme_is_absent');
    }

    In the functions file of my bbpress theme I have:

    $bbp->theme_compat->theme = new MY_BBP_THEME();

    And thus I have my child theme from buddypress safe and my second theme for bbpress used instead of bbp-twentyten.

    Hope this is a good solution and it can be helpful!

Viewing 25 results - 16,526 through 16,550 (of 32,520 total)
Skip to toolbar