Skip to:
Content
Pages
Categories
Search
Top
Bottom

PHP check – show latest replies only

Published on January 24th, 2014 by Shmoo

Just curious as I’m not a PHP-er and learning each day.

What I’m trying to make is a front-end tab-system that shows three tabs
Tab [1] = Topics
Tab [2] = Replies
Tab [3] = Refresh, just a reload of the page

bbPress list latests - Topics and Replies

Topics,
This should be a very easy query-/loop in general, it’s just a list of all new topics that have been added to my forum. There’s only one little thing, it should order at the date of creation so that when an older topic gets a reply it doesn’t bounce to the top of the list.

Replies,
This should be a query for latests updated topics of any age, if a topic of 5 years old receives an update or bounce it should jump to the top of this list. + newly or older created topics without replies shouldn’t get listed inside this second ‘Replies’ tab.

I came up with this idea:


<?php if ( bbp_has_topics( array( 'show_stickies' => false, 'order' => 'DESC', 'posts_per_page' => 120, 'max_num_pages' => 1 ) ) ): ?>
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
	<?php if ( bbp_get_topic_reply_count() ) {
	 bbp_get_template_part( 'last-topic-activity/last-replies-loop' );
	} ?>
<?php endwhile; ?>
<?php endif; ?>

posts_per_page => 120 is a little bold but it’s just for testing right now.
Just curious if this is okay to work with, I found the bbp_get_topic_reply_count() function and it has a True or False statement so I thought lets just check if the topics have a reply_count … if it’s true than list a bunch of stuff through the custom-loop template I made.

Hope somebody can verify if this is okay, it looks like it’s working.

Moderator is unable to create forums

Published on January 24th, 2014 by sarau

I’m using WordPress version 3.8.1 (the latest as of this writing) and bbPress version 2.5.3 The url wouldn’t show the problem since the forum is private and you would only see “Oh bother! No forums were found here!” on the page as a non-logged in non-member of the site. This question also relates to the WordPress dashboard rather than the site itself. I’ve given a user on the site the bbPress role of Moderator with the expectation that he should be able to set up new forums, however, when he logs in, he can only see/access topics, replies and profile in the WordPress dashboard. There is no link to “Forums” where he can add new ones. Why is this the case when according to the roles information on this page: https://codex.bbpress.org/bbpress-user-roles-and-capabilities/ a Moderator “can create and edit forums. Can create, edit and delete other users’ topics and replies. Can manage Tags, and moderate a forum with the moderation tools”?

about permalink

Published on January 24th, 2014 by IbrahimAlfatesh

Hi all,
I would like to someone help me about my website problem on permalink , because I don’t like a browser way for my topic forum (forum/name-topic ) .
I would be as below
forum/id-topic
can anyone help me please ?
i well be so glad if anyone there‎

about permalink

Published on January 24th, 2014 by IbrahimAlfatesh

Hi all,
I would like to someone help me about my website problem on permalink , because I don’t like a browser way for my topic forum (forum/name-topic ) .
I would be as below
forum/id-topic
can anyone help me please ?
i well be so glad if anyone there‎

Private: appended twice to forum title

Published on January 24th, 2014 by sarau

Hello,
I’ve set up bbPress on a clients’ website. They have a private forum and unfortunately the word “Private” gets appended to the forum title twice. The actual title that I created is “Parish News and Discussion” but on the page it reads “Private: Private: Parish News and Discussion” Is there a reasonable way to fix this? I am not a php developer so please keep that in mind when responding. Thanks in advance for any help you can give me!
– Sara

Change Edit Profile Link to Edit bbpress Link

Published on January 24th, 2014 by Matthew

Hi

I would like to change the edit profile link in the admin bar to link to the edit profile link in bbpress.

I this possible?

Thanks
Websiteguy

Can I edit the stock forum root page

Published on January 24th, 2014 by avgmatt

I have my forum all set up about how I want it and I am using the stock root /forums as the forum front page. How do I go about adding to the main area above and below the forum? I would like to add items such as banners or use shortcodes for topic info. Where would this root page file be located?

Thank You
Matt

http://averageoutdoorsman.com/forums/

Website login redirect to wp-admin

Published on January 23rd, 2014 by killix

Hey,

http://www.metachest.com/

As you can see the login bit at the top of the site redirect to a wp-admin page can i just have it take me to a login page, i cant seem to find how to change this anywere?

Thanks!

Topics: bbp_has_topics – post_parent = forum_id

Published on January 23rd, 2014 by Shmoo

In bbPress 1.0 we had an array option called array( ‘exclude’ => ‘-3,-73,-103’ ) why is this gone in bbPress 2.0 ?

First I thought okay it’s just turned around instead of excluding forum_ids we now include forum_ids but that’s not true.

The post_parent is by default set to ‘any’ = 0 but you can only add one single forum_id you can’t do stuff like this.

bbp_has_topics( array( ‘post_parent’ => ‘23,51,73,107’ ) )

It’s show everything – one forum_id or nothing at all.

What am I missing here?

need some help

Published on January 23rd, 2014 by Alan Lang

Im using the latest versions of WP and BBpress,

All i have learnt using WP and BBpress is from trial and error and use of support forums and information from other websites.

I gamer at heart and play many mmo’s, i use wordpress for our main site and wanted to include a forum for our members(BBpress). http://enigmas.eu

I have been able to change lay out and look, so it look like main site and i have install an Plugin (bbPress String Swap) to rename roles, but it only change them on the forum and not in the admin selection area and the same goes with Public-Privet-hidden forum.

I would like to be able to change the names with in the admin side, so that my Moderator’s know which role to select when a new member joins

Key master – Guild leaders
Moderator – Officer
Participant – Member

Also when creating a forum know which one to select

Public – (can stay the same)
Private – Members Zone
Hidden – Officers Zone

As im talking about the forum titles i would like to remove (private) from the forum breadcrumb i have seen many examples of how to do it and have tried them out, but they don’t seem to work. i don’t know if im doing some thing wrong. so look for a fresh input.

i know that my Moderator(Officers) could get used to knowing which role and forum section to choose from with out changing them. but the Private before the forum tile is a real pain.

any ideas would be great thank you

Skip to toolbar