Forum Replies Created
-
In reply to: add a "Featured Image" to a forum
sxalexander,
Can you explain further how to implement this in the functions.php – please.
In reply to: Can anyone tell me how to correct this?Spence – I just abandoned the previous theme (after it costing me $35 I am now on a theme that supports the styling to my liking
Again, thank you for all your help!
Shep
In reply to: Can anyone tell me how to correct this?Just sent again..
In reply to: Can anyone tell me how to correct this?Done..
In reply to: Can anyone tell me how to correct this?The other was the functions.php that I had copied over to my child theme FROM bbPress plugin. This one is the one from the Myriad “mother” theme.
Again – thank you very much.
In reply to: Can anyone tell me how to correct this?You bet – here they are:
header.php – http://pastebin.com/d7s4Qnjb
funtions.php – http://pastebin.com/8Uw8KuYG
(see above for clarity.)
And “Thanks” John for being nice about it. (I have never used pastbin before).
In reply to: Can anyone tell me how to correct this?functions.php are also standard twentyten:
<?php
/**
* 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;
?>
In reply to: Can anyone tell me how to correct this?Spence – I really do appreciate you trying to help me on this.
I am using a child theme >themes>>myriad-custom with myriad being in the same directory. There is no header.php in the child theme but this is the content of the header.php of “mother” theme myriad:
<?php
/**
* Header Template
*
* @package Mysitemyway
* @subpackage Template
*/
?><!DOCTYPE html>
<!–[if lt IE 7]> <html class=”ie ie6 lte9 lte8 lte7″ <?php language_attributes(); ?>> <![endif]–>
<!–[if IE 7]> <html class=”ie ie7 lte9 lte8 lte7″ <?php language_attributes(); ?>> <![endif]–>
<!–[if IE 8]> <html class=”ie ie8 lte9 lte8″ <?php language_attributes(); ?>> <![endif]–>
<!–[if IE 9]> <html class=”ie ie9 lte9″ <?php language_attributes(); ?>> <![endif]–>
<!–[if gt IE 9]> <html> <![endif]–>
<!–[if !IE]><!–> <html <?php language_attributes(); ?>> <!–<![endif]–>
<head>
<meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
<title><?php mysite_document_title(); ?></title>
<link rel=”profile” href=”http://gmpg.org/xfn/11″ />
<link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />
<?php mysite_head(); ?>
<?php wp_head(); ?>
</head>
<body class=”<?php mysite_body_class(); ?>”>
<div class=”multibg”><div class=”multibg”></div></div>
<div id=”body_inner”>
<?php mysite_before_header();
?><div id=”header”>
<div id=”header_inner”>
<?php mysite_header();
?></div><!– #header_inner –>
</div><!– #header –>
<?php mysite_after_header();
?><div id=”content”>
<div id=”content_inner”>
<?php mysite_before_main();
?><div id=”main”>
<div id=”main_inner”>
<?php mysite_before_page_content(); ?>
As far as the setup pf bbPress – it is standard – all of the >plugins>bbPress>bbp-themes>bbp-twentyten “contents” copied over to the child theme of myriad-custom.
I hope that helps you enough to help me
Grateful!
Shep
In reply to: Can anyone tell me how to correct this?Sorry – you can access them now. And thank you.
In reply to: Can anyone tell me how to correct this?I fixed the other one (work-around) – here is what I am talking about: http://stratoliner.me/topic/adding-or-changing-your-avatar/
In reply to: Text input not visible in bbPress 2.1 RC2I had the same issue – just with another plugin. Glad you got it working.
In reply to: SideBar is not on the sideI have this same problem with a few pages. Can you please explain what you mean by float:right?
I know what it means – but where does it go and what is the syntax?
In reply to: No post content! Help.[RESOLVED] – It was the plugin bbPress Shortcode Whiteist that was causing the problem. Deactivated and I am good to go.
In reply to: Posts showing no content[SOLVED] for me at least.
It was the plugin bbPress Shortcode Whitelist that was causing the issues! Deactivated and I am good to go!
Shep
In reply to: Posts showing no contentJust to add to this post – it doesn’t matter what theme I use – I have no posts/replies being listed – even if I use the stock bbPress TwentyTen.
I really need help getting this back online.
In reply to: Posts showing no contentI just updated the the current WordPress and current bbPress and have the same thing. Did you find any solutions?
Thanks man – I just found that like after a day of working on this thing. LOL
I really do appreciate your help and reply!
In reply to: Stickies and closed don't get an unique class?Guys, I am not seeing anything that says “sticky” – when I sticky a post. I am also not getting any color-change – or anything else to indicate that it is a sticky. I am guessing that it has something to do with the <?php bbp_topic_class(); ?> mentioned by Jaja – but I have no clue where to start.
Can you point me in the right direction?
In reply to: wp-admin/ no access to ForumHow do I change those links in Admin? That is what I need help with. The links you gave both work from the Admin page.
Where does it get put. I would like to offer that RSS feed to my users also.
In reply to: ERROR: Your reply cannot be empty.Wout_m – you are a lifesaver! That stopped the error for me also.
Again, thank you for taking the time to reply and help me out.
Shep
In reply to: ERROR: Your reply cannot be empty.The problem seems to be here in /wp-content/plugins/bbpress/bbp-includes – however I do not know how to solve it:
/** Reply Content *********************************************************/
if ( !empty( $_POST ) )
$reply_content = $_POST;
// Filter and sanitize
$reply_content = apply_filters( ‘bbp_new_reply_pre_content’, $reply_content );
// No reply content
if ( empty( $reply_content ) )
bbp_add_error( ‘bbp_reply_content’, __( ‘ERROR: Your reply cannot be empty.’, ‘bbpress’ ) );
Why is it NOT picking up the content of the edited post?
In reply to: Need help with 1.01 "integrated" to the new plugin:FOLLOW UP:
This may help someone. I had not deactivated all the plugins from both bbPress installations. When I did, it imported, with a few errors as it did create by users and users meta tables. Fortunately I had done my own backup of the database. So, I pulled those two sections of the backup and imported them back into the database. Users, meta, and login are now working.
I still have a problem with the admin side of things though. When I select “Forums” – it gives me this incorrect link http://stratoliner.me/wp-admin/admin.php?page=edit.php?post_type=forum when it should be http://stratoliner.me/wp-admin/edit.php?post_type=forum. The first errors with insufficient permissions and the latter goes to the forums.
I have disabled any and all plugins to test and I still get the first error!
I sure could use some help.
In reply to: bbPM blank pageI am installed – can send and receive PM’s but the messages are blank – no text.
I have gone into the database and the PM’s are in the database.
Everything is up to date (theme, bbPress, and plugin.) Theme is MT-Dark
Any help is appreciated
Shep
In reply to: Quoting commentIs there any way to get this plugin to quote the text in a different font or say a table with a different color background – or at the very least ?
Thanks,