Search Results for 'code'
-
Search Results
-
Hi!
I want to hide all the columns (Posts, Topics, Voices, Freshness) except the Forum and Topic.
Everything is working fine except the column size of Forum column is not changing. Here is the css:/* To hide VOICE, REPLY, POSTS and FRESHNESS columns in bbPress */ li.bbp-forum-reply-count, li.bbp-forum-topic-count, li.bbp-forum-freshness { display: none !important; } li.bbp-topic-voice-count, li.bbp-topic-reply-count, li.bbp-topic-freshness { display: none !important; } li.bbp-forum-info, li.bbp-topic-title { float: left; text-align: left; width: 100%; } /* End */Please help.
Topic: Forum Topic Loop
Hello there,
Firstly thank you for viewing this thread, really appreciate.
I am trying to create a topic loop to display in my in development theme. I have created a template part in my
theme-directory/bbpress/omna-forumthreadssee below:<?php /** * Single Thread * * @package bbPress * @subpackage Theme */ $threadURL = bbp_topic_permalink(); $threadTitle = bbp_topic_title(); $threadTIme = bbp_topic_post_date(); ///////////////// Thread Author Avatar URL //////////////////////// $user_id = bbp_get_user_id( $user_id ); $authorAvatarURL = get_avatar_url( $user_id, 300 ); /////////////////////////////////////////////////////////////////// $threadVoiceCount = bbp_topic_voice_count(); ?> <div class="swiper-slide-item"> <div class="icon-author" style="background-image: url('<?php echo $authorAvatarURL; ?>'); background-image: -webkit-image-set(url('<?php echo $authorAvatarURL; ?>') 1x, url('<?php echo $authorAvatarURL; ?>') 2x);"> </div><<?php echo $threadURL; ?>"><?php echo $threadTitle; ?></a></h2> <time class="data" datetime="<?php echo $threadTIme; ?>"><?php echo $threadTIme; ?></time> <span class="views"><i class="fa fa-comment-alt"></i><?php echo $threadVoiceCount; ?></span> </div> </div>And i believe this should work, But currently i have issues with the loop that should display it by driving the content from the template part. Here is my loops:
<div class="swiper-wrapper"> <div class="swiper-slide"> <div class="swiper-slide-container"> <?php if ( bbp_has_topics() ): while ( bbp_topics() ) : bbp_the_topic(); bbp_get_template_part( 'bbpress/omna', 'forumthreads' ) endwhile; endif; ?> </div> </div> </div>Now i get a pass error:
Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE) in C:\wamp\www\omna\wp-content\themes\omna\page-home.php on line 143
I have also tried the curly brace {} type of IF & WHILE expressions, still a parse error..
Please Help.
Topic: Page preview error
I seem to have an error with the page previews as you can see over here. As you can see in the first reply in this link, page preview for WP pages works fine, the problem only occurs with BBpress related urls (second post). In the image below I marked it with red:

When I disable the GP Premium plugin the preview dissapears and it only shows the title as an url inside a blockquote. BUT looking at the source code the wrong preview is still there. Changing class
wp-embedded-contentposition: absolute;toposition: relative;makes it visable again.Disabling all plugins, switching to another theme or deleting all custom css is of no influence. WordPress and all plugins are up to date.
Hi,
I added Customfields to BBpress reply form by this code:
//Input on BBP reply form function bbp_extra_reply_fields() { $custom = get_post_meta( bbp_get_reply_id(), 'bbp_custom', true); echo '<fieldset class="bbp-form bbp-form-add">'; echo "<p><input id='bbp_reply_custom' type='text' name='bbp_custom' value='".$custom."'></p>"; echo '</fieldset>'; } add_action ( 'bbp_theme_before_reply_form_content', 'bbp_extra_reply_fields'); //Register to Detabase add_action( 'bbp_new_reply', 'bbp_save_reply_extra_fields', 10, 1 ); add_action( 'bbp_edit_reply', 'bbp_save_reply_extra_fields', 10, 1 ); function bbp_save_reply_extra_fields( $reply_id ) { if (isset($_POST) && $_POST['bbp_custom']!='') { update_post_meta( $reply_id, 'bbp_custom', $_POST['bbp_custom'] ); } } //Output to BBP reply function inputBBPreply_outputBBPreply() { $reply_id = bbp_get_reply_id(); $reply_custom = get_post_meta( $reply_id, 'reply_custom', true); return '<div>'.$reply_custom.'</div>'; } //Output to Buddypress activity function inputBBPreply_outputBPactivity() { //What should I write? }But this code dose not show at BuddyPress activity.
What should I write?
Thanks
Ahoy,
I am usingbbPress 2.5.14-6684
BuddyPress 3.1.0
bbp style pack 3.9.6
WordPress 4.9.8
running Bento (Child) theme
on this page bomb.bio/forumI am having a problem with the insert/edit image button (in the text version the img button) not working. Image links added this way do not display.
Posting the same link without thetag automaticaly added when using this button works fine as long as they are in a new line.
Does anyone have any idea how I can get this to work? Even removing the misleading button or changing the button functionality so it wont add the
tag which seems to make the link not work would be better than the current situation.
I can’t code. I am only able to copy paste and to some degree alter code that i am given. I do have a working child theme if that helps.
Thank you very much!!!
TimHi there,
When users try to register, they get an email that requests them to follow a link to activate their account. The page it links them to asks for an activation key.
At no point in the email does it provide an activation key code (just a link).How can I fix this problem so that users are able to register?
Topic: How to escape html?
Hi bbpress
I want to escape html in topic and reply output, but I want to Embede media.
REPLACED this code which you can find inside[bbpress/templates/default/bbpress/content-single-topic-lead.php] file, opening via the editor.
<?php bbp_topic_content(); ?>
WITH THIS CODE<?php global $wp_embed; $inputTxt = bbp_get_topic_content(); $escTxt = esc_html( $inputTxt ); echo '<div class="test">'.$wp_embed->run_shortcode( '[embed]' . $escTxt . '[/embed]' ).'</div>'; ?>But I can not it.
How do I write it?
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: Can’t change language
Hello everyone.
Website: Link
WordPress version: 4.9.8
bbPress version: 2.5.14Despite reading many threads about this, I still couldn’t figure out a way to change the language of the forum to hebrew. I will work you through what I did:
1. Download bbPress.
2. Add all the pages (login, register etc.) to the menu. (since the website is in hebrew, you can the pages find it under the second last menu item).
3. Download the hebrew .po and .mo files and put them in the directory /wp-content/languages/bbpress with the proper name (bbpress-he_IL.po and bbpress-he_IL.mo)
4. Check the websites register and login pages, still in english.
5. Edit “wp-config.php” file and added “define(‘BBLANG’, ‘bbpress_he_IL’);”.
6. Check the websites register and login pages, still in english.
Also things I have tried:
– Putting the .po and .mo files under /wp-content/languages/plugins/.– Made sure I don’t have a translation update under “Dashboard -> Updates” in wordpress.
Important Note:
The hebrew is not 100% finished, but from this guide I understood that it doesn’t matter as long as I manually override it.So the bottom line is – I really need help figuring that out. What am I missing?
Thanks for everyone who read and help,
Eitan.