Search Results for 'forum css/'
-
Search Results
-
Hi,
i’ve just installed buddypress 1.7 and bbpress 2.2.4.
I created a custom theme for bbpress doing the following steps:
1. create a folder bbpress inside wp-content/themes/mytheme/
2. moved all the php files that were inside plugins/bbpress/templates/default
3. moved the css file inside wp-content/themes/mytheme/css/after that
I turned on the functionality to include the bbpress forum inside buddypress groups but I found and issue with the topic subscription and add to favorites.
Because when i click on that link in the single topic view it open a blank page.
I checked the bbp-function.php files stored in plugins/bbpress/templates/default and I found that it enqueue all the ajax function for the topic subscribe option and add to favorite options.But when I go the forum page inside BuddyPress Group and open the source code I don’t see any enqueue ajax files or functions.
So what should I do to let it works?
thanks
Hi all,
Running WordPress version 3.5.1 and bbPress version 2.2.4 My them is Everest by Elegant Themes.
All works well with the whole site, and wanted to add Forum functionality with bbPress. The CSS doesn’t appear to be showing at all for the forum. It really is horribly dull and small fonts.Although this is on a staging / testing server, you will see what I mean:
http://letstrav.cpanel1prelive.ireckonhosting.com/interaction/forum/
Can someone help please? I have copied the original bbPress css file into the /themes/everest/css/ folder but still get the same issue.
Thnks in advance.
ChrisI’m wanting to edit the css of bbPress to tweak the appearance of my forums, specifically the font size. I’m running WordPress 3.5.1, bbPress 2.2.4, and using a twentytwelve-child theme. My forums are at
I found the “bbPress Custom CSS File” plug-in but according to the description I do not need it.
** This plugin is for bbPress 2.1.x. If you are using bbPress 2.0.x please upgrade. If you are using bbPress 2.2, read below.**
bbPress 2.2+: As of bbPress 2.2 this plugin is NOT needed. bbPress will auto-detect the CSS file if it exists in the right location.
Copy the CSS file from wp-content/plugins/bbpress/bbp-themes/bbp-default/css/bbpress.css to wp-content/themes/[yourtheme]/bbpress.css.
Following the instructions above I have copied the bbpress.css file from the bbpress plugin’s css folder to “wp-content/themes/twentytwelve-child/bbpress.css”. When I go into the WordPress dashboard under appearance-edit the bbpress.css is available for editing.
So assuming I have the bbpress.css file in the right place (if I don’t please instruct me where I need to put it for editing), which line of code in the bbpress.css file do I need to edit to change the font size on my forums.
Any assistance in this matter will be greatly appreciated. Thanks.
Today when i tested my websites for flaws i saw that the visual editor box text color had changed into white instead of black. This made the text invisible unless you highlighted the written text.
When i did some research on how to change it i saw that this problem goes back years.
Most forum threads didn’t even got solved.I have found a simple solution for this problem.
When i checked my source code i saw that the visual editor .css was located in public-html/wp-includes/css/editor.min.cssCall it a lucky guess but when i searched for ‘white’ it got me to this part of the code:
wp-editor-area{color:black}I changed it into wp-editor-area{color:white} and this solved my problem.
I hope this helps allot of frustrated people!.
Topic: bbpress search widget
WP 3.4.2
BBPress Plugin – 2.2.21) Installed BBPress plugin. Did basic setting in admin for the plugin.
2) Copied archive-forum.php and single-forum.php from bbpress plugin directory to mytheme root directory.
3) Copied “css/bbpress.css” to mytheme root directory and then customized.
4) Installed “bbPress Search Widget” plugin. Put it in Primary Area.
5) That’s it. I have not created any new template/page for the forum.All look fine and working but I have this problem.
If you go to this page http://www.clouni.com/askquestions/
You will notice the search widget in lower right side. How can I put it above the forum breadcrumb “CLOUNI › Forums” ?WP 3.4.2
BBPress Plugin – 2.2.21) Installed BBPress plugin. Did basic setting in admin for the plugin.
2) Copied archive-forum.php and single-forum.php from bbpress plugin directory to mytheme root directory.
3) Copied “css/bbpress.css” to mytheme root directory and then customized.
4) That’s it. I have not created any new template/page for the forum.All look fine and working but I have this problem.
If you go to this link http://www.clouni.com/askquestions/
You will notice the title “Forums” in left side. How can I hide it ? If I understand correctly, it is page title generated through wordpress. But how to hide it only for forum pages and not other page in wordpress ??
Topic: Custom CSS not working
Hey. Not sure if I’m missing something, but I’ve been looking around the forums following advice on using a custom bbPress CSS file, but it isn’t working.
I’m creating a theme based on underscores.me 1000 headstart theme.
I’ve copied the CSS file from ‘plugins/bbpress/templates/default/css/bbpress.css’ to ‘themes/underscores/bbpress.css’. I’ve read previously that that bbPress will then detect the custom CSS file and use it. Doesn’t appear to be the case.
Have I missed something?
I, like most people using BBpress, have had an issue removing the sidebar from my new BBpress forums. I tried editing template files, adding files into my theme’s root, commenting our sidebar commands and whatever else has been recommended on these forums. Not to say those don’t work – I just couldn’t figure them out which is most likely due to my complete lack of php knowledge. I’m posting this for those of you like me, who have no idea how to do those fancy things.
Here’s how I removed my sidebar:
First, I copied over the CSS folder from my BBpress plugin folder /bbp-theme-compat to my theme’s root folder. (From your server root it should be wp-content/plugins/bbpress/bbp-theme-compat/)
Then, I found the CSS class my theme was using to design the main content of my wordpress blog (should be a style.css file in your theme’s folder). Mine happened to be
#main_content
. Next, I found the the sidebar CSS in my theme’s style.css file which was simply#sidebar
.Note: I found the CSS class by right clicking the main content area of my website (where posts show) and selecting “Inspect Element”.
After finding those I created BBpress specific classes and pasted those into the bbpress.css file now located at {you_theme’s_root}/CSS/bbpress.css.
Here’s what I pasted in:
.bbPress #sidebar { width: 0px; display:none; } .bbPress #main-content { width: 940px; !important }
Most likely you won’t need the sidebar’s width attribute but I added it in just in case.
And finally, after hours of trying to figure this out I went to my BBress forums page to discover that the forums fit perfectly into my theme without any sign of a sidebar.
I hope this helps!
I have a WordPress site (3.4.2) which uses a premium theme that I want to keep. I just activated the BBPress plugin (ver 2.1.2) and created a forum and topic etc. The forum and topic pages appear and look ok, but I would like to customize the template and css that is being used in this. I am finding BBP documentation on this somewhat confusing.
My Plan: I will create my own BBP template based on page.php from my main theme and modify the layout etc.
To implement this new template I create, I am guessing that I can replace $new_template (shown below; code taken from bhp-template-loader.php (wp-content/plugins/bbpress/bbp-includes) with the name of my new template, such as “bbp-new-page.php”). Is this correct?
// bbPress template file exists if ( !empty( $new_template ) ) { // Override the WordPress template with a bbPress one $template = $new_template;
And to modify the css, I can simply hack “bbpress.css” (wp-content/plugins/bbpress/
bbp-theme-compat/css/bbpress.css)?This approach seems really hacky/inelegant however.
On a slightly separate note, it appears that implementing the steps for theme-compatibility (http://codex.bbpress.org/theme-compatibility) are necessary only if you are going to use a single (custom) theme (or child theme?) for both WP and BBP?
Finding it a little confusing to untangle the methods and their purposes in BBP theming.
Thanks to anyone who can help!
Judy Wilson
Nashville TNI 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;
?>