I was able to drop that into my functions.php, but it did not change any of my pages. Do I need to map that code somehow to my page url to get it to work? I guess I’m confused on where and what change to expect.
@eddie01001
the li.bbp-header has nothing to do with page title.
this code from my topic would not work on page title.
the li.bbp-header has nothing to do with page title.
this code from my topic would not work on page title.
give me a link to your site??
when i put this code
li.bbp-header {
display: none;
}
it works all forum pages title not show up
but when i put the following code
.post li.bbp-header {
background: none repeat scroll 0% 0% transparent;
display:block;
}
it has nothing happen no change at all
how can i make just NO title on blog post only i want title on other pages.
thanks
when i put this code
li.bbp-header {
display: none;
}
it works all forum pages title not show up
but when i put the following code
.post li.bbp-header {
background: none repeat scroll 0% 0% transparent;
display:block;
}
it has nothing happen no change at all
how can i make just NO title on blog post only i want title on other pages.
thanks
OK, the way I see it is like this.
There are two avatars cause the forum/topic list has two elements that use an avatar.
1. the avatar from the poster of the topic, this avatar is there with the topic title.
2. there is in the freshness an avatar displayed for the reply poster.
In between the topic title and topic freshness there is an element that handles reply, post and/or voice count.
This makes three elements inside this forum list, two with an avatar, hence two avatars.
The list itself is situated in an UL (unordered list in a bbpress php file called loop-single-reply.php).
This ul has three LI (list) elements inside it, the first topic-title, second topic-count, and third topic-freshness.
btw, you have a cache plugin that prevents s to check your CSS in chrome etc.
This line of code will put the avatars where they need to be, you just add this to your themes CSS file, and remove the display:none from your .avatar CSS.
#bbpress-forums li.bbp-body ul.topic {
border-top: 1px solid #eee;
overflow: hidden;
padding: 8px;
float: left;
width: 100%;
}
Here is how it looked for me after adding this.

