as long as you have embed media checked
and also a full hyperlink from youtube.
then it should work.
https://codex.wordpress.org/Embeds
looking forward to your template or codex changes
I just updated the codex article and put an example template to look and study off of.
It is not just copy and pasting the template into a file and it working, you have to study it and read the comments in the code and find similarities in your index.php file. Then you can create a bbpress.php file from your index.php file.
If I add the short-code to a custom page using the page.php code it works
Yes I know but it is just that page, you need all of the bbPress forum pages. Using shortcodes like that means you would have to put a topic shortcode for every topic you have in a bunch of pages. And that is not what either of us are looking for , right??
It doesnt matter if the default forum uses index.php or page.php – it doesnt work.
Yes it does, and you have to edit the new bbpress.php file.
I have sequentially copied pages.php and index.php and made them bbpress.php and each time I can see that the default forum is using it, and each time it doesnt work
Its not as easy as just renaming it.
So i guess I need a generic index.php that will work (which I think you said you were producing) OR some workaround so the generic forums page doesnt appear in the directory path
Was busy with other stuff , but yes i uploaded an example template to look over and compare to your index.php. You cannot just copy and paste , you have to look at the simple code and read how it works in the comments i left in the code.
Hi,
I am using BBPRESS for my website, I checked this option from backend:
“Embed media (YouTube, Twitter, Flickr, etc…) directly into topics and replies”
but only administrator can embed youtube and other embed just reflect the IFRAME code.
can you help what I am missing, I need it to be allowed for CONTRIBUTORS to embed the youtube embed code.
Thanks Sanny
Hi there – thanks so much for your help so far. I did some more tests and I just cant get it to work (so looking forward to your template or codex changes.
To summarise:
1. I was only using WPtweaks to tell it which page to use as a template but no matter which one I told it to use – it didnt work. Have since de-activated
2. If I add the short-code to a custom page using the page.php code it works
3. It doesnt matter if the default forum uses index.php or page.php – it doesnt work.
4. I have sequentially copied pages.php and index.php and made them bbpress.php and each time I can see that the default forum is using it, and each time it doesnt work
So i guess I need a generic index.php that will work (which I think you said you were producing) OR some workaround so the generic forums page doesnt appear in the directory path
Hey Gang,
You know the links that are avail in the user menu (top right) when logged in? (Activity, Profile, Notifications, etc). All of those links are dynamically created based on the logged in userID.
I wanted to create a few of those shortcuts in a custom link in our main site navigation menu, but I’m unsure what type of code to use to dynamically insert the UserID of the logged in user.
So for example, how can I create a custom link that will populate the users’ ID:
http://www.theworshipcommunity.com/members/%5B**USERID-OF-MEMBER**/forums/subscriptions/
As you can see if you go to:
http://www.theworshipcommunity.com/dicuss/
Under “Discussion Forums” i have some sub-links that show the RSS feed options. It’s under there I wanted to have a custom link for “My Subscriptions & Unread Topics” with that dynamic URL above.
Thanks,
Fred
Plus i basically just got this code from here
Resizing Avatars
did you copy it correctly I just tested it out and pasted it right from my functions.php file
Im going to paste it again just in case it was me that forgot something.
function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
$author_avatar = '';
if ($size == 14) {
$size = 24;
}
$topic_id = bbp_get_topic_id( $topic_id );
if ( !empty( $topic_id ) ) {
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
} else {
$author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );
}
}
return $author_avatar;
}
/* Add priority (default=10) and number of arguments */
add_filter('bbp_get_topic_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
add_filter('bbp_get_reply_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
For some reason when I added the function code to my functions.php it gave me a 500 Internal Server Error.
use this PHP function to resize the small avatars
function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
$author_avatar = '';
if ($size == 14) {
$size = 24;
}
$topic_id = bbp_get_topic_id( $topic_id );
if ( !empty( $topic_id ) ) {
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
} else {
$author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );
}
}
return $author_avatar;
}
/* Add priority (default=10) and number of arguments */
add_filter('bbp_get_topic_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
add_filter('bbp_get_reply_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
The CSS you would have to use now is
#bbpress-forums .bbp-author-avatar .avatar-24 {
width: 24px !important;
height: 24px !important;
padding: 0 !important;
border: none !important;
}
and you can remove the first function i gave you to test with
Well the file you are suppose to copy and create a bbpress.php file from is index.php
And although putting the forum index shortcode in a page is “easier” in a sense , you will still come up with issues just like you are going through. This is why I have been editing the Codex for the last few days to hopefully fix these issues that users might come across.
As for that weird wp tweaks issue you have , I do not know how to fix that. if you are only using that plugin just for a bbPress specific sidebar there are better plugins than that one.
And it is not hard to manually create a bbPress specific sidebar too.
Thanks so much – although I am wondering if it is going to solve my problem (but please do!)
it might help a little, there is a bunch of post meta that you would have to remove for it to look correct.
You can also contact me later today through email, if you need help during the process.
Contact
Alright the second code worked. Thank you so much for helping. Do you by chance have any suggestions on how to un-blur my avatar picture? Thank you again.
Yes, possible.
You can insert the massage via hook do_action( 'bbp_theme_before_reply_form' );. To make limitation, you can use post ID get_the_ID() detection.
I hope it helps.
#bbpress-forums .bbp-author-avatar .avatar-14 {
width: 24px;
height: 24px;
padding: 0;
border: none;
}
if that does not work try this
#bbpress-forums .bbp-author-avatar .avatar-14 {
width: 24px !important;
height: 24px !important;
padding: 0 !important;
border: none !important;
}
try this CSS code and hopefully this fixes your issue.
it looks too small at 14px so i bumped it up to 24px , you can change that back to 14 if you want.
#bbpress-forums img .avatar-14 {
height: 24px;
width: 24px;
padding: 0;
border: none;
}
Here are the results from placing the code in my functions.php file:
You will see that I now have an avatar picture showing up next to the topic title, still no change to the other small avatars.
I have a very similar problem and I must admit I have posted it as a seperate topic, but you guys seem so close to the problem (and solving it) that I trust it’s ok to post here as well.
I am using the Listify Theme and there does not fundamentally seem to be a default template that will work with bbpress. No matter what template I choose and copy as the plugin-bbpress.php template for example – it won’t work. Here’s an example of the page not working – http://tattsamistake.com/forums/
So….I built a custom page and put the shortcode in it – and the page works. BUT when I click thru to a forum, I get my navigation path which links to the forums page that doesnt work – ie the path shown is … Tattoo Removal Australia › Forums › Tattoo Removal
and if i click on ‘forums’ it goes to the non-working page – http://tattsamistake.com/forums/
BUT if i go and change the slug from ‘forums’ to ‘Tattoo-forum’ (the customised page that does work) it goes and applies a non-working template to that page, so in effect killing the page.
I guess to solve it I need the following…
1. A way to tell it where the forum short-code is without over-writing the page template
2. This may sound very silly but is there such a think as a generic bbpress.php template that I can use and upload to my site? Sure it won’t look like my site, but it would be a starting block.
3. Can I just get rid of ‘forums’ in that path, or at a pinch just get rid of that path from displaying completely?
Any help much appreciated!
I am using the Listify theme at http://tattsamistake.com
For some reason none of the page themes will work with bbpress (if I am wrong would love to know!)
So I followed the instructions on building a new page and adding the forums short-code to it. Even then it isn’t ideal but it will just about do – you can see it at http://tattsamistake.com/tattoo-forum/
If I click on any forum I then get presented with a directory ‘path’ to go back one page ie – Tattoo Removal Australia › Forums › Caring for Tattoos
The problem is – if I click on ‘Forums’ I go to the ‘default’ forums page that doesn’t work, rather than the new forums page that I built (that mostly works)
If I go to settings and change the name ‘forums’ to the same name as my custom-made forums page, it then overwrites my page template choice with the template that doesn’t work for forums – so it breaks the page
So in short – how can I get that ‘path’ Tattoo Removal Australia › Forums › Caring for Tattoos
to point to my working forums page, rather than a non-working forums page?
Hope this makes sense!
How do your users register through your site?? Do they use the normal WordPress login forms, or do you use the bbPress shortcodes , or something different??
Also do you have multi-site??
this is still a issue for me, because i have to update the role of new users everytime from the database when new user register to my site.
I found the the table inside database where it user role was coming, we need to change wp_capabilities value inside wp_usermeta table. This was the final solution to my issue.
Keymaster value : a:3:{s:13:"administrator";b:1;s:13:"bbp_keymaster";b:1;s:9:"translate";b:1;}
Participant value: a:2:{s:10:"subscriber";b:1;s:15:"bbp_participant";b:1;}
however, the value differs from site to site.
Thats custom code to this site.
Nice to see that other people would like to see this as part of the standard set-up as @roberts-1 says… I am running the same versions using Momizat’s ‘Goodnews’ theme
I’ve just tried @undergroundnetwork ‘s code and it works great for me as an admin… but for some reason, the other users with lower levels of access, don’t get the same result – they only get WordPress results, none from bbPress.
Any ideas why? I’d really like to just have one search that does it all instead of one for forums and another for blogs etc.
Cheers
@hunniemaid
you place the code in your child themes functions.php or you can use a plugin like this
https://wordpress.org/plugins/functionality/
with that plugin you go to plugins> edit functions then place the code i gave you.
Where should I place this code? single-post-reply.php? Sorry, new to bbPress. Thank you for the response.
Thanks for that. Unfortunately when I make those changes i end up with a blank, white screen instead of a forum! If I use the form-search.php alone and don’t add the code to functions.php, about half the page renders but the sidebar etc are missing.
Is there anyone who could do a little custom work to get this figured out for me? I’m happy to pay, of course.