Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,451 through 4,475 (of 32,518 total)
  • Author
    Search Results
  • #190618
    Clivesmith
    Participant

    Thank you Robin for your help.

    with your code I get the word Array under the IP address not the Email.

    Clive

    #190617
    Robin W
    Moderator

    untested (as I’ve not got anonymous set on my test site, and I’m on another project) but this should work

    add_action ('bbp_theme_after_reply_author_admin_details', 'rew_add_email') ;
    
    function rew_add_email () {
    	$email = get_post_meta ( bbp_get_reply_id () , '_bbp_anonymous_email' ) ;
    	if (!empty ($email))
    		echo '<p>'.$email ;
    }

    Add this to your functions file.

    This will put the email after the ip address on anonymous topics and replies for admins only

    If it doesn’t work come back and I’ll do some testing

    #190612
    Robin W
    Moderator

    ok, do you know how to add code to your functions file if I give you some

    #190577
    Robin W
    Moderator
    add_action( 'bbp_template_before_forums_index' , 'rew_shortcode' ) ;
    add_action( 'bbp_template_before_topics_loop' , 'rew_shortcode' ) ;
    
    function rew_shortcode() {
    	echo '<div class="social_login" >' ;
    	echo '<br>' ;
    	echo 'Inicia sesión con su cuenta de redes sociales y participa en el foro' ;
    	echo '</br><br>' ;
     	echo do_shortcode('[wordpress_social_login]'); 
    	echo '</br>' ;
    	echo '</div>' ;
     }
    #190574
    principiante
    Participant

    Hi Robin,
    That is perfect!
    Please, how can I add text:
    “Inicia sesión con su cuenta de redes sociales y participa en el foro”
    before social login shortcode?
    Thank you!

    #190573
    themichaelglenn
    Participant

    @crookie I’m having the same problem. The BBSpoiler button works if I’m editing a post or a page, but it doesn’t appear at all in tinyMCE in bbPress. I’ve tried using tinyMCE Advanced, and the standard WordPress tinyMCE, both with the same results.

    I’m currently working on a bbPress tinyMCE plugin, to allow me to include specific buttons in the forum editor, and if I can figure out how to make that work with BBSpoiler I’ll post an update here.

    I’ve tried to look through the code for BBSpoiler, and I’m guessing that it’s missing an action or a filter to hook into the bbPress tinyMCE (but I don’t honestly understand actions, filters or hooks, so I could be completely wrong.)

    #190560
    alriknijdam
    Participant

    Sorry for the late answer, I missed your last reply because I forgot the ‘notify me’ checkbox.

    I took a look in phpMyAdmin and the menu_order is non of the above, it is 2
    If you visit a topic you can also see that by looking at the $reply_position = get_post_field( 'menu_order', $reply_id ); value 🙂

    #190555
    chumtarou
    Participant

    Would anyone know how to add placeholder text into the visual editor version of the text area for forums.

    Once we enable the visual editor option mentioned here, this option from WPMU no longer works.

    Thanks very much in advance.

    #190553
    liderxlt
    Participant

    Update with more information, I am using the wpallimport plugin, it allows to use PHP functions.

    Which allow to add hooks before, during and after importing.
    All the information here >> http://www.wpallimport.com/documentation/advanced/action-reference/

    <?php
    
    add_action( 'pmxi_saved_post', 'soflyy_forum_data', 10, 3 );
    
    function soflyy_forum_data( $post_id, $xml_record, $is_update ) {
    	$exped = array('1','3','5','7','9','11');//ID OF THE FILE OF TOPIC
    	$actualiz = array('2','4','6','8','10','12');//ID OF THE FILE OF REPLY
    	$import_id = ( isset( $_GET['id'] ) ? $_GET['id'] : ( isset( $_GET['import_id'] ) ? $_GET['import_id'] : 'new' ) );
    
    	if ( in_array($import_id,$exped) ) {
    		// Topics import - 1 esel id de la importacion
    		$parent_forum = get_post_meta( $post_id, '_bbp_forum_id', true );
    		if ( $parent_forum != 0 ) {
    			$args = array(
    				'ID' => $post_id,
    				'post_parent' => $parent_forum
    				);
    			wp_update_post( $args );
    			update_post_meta( $post_id, '_bbp_topic_id', $post_id );
    			update_post_meta( $post_id, 'post_alter_id', $post_id );
    			update_post_meta( $post_id, '_bbp_last_active_time', date( "Y-m-d H:i:s", time() ) );
    		}
    	} elseif ( in_array($import_id,$actualiz) ) {
    		// Replies import - 2 esel id de la importacion
    		$old_topic_id = get_post_meta( $post_id, '_bbp_topic_id', true );
    		$post = get_posts( array(
    			'post_type' => 'topic',
    			'meta_key' => '_old_topic_id',
    			'meta_value' => $old_topic_id
    			) );
    		if ( $post ) {
    			$new_topic_id = $post[0]->ID;
    			$args = array(
    				'ID' => $post_id,
    				'post_parent' => $new_topic_id
    				);
    			wp_update_post( $args );
    			update_post_meta( $post_id, '_bbp_topic_id', $new_topic_id );
    			update_post_meta( $post_id, '_edit_last', 1 );
    			
    			//wp_update_post( $post_id,'post_parent',$new_topic_id );
    		}
    	}
    }
    ?>
    

    I have tried adding hooks like

    add_action( 'pmxi_update_post_meta','bbp_notify_subscribers',10,3);
    add_action( 'bbp_new_reply','bbp_notify_topic_subscribers', 10, 3 );
    add_action( 'bbp_new_reply','bbp_notify_topic_subscribers', 10, 3 );

    But without success.

    I hope this information is useful.

    regards…

    #190552
    Robin W
    Moderator

    add this to your theme’s functions file

    add_action( 'bbp_template_before_forums_index' , 'rew_shortcode' ) ;
    add_action( 'bbp_template_before_topics_loop' , 'rew_shortcode' ) ;
    
    function rew_shortcode() {
    	echo '<div class="social_login" >' ;
    	echo '<br>' ;
     	echo do_shortcode('[wordpress_social_login]'); 
    	echo '</br>' ;
    	echo '</div>' ;
     }

    It may not be perfect, but without seeing its effect on your theme, I can’t say, so come back when it is in if it needs tidying up

    #190550
    principiante
    Participant

    Im using WordPress Social Login plugin
    Shortcode: [wordpress_social_login]
    Thank you!

    #190549
    liderxlt
    Participant

    Hello!
    First of all I want to clarify that the notifications by email if they arrive if a response is made in the subject from the frontend, in that there is no problem.

    I feed the forum with external information, the updates of new and old topics are published daily. This I do by means of an import code. When users subscribe to a topic and receive new answers, email does not arrive.

    I suspect that is the replic’s import code.

    At the beginning of the code, I identified the id of the theme to link the replic, then updated the data.

    $old_topic_id = get_post_meta( $post_id, '_bbp_topic_id', true );
    		$post = get_posts( array(
    			'post_type' => 'topic',
    			'meta_key' => '_old_topic_id',
    			'meta_value' => $old_topic_id
    			) );
    		if ( $post ) {
    			$new_topic_id = $post[0]->ID;
    			$args = array(
    				'ID' => $post_id,
    				'post_parent' => $new_topic_id
    				);
    			wp_update_post( $args );
    			update_post_meta( $post_id, '_bbp_topic_id', $new_topic_id );
    			update_post_meta( $post_id, '_edit_last', 1 );
    		}

    The import of topic and replic is a success, except for the detail that does not motivate users subscribed to forum and topic.

    Regards!

    #190540
    Robin W
    Moderator

    Obviously you are very quotable !!

    From a quick goggle one or both of these might work

    1. add this to your functions file

    add_filter( 'bbp_find_mentions', '__return_false' );
    

    If that doesn’t work or you are being mentioned in buddypress as well

    2. this plugin whilst old probably still works

    BuddyPress No Mentions

    #190515
    Robin W
    Moderator

    ok, can you give me the social widget shortcode you want to use

    #190514
    Robin W
    Moderator

    it is doable, but you would

    1. need to find a forms plugin that has a pre-submission or post submission hook
    2. find someone to add the code to create a topic from that hook.

    I’ve done the pre-submission from gravity forms, but someone else did the form, and I just did the create topic bit.

    #190502
    Robin W
    Moderator

    glad it works

    yes just change that line to

    echo '<div class="badge-os"> Points: '.$points.'</div>' ;

    change the class name to anything you want.

    #190501
    bensainz
    Participant

    I am having trouble getting the topic page template to default to the same page format as my forum page. I created a custom template “bbp-sidebars” that presents my forum page with a sidebar for forum page views and topic views. The forum picks up the custom template, but the topics page ignores it and defaults to the blog view template. So far I downloaded bbp Style Pack, bbp shortcodes, bbP Tookkit, Weaver for bbPress, and What the File to see if there was a setting to accomplish my goal. I also read multiple articles on custom templates, but none address the topic layout. Also, after a new topic or topic response is posted, I can manually go in and set the page settings to have it display the way I want. While my site is growing I can probably do this, but after a certain point it will be too hard to keep up.

    I am using WP 4.9.4, ForeFront theme Version 1.04 as a subtheme under GeneratePress V 2.02
    My Website is https://defensecareersHQ.com PW is “VetsHelpingVets”
    An example of my issue can be viewed here
    https://www.defensecareershq.com/forums/topic/how-about-l-3-technologies/

    Also, please note I manually set the all other topic pages to display correctly. Any advice is greatly appreciated.

    #190497
    fatguyonbike
    Participant

    Hi,

    i want to configure bbPress on my own theme. I am looking for a list of functions like https://codex.wordpress.org/Function_Reference just for bbPress. Where can I find this?

    Thank you!

    #190496
    Robin W
    Moderator

    There is nothing I know of, and whilst it is possible with a deal of code, beyond free help I’m afraid

    #190494
    Robin W
    Moderator

    so..there is no any way to “hide” register form and just left social media login?

    ok, we’re a bit outside bbpress support here, as this is theme/other plugin related.

    where is register (I’m not good in your language!)?

    Also, can you tell me how can I publish social widget shortcode in header of all forum pages?

    if you are ok with copying coding and FTP files, then I may be able to help

    #190493
    Robin W
    Moderator

    although you may want to alter the last line to something like

    echo 'Points: '.$points ;

    so that more than just a number appears !

    #190492
    Robin W
    Moderator

    BadgeOS is a plugin so I can’t comment on whether your code would work – it looks fine from a technical point of view.

    I’ve tweaked it so that it shows the points for each user rather than the current user and added the function to get it below the author name, so if the function is correct this code should work.

    add_action ('bbp_theme_after_reply_author_details', 'badgeos_show_users_points') ;
    
    function badgeos_show_users_points( $user_id = 0 ) {
     $user_id = bbp_get_reply_author_id();
     // echo our user’s points as an integer (sanely falls back to 0 if empty)
     $points = absint( get_user_meta( $user_id, '_badgeos_points', true ) );
     echo $points ;
     }

    let me know if it works

    #190490
    principiante
    Participant

    Thank you Robin, so..there is no any way to “hide” register form and just left social media login?
    Also, can you tell me how can I publish social widget shortcode in header of all forum pages?
    Right now is publish in sidebar widget…what is bad becouse mobile phone users need to scroll all way down to find it.
    Thank you!

    #190488
    florianm
    Participant

    For our restricted members bbPress forum, I would like to display a user’s BadgeOS points below their username next to their posts/replies. I already found some code to display these points but I am not sure if it’s correct and how to make it show below the username.

    function badgeos_get_users_points( $user_id = 0 ) {
    // Use current user’s ID if none specified
    if ( ! $user_id )
    $user_id = wp_get_current_user()->ID;
    // Return our user’s points as an integer (sanely falls back to 0 if empty)
    return absint( get_user_meta( $user_id, ‘_badgeos_points’, true ) );
    }

    Any help would be much appreciated!

    FYI: we also use the latest versions of BuddyPress and the Boss theme.

    #190487

    In reply to: BBCodes bbpress list?

    Robin W
    Moderator

    I think they are pretty much as per the list above a topic/reply.

    You can use this plugin to extend

    bbPress2 BBCode

Viewing 25 results - 4,451 through 4,475 (of 32,518 total)
Skip to toolbar