Search Results for '+.+default+.+'
-
AuthorSearch Results
-
September 15, 2009 at 5:18 am #31739
Topic: Change my default url
in forum Troubleshootingppalayo
MemberI’m a newbie with bbpress.
I just installed a new forum in a new folder “forum” and I want to know how to make some changes.
I want to change my url from http://my.site.com/forum/forum/my-topic to http://my.site.com/forum/my-topic
The default word after http://my.site.com/forum/ is “forum” can I change this?
I can’t find an option in permalinks.
September 15, 2009 at 3:11 am #79099In reply to: Simple PHP Question
Mark
Memberhttps://codex.wordpress.org/I18n_for_WordPress_Developers
Same concept for bbPress. You could make all those plain text if you like, they’re built that way by default for people who need to translate their sites.
September 13, 2009 at 6:48 pm #79022In reply to: Grabbing the tag_id or topic_id with add_action
Adam Harley (Kawauso)
MemberThere might be a fatal database error, and database errors might hidden by default,
$bbdb->suppress_errors( false );will turn them on if they are. Obvious question is, does that work without any database interaction?September 13, 2009 at 6:06 am #31720Topic: Enhance your 404 page
in forum Showcasechandersbs
MemberThe default 404 page doesn’t have much of value to offer a visitor that stumbles your website via an organic search result. This is why I have enhanced mine 404 page a bit and I would like to share that with you guys.
Add 301 redirect for 404 pages
Pages that have been removed to a different URL, will show a 404 page. Add a 301 redirect to your 404 page that will redirect the user to its new address.
Suppose you had an address domain/old-url this got moved to domain/new-address, add the follow code to your 404.php (located in your bb-templates folder). Add this to the top of the page.
<?php
$redirect_301 = array(
'/old-url/' => '/new-url',
'/another-old-url' => '/another-new-url'
);
$request = $_SERVER;
if (array_key_exists($_SERVER, $redirect_301)) {
header(“HTTP/1.1 301 Moved Permanently”);
header(‘Location: http://www.yourdomain.com’ . $redirect_301[$request] );
die();
}
?>
Also you can change the default text:
<p><?php _e('I'm sorry, but there is nothing at this URL.'); ?></p>
Into something more nice, like:
<p><?php _e('The page you are looking for can not be found or it has been removed. You can always just browse the website or even use the search form below to try another search.'); ?></p>
<?php search_form(); ?>
What do you guys think?
September 10, 2009 at 10:33 am #78915In reply to: removing raquo/or » from breadcrumb
Adam Harley (Kawauso)
MemberApart from the template files
forum.phpandtopic.phpthat use thebb_forum_bread_crumb()(which just builds the breadcrumb for forums / topics), the separator is also hardcoded into several (all?) other template files to give custom titles, which I’m afraid have to be changed by hand.The only central location would be the default of
bb_forum_bread_crumb(), which you shouldn’t change.September 9, 2009 at 9:21 pm #78892In reply to: User Roles, WP & BBpress
batrachoid
MemberThat last plugin hasn’t been updated since January and is only compatible up to wordpress 2.7. It only adds a default role to bbpress, but if you’ve matched your wordpress and bbpress roles, this isn’t necessary, if it ever was.
A plugin should not be necessary in order for someone to register on a wordpress blog or on bbpress. Under the Settings/General you have a place to set the default role for new members; Subscriber, Administrator, Editor, Author, or Contributor for wordpress and those roles can be matched up to bbpress roles under Settings/WordPress Integration.
aMember.com mentions wordpress integration but not bbpress on their site, so I think that might be the issue.
September 9, 2009 at 5:04 pm #76786In reply to: New to bbPress and looking for some plugins
NateTraveller
MemberOkay, so every plugin seems to work fine. Except for BBcode Buttons. I have installed BBcode Lite for bbPress, then uploaded BBcode Buttons and activated it.
The description of the plugin states: “Automatically adds an easy access button toolbar above the post textarea to allow quick tags in BBcode. “
Well, no such thing appears for me.
I run on the original, default theme so it should not be a problem.
September 9, 2009 at 5:03 pm #78890In reply to: User Roles, WP & BBpress
wpJunkie
MemberWould it be in this file maybe? bb-admin/options-wordpress.php
https://trac.bbpress.org/browser/trunk/bb-admin/options-wordpress.php
Basically I want to make the inactive user to be a member by default.
September 9, 2009 at 4:07 pm #78887In reply to: User Roles, WP & BBpress
wpJunkie
MemberSo I disabled aMember and activated the plugin https://wordpress.org/extend/plugins/add-bbpress-default-role/
Signed up for an account on http://example.com/wp-login.php?action=register
And the user got added to the BBpress user list but no role is set, its set to Inactive.
So its not aMember as far as I can tell. its something between WordPress and BBpress
September 9, 2009 at 3:16 pm #78885In reply to: User Roles, WP & BBpress
wpJunkie
MemberI am using aMember http://www.amember.com/ that is the membership script users get created in this program when signing up, aMember is set to use subscriber as the default role see > http://helpdock.net/screenshots/456d96758a11f190be049b744a1a1d2d.png
So when the user gets an account in BBpress its is to inactive > http://helpdock.net/screenshots/25466e9bed803fb529b152ff074986e2.png
September 9, 2009 at 2:44 pm #78882In reply to: User Roles, WP & BBpress
gerikg
Memberwould this work? https://wordpress.org/extend/plugins/add-bbpress-default-role/
September 9, 2009 at 1:23 am #78825In reply to: How to Get Rid of The Mysterious Brackets
Mark
MemberIn the meantime you can pass new configuration settings to
bb_topic_admin()to change the way this looks.Current configuration options default to:
array(
'id' => 0,
'before' => '[',
'after' => ']',
'delete_text' => false,
'undelete_text' => false,
'redirect' => true
);Change before to ” and after to ‘ – ‘ and instead of the brackets, you just have an extra dash floating around. Or you can edit
bb_get_topic_move_dropdown()and just remove$beforeand$afterfrom$r.
September 8, 2009 at 11:25 pm #78797In reply to: Errors After Pure Install
SharpMouth
MemberYes I meant bbPress 1.0.2 and not 1.0.3.
I downloaded a fresh bbPress and unzipped it into the directory. Installed anew, still nothing.
Regarding php.ini its…
; allow_call_time_pass_reference
; Default Value: On
; Development Value: Off
; Production Value: Off
September 8, 2009 at 8:52 pm #77949tecsbrain
MemberI had the same problem and indeed it was because that first forum wasn’t created, and indeed because my server runs php4 by default (but I can override to php5 via .htaccess). Of course, I didn’t see this thread until after the fact.
My question: what are the three (or more, or less) files I need to *remove* so I can start the setup over again under php5 and get things working? I assume bb-config.php is among them, but what are the others? What files make bbpress realize it is already installed? Should I just drop everything and start over?
September 8, 2009 at 7:35 pm #31675Topic: Kakumei theme is the way to go !!
in forum Requests & FeedbackFantastic Leman
MemberI don’t know how logical I am in my head (maybe too much alcohol just now !!), but if simplicity is beauty, and if less means more, for me, Kakumei is the best theme. No fancy cosmetics. Default theme is the way to go.
In short, I really love Kakumei theme. It’s so cool, and I mean it.
September 8, 2009 at 6:50 pm #78721In reply to: How to load the header of my theme?
pixelgirl
MemberProblem 1: Might be a problem with cookies. The members link on the navi appears as selected, although I’m not on the members page, but the forums, which is not selected at all. Here’s a part of my header.php of the bb theme template:
<?php if ( function_exists( 'bp_blogs_install' ) ) { ?>
<li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_BLOGS_SLUG ?>" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a></li>
<?php } ?>
<li<?php if ( bp_is_page( 'forums' ) ) {?> class="selected"<?php } ?>><a href="/bbpress/" title="Forums">Forums</a></li>'I used the default template and moved some code around.
Problem 2: I think a pic says more than a 1000 words here: http://yfrog.com/56screen1opj I want to get rid of those “[]” and I have no idea in which file to do that.
pxlgirl.
September 7, 2009 at 8:56 pm #78741In reply to: Private Messaging
Olaf Lederer
ParticipantHi,
personal messaging is not a default function in bbpress, bbpress is great because of other features
September 7, 2009 at 8:52 pm #67520In reply to: Plugin suggestions
Olaf Lederer
ParticipantI get it working!
I added those two replace function before the geshi object is created:
$code = str_replace("& lt;", "<", $code);
$code = str_replace("& gt;", ">", $code);and I use the default priority for the filters. Are the replacements a problem?
September 7, 2009 at 7:55 pm #67518In reply to: Plugin suggestions
Olaf Lederer
ParticipantI worked on the wp-syntax plugin but it doesn’t parse the code

do you have an idea what’s missing?
function allow_syntax_tag($tags) {
$tags['pre'] = array('lang' => array(), 'line' => array(), 'escaped' => array(), 'style' => array(), 'width' => array());
return $tags;
}
add_filter('bb_allowed_tags', 'allow_syntax_tag');
include_once("geshi/geshi.php");
if (!defined("BB_PLUGIN_URL")) define("BB_PLUGIN_URL", bb_get_uri() . "/my-plugins");
function wp_syntax_head()
{
$css_url = BB_PLUGIN_URL . "wp-syntax/wp-syntax.css";
echo "n".'<link rel="stylesheet" href="' . $css_url . '" type="text/css" media="screen" />'."n";
}
function wp_syntax_code_trim($code)
{
// special ltrim b/c leading whitespace matters on 1st line of content
$code = preg_replace("/^s*n/siU", "", $code);
$code = rtrim($code);
return $code;
}
function wp_syntax_substitute(&$match)
{
global $wp_syntax_token, $wp_syntax_matches;
$i = count($wp_syntax_matches);
$wp_syntax_matches[$i] = $match;
return "nn<p>" . $wp_syntax_token . sprintf("%03d", $i) . "</p>nn";
}
function wp_syntax_line_numbers($code, $start)
{
$line_count = count(explode("n", $code));
$output = "<pre>";
for ($i = 0; $i < $line_count; $i++)
{
$output .= ($start + $i) . "n";
}
$output .= "</pre>";
return $output;
}
function wp_syntax_highlight($match)
{
global $wp_syntax_matches;
$i = intval($match[1]);
$match = $wp_syntax_matches[$i];
$language = strtolower(trim($match[1]));
$line = trim($match[2]);
$escaped = trim($match[3]);
$code = wp_syntax_code_trim($match[4]);
if ($escaped == "true") $code = htmlspecialchars_decode($code);
//$code = clean_pre($code);// new
$geshi = new GeSHi($code, $language);
$geshi->enable_keyword_links(false);
do_action_ref_array('wp_syntax_init_geshi', array(&$geshi));
$output = "n<div class="wp_syntax">";
if ($line)
{
$output .= "<table><tr><td class="line_numbers">";
$output .= wp_syntax_line_numbers($code, $line);
$output .= "</td><td class="code">";
$output .= $geshi->parse_code();
$output .= "</td></tr></table>";
}
else
{
$output .= "<div class="code">";
$output .= $geshi->parse_code();
$output .= "</div>";
}
$output .= "</div>n";
return $output;
}
function wp_syntax_before_filter($content)
{
$content = preg_replace_callback(
"/s*<pre(?:lang=["']([w-]+)["']|line=["'](d*)["']|escaped=["'](true|false)?["']|s)+>(.*)</pre>s*/siU",
"wp_syntax_substitute",
$content
);
return $content;
}
function wp_syntax_after_filter($content)
{
global $wp_syntax_token;
$content = preg_replace_callback(
"/<p>s*".$wp_syntax_token."(d{3})s*</p>/si",
"wp_syntax_highlight",
$content
);
return $content;
}
$wp_syntax_token = md5(uniqid(rand()));
// Add styling
add_action('bb_head', 'wp_syntax_head');
// We want to run before other filters; hence, a priority of 0 was chosen.
// The lower the number, the higher the priority. 10 is the default and
// several formatting filters run at or around 6.
add_filter('post_text', 'wp_syntax_before_filter', 0);
// We want to run after other filters; hence, a priority of 99.
add_filter('post_text', 'wp_syntax_after_filter', 99);September 7, 2009 at 9:43 am #31661Topic: How to load the header of my theme?
in forum Themespixelgirl
MemberHi all,
I am running wpmu, buddypress along with bbpress. After deep intergration, Everything works well, except that the theme in my forum doesn’t look the way I want. I want it look like my own theme I use for buddypress, with the header, navi and footer. The Rest can still be adjusted with css, that’s not the big deal, I’d use the default bbpress theme as a base to do that.
I have tried ThemePresss, but it would mess up everything, not show the buddybar and the link to the forums. Is there any other way to make my forums look the way I want?
Thnx in advance,
pxlgirl.
September 5, 2009 at 12:53 am #77508In reply to: All RSS Feeds Broken?
Adam Harley (Kawauso)
MemberWith the final patch from track applied against 1.0.2 trunk you get:
bb-templates/kakumei/rss2.php
<?php
header( 'Content-Type: text/xml; charset=UTF-8' );
echo '<' . '?xml version="1.0" encoding="UTF-8"?' . '>' . "n";
bb_generator( 'comment' );
?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><?php echo $title; ?></title>
<link><?php echo $link; ?></link>
<description><?php echo $description; ?></description>
<language><?php esc_html( bb_option('language') ); ?></language>
<pubDate><?php echo gmdate('D, d M Y H:i:s +0000'); ?></pubDate>
<?php bb_generator( 'rss2' ); ?>
<textInput>
<title><![CDATA[<?php _e('Search'); ?>]]></title>
<description><![CDATA[<?php _e('Search all topics from these forums.'); ?>]]></description>
<name>q</name>
<link><?php bb_uri('search.php'); ?></link>
</textInput>
<atom:link href="<?php echo $link_self; ?>" rel="self" type="application/rss+xml" />
<?php foreach ($posts as $bb_post) : ?>
<item>
<title><?php post_author(); ?> <?php _e('on')?> "<?php topic_title( $bb_post->topic_id ); ?>"</title>
<link><?php post_link(); ?></link>
<pubDate><?php bb_post_time('D, d M Y H:i:s +0000', array( 'localize' => false ) ); ?></pubDate>
<dc:creator><?php post_author(); ?></dc:creator>
<guid isPermaLink="false"><?php post_id(); ?>@<?php bb_uri(); ?></guid>
<description><?php post_text(); ?></description>
</item>
<?php endforeach; ?>
</channel>
</rss>bb-includes/defaults.bb-filters.php
<?php
/**
* Sets up the default filters and actions for most
* of the bbPress hooks.
*
* If you need to remove a default hook, this file will
* give you the priority for which to use to remove the
* hook.
*
* Not all of the default hooks are found in this files
*
* @package bbPress
*/
// Strip, trim, kses, special chars for string saves
$filters = array( 'pre_term_name', 'bb_pre_forum_name', 'pre_topic_title' );
foreach ( $filters as $filter ) {
add_filter( $filter, 'strip_tags' );
add_filter( $filter, 'trim' );
add_filter( $filter, 'bb_filter_kses' );
add_filter( $filter, 'esc_html', 30 );
}
// Kses only for textarea saves
$filters = array( 'pre_term_description', 'bb_pre_forum_desc' );
foreach ( $filters as $filter ) {
add_filter( $filter, 'bb_filter_kses' );
}
// Slugs
add_filter( 'pre_term_slug', 'bb_pre_term_slug' );
// DB truncations
add_filter( 'pre_topic_title', 'bb_trim_for_db_150', 9999 );
add_filter( 'bb_pre_forum_name', 'bb_trim_for_db_150', 9999 );
add_filter( 'pre_term_name', 'bb_trim_for_db_55', 9999 );
// Format Strings for Display
$filters = array( 'forum_name', 'topic_title', 'bb_title', 'bb_option_name' );
foreach ( $filters as $filter ) {
add_filter( $filter, 'esc_html' );
}
// Numbers
$filters = array( 'forum_topics', 'forum_posts', 'total_posts', 'total_users', 'total_topics' );
foreach ( $filters as $filter ) {
add_filter( $filter, 'bb_number_format_i18n' );
}
// Offset Times
$filters = array( 'topic_time', 'topic_start_time', 'bb_post_time' );
foreach ( $filters as $filter ) {
add_filter( $filter, 'bb_offset_time', 10, 2 );
}
add_filter('bb_topic_labels', 'bb_closed_label', 10);
add_filter('bb_topic_labels', 'bb_sticky_label', 20);
add_filter('pre_post', 'trim');
add_filter('pre_post', 'bb_encode_bad');
add_filter('pre_post', 'bb_code_trick');
add_filter('pre_post', 'force_balance_tags');
add_filter('pre_post', 'bb_filter_kses', 50);
add_filter('pre_post', 'bb_autop', 60);
add_filter('post_text', 'do_shortcode');
function bb_contextualise_search_post_text()
{
if ( bb_is_search() ) {
add_filter( 'get_post_text', 'bb_post_text_context' );
}
}
add_action( 'bb_init', 'bb_contextualise_search_post_text' );
add_filter('post_text', 'make_clickable');
add_filter('edit_text', 'bb_code_trick_reverse');
add_filter('edit_text', 'wp_specialchars');
add_filter('edit_text', 'trim', 15);
add_filter('pre_sanitize_with_dashes', 'bb_pre_sanitize_with_dashes_utf8', 10, 3 );
add_filter('get_user_link', 'bb_fix_link');
add_filter('sanitize_profile_info', 'esc_html');
add_filter('sanitize_profile_admin', 'esc_html');
add_filter( 'get_recent_user_replies_fields', 'bb_get_recent_user_replies_fields' );
add_filter( 'get_recent_user_replies_group_by', 'bb_get_recent_user_replies_group_by' );
add_filter('sort_tag_heat_map', 'bb_sort_tag_heat_map');
// URLS
if ( !bb_get_option( 'mod_rewrite' ) ) {
add_filter( 'bb_stylesheet_uri', 'esc_attr', 1, 9999 );
add_filter( 'forum_link', 'esc_attr', 1, 9999 );
add_filter( 'bb_forum_posts_rss_link', 'esc_attr', 1, 9999 );
add_filter( 'bb_forum_topics_rss_link', 'esc_attr', 1, 9999 );
add_filter( 'bb_tag_link', 'esc_attr', 1, 9999 );
add_filter( 'tag_rss_link', 'esc_attr', 1, 9999 );
add_filter( 'topic_link', 'esc_attr', 1, 9999 );
add_filter( 'topic_rss_link', 'esc_attr', 1, 9999 );
add_filter( 'post_link', 'esc_attr', 1, 9999 );
add_filter( 'post_anchor_link', 'esc_attr', 1, 9999 );
add_filter( 'user_profile_link', 'esc_attr', 1, 9999 );
add_filter( 'profile_tab_link', 'esc_attr', 1, 9999 );
add_filter( 'favorites_link', 'esc_attr', 1, 9999 );
add_filter( 'view_link', 'esc_attr', 1, 9999 );
}
// Feed Stuff
function bb_filter_feed_content()
{
if ( bb_is_feed() ) {
add_filter( 'bb_title_rss', 'strip_tags');
add_filter( 'bb_title_rss', 'ent2ncr',
;
add_filter( 'bb_title_rss', 'esc_html' );
add_filter( 'bb_description_rss', 'strip_tags');
add_filter( 'bb_description_rss', 'ent2ncr', 8 );
add_filter( 'bb_description_rss', 'esc_html' );
add_filter( 'post_author', 'ent2ncr', 8 );
add_filter( 'post_link', 'esc_html' );
add_filter( 'post_text', 'ent2ncr' );
add_filter( 'post_text', 'htmlspecialchars' ); // encode_bad should not be overruled by esc_html
}
}
add_action( 'bb_init', 'bb_filter_feed_content' );
add_filter( 'init_roles', 'bb_init_roles' );
add_filter( 'map_meta_cap', 'bb_map_meta_cap', 1, 4 );
// Actions
add_action( 'bb_head', 'bb_generator' );
add_action('bb_head', 'bb_template_scripts');
add_action('bb_head', 'wp_print_scripts');
add_action('bb_head', 'wp_print_styles');
add_action('bb_head', 'bb_rsd_link');
add_action('bb_head', 'bb_pingback_link');
if ( $bb_log->type === 'console' ) {
add_action('bb_head', array(&$bb_log, 'console_javascript'));
add_action('bb_admin_head', array(&$bb_log, 'console_javascript'));
}
add_action('bb_send_headers', 'bb_pingback_header');
add_action('bb_admin_print_scripts', 'wp_print_scripts');
add_action('bb_user_has_no_caps', 'bb_give_user_default_role');
add_action('do_pingbacks', array('BB_Pingbacks', 'send_all'), 10, 1);
add_action( 'bb_init', 'bb_register_default_views' );
add_action( 'set_current_user', 'bb_apply_wp_role_map_to_user' );
add_filter( 'bb_pre_get_option_gmt_offset', 'wp_timezone_override_offset' );
unset( $filters, $filter );rss.php
<?php
require('./bb-load.php');
// Determine the type of feed and the id of the object
if ( isset($_GET['view']) || bb_get_path() == 'view' ) {
// View
$feed = 'view';
$feed_id = isset($_GET['view']) ? $_GET['view'] : bb_get_path(2);
} elseif ( isset($_GET['topic']) || bb_get_path() == 'topic' ) {
// Topic
$feed = 'topic';
$topic = get_topic(isset($_GET['topic']) ? $_GET['topic'] : bb_get_path(2));
$feed_id = $topic->topic_id;
} elseif ( isset($_GET['profile']) || bb_get_path() == 'profile' ) {
// Profile
$feed = 'profile';
$feed_id = isset($_GET['profile']) ? $_GET['profile'] : bb_get_path(2);
} elseif ( isset($_GET['tag']) || bb_get_path() == 'tags' ) {
if ( isset($_GET['topics']) || bb_get_path(3) == 'topics' ) {
// Tag recent topics
$feed = 'tag-topics';
} else {
// Tag recent posts
$feed = 'tag-posts';
}
$feed_id = isset($_GET['tag']) ? $_GET['tag'] : bb_get_path(2);
} elseif ( isset($_GET['forum']) || bb_get_path() == 'forum' ) {
if ( isset($_GET['topics']) || bb_get_path(3) == 'topics' ) {
// Forum recent topics
$feed = 'forum-topics';
} else {
// Forum recent posts
$feed = 'forum-posts';
}
$forum = bb_get_forum(isset($_GET['forum']) ? $_GET['forum'] : bb_get_path(2));
$feed_id = $forum->forum_id;
} elseif ( isset($_GET['topics']) || bb_get_path() == 'topics' ) {
// Recent topics
$feed = 'all-topics';
} else {
// Recent posts
$feed = 'all-posts';
}
// Initialise the override variable
$bb_db_override = false;
do_action( 'bb_rss.php_pre_db' );
if ( !$bb_db_override ) {
// Get the posts and the title for the given feed
switch ($feed) {
case 'view':
if ( !isset($bb_views[$feed_id]) )
die();
if ( !$bb_views[$feed_id]['feed'] )
die();
if ( !$topics_object = new BB_Query( 'topic', $bb_views[$feed_id]['query'], "bb_view_$feed_id" ) )
die();
$topics = $topics_object->results;
if ( !$topics || !is_array($topics) )
die();
$posts = array();
foreach ($topics as $topic) {
$posts[] = bb_get_first_post($topic->topic_id);
}
$title = sprintf( __( '%1$s » View: %2$s' ), bb_get_option( 'name' ), $bb_views[$feed_id]['title'] );
$link = get_view_link($feed_id);
$link_self = bb_get_view_rss_link($feed_id);
break;
case 'topic':
if ( !$topic = get_topic ( $feed_id ) )
die();
if ( !$posts = get_thread( $feed_id, 0, 1 ) )
die();
$title = sprintf( __( '%1$s » Topic: %2$s' ), bb_get_option( 'name' ), get_topic_title() );
$link = get_topic_link($feed_id);
$link_self = get_topic_rss_link($feed_id);
break;
case 'profile':
if ( bb_get_option( 'mod_rewrite' ) === 'slugs' ) {
$user = bb_get_user_by_nicename( $feed_id );
} else {
$user = bb_get_user( $feed_id );
}
if ( !$user ) {
die();
}
if ( !$posts = get_user_favorites( $user->ID ) ) {
die();
}
$title = sprintf( __( '%1$s » User Favorites: %2$s' ), bb_get_option( 'name' ), $user->user_nicename );
$link = bb_get_profile_link($feed_id);
$link_self = get_favorites_rss_link($feed_id);
break;
case 'tag-topics':
if ( !$tag = bb_get_tag( $feed_id ) )
die();
if ( !$topics = get_tagged_topics( array( 'tag_id' => $tag->tag_id, 'page' => 0 ) ) )
die();
$posts = array();
foreach ($topics as $topic) {
$posts[] = bb_get_first_post($topic->topic_id);
}
$title = sprintf( __( '%1$s » Tag: %2$s - Recent Topics' ), bb_get_option( 'name' ), bb_get_tag_name() );
$link = bb_get_tag_link($feed_id);
$link_self = bb_get_tag_topics_rss_link($feed_id);
break;
case 'tag-posts':
if ( !$tag = bb_get_tag( $feed_id ) )
die();
if ( !$posts = get_tagged_topic_posts( array( 'tag_id' => $tag->tag_id, 'page' => 0 ) ) )
die();
$title = sprintf( __( '%1$s » Tag: %2$s - Recent Posts' ), bb_get_option( 'name' ), bb_get_tag_name() );
$link = bb_get_tag_link($feed_id);
$link_self = bb_get_tag_posts_rss_link($feed_id);
break;
case 'forum-topics':
if ( !$topics = get_latest_topics( $feed_id ) )
die();
$posts = array();
foreach ($topics as $topic) {
$posts[] = bb_get_first_post($topic->topic_id);
}
$title = sprintf( __( '%1$s » Forum: %2$s - Recent Topics' ), bb_get_option( 'name' ), get_forum_name( $feed_id ) );
$link = get_forum_link($feed_id);
$link_self = bb_get_forum_topics_rss_link($feed_id);
break;
case 'forum-posts':
if ( !$posts = bb_get_latest_forum_posts( $feed_id ) )
die();
$title = sprintf( __( '%1$s » Forum: %2$s - Recent Posts' ), bb_get_option( 'name' ), get_forum_name( $feed_id ) );
$link = get_forum_link($feed_id);
$link_self = bb_get_forum_posts_rss_link($feed_id);
break;
// Get just the first post from the latest topics
case 'all-topics':
if ( !$topics = get_latest_topics() )
die();
$posts = array();
foreach ($topics as $topic) {
$posts[] = bb_get_first_post($topic->topic_id);
}
$title = sprintf( __( '%1$s » Recent Topics' ), bb_get_option( 'name' ) );
$link = bb_get_uri();
$link_self = bb_get_topics_rss_link();
break;
// Get latest posts by default
case 'all-posts':
default:
if ( !$posts = bb_get_latest_posts( 35 ) )
die();
$title = sprintf( __( '%1$s » Recent Posts' ), bb_get_option( 'name' ) );
$link = bb_get_uri();
$link_self = bb_get_posts_rss_link();
break;
}
}
bb_send_304( $posts[0]->post_time );
if (!$description = bb_get_option( 'description' ) ) {
$description = $title;
}
$title = apply_filters( 'bb_title_rss', $title, $feed );
$description = apply_filters( 'bb_description_rss', $description, $feed );
$posts = apply_filters( 'bb_posts_rss', $posts, $feed );
$link_self = apply_filters( 'bb_link_self_rss', $link_self, $feed );
bb_load_template( 'rss2.php', array('bb_db_override', 'title', 'description', 'link', 'link_self'), $feed );
?>September 4, 2009 at 5:08 pm #78300In reply to: How to echo "nice_username" from post_author ?
gerikg
MemberI found it, but it interrupts _CK_’s attachment plugin. and I had other problems with it that hasn’t been resolved yet.
“@gerikg
That is a bug, I have fixed it in Social It 1.2, which is yet to be released.
For now, check the Twittley checkbox, add some default tags in the twittley section, save and then untick Twittley and save. “
September 3, 2009 at 3:31 pm #78584In reply to: Need to fix a couple of things in theme
Ashish Kumar (Ashfame)
ParticipantI fixed the second & third issue but I am still stuck at the first one.
Looking at the markup I found
<select name="forum_id" id="forum-id"">is being generated by bbPress codebut the same works in default theme flawlessly so this isn’t the cause. Can I have the complete lookup order for file required to generate the “Add new” page.September 2, 2009 at 3:25 pm #78564In reply to: RSS feed for user
Ipstenu (Mika Epstein)
ModeratorInteresting. There actually IS an RSS built into your user ID: https://bbpress.org/forums/rss/profile/otto42
But it’s used for your favorites so not so much. You can see all your posts in your profile (recent posts) so in theory this should be ‘exportable’ to RSS.
The rss.php file has this:
// Get latest posts by default
case 'all-posts':
default:
if ( !$posts = bb_get_latest_posts( 35 ) )
die();
$title = esc_html( sprintf( __( '%1$s » Recent Posts' ), bb_get_option( 'name' ) ) );
$link = bb_get_uri();
$link_self = bb_get_posts_rss_link();
break;Which I think you could toss an extra if
if ( $user->ID == bb_get_current_user_info( 'id' ) )but that would only punt out a list of the current user’s posts, and not be a way to see anyones. The structure is there, though.September 2, 2009 at 5:46 am #65581In reply to: Delete Post by It’s Owner
_ck_
ParticipantIn theory it should be also possible to allow users to move their own topics if placed in the wrong category:
(untested, should allow a user to move only their own topics within the same time period they can typically edit a topic, ie. 1 hour default)
function move_own_topic($retvalue, $capability, $args) {
if ($capability=="move_topic") {return bb_current_user_can( 'edit_topic', $args[1]);}
return $retvalue;
}
add_filter('bb_current_user_can', 'move_own_topic',10,3); -
AuthorSearch Results