Search Results for 'code'
-
AuthorSearch Results
-
April 18, 2015 at 7:41 pm #161261
Robkk
Moderatoryou can use bbPress profile code on Woocommerce templates if you know what you are doing.
it could just be copying the user-details.php file from the bbPress templates and adding a simple link to your my account page from wwocommerce.
i suggest you hire a developer if you want anymore customization and possible merging templates of bbPress and Woocommerce.
April 18, 2015 at 6:41 pm #161259Topic: echo shortcode – view forum – not see topics
in forum Troubleshootingxydeown
ParticipantHello , i just installed bbpress on my wordpress , i opened new Theme page and echo shortcode [bbp-forum-index] , i can see the forum , but when enter the test forum , it’s not enter inside it , what to do i don’t know bbPress much , here a link to my forum page :
http://xn—-7hcbracas6eta3ak.tv/forums/
sorry for Language but you should understand because forums is at middle there and i am sure you can see it clearly , Thanks in advacned.April 18, 2015 at 5:54 pm #161255In reply to: User Topics Created
Robin W
Moderatorok if you look at user-topics-created.php you’ll see on line 18 that it calls
bbp_get_user_topics_started()that function presumes that you have $user_id set for the user, and however you are calling it, that is not the case, so you need to set it.
so try adding
$user_id = get_current_user_id(); <code>and then call</code>bbp_get_user_topics_started($user_id)April 18, 2015 at 5:18 pm #161247In reply to: (bbp_reply_to) Show as button from admin links
Robkk
Moderatoreach admin link has a class , you can style each to your liking.
here is an example of what i did to make a link in the twentyfourteen theme look like a button.
span.bbp-admin-links a.bbp-topic-reply-link, span.bbp-admin-links a.bbp-reply-to-link { color: #fff; background-color: #24890d; border-radius: 2px; padding: 5px 10px; } span.bbp-admin-links a.bbp-topic-reply-link:hover, span.bbp-admin-links a.bbp-reply-to-link:hover { background-color: #41a62a; }April 18, 2015 at 4:51 pm #161246In reply to: Hide forum post content in activity streams?
andrew55
ParticipantI’m still testing, but I think this does it:
.activity-list li.bbp_topic_create .activity-content .activity-inner, .activity-list li.bbp_reply_create .activity-content .activity-inner { display: none !important; }It shows bbPress forum titles in BuddyPress activity streams, but not content of the reply/post.
Hope this helps anyone who might need it.
April 18, 2015 at 3:08 pm #161242Robkk
ModeratorHowever, the auto mentions only work from the text tab (not the visual), is this a bug?
i think the functionality to make the script work for the TinyMCE visual editor is not possible now. You see that we are basically just borrowing the script from BuddyPress to work for bbPress forums , and also that neither bbPress and BuddyPress have the visual editor in their default installations without some plugins or functions added.
It is possible to make it work for TInyMCE though, you would probably have to use some of the code of this auto-complete plugin for TinyMCE.
https://github.com/abrimo/TinyMCE-Autocomplete-Plugin
If you want to develop some custom functionality to make it work for your client ,only thing i can suggest is look over how this plugin is developed and see how they make it work for TinyMCE and of course add on to the script from the BuddyPress plugin.
wordpress.org/plugins/mentionable/
Other than that maybe decide to disable the visual editor for bbPress to make it work fine.
Also, it seems that some users get a notification, but some are not.
If you are talking about the notifications users get when @mentioned , then go to the BuddyPress Support forums for help on this.
April 18, 2015 at 4:47 am #161231In reply to: Showing freshness of replies in forums
Robin W
ModeratorI’ve just had a look at my test site, and I think the code is not working as it should. Topics are fine, bur replies refer to the original topic date/time not the latest reply date/time. So if no reply it is correct, but otherwise wrong !
I’ll take a look at the source code when I get a chance, but maybe some days away. I’m not the plugin author, just a humble user !
April 17, 2015 at 6:22 pm #161202In reply to: import from bbPress1 crashes/restart Apache
thierryyyyyyy
ParticipantI got it !
sometimes, Apache exited with higher Status number example :
[Sat Apr 18 00:02:05.423769 2015] [mpm_winnt:notice] [pid 5900:tid 404] AH00428: Parent: child process 5032 exited with status 3221225725 — Restarting.Google gave me a hint : write this code in your httpd.conf (that’s for Windows)
<IfModule mpm_winnt_module> ThreadStackSize 8888888 </IfModule>It works now, like a charm 🙂
explanation : the stackSize in Windows is defaulted at 1MB, and it seems that bbPress Import need much more…. This line push the limit to more than 8MB. That’s all.
WAMP does NOT show this mpm_winnt_module in the list of loaded modules, I guess it is because it’s a default Apache Windows module ( http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html )
Ah, I put first only the line “ThreadStackSize 8888888” (without ifModule) to be sure that it is taken into account. If the module was not mounted, Apache would have wrote it in apache_error.log. It should work on every windows normal installationApril 17, 2015 at 5:31 pm #161198In reply to: Add Custom User Roles
Robin W
Moderatorok, I’ve just loaded that code to my test site and it all works fine, the artisan role gives moderator access.
Not sure what has happened, what other changes have there been to your site?
He had the same results when set to an Artisan
Presume you mean he could not access, and by the by what do you mean by that? what happens when they try and access the forums, can they not see menu item, or what do they get when they try??
April 17, 2015 at 4:56 pm #161197marjons
ParticipantHello, I’m the webdesigner for BBC and installed both buddypress and the extra code for functions.php for him.
However, the auto mentions only work from the text tab (not the visual), is this a bug?
Also, it seems that some users get a notification, but some are not.
Any idea what could be the problem?
Thanks in advance!
April 17, 2015 at 3:23 pm #161195In reply to: Add Custom User Roles
Alice Kaye
ParticipantHi @robin-w!
Thanks for replying back about this. I’m sorry I failed to mention my troubleshooting. It definitely worked when I set up my husband’s account as a Councilman, and I tested every single rank on his account. He had the same results when set to an Artisan.
At that point, I came here because I can’t see anything wrong with the code.
Thanks again for the reply! 🙂
April 16, 2015 at 10:26 pm #161183In reply to: How to add create new topic button and….
sina_mech
ParticipantThank you for your reply. The code you just suggested, shows the form in new page. Still users have to choose the parent forum, in which they would like to publish their topic. I was wondering if there is a way that like other forums, user can create the topic IN THE CURRENT FORUM by pishing the NEW TOPIC button at the corresponding forum (without any need to choose the destination forum in the form).
April 16, 2015 at 10:19 pm #161181In reply to: How to add create new topic button and….
Robkk
Moderatoryou can do new page.
just create a new page in wordpress called new-topic or something.
put the shortcode
[bbp-topic-form]in it.then change my function to this instead.
function rk_new_topic_button() { echo '<a href="/new-topic/" class="bbp-new-topic-button button btn input[type="button"]" >New Topic</a>'; } add_action('bbp_template_before_topics_loop','rk_new_topic_button');April 16, 2015 at 10:04 pm #161180Robkk
Moderatoryou could also edit loop-single-reply.php in your child theme and just replace
<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>with
<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_position(); ?></a>that should work the same way.
April 16, 2015 at 1:10 pm #161168RobbyMcCullough
ParticipantHi all!
I am having the same issue. I tried using the code snippets provided by xenous (thanks for those), but they didn’t work 🙁
jturet, if you could explain anything you tried to resolve this issue, we’d really appreciate it. We’re a bit stumped and SMTP/Mail server issues are beyond any of our expertise here. Thanks!
April 16, 2015 at 11:38 am #161163In reply to: limited capabilities for roles in a specific forum
redwolf83
ParticipantOk, Thanks Robin, I’ve solved the matter.
at the beginning of form-topic.php I’ve added this code
<?php $forumid = bbp_get_forum_id(); if ($forumid == YourForumID(in numbers without quote.) ) { $displayed_user = bbp_get_user_id( 0, false, true ); $role = bbp_get_user_role($displayed_user); if ( $role == "bbp_participant" ) { echo '<div class="bbp-template-notice">This forum is marked as closed to new topics from participant, however your can reply to existing topics</div>'; return; } } ?>Thanks for your help, 🙂 ::cheers::
Have a Nice day!April 16, 2015 at 11:12 am #161162wenlujon
Participantok, i got it (loop-replies.php):
<?php $count=1; while ( bbp_replies() ) : bbp_the_reply(); ?> <?php $post_id = get_the_ID(); //save the new count update_post_meta($post_id, 'bbp_seq_test', $count) ; ?> <?php bbp_get_template_part( 'loop', 'single-reply' ); $count = $count + 1 ; ?> <?php endwhile; ?>and define a function show_seq()
$post_id = get_the_ID(); $count = get_post_meta( $post_id, 'bbp_seq_test', true ); echo $count;and then in loop-single-reply.php
` <a href=”<?php bbp_reply_url(); ?>” class=”bbp-reply-permalink”>#<?php show_seq(); ?></a>
`and it works!
please take a look!
http://bbs.circday.com/forums/topic/%E6%B5%8B%E8%AF%95%E6%B0%B4%E5%8D%B0
April 16, 2015 at 10:35 am #161159wenlujon
Participantlooks like loop-single-reply.php is a single reply entry, which file invokes it (in a loop way),
if i can find the caller, maybe I can set the meta data in the caller every time it loops:$index=1 while (replies) set meta data (topic_id) to $index load loop-single-reply.php get meta data (topic_id) in loop-single-reply.php $index++April 16, 2015 at 8:03 am #161157In reply to: Redirect from page to profile url (menu link)
project_subdomain
Participantthanks robkk!
now the profile link is in the main and also in my sidebar menu.
unfortunately i’d need to have it in the sidebar menu only. also i’d need a link to the single profile pages as I’d like to replace the default display of options below the avatar which I’d remove then.which amendments of that code would do that?
April 16, 2015 at 7:41 am #161154In reply to: limited capabilities for roles in a specific forum
Robin W
Moderatoryes you would just put that code in form-topic.php
wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/form-topic.phpMake a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/form-topic.phpbbPress will now use this template instead of the original
you can then look at how the form does this, and put the appropriate lines in.
April 16, 2015 at 7:36 am #161153Robin W
Moderatorwith code anything is possible !
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php
line 27
April 16, 2015 at 3:36 am #161145In reply to: Add Custom User Roles
Robin W
Moderatoryou can have multiple roles with the same capabilities, so the original code should be fine.
So I would check
1. that the moderator role which you have renamed Councilman works
2. that if you set up a test user and give them Artisan, that that works (ie is it only her)April 16, 2015 at 12:31 am #161141In reply to: My forums List messed up
Robkk
ModeratorbbPress thinks your forums are a blog post hence the “filed under” .
you need to create a bbpress.php in your child theme from a copy of page.php and remove any unwanted code you do not need for your bbPress forums.
April 15, 2015 at 11:32 pm #161137In reply to: Redirect from page to profile url (menu link)
Robkk
Moderatoryou can do something like this to a link to your profile in the menu
add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else $current_user = wp_get_current_user(); $user=$current_user->user_login ; $profilelink = '<li><a href="/forums/users/' . $user . '/">Your Profile</a></li>'; $menu = $menu . $profilelink; return $menu; }April 15, 2015 at 10:26 pm #161130Robkk
Moderatorif you are really using bbpress v1 then it wouldnt work.
i think that shortcode is only for the newer bbpress v2 wordpress plugin
-
AuthorSearch Results