Search Results for '+.+default+.+'
-
Search Results
-
Hi all,
I’m trying to integrate the BuddyPress favorite (aka like system) system with BBPress.
But I can not implement ajax and the page will be reloaded.
How do I write it?
▼【functions.php】
function my_bp_activity_is_favorite($activity_id) { global $bp, $activities_template; return apply_filters( 'bp_get_activity_is_favorite', in_array( $activity_id, (array)$activities_template->my_favs ) ); } function my_bp_activity_favorite_link($activity_id) { global $activities_template; echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/favorite/' . $activity_id . '/' ), 'mark_favorite' ) ); } function my_bp_activity_unfavorite_link($activity_id) { global $activities_template; echo apply_filters( 'bp_get_activity_unfavorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/unfavorite/' . $activity_id . '/' ), 'unmark_favorite' ) ); }
▼【bbPress/templates/default/bbpress/loop-single.php】
<div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header"> <!--omission--> <div class="favorite-wrap"> <?php $activity_id = get_post_meta( bbp_get_reply_id( $reply_id ), '_bbp_activity_id', true ); ?> <?php if ( is_user_logged_in() ) : ?> <?php bp_has_activities(); ?> <?php if ( !my_bp_activity_is_favorite($activity_id) ) : ?> <a href="<?php my_bp_activity_favorite_link($activity_id) ?>" class="button fav bp-secondary-action bp-tooltip" data-bp-tooltip="add" aria-pressed="false"> <span class="bp-screen-reader-text">add</span> </a> <?php else : ?> <a href="<?php my_bp_activity_unfavorite_link($activity_id) ?>" class="button unfav bp-secondary-action bp-tooltip" data-bp-tooltip="remove" aria-pressed="false"> <span class="bp-screen-reader-text">remove</span> </a> <?php endif; ?> <?php endif;?> </div> <!--omission--> </div><!-- #post-<?php bbp_reply_id(); ?> -->
Help for figuring this one out is appreciated.
Best regardsTopic: Breadcrumbs problems
Hi. I am building my Online School and I installed bbpress to have a forum. I can’t give you a link now, because my website has coming soon mode active.
I have a problem with breadcrumbs. First of all, they don’t show as I see them in others’ forums. They don’t show at all. I have enabled Page Title Bar to show breadcrumbs, but this is an option from my theme (I use Avada theme). This helped me to show breadcrumbs in the page title bar, but I would prefer to see default breadcrumbs from bbpress just above the forum.Another problem is that when I click on “Home” it takes me to my homepage, not to the Forum homepage, but this is understandable, since the breadcrums come from my theme, not from the bbpress.
Why I can’t see that simple forum breadcumb trail just above the forum?
Good day. I want to add new notification type in my site – Updated the status of the task I have assigned to the user (for example, the task completed). But by default, this function is not. How to do this?
Version WP and BP last.
I’m surprised no one has asked such a question before… Please, help me.
Hello. I’d be grateful for some advice please.
Is it possible to change the number of forums per ‘page’ from the default 50?
I appreciate the argument for better categorisation, but the situation I have is a parent category relating to prison establishments and within that category are 104 separate forums – one for each prison establishment, so there’s no scope for categorising any differently.
As my site stands, when visiting the prison establishments page, only the first 50 forums are listed, with no pagination etc. linking to the hidden forums.
Thanks for your time.
Ash
Topic: Change user color
Hello BBPRESS community,
I really want to change color of my usergroups in my forum made by bbpress.
I have the standard role (keymaster, moderator, blocked ecc) but with names modified by editing the file functions.php in my theme folder.Now I would like to change the color in the status bar and in the topic/threads, example Administrator in the red, moderators in blue ecc.
I tried a insert this code in bbpress/templates/default/css/bbpress.css:.bbp-author-role-keymaster { background:blue; color:white; padding:0 5px; }
but it does not change anything, why?
I want to change color here
and in threads/topic discussion.
How I do?
Thank you very much.Wordpress 4.9.6
bbPress 2.5.14http://www.personalgroupware.com/wilsonlogan/
Hi All,
I have a forum in SQLITE format and I want to import it into bbPress.
I decided that if I was going to have to convert to a MYSQL database, I might as well use the schema indicated in Example.php
As I didn’t *actually* have the schema, I had to *guess* based on the fields in Example.php
For example:
CREATE TABLE IF NOT EXISTS forums_table (
_bbp_old_forum_id int(10) NOT NULL default 0,
the_parent_id int(10) NOT NULL default 0,
the_topic_count int(10) NOT NULL default 0,
the_reply_count int(10) NOT NULL default 0,
the_total_topic_count int(10) NOT NULL default 0,
the_total_reply_count int(10) NOT NULL default 0,
the_forum_title varchar(150) NOT NULL default ‘ ‘,
the_forum_slug varchar(255) NOT NULL default ‘ ‘,
the_forum_description text NOT NULL,
the_forum_order int(10) NOT NULL default 0,
the_forum_type int(10) NOT NULL default 0,
the_forum_status int(10) NOT NULL default 0
);
Having created the database as it is in Example.php, all I needed to do was load the MYSQL database from my SQLITE database.
Job done!
Yeah? Not so fast…
The import fails here:
SELECT convert(topics_table.the_topic_id USING “utf8mb4”)
AS the_topic_id,convert(topics_table.the_topic_reply_count USING “utf8mb4”)
AS the_topic_reply_count,convert(topics_table.the_total_topic_reply_count USING “utf8mb4”)
AS the_total_topic_reply_count,convert(topics_table.the_topic_parent_forum_id USING “utf8mb4”)
AS the_topic_parent_forum_id,convert(topics_table.the_topic_author_id USING “utf8mb4”)
AS the_topic_author_id,convert(topics_table.the_topic_author_ip_address USING “utf8mb4”)
AS the_topic_author_ip_address,convert(topics_table.the_topic_content USING “utf8mb4”)
AS the_topic_content,convert(topics_table.the_topic_title USING “utf8mb4”)
AS the_topic_title,convert(topics_table.the_topic_slug USING “utf8mb4”)
AS the_topic_slug,convert(topics_table.the_topic_sticky_status USING “utf8mb4”)
AS the_topic_sticky_status,convert(topics_table.the_topic_creation_date USING “utf8mb4”)
AS the_topic_creation_date,convert(topics_table.the_topic_modified_date USING “utf8mb4”)
AS the_topic_modified_date,convert(replies_table.the_topic_id USING “utf8mb4”)
AS the_topic_id FROM topics_table AS topics_table INNER JOIN replies_table
AS replies_table USING replies_table.the_topic_id = topics_table.the_topic_id WHERE forums_table.the_topic_id = 0 LIMIT 0, 100Lookee thar… a mystery field!
forums_table.the_topic_id
Are there any other mandatory fields in the import schema that are not referenced in Example.php?
And… what field from my database should I load to forums_table.the_topic_id ?
Thanks!