Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,926 through 1,950 (of 32,458 total)
  • Author
    Search Results
  • #217922
    Robin W
    Moderator

    in which case you would hook to

    $subject = apply_filters( 'bbp_subscription_mail_title', '[' . $blog_name . '] ' . $topic_title, $reply_id, $topic_id );

    in bbpress 2.6.6\includes\common\functions.php line 1124 and 1291

    #217919
    Robin W
    Moderator

    ok,

    the default display order is freshness, followed by author – you have it the other way around.

    try changing the line above

    add_action( 'bbp_theme_after_topic_author', 'rew_freshness_display_image');

    to

    add_action( 'bbp_theme_after_forum_freshness_link', 'rew_freshness_display_image');

    #217915
    Robin W
    Moderator

    you don’t need stylepack, it’s just that the answer is different if you do !

    I’ll come back with code when I get a moment 🙂

    #217895
    Robin W
    Moderator

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    
    add_action( 'bbp_theme_after_topic_author', 'rew_freshness_display_image');
    
    function rew_freshness_display_image ($forum_id = 0) {
    	// Verify forum and get last active meta
    	$forum_id  = bbp_get_forum_id( $forum_id );
    		$active_id = bbp_get_forum_last_active_id( $forum_id );
    		$link_url  = $title = '';
    
    		if ( empty( $active_id ) )
    			$active_id = bbp_get_forum_last_reply_id( $forum_id );
    
    		if ( empty( $active_id ) )
    			$active_id = bbp_get_forum_last_topic_id( $forum_id );
    
    		if ( bbp_is_topic( $active_id ) ) {
    			//then reset forum_id to the forum of the active topic in case it is a sub forum
    			$forum_id = bbp_get_topic_forum_id($active_id);
    			$link_url = bbp_get_forum_last_topic_permalink( $forum_id );
    			$title    = bbp_get_forum_last_topic_title( $forum_id );
    		} elseif ( bbp_is_reply( $active_id ) ) {
    			//then reset forum_id to the forum of the active topic in case it is a sub forum
    			$forum_id = bbp_get_reply_forum_id($active_id);
    			$link_url = bbp_get_forum_last_reply_url( $forum_id );
    			$title    = bbp_get_forum_last_reply_title( $forum_id );
    		}
    		
    		$anchor = '<a class="rew_freshness_display_image" href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '"><img src="http://mysite.com/wp-content/uploads/2013/06/Brauhaus-2.jpg">' . '</a>';
    	
    echo '<p>'.$anchor.'</p>' ;
    }

    and change the <img src="http://mysite.com/wp-content/uploads/2013/06/Brauhaus-2.jpg" /> to the image you want – make sure it is sized right !!

    #217855
    Chuckie
    Participant

    GD bbPress Tools

    It has option to quote reply or topic. This is the shortcode I refer to.

    #217854
    Chuckie
    Participant

    If you mean blockquote then yes, but it shows asa quote shortcode. See linked discussion.

    #217846
    Robin W
    Moderator

    well that’s embarassing, I hadn’t spotted that the shortcode is wrong.

    It is one shortcode with parameters so should read

    bsp Profile

    [bsp-profile] will show ‘My Profile’ in a clickable link to the profile

    [bsp-profile label=’This is the label’] will show ‘This is the label’ in a clickable link to the profile

    [bsp-profile label=’Edit My Profile’ edit=’y’] will show ‘Edit My Profile’ in a clickable link to the edit section of profile

    so you can have anything as the label eg label=’hello mother’

    #217845
    uksentinel
    Participant

    Sorry

    The two shortcodes are, I assume they can work independently so does not need to work in conjunction with[bsp-profile] ?

    [Profile label=’This is the label’]

    [Profile label=’This is the label’]

    #217843
    Robin W
    Moderator

    there are 6 shortcodes in style pack, can you clarify which 2 you mean?

    Image didn’t help me 🙁

    #217842
    uksentinel
    Participant

    No problem and any time you spend with this is great news for us all.

    The [bsp-profile] now works perfectly for both single names and double spaced names and for myself, job done.

    I did try the other two shortcodes and alas for myself they do not work at all, when either is placed in the menu or onto a page as a shortcode, then the shortcode is shown in menu, not the result of the shortcode,

    please see image link for clarity and I assumed the remaining two shortcodes would work the same as [bsp-profile] i.e, just add and it works?

    forum layout

    [Profile label=’Edit My Profile’ edit=’y’]

    #217840
    Robin W
    Moderator

    sorry, I’d left a line of test code in which caused the user not to be selected, fixed in 4.7.7

    I have also corrected the shortcode to do what it said in the documentation – so the default is ‘my profile’

    so

    [bsp-profile] will show ‘My Profile’ in a clickable link to the profile

    [Profile label=’This is the label’] will show ‘This is the label’ in a clickable link to the profile

    [Profile label=’Edit My Profile’ edit=’y’] will show ‘Edit My Profile’ in a clickable link to the edit section of profile

    #217839
    uksentinel
    Participant

    FYI – the shortcode produces the title My Profile which disappears when user logs out of account (which is great) and this new firmware seems to sit much better in my Top Menu, before it kept going to the Far Left and looked a little odd

    😉 nearly there

    #217838
    Chuckie
    Participant

    Hi

    My discussion is here:

    https://github.com/EnlighterJS/Plugin.TinyMCE/issues/14

    To summarize, I use EnlighterJS to display code blocks inside WordPress and bbPress. It is fantastic at what it does. However I have noticed odd behaviour if someone hits “Quote” and quotes a code block. You can see an example of what it looks like in the linked discussion.

    It seems that the quote shortcut might nee some updating to cater properly for EnlighterJS code blocks. I can’t remember if this particular shortcode is part of bbPress or part of the bbPress GD Toolkit.

    #217837
    uksentinel
    Participant

    Thanks Robin.

    Just installed and tested, shortcode [bsp-profile] creates https://uktechhub.com/forums/users/

    No username at end ?

    I tried three different browsers and cleared cache etc

    Julia
    Participant

    I have plan to link bbpress to events manager plugin.
    The path is [bbpress]⇒[WP calendar]⇒[events manager].
    The participants look at topic in bbpress at first.
    Next he visits WP calendar and then events manager booking-form at last.

    How to send the bbpress topic title which he visited
    to the next next page(booking-form in events managaer)?

    Do I have to use filter or actions in events manager?

    The code ongoing

    
    add_filter('events-manager-hook', 'bbpress_title', 20);
    function bbpress_title($topic_title,$topic_id){
    
    	global $my_global;  // previous-topic title and topic title in the events manager 	
    
    	$topic_id = bbp_get_topic_id();
    	$topic_title['title']=$topic_id -> ???;
    	$my_global = get_topic_title();? ⇒ error!!
    
        }
    return  $topic_title;
    }
    

    Or do you have any other plans?

    #217819
    uksentinel
    Participant

    Just making sure my last post did not get missed

    SO the [bsp-profile] shortcode works for usernames when they do not have a space between them such as ‘billibob’ but fails when there is a space e.g. UK Sentinel ?

    #217795
    estakhrchi ali
    Participant

    irstly I only included the fields Robin had supplied, I do not have a copy of Snitz to test either. So I commented out but didn’t remove any of the code so that it would stand out and you could update any of these as needed which you have done.

    The forum ‘counts’ I think you may have incorrect in your post above:
    * _bbp_topic_count – The number of topics that are ‘publicly’ visible
    * _bbp_reply_count – The number of replies that are ‘publicly’ visible
    * _bbp_total_topic_count – The total number of topics (includes topics that are are unapproved or hidden)
    * _bbp_total_reply_count – The total number of replies (includes replies that are are unapproved or hidden)

    A clearer explanation of each of these would be helpful and also are each of these fields in the FORUM_FORUM database table:
    * F_TOPICS
    * F_COUNT
    * T_COUNT
    * P_COUNT

    The topic ‘counts’ is the same:ساخت استخر
    * _bbp_reply_count – The number of replies that are ‘publicly’ visible
    * _bbp_total_reply_count – The total number of replies (includes replies that are are unapproved or hidden)

    frenchlemans
    Participant

    Hello,

    With Notepad ++ I added to the Po file a French translation for an expression contained in /plugins/bbpress/includes/topics/functions.php.
    I then opened the Po file to validate the translation and generate the Mo file, they are up to date in languages ​​/ plugins / bbpress-fr_FR.po and also bbpress-fr_FR.mo.
    The problem is that I do not see the translation of this expression on my site, all the others of the same Mo file are present.

    I have looked at many expressions in this “functions.php” file and many of them have never been translated.

    What is the problem ?

    Thanks for your future answers.

    Regards

    Line 156 of functions.php :
    // No topic title
    if ( empty( $topic_title ) ) {
    bbp_add_error( 'bbp_topic_title', __( 'Error: Your topic needs a title.', 'bbpress' ) );
    }

    #217792
    smith512
    Participant
    <?php
    
    /**
     * User Registration Form
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Exit if accessed directly
    defined( 'ABSPATH' ) || exit;
    
    ?>
    
    <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
    	<fieldset class="bbp-form">
    		<legend><?php esc_html_e( 'Create an Account', 'bbpress' ); ?></legend>
    
    		<?php do_action( 'bbp_template_before_register_fields' ); ?>
    
    		<div class="bbp-template-notice">
    			<ul>
    				<li><?php esc_html_e( 'Your username must be unique, and cannot be changed later.',                        'bbpress' ); ?></li>
    				<li><?php esc_html_e( 'We use your email address to email you a secure password and verify your account.', 'bbpress' ); ?></li>
    			</ul>
    		</div>
    
    		<div class="bbp-username">
    			<label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?>: </label>
    			<input type="text" name="user_login" value="<?php bbp_sanitize_val( 'user_login' ); ?>" size="20" id="user_login" maxlength="100" autocomplete="off" placeholder="半角英数字" />
    		</div>
    
    		<div class="bbp-email">
    			<label for="user_email">大学のメールアドレス</label>
    			<input type="text" name="user_email" value="<?php bbp_sanitize_val( 'user_email' ); ?>" size="20" id="user_email" maxlength="100" autocomplete="off" />
    		</div>
    
    		<?php do_action( 'register_form' ); ?>
    
    		<div class="bbp-submit-wrapper">
    
    			<button type="submit" name="user-submit" class="button submit user-submit"><?php esc_html_e( 'Register', 'bbpress' ); ?></button>
    
    			<?php bbp_user_register_fields(); ?>
    
    		</div>
    
    		<?php do_action( 'bbp_template_after_register_fields' ); ?>
    
    	</fieldset>
    </form>
    

    is this okay?

    #217781
    smith512
    Participant

    Yes, that is there.

    Why my form-user-register.php is not update?

    Also, I tried to directly add code to form-user-register.php in bbpress (not child theme’s bbpress), the result was not changed.

    #217779
    uksentinel
    Participant

    I just created another user called bob and the shortcode in the menu works well and shows profile for bob 😉

    It is just an issue with two worded usernames like UK Sentinel ?

    Hope that helps and this is so much better than previous 😉

    #217778
    uksentinel
    Participant

    Hi Robin

    I updated BBP Style Pack and placed the shortcode [bsp-profile] both into a page and into a shortcode option for the menu

    The shortcode in the page does not work and the shortcode in the menu creates the following Hyperlink in which UK Sentinel is replaced by UK%20Sentinel and does not work – it should be uksentinel

    https://uktechhub.com/forums/users/UK%20Sentinel

    I am just going to create a new user with a single name,

    #217774
    smith512
    Participant

    Yes. I made ‘bbpress’ directory by following your manual.
    I looked at this

    I’m sorry for my poor English.
    Thanks.

    #217770
    smith512
    Participant

    Yes. I copied bbpress’s template to my child theme, and not I put my original template but I add codes to bbpress’s templates.

    For example,
    before “form-user-register.php”
    <input type="text" name="user_login" value="<?php bbp_sanitize_val( 'user_login' ); ?>" size="20" id="user_login" maxlength="100" autocomplete="off" />

    after “form-user-register.php”
    <input type="text" name="user_login" value="<?php bbp_sanitize_val( 'user_login' ); ?>" size="20" id="user_login" maxlength="100" autocomplete="off" placeholder="half-width characters" />

    #217754
    Robin W
    Moderator

    my code calls site_url() as a function which weirdly gets the wordpress url, whereas home_url() gets the site url !!

    I’ll amend the code and release a new version tomorrow

Viewing 25 results - 1,926 through 1,950 (of 32,458 total)
Skip to toolbar