Search Results for 'code'
-
AuthorSearch Results
-
January 9, 2014 at 3:51 pm #141230
In reply to: Display post count in sidebar for author ID
Nathan Hawkes
ParticipantThat code doesn’t seem to be working, at least for me. However, a little more delving uncovered the functions bbp_get_user_topic_count_raw and bbp_get_user_reply_count_raw. Since I want a total post count (topics opened plus replied made), I added the two together and injected my get_the_author_meta(‘ID’) into it, and that comes up. I even checked with having the two separate and it does differentiate between the two sets of posts and seems to work as desired.
Thanks for your assistance!
January 9, 2014 at 1:55 pm #141225In reply to: Display post count in sidebar for author ID
Robin W
ModeratorSuspect that you ID bit isn’t working, hence you’re getting zeros
I use a count code to put a total count after the avatar using
function display_counts () { $post_count = bbp_get_user_post_count( bbp_get_reply_author_id( $reply_id )) ; echo "<br>Total posts : " ; echo $post_count ; echo "</br>" ; } add_action ('bbp_theme_after_reply_author_details', 'display_counts') ;and that works fine.
If you doing this for the topic, then $reply_id might be worth having a go at, depends on whether the widget is doing this for the topic, or the last reply !
Otherwise you might need to actually specify an ID (the codex talks about needing to do this if outside the loop, and your widget would not be displayed within the loop eg as in
get_the_author_meta(‘ID’,$ID)
where you have set $ID as the topic user probably in the loop bit.
Don’t know, but worth having a further play
January 9, 2014 at 5:34 am #141205In reply to: Change user role from outside bbPress
Stephen Edgar
KeymasterI’d suggest taking a look at the bbPress Repair Tool to remap users forums role as it shows pretty much what you are trying to achieve using
bbp_set_user_rolehttps://bbpress.trac.wordpress.org/browser/trunk/includes/admin/tools.php#L771
January 9, 2014 at 5:03 am #141200Stephen Edgar
KeymasterThat is a little strange, was it only in one particular browser? (IE, Firefox etc)
Aside from that if you need to have custom templates the best way is to copy the template you need to a subfolder
/bbpressof your theme to avoid it being overridden after an update.https://codex.bbpress.org/theme-compatibility/
I’d suggest you copy that
form-topic.phptemplate per the above.You could also try adding some CSS styling to those labels to make them work better with your theme.
January 9, 2014 at 4:12 am #141196In reply to: new post content is not being displayed
Stephen Edgar
KeymasterJillianne, glad you found the issue, it might be worthwhile adding a post to the support section on CodeCanyon here http://codecanyon.net/item/pages-by-user-role-for-wordpress/136020/comments
p.s. I moved your topic is it was a different issue 🙂
January 9, 2014 at 3:44 am #141187In reply to: Forum Page
Stephen Edgar
KeymasterI just noticed that the permalink is …/forums/forum/… is that normal?
Yes, the ‘forums’ part is the ‘forum root’ prefix you have set in the settings
https://codex.bbpress.org/forum-settings/#forum-root-slugThen the ‘forum’ is the prefix before a single forum name.
https://codex.bbpress.org/forum-settings/#single-forum-slugsJanuary 9, 2014 at 3:42 am #141186In reply to: Forum Page
Stephen Edgar
KeymasterSee if this stops your theme from nuking the forum list. Make a copy of your themes full width template eg.
page.phpfile and rename it tobbPress.phpthen all your bbPress pages will use this template.January 9, 2014 at 2:54 am #141184In reply to: Where is registered the forum sidebar?
Stephen Edgar
KeymasterThere are numerous ways of doing this:
You can use a conditional to check
is_bbpress()Make some copies of your templates for example and make a copy of
page.phpfile and rename it tobbpress.phpand call a specific sidebar template egbbpress-sidebar.phpfrom yourbbpress.phptemplate.January 9, 2014 at 2:22 am #141178In reply to: Cannot see "Forums" tab in WordPress dashboard
Stephen Edgar
KeymasterTry installing the plugin I linked below and compare the roles of your users in particular ‘keymaster’ to what the defaults should be in the codex.
https://github.com/johnjamesjacoby/bbp-capabilities
(Open a users profile from the Users section in wp-admin and scroll down)https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
January 9, 2014 at 2:18 am #141177Stephen Edgar
KeymasterMake a copy of your themes full width template eg.
page.phpfile and rename it tobbPress.phpthen all your bbPress pages will use this template.January 9, 2014 at 2:13 am #141176In reply to: Forum index table not showing
Stephen Edgar
KeymasterIt looks like your theme is stopping the forums from displaying.
Make a copy of your themes full width template eg.
page.phpfile and rename it tobbPress.php.January 9, 2014 at 12:43 am #141174In reply to: Getting Spam in my forum!
Stephen Edgar
KeymasterFollow the guide here as it looks like your site has been hacked or has some malware there.
(If you do have plugins redirecting your visitors to ‘other’ sites then maybe your not hacked but I seriously hope you are not doing this)
https://codex.wordpress.org/FAQ_My_site_was_hacked , and stop trying to patch up your hacked site. Reinstall or restore your backups. And read https://codex.wordpress.org/Hardening_WordPress
Stephen Edgar
KeymasterUse the [bbp-single-forum id=$forum_id] shortcode on your page.
January 8, 2014 at 6:38 pm #141150In reply to: Where is registered the forum sidebar?
piccart
ParticipantHi there!
Thanx for answering! I’ve read your answer to a similar issue in an old post and I’ve already checked that, but unfortunately it seems that in the new versions, or at least in this installation, the bbpress class is added to the body of the post content and not to the page wrapper, so the sidebar is outside and I can’t target it with that class..
it’s a bit weird though, cause it seems that the shortcode which calls the forum archive in the post content, is actually overriding the template chosen with the page attributes. it’s set as default template, but in the theme default page should be displayed the default sidebar, and in the forum page is displaying the forum sidebar instead, even if is set on default template and there is just a shortcode into the post content..
January 8, 2014 at 5:11 pm #141145In reply to: new post content is not being displayed
jilliannec
ParticipantHi Again,
So after working like crazy I found a plugin that seems to interfere with the permissions somehow with bbPress causing the first post to not display properly.
This was the culprit:
http://codecanyon.net/item/pages-by-user-role-for-wordpress/136020?ref=RightHereAfter deactivating the above plugin everything worked as it was supposed to.
As I still require the functionality of this role restriction to limit access to page content I am investigating other options.
Cheers,
JillianneJanuary 8, 2014 at 3:22 pm #141141Topic: Shortcodes for 3 Words (Members, Groups, Activity)
in forum InstallationPCTP
ParticipantI have the latest versions of WP & bbPress.
Looking for short codes for “ACTIVITY” – “MEMBERS” – “GROUPS” to keep it private from the public. i.e., only those logged in will be able to view those three items on the home bar. http://www.PickensCountyTeaParty.com
Thanks!
January 8, 2014 at 1:15 pm #141136In reply to: Need Forum Page Full Width
Robin W
ModeratorYour theme has a full width page option viz:
you can create a page which is full width, and just put this shortcode onto it :
[bbp-forum-index]
Then your forum will display full width.
January 8, 2014 at 12:09 pm #141127In reply to: using WP_Editor instead of default html edit
mth75
ParticipantI solved it like this:
// add tinymce for BBPress as default editor add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' ); function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = true; $args['media_buttons'] = true; $args['textarea_rows'] = true; $args['dfw'] = false; $args['tinymce'] = array( 'theme_advanced_buttons1' =>'bold,italic,underline,strikethrough,bullist,numlist,code,blockquote,link,unlink,outdent,indent,|,undo,redo,fullscreen', 'theme_advanced_buttons2' => '', // 2nd row, if needed 'theme_advanced_buttons3' => '', // 3rd row, if needed 'theme_advanced_buttons4' => '', ); // 4th row, if needed $args['quicktags'] = array ('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close'); return $args; }January 8, 2014 at 11:01 am #141126Topic: My forums titles are wrapping to the next line
in forum Troubleshootingjernatety1
ParticipantHello,
I recently installed bbpress, (this morning). I’ve gotten everything setup but I’m having a problem with the forum titles. Instead of one forum on one line titles seem to be wrapping to the next line beneath.
Is this something I can fix in CSS as in number of characters per title?
hockeyfights-video.com/forums/Thank you
January 8, 2014 at 10:21 am #141124In reply to: Thousands of revisions
inspirationally
ParticipantAfter deactivating all bbPress related Plugins, it still occured. Now I removed the functions.php and it seems to have stopped and I’m re-adding it one snippet after the other, but I always have to wait half an hour between each snippet to see if it continues. No idea how to test it “immediately”.
It might be something about this part:
//Remove bbPress Head on non bbPress sitesadd_action( 'wp_head', 'conditional_bbpress_head', 9 );
function conditional_bbpress_head(){
global $post;
if( !is_bbpress() && !(is_home() && $_SERVER['SERVER_NAME'] == 'deppheads.com') && !(isset( $post->post_parent ) && $post->post_parent == "17123") )
remove_action( 'wp_head', 'bbp_head' );
}
add_action( 'wp_enqueue_scripts', 'conditional_bbpress_scripts', 9 );
function conditional_bbpress_scripts(){
global $post;
if( !is_bbpress() && !(is_home() && $_SERVER['SERVER_NAME'] == 'deppheads.com') && !(isset( $post->post_parent ) && $post->post_parent == "17123") )remove_action( 'wp_enqueue_scripts', 'bbp_enqueue_scripts' );
}
which I added because I have two domains running and just one little part under the domain deppheads is actually the forum, and I did not want all that bbPress code in all sites, especially not on my main site.
Is that possible??January 8, 2014 at 2:32 am #141106In reply to: Thousands of revisions
Stephen Edgar
KeymasterOk, this is really weird, I’m out and about at the moment but will take a closer look at this in the morning.
For now if you want to truly disable revisions you can do so
wp-config.phpas detailed here:https://codex.wordpress.org/Editing_wp-config.php#Disable_Post_Revisions
January 8, 2014 at 1:54 am #141103In reply to: Need Forum Page Full Width
Stephen Edgar
KeymasterMake a copy of your themes full width template eg.
page.phpfile and rename it tobbPress.phpand you should be good to go. 🙂January 8, 2014 at 1:14 am #141101In reply to: 404 on Edit my post
Stephen Edgar
Keymasterhttps://codex.bbpress.org/faq/
My Forum posts are returning 404 messages. How can I fix this?
This could be an issue with your rewrite rules. To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.
January 8, 2014 at 12:35 am #141097In reply to: Customising bbp_list_forums – Last Poster Block
Oken
ParticipantI was directed to this topic when I asked about the particular features this customization was said to have solved. I too have also tried to follow the directions and entered the codes from this post, but to no avail. I get the same crashed website.
Here’s where I put each peace of code. Maybe someone can point out where I went all wrong.
http://pastebin.com/GLhCHYze – I put this in my functions.php file.
http://pastebin.com/8K0pkKs5 – I put this in my theme’s bbpress/loop-single-forum.php file.
http://pastebin.com/FGptZmiQ – I put this in my theme’s bbpress/loop-single-topic.php file.
As someone mentioned, The creator of this code seems to have a stand alone version of bbpress instead of the plugin type that I use with Buddypress. Perhaps this is why it hasn’t worked for a few folks. I’d be interested to hear from someone that has Buddypress installed on their copy of wordpress and have successfully been able to make the customization work for them in their template files. If we could hear how they went about installing the code, it might help out some that might be stuck.
Many thanks in advance! 🙂
January 7, 2014 at 5:59 pm #141086Topic: Forum index table not showing
in forum Troubleshootingaje_1985
ParticipantHi, my website is http://www.findgreatness.com and I am using Kopatheme circle, I have installed and setup a page with forums as the permalink and the bbpress short code, and added two forums to see how it looks. Although I can see some format with the forums if I add them additionally as a drop down menu, I cannot see the table format on the forum index page. Any help appreciated, thanks, Andy.
-
AuthorSearch Results