Search Results for 'code'
-
AuthorSearch Results
-
August 30, 2016 at 3:49 pm #177505
MalMac
ParticipantContinuing on….
In my themes function.php file I have the following which creates my thumbnail:
// /bbpress/templates/default/content-single-forum add_action('bbp_template_before_single_forum', 'pym_print_featured_image_single_forum', 11); add_action('bbp_template_before_single_forum', 'pym_print_forum_description', 12); function pym_print_featured_image_single_forum() { if (has_post_thumbnail()) { echo '<div class="pym-bbp-topic-thumbnail">'; echo get_the_post_thumbnail(null, 'thumbnail' ); echo '</div>'; } }I have been calling this elsewhere in my template using ”
<?php do_action( 'bbp_template_before_single_forum' ); ?>I am now trying to edit content-single-forum.php to call this thumbnail using the following:
<?php bbp_get_template_part( 'loop', 'topics' ); ?>How do I go about getting the thumbnail to be called in the loop?
Thanks, Malcolm
August 30, 2016 at 2:05 am #177499In reply to: Notification when reply in topic receives reply?
VeeLow
ParticipantYes, I did. (Sorry for this long delay.)
They don’t solve the case where I am notified of my own activity, when I reply to a replier to my initial topic.
They still fire: a new nunber 1 appears in the bubble.
But your code does erase the text–I get a blank space where the content would appear, and if I click through the text is also invisible–in my list of notifications they appear as blank entries…
August 29, 2016 at 11:10 pm #177498In reply to: Translations are not appearing
Stephen Edgar
KeymasterMaybe try deleting any
bbpress-es_ES.pofiles, and then get new translations by going to http://example.com/wp-admin/update-core.php and click “Update Translations”August 29, 2016 at 4:43 am #177486In reply to: bbp_get_user_role_map filter not working
ptrck_r
Participant[Solved]
If anybody hasthe same problem, I solved it by creating a small plugin out of the code so it’ll load on time.
<?php /* Plugin Name: FilterBbRoleMap */ if(!class_exists('FilterBbRoleMap')) { class FilterBbRoleMap { public function __construct() { add_filter('bbp_get_user_role_map', 'add_spectator_role'); function add_spectator_role($role_map) { $role_map['prefix_spectator'] = bbp_get_spectator_role(); return $role_map; } } } $FilterBbRoleMap = new FilterBbRoleMap(); }August 28, 2016 at 11:32 pm #177475In reply to: How To Remove “by” from Topics Widget
Robkk
ModeratorThe “by” is printed in php, as displayed in this code here.
https://github.com/ntwb/bbPress/blob/master/src/includes/common/widgets.php#L822
There is a way to use CSS to hide the “by” though. It will look like the topic title has a little margin away from the topic authors name.
Here is a custom CSS example.
.widget_display_topics li { visibility: hidden; } .widget_display_topics li > * { visibility: visible; }There might be a way to use a plugin like Loco translate to just translate “by” to nothing also, but I have never tried that plugin before, and I am not 100% if that would even work. But it could be another possibly easy solution.
August 28, 2016 at 10:59 pm #177474In reply to: single forum shortcode not working
Robkk
ModeratorRobin might be on to something with the url thing. Robins suggestion works fine, but I usually suggest looking into using the Reveal IDs plugin, as it really makes it easier by just adding a column in posts like Forums > All Forums list and users list in the WordPress backend.
August 28, 2016 at 10:54 pm #177473In reply to: meta-single-topic
Robkk
ModeratorIts a custom bbPress template file in your theme. I suggest you contact your theme developer. Maybe they can make the custom bbPress layout translatable by a few code tweaks.
August 28, 2016 at 10:41 pm #177472In reply to: How to set up a page with unanswered topics?
Robkk
ModeratorYou already should have a way to view topics with no replies. By default bbPress has a feature called Views. It allows you to display topics with various different arguments. Topics with no replies should be one of the 2 default views which are Most popular topics and Topics with no replies
You can link to the existing page using the Topic Views widget in your sidebar, or you can use a shortcode already provided by bbPress to display a view shortcode in a page and add it to a menu. You can also also instead add a custom link to a menu in the menus section in Appearance > Menus if you do not need to use a shortcode in a page.
The widget is called the Topic Views widget that you will be able to see in Appearance > Widgets or you can manage your sidebars using the Customizer API in Appearance > Customize in the WordPress backend.
https://codex.bbpress.org/features/widgets/
The shortcode you would want to use is
[bbp-single-view id='no-replies']https://codex.bbpress.org/features/shortcodes/#views
If for some reason you may not already have the default view. See if its related to a theme/plugin function removing the default view by troubleshooting.
Plugin Troubleshooting
https://codex.bbpress.org/getting-started/troubleshooting/#plugins
Theme Troubleshooting
https://codex.bbpress.org/getting-started/troubleshooting/#themes
If its not a theme/plugin issue we can check to see if its a possible bug causing an issue.
August 28, 2016 at 9:26 pm #177471In reply to: Translations are not appearing
Stephen Edgar
Keymaster@rateyourway The “freshness” term has been removed from bbPress 2.6 (
/dev) so you will not see it in the translation files, it is still there for the current bbPress 2.5.x see:
https://translate.wordpress.org/projects/wp-plugins/bbpress/stable/es/default?filters%5Bterm%5D=freshness&filters%5Buser_login%5D=&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&filter=Filter&sort%5Bby%5D=priority&sort%5Bhow%5D=desc#Edit: The string may also be coming from your theme, switch themes to one of the included “Twenty” themes to double check.
August 28, 2016 at 3:00 pm #177469In reply to: How to set up a page with unanswered topics?
Robin W
ModeratorI’ve just added that capability to one of my existing shortcodes in my style pack plugin, so if you install
https://wordpress.org/plugins/bbp-style-pack/
and then see
Dashhboard>settings>bbp style pack>shortcodes for a description of how to use it in detail, but
[bsp-display-topic-index noreply='true']used in a page will get you what you want
August 27, 2016 at 2:11 pm #177457In reply to: single forum shortcode not working
Robin W
ModeratorThe correct code would be
[bbp-single-forum id='3569159-2']but I suspect ‘3569159-2’ is the url not the post ID as post ID are a whole number and what you want
so go to
Dashboard>forums and select all forums
If you hover of ‘edit’ of then forum you want, you’ll see at the bottom left of the screen
url…post.php?post=12345&action=edit
it is the 12345 that you want to put in the shortcode
August 27, 2016 at 8:34 am #177455Topic: single forum shortcode not working
in forum TroubleshootingsmartIt
ParticipantHi,
I created a forum, his id is 3569159-2 and it contains one topic.in this page of my website http://radiotounsi.com/?page_id=4862
I tried to display this forum by using the shortcode [bbp-single-forum id=$3569159-2] but nothing is displayed, but other bbpress shortcodes work just fine like [bbp-forum-index] and [bbp-login]
I switched the theme to twenty sixteen for testing purpose, same problemAugust 27, 2016 at 12:14 am #177453In reply to: Providing a link to login
epretorious
ParticipantThis may be easier than I’d thought:
[root@cp bbpress]# grep -r 'You must be logged in' * languages/bbpress.pot:msgid "You must be logged in to create new forums." languages/bbpress.pot:msgid "You must be logged in to reply to this topic." languages/bbpress.pot:msgid "You must be logged in to create new topics." templates/default/bbpress/form-forum.php: <p><?php is_user_logged_in() ? _e( 'You cannot create new forums.', 'bbpress' ) : _e( 'You must be logged in to create new forums.', 'bbpress' ); ?></p> templates/default/bbpress/form-topic.php: <p><?php is_user_logged_in() ? _e( 'You cannot create new topics.', 'bbpress' ) : _e( 'You must be logged in to create new topics.', 'bbpress' ); ?></p> templates/default/bbpress/form-reply.php: <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p>What’s the “best practice” for modifying the languages file? Is that something that I can achieve with a child theme?
TIA,
Eric Pretorious
Portland, ORAugust 27, 2016 at 12:04 am #177452In reply to: Understand forums structure
epretorious
Participant> Thanks, Pascal: That worked perfectly!
One, very important correction: If visitors to the site aren’t logged in, they see nothing – not even the warning that “You must be logged in to…” 🙁
There must be an easy way to do away with that “Oh bother!…” bit of text without leaving visitors in the dark. 🙁
Maybe I should just manually change the source:
[root@cp bbpress]# grep -r bother * languages/bbpress.pot:msgid "Oh bother! No forums were found here!" languages/bbpress.pot:msgid "Oh bother! No replies were found here!" languages/bbpress.pot:msgid "Oh bother! No search results were found here!" languages/bbpress.pot:msgid "Oh bother! No topics were found here!" templates/default/bbpress/feedback-no-topics.php: <p><?php _e( 'Oh bother! No topics were found here!', 'bbpress' ); ?></p> templates/default/bbpress/feedback-no-replies.php: <p><?php _e( 'Oh bother! No replies were found here!', 'bbpress' ); ?></p> templates/default/bbpress/feedback-no-search.php: <p><?php _e( 'Oh bother! No search results were found here!', 'bbpress' ); ?></p> templates/default/bbpress/feedback-no-forums.php: <p><?php _e( 'Oh bother! No forums were found here!', 'bbpress' ); ?></p>Eric Pretorious
Portland, ORAugust 26, 2016 at 11:55 pm #177451Topic: Providing a link to login
in forum Troubleshootingepretorious
ParticipantI’m really surprised to see that bbPress warns visitors to the forums that “You must be logged in to create new topics.” but does not provide a link to the login page. e.g.,
<a href='/login.php'>Login</a> to create new topics and/or to reply to topics.Is there some way to correct that?
TIA,
Eric Pretorious
Portland, ORAugust 26, 2016 at 6:47 pm #177446epretorious
ParticipantRobin:
Originally: I hid the top primary menu by adding a bit of CSS to the child theme:
.primary-navigation { display: none; }…but I have since enabled the top primary menu.
HTH,
Eric Pretorious
Portland, ORAugust 25, 2016 at 8:48 pm #177429Robkk
ModeratorCreating a new view template will help with the layout of how you want it. And yes you can still show that view with a shortcode.
August 25, 2016 at 8:34 pm #177428MalMac
ParticipantApologies for being unclear,
The shortcode I posted worked, just wondering if I create a new view template if I will be able to call it in a shortcode?
Thanks!
August 25, 2016 at 8:19 pm #177427Robkk
ModeratorThe shortcode that you posted seemed alright with the code you posted, so you had the right ID and everything, only thing I would possibly say is if those quotes don’t work use single quotes.
'August 25, 2016 at 8:13 pm #177425MalMac
ParticipantThats a great help, Thanks! Would it be possible to call this new view in a shortcode?
August 25, 2016 at 7:38 pm #177423In reply to: Dynamic Profile Link
Robkk
ModeratorThe toolbar on this site is sort of absolutely positioned, it has this CSS used. Its not really that great if you want a good mobile site.
#wpadminbar { top: 81px; }August 25, 2016 at 5:32 pm #177419Robkk
ModeratorIf you want a specific view to have images, you would need to create a custom view template called either
single-view-recent-with-topic-image.phporview-recent-with-topic-image.phpand most of the code would be based on thesingle-view.phptemplate in the extras folder in the bbPress plugin, you would have to make it custom enough to include the featured image code, and I guess however your users will be able to select a featured image during topic creation.Robkk
ModeratorWell I don’t entirely understand where you are getting at, but I mean its possible for a user to have 3 different roles.
For example.
Site Role – Subscriber – Default WordPress role
Forum Role – Participant – Default bbPress role
Membership Role – Premium Member – Some paid membership framework plugins roleIf you want 1 custom site role with different capabilities that other roles might have, consider creating a custom user role. But be aware of what each capability does, so that you will not give your users permissions that you do not exactly want them to have.
Creating a custom bbPress role guide.
https://codex.bbpress.org/custom-capabilities/
bbPress user roles and capabilities
https://codex.bbpress.org/getting-started/before-installing/bbpress-user-roles-and-capabilities/
WordPress roles and capabilities
https://codex.wordpress.org/Roles_and_Capabilities
And a plugin I would recommend to create a custom user role with custom capabilities would be a plugin called Members by Justin Tadlock.
August 25, 2016 at 4:56 pm #177417MalMac
ParticipantHello All,
This is what I have so far:
in my functions.php file:
bbp_register_view( 'recent-with-topic-image', __( 'Recent With Topic Image' ), array(false ,'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 8 ), false );corresponding short code
[bbp-single-view id="recent-with-topic-image"]What can I add to array to show the featured image from the topic that the post is in?
Thanks, Malcolm
August 25, 2016 at 3:39 pm #177416In reply to: What do you think BBPress for news site, check this!
Robkk
ModeratorI think other moderators thought this was spam.
I can see that it is hard to tell unless you go digging in your sites source code to tell if you are using bbPress.
I knew one day with all these users basically using bbPress as a blog, that a designer one day would customize and create custom templates for bbPress enough to just make it look like a blog.
Interesting and very unique stuff!!
You don’t even have to worry about waiting for bbPress replies for blog posts, because your whole site is mainly using bbPress.
Interesting as hell to see bbPress turn into a news site.
-
AuthorSearch Results