Search Results for 'code'
-
AuthorSearch Results
-
July 19, 2014 at 1:46 am #149333
In reply to: Help with getting basic plugin to work
Stephen Edgar
KeymasterUse WordPress’
user_contactmethodshttps://codex.wordpress.org/Plugin_API/Filter_Reference/user_contactmethods
July 19, 2014 at 12:54 am #149332Topic: Help with getting basic plugin to work
in forum Plugins3djake
ParticipantHi there
I want to add more fields to the users profile and also display them under the users role in posts.
I just want it to fetch the information from the users meta data.
How ever the following does not appear to work
`
<?phpfunction add_author_details( $user_details ){
/* Add author details */
$user_details['soldier'] = __('Soldier Name');return $user_details;
}
add_filter('user_adddetails', 'add_author_details');function add_author_details_author() {
echo get_user_meta(bbp_get_reply_author_id(), 'soldier', true);
}
add_action( 'bbp_theme_after_reply_author_details', 'add_author_details_author' ); ?>
`Any help would be appreciated.
July 19, 2014 at 12:08 am #149330In reply to: User Groups and Forums
Stephen Edgar
KeymasterbbPress’ ‘private’ forums can be viewed by any bbPress user logged in.
bbPress’ ‘hidden’ forums can only be viewed by any bbPress moderators and keymasters.https://codex.bbpress.org/getting-started-with-bbpress/#creating-your-first-forum
For BuddyPress specific info you should see http://buddypress.org
https://codex.buddypress.org/buddypress-components-and-features/groups/group-settings-and-roles/
July 18, 2014 at 11:58 pm #149328In reply to: Update 2.5.4 – Lost Languages Files
Stephen Edgar
KeymasterYou’ll need to download the translations manually per the details here:
https://codex.bbpress.org/bbpress-in-your-language/
https://translate.wordpress.org/projects/bbpress/2.5.xSave them into
/wp-content/languages/pluginsWith some luck these two direct links will get you the .mo and .po. Make sure you rename both files so they are named
bbpress-fr_FR.moandbbpress-fr_FR.porespectively.The reason I asked for the language you are using is because if the language translation is 100% translated then bbPress translations are delived to you automatically by the same WordPress Core ‘Automatic Updates’ mechanism, sadly bbPress French translations are not at 100%. (Technically they are at 100% translated but there are 228 strings waiting to be approved.)
July 18, 2014 at 7:08 pm #149320In reply to: Update 2.5.4 – Lost Languages Files
Stephen Edgar
KeymasterWhat language are you using? You should see bbPress’ translations in
/wp-content/languages/(Dependant on the language you use also changes a couple of things)
July 18, 2014 at 4:29 pm #149315In reply to: compact bbpress
Robin W
ModeratorThat doesnโt seem to be possible in 2012, which forces a sidebar if you want a search facility, and which consumes a lot of vertical space with the identity of the contributor, including a large avatar.
Good job we’re in 2014 then ๐
If you switch on the search facility
dashboard>settings>forums and look for search allow forum wide search, you’ll get a search bar at the top of the forums pagefor the avatar size use the following code in your functions file
function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) { $author_avatar = ''; if ($size == 14) { $size = 24; } if ($size == 80) { $size = 110; } $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); add_filter('bbp_get_current_user_avatar', 'my_bbp_change_avatar_size', 20, 3);The example increase the size, just change to to what you want
see https://codex.bbpress.org/functions-files-and-child-themes-explained/ for how to do that
you can also remove things like keymaster – just come back with what you want – and we’ll try to help you
July 18, 2014 at 4:18 pm #149314In reply to: Forum Page does not have link to Login
Robin W
ModeratorYour link takes you to a registration page
there are several ways to get a login.
You can use a sidebar and add the login widget
or you can add a login to your menus
or a modal loginJuly 18, 2014 at 4:09 pm #149313In reply to: My topics side bar is not appearing in my forum?
Robin W
ModeratorOk,
Can you confirm that that you actually followed my instructions? Which weren’t to re-install the widget. If you’ve simply done that then you would not have changed any settings (they remain in the database on deletion and are just re-enlivened when the widget is re-installed) and you would still have the problem. If you follow the instructions, this changes settings and in many cases gets it working.
But assuming you haven’t tried to guess what I was trying to get you to do, and have followed the instructions and these didn’t work, then we’ll try approach 2.
This involves installing another plugin and using that to set conditions on the sidebar.
so go to dashboard>plugins>install new and look for ‘widget logic’ by Alan Trewartha and install that.
This lets you set conditions on when a widget appears in the sidebar.
so now in your main sidebar if you look at any widgert you’ll see a new box at the bottom which says widget_logic
for any widgets you want in all your pages including bbpress – just leave this blank
for widgets that you just want in bbpress pages add the logic
is_bbpress()in the widget logic box
for widgets that you don’t want in bbpress pages add the logic
!is_bbpress()in the widget logic boxJuly 18, 2014 at 3:42 pm #149312Topic: Forum Page does not have link to Login
in forum Installationarminius
ParticipantHello, just setup my first forum, and it does not give the user an option to login if they have already created the account. On my forum page, I have the code: [bbp-forum-index]. Here is the page: http://bodybuildingdietapp.com/forum/. Insight would be appreciated.
July 18, 2014 at 1:11 pm #149308In reply to: Sidebar reappear in topic and topic/
Robin W
Moderatorcan you post the code from your current bbpress.php
July 18, 2014 at 1:06 pm #149307In reply to: bbPress menus not appearing in some of my sites
Robin W
Moderator“well, thatโs life in the world of WordPress, so live with itโ, which is what your first comment conveyed” – yep and it’s what I meant – having coded several plugins, I can with some certainty say that the way you link to wordpress does mean that several people can hook to the same item and affect each other, and no we can’t test all plugins against all other plugins.
But your offer to try and come up with a repeatable problem would be great, and if you can do so I’d be happy to try and look and let you know why a particular plugin is affecting.
However 5 people going to the doctor after having been to the gym doesn’t mean there’s a common problem or that the gym is to blame ๐
Anyway I look forward to hearing from you when you’ve had a chance to investigate.
July 18, 2014 at 10:58 am #149303In reply to: Sidebar reappear in topic and topic/
gogitossj34
ParticipantOk. Now this is what I’m currently have:
The forum page is okay with full width and no sidebar but topic is still like before, with sidebar.
Note that I also did thing a bit differently. This time I didn’t remove the get_footer line. Instead I chose the 1 page width layout ( not template ). I did try this before but it didn’t work because I put the [bbp-index] line inside c.o.d.e in the page. After I remove them, it worked.
So now, I want the topic to be like the forum page, no sidebar and full width.And also, I’ve just came across this other things. I notice that there are 2 “forum” page. forumS and forum. the things is. When I access the forum page through the forum permalink, it doesn’t have side bar but when I access it through the forumS permalink like when I click on forums at Home > forums > …, it act just like the topic page.
This is a long post but to summarize:
The topic and the forum access from the forums permalink to be full width with no sidebar.Thanks in advance.
July 18, 2014 at 10:56 am #149302Robin W
ModeratorI deactivated, deleted, reinstalled, and reactivated the Easy WP SMTP plug-in and tested: same result (below.)
OK, but did you just deactivate the plugin, and then test a forum post. I was keen to see if the problem was being caused by bbpress or the plugin.
@nightcoder – you’re issue may or may not be the same. That’s why I’m keen to get surachar
to see if they have the problem without the plugin.The bit of code you quote is the bit that sets up the variable for the to address, but as far as I can see there’s nothing there that should be causing a problem, it simply strips the http part from the URL as set in wp_options ‘home’.
July 18, 2014 at 10:33 am #149299In reply to: bbPress menus not appearing in some of my sites
Robin W
ModeratorThese issues will occur with different combinations of plugins, and it is nobody’s fault.
and it will never be eliminated.Wordpress is free open source software. It allows others to hook into it using Filters and actions, as well as using templates and functions. Additionally theme developers can affect the way wordpress functions. This lets lots of other people change how wordpress works and add both functionality and looks.
So if two developers both hook into the same bit of code, the actions of one can alter or even cancel out the other’s code.
With many thousands of plugins it is simply impossible for developers to test to see if their plugin works with every other plugin out there.
bbPress is thoroughly tested with the latest version of WordPress, in combination with all of the wordpress default themes (twentyten, twentyeleven etc.) to ensure it functions. Most bbpress plugin developers will also test against this combination to give a good degree of conformance.
This is the best that you can get.
It is no more the fault of bbpress that it doesn’t work with plugin A, than it is the fault of plugin A that it doesn’t work with bbpress!
Sorry but that is life ๐
Open source means you get lots of great FREE software but you don’t get an integration guarantee – it’s pretty damn good, but sorry not perfect.
And It’s nobody’s fault !
July 18, 2014 at 10:09 am #149295In reply to: bbPress menus not appearing in some of my sites
linkomatic
ParticipantI have experienced similar problems with the bbPress menus not showing in the dashboard. For example, I have a site where both CPT UI and WordPress SEO plugins are installed. The menu items appeared adjacent to each other in the dashboard – then WordPress SEO menu appeared just above the CPT UI menu. After I installed bbPress, the Forums, Topics and Replies menus did not appear in the dashboard. When I use Chrome inspector to look at the code, it appeared that the bbPress menus were trying to display below the WordPress SEO menu and above the CPT UI menu — but they did not appear. I tried deactivating the WordPress SEO plugin to see what would happen and, sure enough, the bbPress menus then DID appear in the dashboard, just above the CPT UI menu. I reactivated WordPRess SEO, and everything now looks fine: SEO appears above Forums, Topics and Replies, followed by CPT UI.
So, perhaps all’s well that ends well, but this semi-random behavior is concerning. I’ve seen other similar issues myself, and employed different solutions recommended by others on different discussion threads. One of these involved installing the Capability Manager plugin. That fixed the dashboard menu problem but BROKE the CPT UI plugin! I deactivated Capability Manager, which un-broke CPT UI, and still the menus displayed correctly. So, again, all’s well that ends well — but what the heck is going on here? It would be nice if the bbPress plugin developer would weigh in on this topic — and figure out a way to eliminate these issues.
July 18, 2014 at 9:38 am #149294In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantStephen and Robkk, once again thanks for everything you do here.
I will continue improving my bbPress and will post some codes once Iยดm done.July 18, 2014 at 7:47 am #149284nightcoder
ParticipantHello Robin,
I’ve got the same issue also. Just noticed that my website url is starting with an “s” as Sura’s. I have never installed the plugin the Easy SMTP plugin.
It might be related with this line in /includes/common/functions.php line:1065
$do_not_reply = '<noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';Kind Regards
July 18, 2014 at 5:12 am #149281In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantOkay, figured it out.
I added this code
<a class="bbp-new-topic-button" href="#new-post">New Thead</a>right after
<?php do_action( 'bbp_template_before_topics_loop' ); ?>And now I need to float my button right and add a bit css to it!
Thanks so much guys!
July 18, 2014 at 3:46 am #149278In reply to: How to make similar bbpress forum to QuicSprout one?
Robkk
ModeratorThings are getting tricky and or difficult following the actual code here
XD haha did not know you were tracking this
i created a github account, was gonna end up with one anyway, so ehh why not now.
July 18, 2014 at 3:03 am #149272In reply to: How to make similar bbpress forum to QuicSprout one?
Stephen Edgar
KeymasterThings are getting tricky and or difficult following the actual code here ๐
I just made a GitHub gist containing the original bbPress files and then progressing through each of the above posts revising the code in each file.
You can see it here https://gist.github.com/ntwb/695bc26b44d6458040c7
Scroll to the very bottom and you will see the descriptions of the revisions and links to each change ๐
If you have a GitHub account you can ‘fork’ my Gist, edit and revise your own versions, it makes sharing code so much simpler to follow, but is only a suggestion of course, don’t feel obliged to have to create a GitHub account and continue as you are here if you like. Showing revisions, green code is new code and red is removed code along with line numbers is what makes version control so awesome, you are able to clearly see what has changed and where exactly ๐
Here all the revisions listed in one hit https://gist.github.com/ntwb/695bc26b44d6458040c7/revisions
July 18, 2014 at 2:10 am #149269In reply to: How to make similar bbpress forum to QuicSprout one?
Robkk
ModeratorUnfortunately I pasted the code correctly, but I still do not see a link anywhere
well like is said i had trouble with it too i had the code in my content-archive-topic.php and then it disappeared for some reason.
But before i had the code there i just threw it into loop-topics.php so it should work.
But if your a style freak like me you will get annoyed whenever you look at your favorited topics and subscribed topics and also see the new thread link there too.
Any other ideas perhaps?
No idea, flush cache?
Sorry for bothering you man
nah your not bothering
ok delete the new thread code from content-archive-topic.php
and now copy loop-topics.php into your child theme
the entire code of loop-topics.php should look like this
<?php /** * Topics Loop * * @package bbPress * @subpackage Theme */ ?> <?php do_action( 'bbp_template_before_topics_loop' ); ?> <ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics"> <a class="bbp-new-topic-button" href="#new-post">New Thead</a> <li class="bbp-header"> <ul class="forum-titles"> <li class="bbp-topic-title"><?php _e( 'Topic', 'bbpress' ); ?></li> <li class="bbp-topic-voice-count"><?php _e( 'Voices', 'bbpress' ); ?></li> <li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></li> <li class="bbp-topic-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></li> </ul> </li> <li class="bbp-body"> <?php while ( bbp_topics() ) : bbp_the_topic(); ?> <?php bbp_get_template_part( 'loop', 'single-topic' ); ?> <?php endwhile; ?> </li> <li class="bbp-footer"> <div class="tr"> <p> <span class="td colspan<?php echo ( bbp_is_user_home() && ( bbp_is_favorites() || bbp_is_subscriptions() ) ) ? '5' : '4'; ?>"> </span> </p> </div><!-- .tr --> </li> </ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> --> <?php do_action( 'bbp_template_after_topics_loop' ); ?>July 18, 2014 at 1:15 am #149268In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantThanks for all the help @Robbk.
Unfortunately I pasted the code correctly, but I still do not see a link anywhere, will try to figure out why. Any other ideas perhaps? Sorry for bothering you man.
July 17, 2014 at 11:52 pm #149264In reply to: customizing bbpress admin links
Robkk
Moderator1 [x] admin links show up in a dropdown menu
2 [x] admin links work while in the dropdown menu
3 [x] admin links work on every post
4 [x] different admin links show up depending on post type
5 [x] admin links hover over all objects and is not hidden if all the way right
6 [x] dropdown menu show links to all users
7 [/] add report content link and ignore user link on reply admin links
8 [/] and mark as read, report content , ignore user, favorite , and subscribe links to topic admin links
*2 cant single out stick , and (to front) to where its on 2 different
li
*3 Fixed with different css code
*5 used z-index
*7 only ignore user is left (1/2)
*8 only ignore user is left (4/5)will post code when i fix some css positioning for original bbpress layout
July 17, 2014 at 9:12 pm #149262In reply to: Different Sidebar for the Forums
Herophantom
ParticipantThank you.
I would also like to update, so after reading some more last night, I found the documentation on the short codes. I tried making a dedicated page and using the short codes to load the main forum index. Now this works in almost every way, including using the proper sidebar that I want, however, the search option at the top is now off set, with the button below the bar instead of next to it. I have been fiddling with the CSS for awhile to see if I can get it to align properly, but so far no luck. And now, even the page provided by the bbpress plugin is doing the same thing. So maybe I messed something up, or maybe I’m just missing something, but if I can get this solved, I will have a perfect solution.
July 17, 2014 at 7:24 pm #149258In reply to: How to make similar bbpress forum to QuicSprout one?
Robkk
Moderatorwhat am I doing wrong guys?
reading carefully
your suppose to put
<a class="bbp-new-topic-button" href="#new-post">New Thead</a>above
<?php do_action( 'bbp_template_before_topics_index' ); ?>like this
<?php /** * Archive Topic Content Part * * @package bbPress * @subpackage Theme */ ?> <div id="bbpress-forums"> <?php if ( bbp_allow_search() ) : ?> <div class="bbp-search-form"> <?php bbp_get_template_part( 'form', 'search' ); ?> </div> <?php endif; ?> <?php bbp_breadcrumb(); ?> <?php if ( bbp_is_topic_tag() ) bbp_topic_tag_description(); ?> <a class="bbp-new-topic-button" href="#new-post">New Thead</a> <?php do_action( 'bbp_template_before_topics_index' ); ?> <?php if ( bbp_has_topics() ) : ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?> <?php endif; ?> <?php do_action( 'bbp_template_after_topics_index' ); ?> </div>tell me if you got it to work now
-
AuthorSearch Results