Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,701 through 2,725 (of 32,462 total)
  • Author
    Search Results
  • Hammy Havoc
    Participant

    When running debug, this is one of the warnings/errors I get:

    <b>Warning</b>:  register_shutdown_function(): Invalid shutdown callback 'BBP_Converter_DB::__destruct' passed in <b>/home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php</b> on line <b>33</b><br />
    <br />
    Hammy Havoc
    Participant

    Hi all,

    After about six months of a website working perfectly, one of the admins is now unable to login. They’re presented with this error in Firefox’s JSON viewer, which automatically appears after submitting their login details and landing on wp-login.php:

    success	false
    data	
    0	
    code	"bbp_converter_db_connection_failed"
    message	"Database connection failed."

    Yet they are able to login just fine as other admins.

    #211440
    Robin W
    Moderator

    you could enable the visual editor

    either

    Enable Visual Editor

    or

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Topic/Reply Form

    Robin W
    Moderator
    #211418
    scabbrox
    Participant

    Not sure how to easily get a list, but this is what’s in my plugins folder:

    advanced-backgrounds
    4 KB
    Apr 2, 2020, 2:12 PM
    httpd/unix-directory
    0755

    advanced-css-editor
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    advanced-custom-fields-pro
    4 KB
    Today, 5:51 PM
    httpd/unix-directory
    0755

    akismet
    4 KB
    Apr 30, 2020, 11:45 AM
    httpd/unix-directory
    0755

    all-in-one-wp-migration
    4 KB
    May 18, 2020, 4:13 PM
    httpd/unix-directory
    0755

    all-in-one-wp-migration.6.77.zip
    331.74 KB
    Dec 15, 2019, 11:54 AM
    package/x-generic
    0644

    bbp-private-groups
    4 KB
    May 22, 2020, 11:17 AM
    httpd/unix-directory
    0755

    bbp-style-pack
    4 KB
    May 8, 2020, 4:37 PM
    httpd/unix-directory
    0755

    bbp-toolkit
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    bbp-user-online-status
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    bbpress
    4 KB
    Jan 30, 2020, 4:43 PM
    httpd/unix-directory
    0755

    bbpress-enable-tinymce-visual-tab
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    bbpress-mark-as-read
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    bbpress-wp-tweaks
    4 KB
    Jan 15, 2020, 10:12 AM
    httpd/unix-directory
    0755

    bbpress2-shortcode-whitelist
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    bp-custom.php
    302 bytes
    Nov 14, 2019, 2:05 PM
    application/x-httpd-php
    0644

    bsp_test.css
    134 bytes
    Nov 14, 2019, 2:05 PM
    text/css
    0644

    bspstyle.css
    12.2 KB
    Nov 14, 2019, 2:05 PM
    text/css
    0644

    buddypress
    4 KB
    May 15, 2020, 2:15 PM
    httpd/unix-directory
    0755

    category-featured-images-extended
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    contact-form-7
    4 KB
    May 22, 2020, 11:17 AM
    httpd/unix-directory
    0755

    custom-sidebars
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    extended-widget-options
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    facebook-pagelike-widget
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    gd-bbpress-attachments
    4 KB
    May 13, 2020, 4:18 PM
    httpd/unix-directory
    0755

    gd-bbpress-tools
    4 KB
    May 13, 2020, 4:18 PM
    httpd/unix-directory
    0755

    godlike-core
    4 KB
    Today, 1:00 PM
    httpd/unix-directory
    0755

    google-analytics-dashboard-for-wp
    4 KB
    Feb 26, 2020, 3:41 PM
    httpd/unix-directory
    0755

    index.php
    28 bytes
    Nov 14, 2019, 2:05 PM
    application/x-httpd-php
    0644

    jetpack
    4 KB
    May 6, 2020, 7:51 AM
    httpd/unix-directory
    0755

    js_composer
    4 KB
    Apr 25, 2020, 3:27 PM
    httpd/unix-directory
    0755

    kirki
    4 KB
    May 22, 2020, 11:17 AM
    httpd/unix-directory
    0755

    list-category-posts
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    lock-user-account
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    login-with-ajax
    4 KB
    Jan 24, 2020, 9:34 AM
    httpd/unix-directory
    0755

    mailchimp-for-wp
    4 KB
    Apr 28, 2020, 4:44 PM
    httpd/unix-directory
    0755

    members
    4 KB
    Apr 29, 2020, 1:07 AM
    httpd/unix-directory
    0755

    menu-icons
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    mycred
    4 KB
    May 8, 2020, 4:37 PM
    httpd/unix-directory
    0755

    nav-menu-roles
    4 KB
    Mar 28, 2020, 3:21 PM
    httpd/unix-directory
    0755

    nk-themes-helper
    4 KB
    May 6, 2020, 7:51 AM
    httpd/unix-directory
    0755

    nk-woocommerce-swatches
    4 KB
    Jan 26, 2020, 11:20 AM
    httpd/unix-directory
    0755

    notification
    4 KB
    Apr 22, 2020, 10:14 AM
    httpd/unix-directory
    0755

    notification-bbpress
    4 KB
    May 18, 2020, 4:11 PM
    httpd/unix-directory
    0755

    notification-buddypress
    4 KB
    May 18, 2020, 4:14 PM
    httpd/unix-directory
    0755

    paypal-donations
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    post-views-counter
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    quick-pagepost-redirect-plugin
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    recent-posts-widget-with-thumbnails
    4 KB
    Jan 15, 2020, 10:13 AM
    httpd/unix-directory
    0755

    revslider
    4 KB
    May 17, 2020, 11:57 AM
    httpd/unix-directory
    0755

    sociality
    4 KB
    Apr 23, 2020, 9:53 AM
    httpd/unix-directory
    0755

    tinymce-advanced
    4 KB
    Apr 2, 2020, 2:12 PM
    httpd/unix-directory
    0755

    tomparisde-twitchtv-widget
    4 KB
    Apr 30, 2020, 6:56 PM
    httpd/unix-directory
    0755

    ttv-easy-embed
    4 KB
    Mar 11, 2020, 1:58 PM
    httpd/unix-directory
    0755

    updraftplus
    4 KB
    Today, 11:53 AM
    httpd/unix-directory
    0755

    user-role-editor
    4 KB
    May 5, 2020, 10:13 AM
    httpd/unix-directory
    0755

    usp-helper
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    usp-pro
    4 KB
    Apr 9, 2020, 3:30 PM
    httpd/unix-directory
    0755

    w3-total-cache
    40 KB
    Apr 29, 2020, 1:07 AM
    httpd/unix-directory
    0755

    woocommerce
    4 KB
    May 22, 2020, 11:17 AM
    httpd/unix-directory
    0755

    woocommerce-admin
    4 KB
    May 19, 2020, 12:53 PM
    httpd/unix-directory
    0755

    wow-recruitment-legion
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    wp-discord
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    wp-google-maps
    4 KB
    May 8, 2020, 4:37 PM
    httpd/unix-directory
    0755

    wp-optimize
    4 KB
    Apr 2, 2020, 2:11 PM
    httpd/unix-directory
    0755

    wp-slimstat
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    wp-smushit
    4 KB
    May 19, 2020, 12:53 PM
    httpd/unix-directory
    0755

    wpcat2tag-importer
    4 KB
    Dec 15, 2019, 12:04 PM
    httpd/unix-directory
    0755

    youtube-embed-plus
    4 KB
    Apr 17, 2020, 3:40 PM
    httpd/unix-directory
    0755

    #211416
    Robin W
    Moderator

    ok, thanks for the update.

    I loaded your code in my test site and it works fine – eg I can allocate someone to warlord.

    what plugins do you have on your site?

    #211408
    Robin W
    Moderator

    custom roles work on my test site under2.6

    I’ll load your code onto my test site later and see if it works there.

    g28f99
    Participant

    Hi, Robin. I think the above goal to apply the customization only in some specified forums should be practical. For example, I do NOT want the above customization to take effects in two forums with forum id 124 and 126. Or, alternatively, I do NOT want the customization to take effects in forums with menu_order < 10.But I could not find any previous posts with codes to set the effective range among forums.
    How do you think about it? I have no idea how to integrate the following selection information into the above customization code. Could you please make a demonstration?

    
    $current_forum_id = get_forum_id();
    if $current_forum_id !==124 AND $current_forum_id !==126 
    
    #211395
    jamnet.kr
    Participant

    Is this code can I using in functions.php? Not in the child theme…

    #211378
    Robin W
    Moderator

    ok, understand

    if you just want that then

    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    
    function rew_bbpress_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            'Reply To:' => 'Svar till:',
    			            );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
         return $translated;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    g28f99
    Participant

    So I shall finalize the code for others for reference use. One last optimization for this topic so that it is really powerful:
    I may set forums with “menu_order” <10 (class=”screen-reader-text”) as admin purpose forums and do not want to apply above customization setting. Can I really achieve that goal with some condition setting?

    #211363

    In reply to: Make Forum Full Width

    Robin W
    Moderator

    looks pretty full width to me – have you refreshed your browser?

    the theme is setting a width of 90% well before bbpress gets involved.

    you could try

    .both-sidebars .container {
    	width: 100% !important ;
    }

    but that will affect the whole site

    Robin W
    Moderator
    add_action( 'bbp_theme_after_reply_content', 'new_reply_additional_fields', 10 );
    function new_reply_additional_fields() {
    $new_reply_additional_fields = 'Above is my personal opinion';
    	echo "<p id='new_reply_additional_fields'><font color=red font size='4pt'>".$new_reply_additional_fields."</p>";	
    }
    #211360
    jayapramod
    Participant

    Nothing changed… I applied this as:

    1. created child theme folder in my — wp-content >> themes >> astra-child

    2. created functions.php file inside that folder with provided code.

    3. Showed in themes list.

    On viewing my discussion page nothing changed.

    g28f99
    Participant

    Thank you again!
    I also hope to add specified sentence after user personalized replies.

    
    add_action( 'bbp_theme_after_reply_content', 'new_reply_additional_fields', 10 );
    function new_reply_additional_fields() {
    $new_reply_additional_fields = 'Above is my personal opinion';
    	echo "<p id='new_reply_additional_fields'><font color=red font size='4pt'>$new_reply_additional_fields</p>";	
    

    Using above code directly also induce wordpress website error. To permanently show above sentence after every reply, I suppose it should be saved into metabox. Could you please help manage how to integrated into above code to solve this problem?

    #211358
    BGNMGUY
    Participant

    I would like to make my forum full width on all devices but I am unsure how to do so, even after viewing other forum posts and using their tips. Can someone please help me with code that will solve this problem? Thanks in advance!

    Link to my forum: https://vetteenthusiast.com/forums/forum/the-fiberglass-forum/

    #211357
    kasperdalkarl
    Participant

    Thanks again for your amazing help!

    I did as you asked, and I realized a few things.

    Adding your code in form-reply.php only changed how it looks in the reply form, i.e. when you open a thread and scroll down to the actual box where you write replies.

    What I realised is that “Reply To:” that shows in the forums is actually not from code, it’s automatically added to the topic name when someone answers a thread.
    Reply to

    So the follow up question is, can you somehow in bbpress change so replies doesn’t add “Reply To”, I would like to change it to the Swedish equivalent: “Svar till:”. And is it possible then to add what we tried earlier with the avatar+name in front of the name of the topic reply?

    Thanks a lot!

    #211355
    Robin W
    Moderator

    ok so change

    <div class="nk-gap-2"></div>

    to

    <div class="nk-gap-2"></div>
    		<?php
    		$reply_id = bbp_get_topic_last_reply_id () ;
    		echo '<span class="bbp-reply-author">'.bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) ) ;
    		?>
    #211353
    kasperdalkarl
    Participant

    Hi again!

    I managed to find it now. It’s here:
    wp-content/themes/godlike/bbpress/form-reply.php

    <?php if (bbp_is_reply_edit()) : ?>
    
    <div id="bbpress-forums">
    
        <?php endif; ?>
    
        <?php if (bbp_current_user_can_access_create_reply_form()) : ?>
            <div class="nk-gap-2"></div>
            <h3 class="h4"><?php printf(esc_html__('Reply To: %s', 'godlike'), bbp_get_topic_title()); ?></h3>
            <div class="nk-gap-1"></div>
            <div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form nk-box-3 bg-dark-1">
    
                <form id="new-post" name="new-post" method="post" class="nk-form" action="<?php the_permalink(); ?>">
    
                    <?php do_action('bbp_theme_before_reply_form'); ?>
    
                    <fieldset class="bbp-form">
    
                        <?php do_action('bbp_theme_before_reply_form_notices'); ?>
    
                        <?php if (!bbp_is_topic_open() && !bbp_is_reply_edit()) : ?>
    
                            <?php echo do_shortcode('[nk_info_box icon="fa fa-exclamation-circle" show_close_button="true" class="bg-main-1"]' . esc_html__('This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'godlike') . '[/nk_info_box]'); ?>
    
                        <?php endif; ?>
    #211349
    Robin W
    Moderator

    ok, hopefully that’s just a refinement of order

    try changing

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 10 ) ;

    to

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 5 ) ;

    or

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 15 ) ;

    #211348
    kasperdalkarl
    Participant

    Hi there!
    Thanks for the help! I added it using Code Snippets, and now the last reply author’s name appears in front of “Started by”, as you can see on this link here: https://www.talanrien.com/rollspel/

    Maybe with some minor adjustment it could appear in front of “Reply To”. Thanks for your amazing help!

    #211345
    Robin W
    Moderator

    ok, they’ve done it by a function by the look of it.

    so try this

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 10 ) ;
    
    function rew_reply_author () {
    	$reply_id = bbp_get_topic_last_reply_id () ;
    	echo '<span class="bbp-reply-author">'.bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) ) ;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    then come back and let me know where this appears, we might need to adjust

    Robin W
    Moderator

    just overwrite your code with the above – that code works

    Robin W
    Moderator
    add_action( 'bbp_theme_before_reply_form_content', 'rew_additional_field' );
    function rew_additional_field($post){
    	?>
    	<select name="rew_additional_field" id="rew_additional_field">
    		<option value="enqury">Enquiry</option>
    		<option value="complaint">Complaint</option>
    		<option value="feedback">Feedback</option>
    	</select>
    	
    	
    	<select name="rew_additional_field_2" id="rew_additional_field_2">
    		<option value="enqury2">Enquiry2</option>
    		<option value="complaint2">Complaint2</option>
    		<option value="feedback2">Feedback2</option>
    	</select>
    	<?php
    }
     
    
    add_action('bbp_new_reply_post_extras', 'rew_save_additional_field');
    
    function rew_save_additional_field($reply_id){ 
        global $post;
        if(isset($_POST["rew_additional_field"])) {
            update_post_meta ($reply_id, 'rew_additional_field', $_POST["rew_additional_field"]) ;
    	}
        if(isset($_POST["rew_additional_field_2"])) {
            update_post_meta ($reply_id, 'rew_additional_field_2', $_POST["rew_additional_field_2"]) ;
    	}
    }
    
    add_action('bbp_theme_before_reply_content', 'rew_show_additional_field');
    
    function rew_show_additional_field () {
    $reply_id = bbp_get_reply_id();
    	$field = get_post_meta($reply_id, 'rew_additional_field', true);
    	if (!empty ($field)) {
    		echo "Type: ". ucfirst($field)."<br>"; 
    	}	
    	$field_2 = get_post_meta($reply_id, 'rew_additional_field_2', true);
    	if (!empty ($field_2)) {
    		echo "Type: ". ucfirst($field_2)."<br>";  
    	}
    }
    g28f99
    Participant

    But I found a new problem. I hope more than one selection box will be shown there.
    And there will be errors. Could you please kindly suggest solutions?

    
    add_action( 'bbp_theme_before_reply_form_content', 'rew_additional_field' );
    function rew_additional_field($post){
    	?>
    	<select name="rew_additional_field" id="rew_additional_field">
    		<option value="enqury">Enquiry</option>
    		<option value="complaint">Complaint</option>
    		<option value="feedback">Feedback</option>
    	</select>
    	
    	
    	<select name="rew_additional_field_2" id="rew_additional_field_2">
    		<option value="enqury2">Enquiry2</option>
    		<option value="complaint2">Complaint2</option>
    		<option value="feedback2">Feedback2</option>
    	</select>
    	<?php
    }
     
    
    add_action('bbp_new_reply_post_extras', 'rew_save_additional_field');
    
    function rew_save_additional_field($reply_id){ 
        global $post;
        if(isset($_POST["rew_additional_field"])) {
            update_post_meta ($reply_id, 'rew_additional_field', $_POST["rew_additional_field"]) ;
    		
        if(isset($_POST["rew_additional_field_2"])) {
            update_post_meta ($reply_id, 'rew_additional_field_2', $_POST["rew_additional_field_2"]) ;
    	}
    }
    
    add_action('bbp_theme_before_reply_content', 'rew_show_additional_field');
    
    function rew_show_additional_field () {
    $reply_id = bbp_get_reply_id();
      $field = get_post_meta($reply_id, 'rew_additional_field', true);
      if (!empty ($field)) {
    	echo "Type: ". ucfirst($field)."<br>";  
    	
      $field_2 = get_post_meta($reply_id, 'rew_additional_field_2', true);
      if (!empty ($field_2)) {
    	echo "Type: ". ucfirst($field_2)."<br>";  
      }
    }
    
    
Viewing 25 results - 2,701 through 2,725 (of 32,462 total)
Skip to toolbar