Search Results for 'code'
-
Search Results
-
I was running a Query Monitor on my site and noted the following:
Undefined index: latest-user
wp-content/plugins/bbpress-improved-statistics-users-online/includes/public/class.online.php:229 bbPress_Advanced_Statistics_Online->allowed_tags()So I had a look at the core file at that line and found:
private function allowed_tags() { // Store all of the strings currently replace $this->_tags = array( "%MINS%" => $this->parent->option['user_inactivity_time'], "%COUNT_ACTIVE_USERS%" => $this->stats["count"]["active"], "%HOURS%" => $this->parent->option['user_activity_time'], "%COUNT_ALL_USERS%" => $this->stats["count"]["inactive"] - $this->stats["count"]["guests"], "%COUNT_ALL_GUSERS%" => $this->stats["count"]["guests"], "%COUNT_ACTIVE_GUSERS%" => $this->stats["count"]["guestsa"], "%USER_USERS%" => _n("user", "users", $this->stats["count"]["active"], 'bbpress-improved-statistics-users-online'), "%GUEST_GUESTS%" => _n("guest", "guests", $this->stats["count"]["guestsa"], 'bbpress-improved-statistics-users-online'), "%ALL_USER_USERS%" => _n("user", "users", $this->stats["count"]["inactive"] - $this->stats["count"]["guests"], 'bbpress-improved-statistics-users-online'), "%ALL_GUEST_GUESTS%" => _n("guest", "guests", $this->stats["count"]["guests"], 'bbpress-improved-statistics-users-online'), "%USER_RECORD%" => $this->most_users( "record" ), "%USER_RECORD_DATE%" => $this->most_users( "date" ), "%USER_RECORD_TIME%" => $this->most_users( "time" ), "%LATEST_USER%" => $this->stats["latest-user"] );The offender is:
"%LATEST_USER%" => $this->stats["latest-user"]So I tried to find where
latest-useris also used and only found one place in all the files, here:private function stats_extra( $activity ) { if( $this->parent->option["bbpress_statistics"] == "on" ) { // Add the bbPress Statistics $activity["bbpress"] = $this->get_formatted_statistics(); } if( $this->parent->option["last_user"] == "on" ) { // Get the HTML latest usser $activity["latest-user"] = $this->get_latestuser( true ); } if( $this->parent->option["most_users_online"] == "on" ) { // Get/set the most users ever online, users the active online users $activity["most-users"] = $this->get_mostusers( $activity["count"]["active"] ); } return $activity; }This led me to:
// Create the statistics variable $this->stats = $this->stats_extra( $activity );So this warning looks like a false positive to me. Thoughts?
For the part of my website containing bbPress, I don’t want the main navigation menu to show. To achieve this, I enter CSS code on the main web page where [bbp-forum-index] is displayed.
The CSS code does its job as far as the first page is concerned – that is the page where the forums are listed.
However, if you select a specific forum to look at, this takes you to a new page. Unfortunately, on the new page, the main navigation menu is showing. So the CSS code has not done its job here.
Any advice on how to solve this problem would be much appreciated!
Topic: Empty forum index
Hi,
Nothing is displayed in a page when using bbp-forum-index shortcode.
Tried saving permanent links, but the issue is still present.
The same happens when creating new page with bbp-forum-index shortcode.
Not sure when the issue started, but probably since 2.6 update.
Current bbpress version is 2.6.5.
The URL is https://www.thevisasofoz.com/australia-migration-forum/Hi,
there is a shortcode to display a single topic:
[bbp-single-topic id=$topic_id]
and there is a function to find last reply of the topic:
<?php bbp_last_topic_reply_permalink ?>
Now I want to create a shortcode to show the last reply of the topic.
for example:
[bbp-single-topic-last id=$topic_id]
Please tell me how can I do this.
ThanksI’m redesigning my site, and for some reason, the child (sub) forums are not showing on the Forum Index under their parents. This happened on my first development site and after trying different things, I uninstalled bbPress and reinstalled it. They appeared. Now, when I moved my redesigned theme (which does have some template overrides) to a new dev site setup, once again my child forums are missing. However, uninstalling and reinstalling bbPress didn’t fix it this time.
I looked at the source code of the forum index and there is absolutely nothing there (no child forums).
Any ideas why they are not showing up again?
NOTE: I’m on WordPress 5.4.2, PHP 7.2. I switched to the twenty twenty theme, and the same thing happens…no child forums show under the parents. I also cannot give a link because my redesign is done locally on XAMPP.
I have this style:
/* Profile Info */ #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author { margin-left: 5px; margin-top: 5px; background: #c1c1c1; color: #262626; border: 1px solid black; } /* Header Row */ #bbpress-forums li.bbp-header .bbp-topic-author, #bbpress-forums li.bbp-header .bbp-reply-author, #bbpress-forums li.bbp-header .bbp-topic-content, #bbpress-forums li.bbp-header .bbp-reply-content #bbpress-forums div.bbp-topic-author { color: #262626; }The problem is that the header row uses the same class name and I can’t get to one without affecting the other.