good luck
Peter Hamilton
@Sura You getting this “Mail Delivery Failure” email because there is no such email and domain name. BB-Press sends email to all the subscribers and also sends an email to “noreply@oi-seattle-kinship.org” Since there is no such an email, you getting the bounce back email.
@Sura and @Robin
I disabled all plugins and still noreply email missing the first “s” like;
noreply@itename.com instead of noreply@sitename.com
When I change line:1065 in includes/common/functions.php like this
//$do_not_reply = '<noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';
$do_not_reply = '<noreply@sitename.com>';
it works with or without the plugins.
Hope this helps both developers and users
The double avatar was fine, because there were two instances on that page that were calling for the avatar; If there were more posters there could be two different avatars there.
The only problem I saw was that they were too large on the one page and it was nerfing your layout. The code I gave you above worked when I tested it, what was it doing that wasn’t working for you? If you have Gyazo or some other way to show a screenshot, that would be helpful, since you are still playing with it and it’s changing when we go to look.
My opinion is that the larger avatars looked great in the other areas of your forum, and that you only needed small avatars in that one spot so that they didn’t make your layout look wonky.
@ttmt place this code into loop-topics.php above the <li class="bbp-header">
<a class="bbp-most-popular-button" href="http://sitename.com/forums/view/popular/">Most Popular</a>
@robin-w I think the second one would require PHP and i hate PHP , but i can tell you the second one is going to use scraps of this
<a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Replies Created', 'bbpress' ); ?></a>
and some of this , basically the wp-get-current-user and output a link
Layout and functionality – Examples you can use
@gogitossj34
well if you want the 14px avatars by started by and the freshness try this instead
remove the code i gave you before and add this
.avatar {
width: auto;
height: auto;
margin: 0 0 1.5rem;
border: 1px solid;
border-radius: 50%;
}
and then you can resize certain avatars by providing their class then .avatar then the css
@robin-w just helping out
link to show a list of the most popular topics
this is easy you can just create an html link to the (most poplular) view in bbpress
<a class="bbp-most-popular-button" href="http://sitename.com/forums/view/popular/">Most Popular</a>
‘View my posts’ link so user could view a list of there posts
this would require a link to replies created
which i think you could if you edit some of this function
<li class="<?php if ( bbp_is_single_user_replies() ) :?>current<?php endif; ?>">
<span class='bbp-user-replies-created-link'>
<a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Replies Created', 'bbpress' ); ?></a>
</span>
</li>
I’ve just started using bbpress and I like the simplicity of it. I’ve been trying to customize it to my need for the past 2 weeks (yeah, I am slow). This is something that I came up with that I’d like to share with the community since I’ve learned so much from over here. And I am really proud of myself for coming up with this since I usually suck at php and css.
If you want a new topic, or new reply button on top of your topics list ore replies list.
You can just add this code to your functions.php and you are good to go. This way, it will only show a “new topic” link if the user is logged in. If they are not, then it’ll show a text saying “to post a new topic register or login”. Of course, you can change the code to whatever you want. And make sure you change the links to your login and register pages. And you can add class to customize the text with css.
//function to add new topic thread
function bbp_login_thread_link() {
if ( is_user_logged_in() ) { ?>
<a href="#new-post">Create a new thread</a>
<?php }
else { ?>
<p> To create a new thread <a href="http://yourwebsite.com/login">login</a> or <a href="http://yourwebsite.com/register">register</a></p>
<?php }
}
add_action( 'bbp_template_before_single_forum' , 'bbp_login_thread_link' );
//function to add new reply thread
function bbp_post_reply_link() {
if ( is_user_logged_in() ) { ?>
<a href="#new-post">Post a Reply</a>
<?php }
else { ?>
<p> To post a reply <a href="http://yourwebsite/login">login</a> or <a href="http://yourwebsite/register">register</a></p>
<?php }
}
add_action( 'bbp_template_before_single_topic' , 'bbp_post_reply_link' );
I am hoping you guys can add this to this article which has examples of layout and functionality. That article helped me immensely and I will feel honoured to have contributed to it.
@gogitossj34 this code is what your problem is, it changes the size of all avatars in your site.
.avatar {
width: 60px;
height: 60px;
margin: 0 0 1.5rem;
border: 1px solid;
border-radius: 50%;
}
the distorted avatar image is because there is a function in your templates that is used to call the user avatar , and in the function it is proportioned to be at 14px X 14px. your css code stretches this out 14px avatar to be 60px X 60px causing a distorted avatar image.
to remove the distorted image just add this to custom css
.avatar-14 { display: none !important; }
it should work
i dont know what exactly is causing your double avatars though , i would guess that it is the “started by” avatar like how these forums have.
But i am not for sure.
If you want to keep the avatar next to freshness only tell me
I’m not a programmer or such so I cannot understand what you’re saying
im no programmer i had practice with trial and error, and all this is basically common sense
Hello Dears,
@Robin – did run a test yesterday; please see below. Yes – it is still missing the ‘s’. This test was with both Easy WP SMTP and WP Email Template Pro deactivated.
@nightcoder – sorry you are having this problem also, however it is always good having another set of variables for troubleshooting. Hopefully we can get this resolved for everyone :-).
Kind Regards,
Sura
——-
Return-Path: soiseattle@ps304111.dreamhostps.com
Received: from imta27.westchester.pa.mail.comcast.net (LHLO
imta27.westchester.pa.mail.comcast.net) (76.96.62.95) by
resmail-po-395v.sys.comcast.net with LMTP; Fri, 18 Jul 2014 16:33:29 +0000
(UTC)
Received: from ps304111.dreamhostps.com ([208.113.253.50])
by imta27.westchester.pa.mail.comcast.net with comcast
id TsZL1o00R160WiQ0TsZNEA; Fri, 18 Jul 2014 16:33:23 +0000
X-CAA-SPAM: 00000
X-Authority-Analysis: v=2.1 cv=ArbXgoNP c=1 sm=1 tr=0
a=NcV50e7I1kQ8B/O3WndQqA==:117 a=NcV50e7I1kQ8B/O3WndQqA==:17 a=XZDE9umKAAAA:8
a=C_IRinGWAAAA:8 a=GGcpBh7Jt_oA:10 a=uq16MROfcOUA:10 a=uu93pNcUhmwA:10
a=IkcTkHD0fZMA:10 a=IG5F5yMIAAAA:8 a=Iz4Y0fGcAAAA:8 a=hw_3Kq5EVvpHEeQqwo8A:9
a=QEXdDO2ut3YA:10 a=C0YYocD4L-gA:10 a=T_gbqimHre8A:10 a=Dufu7xK66WEA:10
a=uMZShaPKYjEA:10
Received: by ps304111.dreamhostps.com (Postfix, from userid 12776964)
id 6BCD0425A6AB; Fri, 18 Jul 2014 09:33:14 -0700 (PDT)
To: noreply@oi-seattle-kinship.org
Subject: [SOI-Seattle Kinship] Testing w/o Email Plug-ins
X-PHP-Originating-Script: 12776964:class-phpmailer.php
Date: Fri, 18 Jul 2014 16:33:14 +0000
From: SOI-Seattle Kinship <noreply@oi-seattle-kinship.org>
Message-ID: <6f30a1cc387fed63ffcb2460d5c09f2a@soi-seattle-kinship.org>
X-Priority: 3
X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Arus wrote:
Did you receive this with the proper ‘no-reply’ address in the header?
Topic Link: http://soi-seattle-kinship.org/forums/topic/testing-wo-email-plug-ins/
———–
You are receiving this email because you subscribed to a forum.
Login and visit the topic to unsubscribe from these emails.
Sorry Peter but I’m not a programmer or such so I cannot understand what you’re saying, can you provide a step by step for me ?
I can use custom css plugin but that’s all.
I tried your code with custom css and now it looks different but still weird nonetheless. Any suggestions ?
Yikes I think I may have spoke a little too soon. Having done your recommended method, it doesn’t seem to isolate the changes made for the shortcode. I have removed the original modified file and created a duplicate named ‘content-single-topicb.php’. This corresponds with the change to line 335 in shortcodes.php with bbp_get_template_part( 'content', 'single-topicb' );.
Any idea why it’s not working?
ok so if your code savvy, two approaches
1. the hack
I haven’t tried this, but it should work fine
go into
wp-content/plugins/bbpress/includes/common/shortcodes.php
and look at line
355 which says
bbp_get_template_part( 'content', 'single-topic' );
change that to
bbp_get_template_part( 'content', 'single-topicb' );
That will then get bbpress looking for a php file called ‘content-single-topicb.php’
so then you can use the method in my first post to create that file in your theme ie as per first post, but just rename the file with a b at the end.
YOU WILL need to change this each time bbpress upgrades as it will overwrite – hence why it is the hack ! But that’s hardly difficult !
2. the proper way
Would be to create your own version of the shortcode, by copying all that particular shortcode into your themes functions file, BUT renaming it (or you’ll get already loaded errors), and then lots of editing to get it to work.
Personally I’d go route 1, and just make a note to change that file each time bbpress upgrades
ok, I’ve worked out that error
You have two issues
1. the code is slightly wrong, I’ve corrected it in the documentation, but you need to change your line 168 from
function add_new roles( $bbp_roles )
to
function add_new_roles( $bbp_roles )
ie an underline between ‘new’ and ‘roles’
BUT MORE IMPORTANTLY
2. you have now put the code in a core functions file of bbpress, and it cannot run there as it calls code that has not yet been loaded.
The code needs to go into your THEME’s functions.php file, not any functions file with the PLUGIN bbpress.
Please read again
Functions files and child themes – explained !
Thanks Robin! No problem with the steps you have laid out so far. How would I isolate these changes only for the shortcode?
ok the template you are after is
wp-content/bbpress/templates/default/bbpress/content-single-topic.php
this will alter it wherever this template is used.
make a copy of this template and put it in a directory called bbpress in the root of your theme, so you end up with
wp-content/themes/%your-theme-name%/bbpress/content-single-topic.php
where %your-theme-name% is the name of your theme
Then modify this file
to remove breadcrumbs take out line 14 which says
<?php bbp_breadcrumb(); ?>
then move line 44 (will probably be line 43 if you’ve taken out then breadcrumb!) which says
<?php bbp_get_template_part( 'form', 'reply' ); ?>
You may need to play with where to put it 9i haven’t tried it) , but after lines 21 & 22
<?php bbp_get_template_part( 'form', 'protected' ); ?>
<?php else : ?>
looks a good start, if not just keep moving it til you get what you want.
If you only want it to look like this for the shortcode, then that is doable but a lot more complicated !
now I added the code in functions.php
but the error message still appear:
Parse error: syntax error, unexpected T_STRING, expecting ‘(‘ in /home/u639474582/public_html/wp-content/plugins/bbpress/includes/core/functions.php on line 168
My Full Code:
http://pastebin.com/75iu9ijH
Hi guys, I’m using the [bbp-single-topic id=$topic_id] shortcode to include a topic on my post. Would it be possible to have the reply form above the topic? How would I modify the template to remove the displayed breadcrumb as well?
I tried your code anyway, fixed some stuf here and there and apparently, it worked but there is still some problem.
The copyright part is acting weirly now.
The one on orther page and the one in the forum is very different.
Can you give it another shot, we are so close to finally win this theme. :))
Thanks for trying so hard to help me.
Can you send the file to me since I’ve notice that copying the code sometime corrupt this theme. Even copying the original code break it sometime.