Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,001 through 4,025 (of 32,522 total)
  • Author
    Search Results
  • #197034
    Info Ekonomi
    Participant

    PekMez your solution does work, but still modifying the core code will be overwritten on the upcoming update, and we will probably forget about this in the future. So after upgrade our BBPress version we forget to re-modify this code.

    Anyway how about now, is there a solution for BreadCrumbs without modifying the core?

    #197015
    tekgazet
    Participant

    Sure. I used the bbp_new_topic_pre_content Filter Hook and the code I used is as under:

     //code to limit number of characters in topic contents to 500 characters
     
    function tm_limit_topic_content( $topic_content )
    {
        /* Check for number of characters in topic contents  */
        if (strlen($topic_content) > 500) {
    		$revised_content = substr($topic_content, 0, 500);
    		}	
    	else {
    		$revised_content = $topic_content ;
    	}		
     
        return $revised_content ;
    }
     
    add_filter( 'bbp_new_topic_pre_content', 'tm_limit_topic_content' );
    #196987
    eigodeasobo
    Participant

    I want to display only the following two on buddypress activity.

    ※When creating topics for BBP.
    ※When comment for topics.

    What should I write in “※” below?

    wp-content>plugins>buddypress>bp-templates>bp-legacy>buddypress>members>single>activity.php
    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) . ‘&action=※※’ ) ) : ?>

    tekgazet
    Participant

    I want to limit the number of characters in the Topic Content Text Area in bbPress to a maximum limit (of say 500 characters). How can I do it?

    I tried to do it by using the maxlength attribute of textarea (bbp_topic_content) in the stylesheet file, but this attribute is not working (may perhaps be because this attribute was included in HTML5 version only). However, if I use this in Developer Tools in Chrome while inspecting the text area for Topic Content, it works fine; but that is only for testing and I am not able to make a permanent change by editing the source file or through any plugin.

    Other two methods could be javascript to check on local machine the number of characters being entered, but I understand that this can easily be cheated by disabling javascript. Moreover, I am not fully sure how to do it.

    Third method could be to use for action or filter hook. Can you please suggest me which hook to be used and sample code, if any?

    Thanks in advance.

    #196959
    wpturk
    Participant

    @robin-w , thanks for your advise. RC7 partially solved the problem.

    This is before updating topic (post_id:54878) in admin area:

    mysql> select * from forum_postmeta where meta_key="_bbp_subscription" ; 
    +---------+---------+-------------------+------------+
    | meta_id | post_id | meta_key          | meta_value |
    +---------+---------+-------------------+------------+
    .....
    .....
    |   35265 |   54878 | _bbp_subscription | 11743      |
    +---------+---------+-------------------+------------+

    This is after updating the topic (post_id:54878) in admin area:

    mysql> select * from forum_postmeta where meta_key="_bbp_subscription" ; 
    +---------+---------+-------------------+------------+
    | meta_id | post_id | meta_key          | meta_value |
    +---------+---------+-------------------+------------+
    .....
    .....
    |   35265 |   54878 | _bbp_subscription | 11743      |
    |   35280 |   54879 | _bbp_subscription | 1          |
    +---------+---------+-------------------+------------+

    So, the user subscription is there but there is a new unnecessary row, the admin user is subscribed to a non-existing topic. post_id=54879 does not exist.

    Who can we report bugs?

    #196923
    ducrevit181
    Participant

    You have been a great help.

    I read through and tried https://codex.bbpress.org/bbpress-styling-crib/

    What I did,
    1. installed Simple Custom CSS plugin – all ok
    2. insert the below code. and changed the font-size: 1.1em; to 1.6em

    #bbpress-forums div.odd, #bbpress-forums ul.odd { background-color: #fbfbfb; } #bbpress-forums div.even, #bbpress-forums ul.even { background-color: #fff; }

    IF post is sticky or super sticky, then

    .bbp-topics-front ul.super-sticky, .bbp-topics ul.super-sticky, .bbp-topics ul.sticky, .bbp-forum-content ul.sticky { background-color: #ffffe0 !important; font-size: 1.1em; }

    but the rest doesn’t seem to work…especially
    Number 5. Various texts

    bbpress-forums .bbp-topic-content p, bbpress-forums .bbp-reply-content p { font-size: 12px;

    I change the font-size: 20px

    nothing happens. 

    what did I do wrong? basically I wanted to increase font size for all forum section from 1 to 8. How please.

    Thank you in advance

    #196841
    arturooo32
    Participant

    WordPress 4.9.8
    bbPress 2.5.14
    ProfileGrid 3.2.1
    http://Www.lokmiechow.pl

    Hello, i use bbpress and ProfileGrid. I have problem with profile user. Now i have 2 various profile user. 1st is from forum mybb and 2nd is from profileGrid.
    1st view is, if i click on name author post. I think i need change it in file php but i dont know how and where.

    
    1st) http://www.lokmiechow.pl/forums/user/assadsadas-asasda/
    2nd) http://www.lokmiechow.pl/konto/?uid=10
    

    I would like have only 2nd view. What should i change and where to fix it?

    I would like also add options from 1st to 2nd view, for example in new overlap “user forum stats”.

    #196802
    shubh2018
    Participant

    When i create new topic it shows normally no issues!!
    But i had a huge data that needed to be imported on the same site. I used WP All Import Plugin for the import and I imported the data into topics… Actually I only require the topics section so there is forum I want to show… I managed the look. But after the import finished. I cant see the list of topics that meant to be seen on my homepage. Though I see the topics in the sidebar under related topics. I used shortcode [bbp-topic-index] to show the topic on my homepage.
    I can also see the topic in my wordpress topics section…
    So, I decided to take a look in my database. I saw that earlier when i created topics it was stored in wp_posts table but now after import all that new data is in wp_pmxi_ tables and topics were in wp_pmxi_topics table. I don’t know if that supposed to be but I cant solve this issue… I even imported data again in posts which then went to wp_posts table in database but ofcourse wordpress was taking that as posts not bbpress topics…
    Can please someone help me out?

    #196761

    In reply to: Trackbacks

    Robin W
    Moderator

    if you have put the code in the plugin – that’s it !

    On a load, the code looks to see if it is a topic or reply, and if so turns off pingbacks

    #196758

    In reply to: Trackbacks

    cdwed
    Participant

    OK I added the plug-in. Can you give some specific instructions on how to enter the code?

    Do I do this for each forum page?

    TNX Robin.

    Peter

    #196744
    jsima
    Participant

    @robin-w how much i have to pay for that code?

    #196739
    engin1984
    Participant
    <!DOCTYPE html>
    <!--[if IE 7]>
    <html class="ie ie7" lang="en-US" prefix="og: http://ogp.me/ns#">
    <![endif]-->
    <!--[if IE 8]>
    <html class="ie ie8" lang="en-US" prefix="og: http://ogp.me/ns#">
    <![endif]-->
    <!--[if !(IE 7) | !(IE 8)  ]><!-->
    <html lang="en-US" prefix="og: http://ogp.me/ns#">
    <!--<![endif]-->

    testing some code…
    edit: YEP! Code tag is working .

    #196738

    In reply to: Trackbacks

    Robin W
    Moderator

    no.

    The simplest way is to use this plugin

    Code Snippets

    and put the code in there

    #196732
    xavier_bs
    Participant
    add_action( 'private_title_format', 'xbs_hide_second_prefix_title' );
    function xbs_hide_second_prefix_title( $title ) {
       $prefix = str_replace( '%s', '', $title );
       return "<span class=\"private-title\">$prefix</span>%s";
    }

    and in CSS:

    .private-title + .private-title {
        display: none;
    }
    #196722

    In reply to: Trackbacks

    Robin W
    Moderator

    I just looked in trac, and fixing this is now a 2.8 goal.

    However this looks like it might help

    // Force ping_status on bbPress post types 
    add_filter( 'pings_open', 'rew_force_ping_status' ); 
    
    function rew_force_ping_status( $open, $post_id = 0 ) { 
    
    // Get the post type of the post ID 
    $post_type = get_post_type( $post_id ); 
    // Default return value is what is passed in $open 
    $retval = $open; 
    // Only force for bbPress post types 
    switch ( $post_type ) { 
    case bbp_get_forum_post_type() : 
    case bbp_get_topic_post_type() : 
    case bbp_get_reply_post_type() : 
    	$retval = false; 
    break; 
    // Allow override of the override 
    return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type ); 
    } 
    #196721
    Robin W
    Moderator

    not within free help, sorry, but if you have a way to allocate I could probably write some code cheaply

    contact me via

    http://www.rewweb.co.uk

    OK guys, probably not really relevant now, but I experience the same issue and found this thread.

    Here is solution I use:

    add_filter( 'wp_mail', function( $args = array() ) {
    	/**
    	 * If WordPress wants to send an email to bbp_get_do_not_reply_address() we check
    	 * if $search_header is set. If it is, we take its value (email address) and set
    	 * it as "to" address. Also we unset the $search_header.
    	 */
    	$search_header = 'Bcc:';
    
    	if ( bbp_get_do_not_reply_address() === $args['to'] && is_array( $args['headers'] ) ) {
    		foreach ( $args['headers'] as $key => $header ) {
    			if ( false !== stripos( $header, $search_header ) ) {
    				$args['to'] = trim( str_replace( $search_header, '', $header ) );
    				unset( $args['headers'][ $key ] );
    				break;
    			}
    		}
    	}
    
    	return $args;
    } );
    #196700
    Robin W
    Moderator

    The space is where the site is trying to show your avatar

    <a href="http://logicbenchmarks.com/forums/users/logicbenchmarks/" title="View Admin's profile" class="bbp-author-avatar" rel="nofollow"></a>

    which is somehow not showing – no idea why, but suspect you have code doing this

    Hi there!

    If you’re looking for an off-the-shelf solution, BuddyPress and the Private Messages component sounds like the best one. You’d still need to tune it a bit with some custom code to lock it down exactly how you’ve described, but it gives you isolated message threads with invitees, notifications, an inbox, etc…

    Technically, in the next major version of bbPress (2.6) you could use the new engagements API to keep those conversations a forum topic, but limit them to specific invited users, but that’s probably more work and less obvious to end users what it’s for & doing.

    #196634
    writersabroad
    Participant

    I created a list of 5 forums some with sub forums and used the short code to display the index of forums on a page which I added to my navigation menu. Today it is only showing the first forum and none of the others. I’ve tried refreshing the page, renewing the page with the shortcode and gone back over some of the steps (I’ve been trying to remove a sidebar from the forum page) but nothing seems to work. All the forums are listed and I haven’t changed any of the settings within the forums…

    I’m using the Ruby theme – but have tried it with twenty fifteen, sixteen and seventeen and the problem persists. I’m using bbpress Version 2.5.14 and the bbpress style plug in Version 4.0.3 which was updated today.

    My site is not published as I’m still working on it, ironing out some of these issues.

    Thanks for any advice

    #196624
    dmalkin
    Participant
    // Time Variable
    $localTime = str_replace('at ', '', $localTime);
    
    $localTime = do_shortcode('[localize_time before_local=" " after_local=" " fmt="F j, Y g:i a"]'.$localTime.'[/localize_time]');
    echo $localTime;
    
    #196623
    dmalkin
    Participant

    Having a really difficult time figuring out a way to output topic reply time stamps in a users local timezone. I have a forum with global users and this is a necessity.

    WP version: 4.9.8
    bbPress version: 2.5.14

    Currently using this plugin: Localize Time (https://wordpress.org/plugins/localize-time/)

    I am wrapping the bbp_get_reply_post_date() with the shortcode [localize_time]; however, I cannot alter the format of the output date from the shortcode.

    I need an alternate solution.

    #196611
    Wasca
    Participant

    I should also not that this is only happening in Chrome not Firefox. I’m seeing this in the console. (sanitized)

    Uncaught DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
        at et_core_page_resource_fallback (https://mydomain.com/topic/test-video/embed/:12:160)
        at HTMLLinkElement.onload (https://mydomain.com/topic/test-video/embed/#?secret=HEI33yuPgo:158:289)
    et_core_page_resource_fallback @ (index):12
    onload @ VM2025 :158
    wreckcox
    Participant

    What is the best way to add login and a register link to “You must be logged in to reply to this topic”

    I found this but I realized I cannot edit a code as I am very new to PHP.
    Please suggest.

    	<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
    		<div class="bbp-template-notice">
    			<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>
    		</div>
    	</div>
    #196598
    Robin W
    Moderator

    ok, take the change above out.

    Then find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php
    Make a copy of this file to your pc

    The edit this file to be this

    <?php
    
    /**
     * Replies Loop - Single Reply
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    <div class='rew-border'>
    <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    
    	<div class="bbp-meta">
    
    		<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    
    		<?php if ( bbp_is_single_user_replies() ) : ?>
    
    			<span class="bbp-header">
    				<?php _e( 'in reply to: ', 'bbpress' ); ?>
    				<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
    			</span>
    
    		<?php endif; ?>
    
    		<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
    
    		<?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
    
    		<?php bbp_reply_admin_links(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
    
    	</div><!-- .bbp-meta -->
    
    </div><!-- #post-<?php bbp_reply_id(); ?> -->
    
    <div <?php bbp_reply_class(); ?>>
    
    	<div class="bbp-reply-author">
    
    		<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
    
    		<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
    
    		<?php if ( bbp_is_user_keymaster() ) : ?>
    
    			<?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
    
    			<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
    
    			<?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?>
    
    		<?php endif; ?>
    
    		<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
    
    	</div><!-- .bbp-reply-author -->
    
    	<div class="bbp-reply-content">
    
    		<?php do_action( 'bbp_theme_before_reply_content' ); ?>
    
    		<?php bbp_reply_content(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_content' ); ?>
    
    	</div><!-- .bbp-reply-content -->
    
    </div><!-- .reply -->
    </div>
    
    <div class='rew-spacer'><p/> </div>

    Then put this in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.php

    Finally in your theme’s custom css area put

    
    #bbpress-forums ul.bbp-replies {
    border : none ;
    }		
    
    .rew-border {
    border: 1px solid #eee;
    }		
Viewing 25 results - 4,001 through 4,025 (of 32,522 total)
Skip to toolbar