Search Results for 'code'
-
AuthorSearch Results
-
April 3, 2015 at 7:45 am #160624
In reply to: Edit the bbPress login widget
Jake Hall
Participantyes there is its called
form-user-login.phpusing the bbp-login shortcode works as one would expect, editing the user-login form works also, as one would expect. However:
When the user is logged in, it constantly displays a “you are already logged in message”. The reason I want to edit the bbp login widget is because that handles whether or not the user is logged in flawlessly, it just looks plain awful.
So, if I can easily edit the form that is included within the widget, that would be much better
April 2, 2015 at 7:23 pm #160614In reply to: Participants cannot see topics in private forums
mglasser
ParticipantOur phpbb3 forum was migrated to a brand new WordPress installation with bbPress installed (not BuddyPress). It was done by a consultant, so I am not sure how much of the code was custom vs a phpbb3 migration tool.
We got the private topics to show to Participants by using the plugin “Capability Manager Enhanced” and allowing the read_private_topics and read_private_replies. This now allows Participants to read the private topics, but also allows them to see Hidden forums. They cannot see the content/topics of the forums, but they can see the hidden forum titles.
The remapping to default was done with the repair tool. It had no impact, except to require me to go back and reset the handful of users that were not set to Participants.
The big question that seems unresolved in many threads is whether Participants are supposed to see Private topics/replies, or if that is a misprint in the documentation? Why would we have to use the Capability Manager Enhanced plugin to do what the docs say should happen by default.
April 2, 2015 at 4:25 pm #160604In reply to: Use WordPress Page instead of Forum Root
jayd94
Participant[bbp-single-forum id=460] im using this momentally, but i`ve tried more codes that did the same.
The link works good as i rewrote the forum root to the wp page`s slug-http://rohamjelvenyek.com/foforum/kategoriak/altalanos/regi-penzek-foruma-az-okortol-napjainkig/April 2, 2015 at 4:11 pm #160603In reply to: Use WordPress Page instead of Forum Root
Robin W
Moderatorcan you give us a shortcode you are using and a link to the resultant page?
April 2, 2015 at 2:16 pm #160596pazzaglia
ParticipantUnfortunately, with the upgrade to WordPress 4.x these little snippets no longer work – I read elsewhere that bbpress search had some updates which likely render these snippers useless. : (
If anyone has the updated code, I would really appreciate it!!
Ciao,
L
April 2, 2015 at 1:54 pm #160593In reply to: MAJOR noobie with a lot of questions
leeleepompom
ParticipantWhere and how do I insert that? I used the short code [bbp-register] How can I add the Captcha?
April 2, 2015 at 1:50 pm #160592In reply to: Use WordPress Page instead of Forum Root
jayd94
ParticipantHello!
My problem is :
I set my forum root matching with the wp page slug i created for main forum page, named it: ´foforum`.It works, the root is now the wp page, but it breaks all the bbp shortcodes that i am using on the page, it seems to display forum index instead of each single forum displayed, so everywhere there is [bbp-single-forum id=xxx], it shows all the forums-as ifd it was the forum index shortcode.
Thanks,
DanielApril 2, 2015 at 12:28 pm #160585In reply to: Use WordPress Page instead of Forum Root
jayd94
Participanthey!
It wokrs for me also, root is good, but it somehow breaks my shortcodes, instead of displaying single forum, all my single forum shortcode shows forum index shortcode.April 2, 2015 at 8:31 am #160577Topic: Send HTML Notification e-mails?
in forum Requests & Feedbackpazzaglia
ParticipantI tried three plug-ins from the WordPress repository and all of them send Text e-mails for bbpress notifications.
– bbPress Notify
– bbPress Notifications
– bbPress Custom Reply Notifications*I also tried Satollo’s bbpress plug-in, Satollo x bbPress, which DOES send HTML e-mails and is available only on his website (not in the repository) but it’s a little buggy. Sometimes it works, sometimes it doesn’t but every time someone submits a comment they get a page with php warnings and errors-eeek!
I’m only a PHP tweaker, not writer, and cannot make out the spaghetti code of the three robust plug-ins to find where and how to add the information that the notification should go out in HTML.
Any suggestions or ideas?
Thanks!
L
April 2, 2015 at 4:04 am #160573In reply to: Issue with [bbp-topic-index]
Robin W
ModeratorThe first basketball is given by a div class of ‘page-title’
The second basketball is given by a div class of ‘entry-title’so you could try
#bbpress-forums .entry-title {
display : none !important ;
}in your child theme css
April 1, 2015 at 10:16 pm #160567In reply to: Is this a forum width issue?
novicechess
ParticipantMatter resolved.
“If you wish that the Homepage Blog and the Post will have the Center Effect then the code will be:
.home.blog #content, .single #content{width: 100%}
this code will only affect the Homepage and the Blog Posts.”
April 1, 2015 at 8:56 pm #160565In reply to: Is this a forum width issue?
novicechess
ParticipantFollow-up question:
After aligning my forum, I found that my posts were all shifted left. I attempted to shift them right by referencing the title (h1) and content of posts (p). After changing the values of their width and margin-left, they look fine (minus the date/comment buttons, which I haven’t figured out how to reference yet), but now my forums are affected by the “p” width change, which makes them overflow.
Is there a way to only reference blog posts while keeping the format for the forums in tact?
Here is the code I used to manually center my post content/title.
h1.entry-title { width: 500px; margin-left: 250px; } p { width: 500px; margin-left: 250px; }Here is what my blog posts look like:

Here is what my forum looks like with the overflow:

All help/feedback appreciated!
April 1, 2015 at 8:08 pm #160561In reply to: Some problems with visual editor
Robkk
ModeratorThis should help.
April 1, 2015 at 8:01 pm #160560In reply to: Merge search boxes of bbpress and wordpress?
Robkk
Moderatoryou can add the bbpress post type to the default wordpress search.
copy this into your child theme functions.php or a functionality plugin
/** * Include bbPress 'topic' custom post type in WordPress' search results */ function ntwb_bbp_topic_cpt_search( $topic_search ) { $topic_search['exclude_from_search'] = false; return $topic_search; } add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' ); /** * Include bbPress 'reply' custom post type in WordPress' search results */ function ntwb_bbp_reply_cpt_search( $reply_search ) { $reply_search['exclude_from_search'] = false; return $reply_search; } add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' ); function ntwb_bbp_forum_cpt_search( $forum_search ) { $forum_search['exclude_from_search'] = false; return $forum_search; } add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' );April 1, 2015 at 7:42 pm #160556In reply to: Issue with [bbp-topic-index]
ajsonnick1
ParticipantTHANKS! will look into the plugin.
HMM.. Using the Listify wordpress theme.
I can’t find anything in the code. I was able to remove the first page title if I want, but I want to leave that.
The big grey box I wanted to remove.Thanks!
April 1, 2015 at 3:27 pm #160546In reply to: No posts are being displayed when inside of a thread
Jake Hall
ParticipantOK, removing the following from my functions file;
function SearchFilter($query) { if ($query->is_search) { $query->set('post_type', 'post'); } return $query; } add_filter('pre_get_posts','SearchFilter');Seemed to fix the problem. No idea why that broke things, but I can finally start working on my forum!
April 1, 2015 at 3:21 pm #160545Topic: No posts are being displayed when inside of a thread
in forum TroubleshootingJake Hall
ParticipantHi all,
I have slowly developed my own theme for bbPress + WordPress, and it has been a sharp learning curve trying to get my head around the code for WordPress. Anyway, I am having an issue where I can drill down into a topic, however, no posts are ever displayed. The only thing that is displayed on screen is the “Add new Reply” GUI.
I am essentially wondering, why is this happening, and how can I fix it? I have tried to replicate the same problem on the default wordpress themes and they work fine, so – what have I managed to do with my theme that has broken everything?
Any help would be appreciated,
April 1, 2015 at 2:20 pm #160542In reply to: Displaying User role beside their replies
andrew55
ParticipantGot it – This seems to work for showing the first role:
<?php $user = new WP_User( bbp_get_reply_author_id() ); echo $user->roles[0]; ?>April 1, 2015 at 11:26 am #160537In reply to: Is this a forum width issue?
novicechess
ParticipantI’ve found the solution, and it turned out I needed a “container” edit. The code I ended up using was as follows
#container {
width: 690px;
padding: 30px 30px 0;
}#content {
float: left;
width: 455px;
}.singlecol #content {
float: none;
width: 550px;
}April 1, 2015 at 10:12 am #160534Process of Illumination
ParticipantHi Robin,
“having it exist as /mysite.com/forum”
would be the perfect solution for me, since my standalone bbpress is already at /mysite.com/forum/, and my wordpress blog is at /mysite.com/blog/ (they are both in production).
Would your solution work in my case?
Where exactly should I add the shortcode
[bbp-forum-index]?Thank you very much!
April 1, 2015 at 4:47 am #160530Robin W
Moderatorgreat, putting it in the template is equally fine, BUT make sure you put that template into a child theme, else plugin and theme updates will destroy it.
April 1, 2015 at 1:07 am #160524In reply to: Displaying User role beside their replies
andrew55
ParticipantI’m very happy to have found this – very useful.
Question – any suggestions on how to adjust the code to where subscribers can also view the role of other users.
Thanks for any help.
March 31, 2015 at 11:44 pm #160522In reply to: Limit tags to a pre-defined list?
23creative
ParticipantHey Guys,
i have just completed this functionlaity for my site. i wanted to use a jquery chosen as opposed to a text input so in my themes functions.php file i added the following:
function restrict_topic_tags( $terms, $topic_id, $reply_id ) { $terms = bbp_get_topic_tag_names( $topic_id ); foreach ($_POST['bbp_topic_tags'] as $topicTags){ $terms .= ', '.esc_attr( strip_tags( $topicTags ) ); } return $terms; } add_filter( 'bbp_new_reply_pre_set_terms', 'restrict_topic_tags' ); function displayTagElements($selectedTags){ $html = array(); $tags = get_categories( array('hide_empty'=> 0,'taxonomy' => 'topic-tag')); $selectedTags = explode(', ', $selectedTags); //die(var_dump($selectedTags)); $html[] = '<select class="chzn-select" multiple="multiple" name="bbp_topic_tags[]" id="bbp_topic_tags">'; foreach($tags as $tag){ $selected = ''; if (in_array($tag->name, $selectedTags)) { $selected = 'selected="selected"'; } $html[] = '<option '.$selected.' value="'.$tag->slug.'">'.$tag->name.'</option>'; } $html[] = '</select>'; return implode('',$html); }then in my bbpress custom theme files (form-reply.php, any others that had the reply form. I’m sure there is more than one i haven’t fully checked yet) i added the following code at line 75
<p> <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br /> <?php echo displayTagElements(bbp_get_form_topic_tags()); ?> </p>March 31, 2015 at 9:44 pm #160520andrew55
ParticipantWow – thanks for taking the time to create this. Much appreciated. I’m a realist, not so much of a purist!
Unfortunately, I am getting this error in the profile area of all topics and replies:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'andrew55_insert_field ' not found or invalid function name in /home/mysite/wp-includes/plugin.php on line 496I tried function with both “bbp buddypress profile information” and “bbp profile information” installed.
Another idea – instead of pestering for help with advanced php functions, what about just throwing the snippet I have in a template file in my child theme?
I’ve been looking, but I can’t find the correct template file that controls the “user profile area” for the topics and replies when viewing a single topic. Any suggestions on where I might find this file so I can give it a try? It seems like it would be loop-single-topic.php, but that is for the view for all the topics together.
I’m still new to bbPress and am finding it tricky to learn my way around the files – but I’m getting there!
Thanks for any suggestions.
March 31, 2015 at 7:29 pm #160516Robin W
Moderatorok assuming it works it just needs wrapping into a function, and then adding to the action so :
<?php Function andrew55_insert_field () { require_once '/home/site/public_html/amember/library/Am/Lite.php'; if (Am_Lite::getInstance()->haveSubscriptions(2)) { ?> <p>custom text 1</p> <?php } else { if (Am_Lite::getInstance()->isLoggedIn()) { ?> <p>custom text 2</p> <?php } else { ?> <p>custom text 3</p> <?php } } }which could be shortened to
Function andrew55_insert_field () { require_once '/home/site/public_html/amember/library/Am/Lite.php'; if (Am_Lite::getInstance()->haveSubscriptions(2)) echo '<p>custom text 1</p>' ; elseif (Am_Lite::getInstance()->isLoggedIn() ) echo '<p>custom text 2</p>' ; else echo '<p>custom text 3</p>' ; } add_action (‘bbp_theme_after_reply_author_details’, ‘andrew55_insert_field ’) ;that might upset the purists who seem to love have php statements all over their code, but makes it more readable – apologies if you’re in the purist camp 🙂
You need to put this code into your functions file, so that it is automatically called when the action is executed
-
AuthorSearch Results

