Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,626 through 2,650 (of 32,492 total)
  • Author
    Search Results
  • #212411
    Robin W
    Moderator

    I can’t see an option for tags in the code

    #212410
    Robin W
    Moderator

    Actually, this is the (I hope) correct code for revisions

    foreach ( $query as $id ) {
    $post_parent_id = wp_get_post_parent_id ($id) ;
    $type = get_post_type ($post_parent_id) ;
    if ($type != 'topic' && $type != 'reply' ) 
    wp_delete_post_revision( (int) $id );
    }
    #212407
    Robin W
    Moderator

    if you go into the plugin and find

    wp-sweep.php

    find line 557 which says

    foreach ( $query as $id ) {
    												wp_delete_post_revision( (int) $id );
    }

    and amend to

    foreach ( $query as $id ) {
    $post_parent_id = wp_get_post_parent_id ($id) ;
    $type = get_post_type ($post_parent_id) ;
    if ($type != 'topic' && $type != 'reply' ) 
    wp_delete_post_revision( (int) $id );
    }

    that should do it

    #212385
    Juha Metsäkallas
    Participant

    I have had TinyMCE working, but something seems to have broken it. Unfortunately I don’t know after which update to which plugin this began. Neither the code by AnnieBVT nor the bbp style pack plugin helps.

    Pointers to what to try next appreciated.

    #212384
    Chuckie
    Participant

    I was running a Query Monitor on my site and noted the following:

    Undefined index: latest-user

    wp-content/plugins/bbpress-improved-statistics-users-online/includes/public/class.online.php:229
    bbPress_Advanced_Statistics_Online->allowed_tags()

    So I had a look at the core file at that line and found:

            private function allowed_tags() {
                // Store all of the strings currently replace
                $this->_tags = array(   
                            "%MINS%"                => $this->parent->option['user_inactivity_time'],
                            "%COUNT_ACTIVE_USERS%"  => $this->stats["count"]["active"],
                            "%HOURS%"               => $this->parent->option['user_activity_time'],
                            "%COUNT_ALL_USERS%"     => $this->stats["count"]["inactive"] - $this->stats["count"]["guests"],
                            "%COUNT_ALL_GUSERS%"    => $this->stats["count"]["guests"],
                            "%COUNT_ACTIVE_GUSERS%" => $this->stats["count"]["guestsa"],
                            "%USER_USERS%"          => _n("user", "users", $this->stats["count"]["active"], 'bbpress-improved-statistics-users-online'),
                            "%GUEST_GUESTS%"        => _n("guest", "guests", $this->stats["count"]["guestsa"], 'bbpress-improved-statistics-users-online'),
                            "%ALL_USER_USERS%"      => _n("user", "users", $this->stats["count"]["inactive"] - $this->stats["count"]["guests"], 'bbpress-improved-statistics-users-online'),
                            "%ALL_GUEST_GUESTS%"    => _n("guest", "guests", $this->stats["count"]["guests"], 'bbpress-improved-statistics-users-online'),
                            "%USER_RECORD%"         => $this->most_users( "record" ),
                            "%USER_RECORD_DATE%"    => $this->most_users( "date" ),
                            "%USER_RECORD_TIME%"    => $this->most_users( "time" ),
                            "%LATEST_USER%"         => $this->stats["latest-user"]
                        );

    The offender is:

    "%LATEST_USER%" => $this->stats["latest-user"]

    So I tried to find where latest-user is also used and only found one place in all the files, here:

            private function stats_extra( $activity ) {
                
                if( $this->parent->option["bbpress_statistics"] == "on" ) {
                    // Add the bbPress Statistics
                    $activity["bbpress"] = $this->get_formatted_statistics();
                }
                
                if( $this->parent->option["last_user"] == "on" ) {
                    // Get the HTML latest usser
                    $activity["latest-user"] = $this->get_latestuser( true );
                }
                
                if( $this->parent->option["most_users_online"] == "on" ) {
                    // Get/set the most users ever online, users the active online users
                    $activity["most-users"] = $this->get_mostusers( $activity["count"]["active"] );
                }
                
                return $activity;
            }

    This led me to:

                // Create the statistics variable
                $this->stats = $this->stats_extra( $activity );

    So this warning looks like a false positive to me. Thoughts?

    #212367
    Robert Hewitt
    Participant

    For the part of my website containing bbPress, I don’t want the main navigation menu to show. To achieve this, I enter CSS code on the main web page where [bbp-forum-index] is displayed.

    The CSS code does its job as far as the first page is concerned – that is the page where the forums are listed.

    However, if you select a specific forum to look at, this takes you to a new page. Unfortunately, on the new page, the main navigation menu is showing. So the CSS code has not done its job here.

    Any advice on how to solve this problem would be much appreciated!

    #212363

    In reply to: Empty forum index

    Robin W
    Moderator

    you have in-line css code that says

    .bbp-forums {
     display:none
    }

    which means they don’t display, but the forum is there on the page.

    I cannot see what is setting that, and in-line code cannot be overridden.

    It may be your theme, or another plugin, so a setting you have in your theme or another plugin.

    Have you added any plugins lately, or updated theme or plugins ?

    #212359
    Chuckie
    Participant

    If you know how to do the code in php you might be able to build a URL that effectively jumps to that reply in the topic (just like you can see on the standard forum pages).

    #212356
    thevisas
    Participant

    Hi,
    Nothing is displayed in a page when using bbp-forum-index shortcode.
    Tried saving permanent links, but the issue is still present.
    The same happens when creating new page with bbp-forum-index shortcode.
    Not sure when the issue started, but probably since 2.6 update.
    Current bbpress version is 2.6.5.
    The URL is https://www.thevisasofoz.com/australia-migration-forum/

    #212344

    In reply to: bbPress + Elementor

    Kamrujjaman kanak
    Participant

    Hello, I use Elementor pro and element pack pro But the problem is going on when I can showing the forum single post then only possible to show the post by id but I can show all of the specific posts in my Elementor forum single post template I want to show all of the specific posts in this page.

    Here is the shortcode for showing the single post by id [bbp-single-topic id=$topic_id]
    But I can show all of the single posts without using id Is it possible can I give some solution, please

    Madam @fabwintle Please give me a great solution, please

    Thanks
    only4kanak

    #212343
    Sadegh Hosseini
    Participant

    Hi,
    there is a shortcode to display a single topic:
    [bbp-single-topic id=$topic_id]
    and there is a function to find last reply of the topic:
    <?php bbp_last_topic_reply_permalink ?>
    Now I want to create a shortcode to show the last reply of the topic.
    for example:
    [bbp-single-topic-last id=$topic_id]
    Please tell me how can I do this.
    Thanks

    #212339
    Tessa Watkins
    Participant

    I keep coming back to this in my search to find a shortcode to display the same content (like the avatar, profile link, etc.) as the widget titled (bbPress) Login Widget.

    Unfortunately, none of these account-related shortcodes from https://codex.bbpress.org/shortcodes/

    [bbp-login] – Display the login screen.
    [bbp-register] – Display the register screen.
    [bbp-lost-pass] – Display the lost password screen.

    show the same content as the widget, especially for a logged in user. There doesn’t seem to be a shortcode, so instead, I’m using this successfully.

    if (class_exists('BBP_Login_Widget')) {
        the_widget('BBP_Login_Widget');
    }
    #212332
    Rough Pixels
    Participant

    I’m redesigning my site, and for some reason, the child (sub) forums are not showing on the Forum Index under their parents. This happened on my first development site and after trying different things, I uninstalled bbPress and reinstalled it. They appeared. Now, when I moved my redesigned theme (which does have some template overrides) to a new dev site setup, once again my child forums are missing. However, uninstalling and reinstalling bbPress didn’t fix it this time.

    I looked at the source code of the forum index and there is absolutely nothing there (no child forums).

    Any ideas why they are not showing up again?

    NOTE: I’m on WordPress 5.4.2, PHP 7.2. I switched to the twenty twenty theme, and the same thing happens…no child forums show under the parents. I also cannot give a link because my redesign is done locally on XAMPP.

    #212325
    Robin W
    Moderator

    always a toss up – I can add endless options to my plugins or take judgements on what people want.

    <span class=”bsp-la-text”>in </span> lets people translating change what they want. If I take then space out, then that is always there.

    you can use

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'old text' ) {
    	$translated_text = 'new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );

    to put in a : if you want it

    #212324
    Chuckie
    Participant

    Sorted it!

    
    /* Profile Info */
    #bbpress-forums li.bbp-body div.bbp-reply-author,
    #bbpress-forums li.bbp-body div.bbp-topic-author {
    	margin-left: 5px;
    	margin-top: 5px;
    	background: #c1c1c1;
    	color: #262626;
    	border: 1px solid black;
    }
    
    /* Header Row */
    #bbpress-forums li.bbp-header .bbp-topic-author,
    #bbpress-forums li.bbp-header .bbp-reply-author,
    #bbpress-forums li.bbp-header .bbp-topic-content,
    #bbpress-forums li.bbp-header .bbp-reply-content
    #bbpress-forums div.bbp-topic-author {
    	color: #262626;
    	font-size: 16px;
    }
    

    Still, a bit clumsy using the same class name for two different things. 🙁

    #212323
    Chuckie
    Participant

    I have this style:

    
    /* Profile Info */
    #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author {
    	margin-left: 5px;
    	margin-top: 5px;
    	background: #c1c1c1;
    	color: #262626;
    	border: 1px solid black;
    }
    
    /* Header Row */
    #bbpress-forums li.bbp-header .bbp-topic-author,
    #bbpress-forums li.bbp-header .bbp-reply-author,
    #bbpress-forums li.bbp-header .bbp-topic-content,
    #bbpress-forums li.bbp-header .bbp-reply-content
    #bbpress-forums div.bbp-topic-author {
    	color: #262626;
    }
    

    The problem is that the header row uses the same class name and I can’t get to one without affecting the other.

    #212318
    Chuckie
    Participant

    Also, it would be better if the bbp style pack plugin did not create code like this:

    <span class="bsp-la-text">in </span>

    The space is hard-coded. If the gap was achieved with styling then I could have added a “:” suffix which would make it even more consistent. I would be able to do that for the line:

    <span class="bsp-la-text">topic by</span>

    But not the “in ” line.

    #212317
    Chuckie
    Participant

    This is the final CSS that looks good:

    /* Recent Topics Widget */
    /* See also: .widget_display_topics img.avatar.photo */
    .widget_display_topics ul {
        background: rgba(0, 0, 0, 0.04);
        padding: 10px 20px;
        list-style-type: none;
        margin: 0;
        margin-bottom: 1.66666667em;
    }
    a.bsp-la-reply-topic-title {
        color: #222222;
        font-weight: 600;
        display: block;
    }
    .bsp-la-text,
    .bsp-la-topic-author,
    .bsp-activity-freshness,
    .bsp-activity-forum {
        font-size:12px;
        text-transform: uppercase;
    }
    .bsp-activity-author,
    .bsp-activity-freshness,
    .bsp-activity-forum {
        display: inline;
    }
    .bsp-activity-author:after,
    .bsp-activity-forum > .bsp-la-text:before {
        content:"/";
        margin: 0 7px;
    }
    .widget_display_topics ul:last-child {
        margin-bottom: 0;
    }
    #212314
    Chuckie
    Participant

    I have improved it alot:

    .widget_display_topics ul {
    	background: rgba(0, 0, 0, 0.04);
    	padding: 10px 20px;
    	list-style-type: none;
    	margin: 0;
    	margin-bottom: 1.66666667em;
    }
    a.bsp-la-reply-topic-title {
    	color: #222222;
    	font-weight: 600;
    }
    .bsp-la-text,.bsp-la-topic-author, .bsp-activity-freshness, .bsp-activity-forum {
    	font-size:12px;
    	text-transform: uppercase;
    }
    .widget_display_topics ul:last-child {
    	margin-bottom: 0;
    }
    .widget_display_topics img.avatar.photo {
    	border: #000 solid 1px;
    	margin-top: -3px;
    	margin-right: 4px;
    	display:inline-block;
    	vertical-align:middle;
    }

    The only thing I would still like to do is get the final “TOPIC BY …” information to all flow as a sentence with a / delimiter. Can that be done?

    #212293
    Milan Petrovic
    Participant

    There has to be something. It is very unlikely that high load is caused by PHP code only, my guess is that MySQL queries are causing high load. That too is strange, because it should not be happening normally, but at least, it can point to some configuration issue with MySQL server.

    #212251

    In reply to: bbPress + Elementor

    Kamrujjaman kanak
    Participant

    Hello, I use Elementor pro and element pack pro But the problem is going on when I can showing the forum single post then only possible to show the post by id but I can show all of the specific posts in my Elementor forum single post template I want to show all of the specific posts in this page.

    Here is the shortcode for showing the single post by id [bbp-single-topic id=$topic_id]
    But I can show all of the single posts without using id Is it possible can I give some solution, please

    Madam @fabwintle Please give me a great solution, please

    Thanks
    only4kanak

    #212242
    randrcomputers
    Participant

    I do use shortcode for bbpress index display is there another way but man is index super slow to load! latest post shortcode is fine its just the index. rest of site is fine jumping from topic to topic but something must be going on. I have researched this and seems related to shortcode or amount of posts/topics/replies? site has only 80,000 posts with 6,044 topics so not big at all

    #212228
    sblwp
    Participant

    Thank you Robin for helping me,

    The procedure is all clear but unfortunately the breadcrumb is still displayed above the [bbp-topic-form].
    Maybe that’s because the site is also using the WOffice plugin (some code there that would pass over the content-archive-forum.php ?)

    I just thought of another solution, more wobbly maybe :
    I can see in the code source that this div is called <div class ="bbp-breadcrumb"> meaning that if I create a .bbp-breadcrumb in my CSS file, I can add a display:none; and could hide it ?

    Pawan
    Participant

    Thanks Robin for a great help. I am coding my own theme, and code from this plugin helped me to find out the filter ‘bbp_subscription_mail_message’. Though function ‘bbp_pre_notify_subscribers’ and ‘bbp_post_notify_subscribers’ are not working. But its working great with the ‘wp_mail_content_type’. It is now returning all mails from wordpress to Html emails. Anyway atleast it solved my issue. Thanks!!

    Kamrujjaman kanak
    Participant

    Hello, I use Elementor pro and element pack pro But the problem is going on when I can showing the forum single post then only possible to show the post by id but I can show all of the specific posts in my Elementor forum single post template I want to show all of the specific posts in this page.

    Here is the shortcode for showing the single post by id [bbp-single-topic id=$topic_id]
    But I can show all of the single posts without using id Is it possible can I give some solution, please

    Thanks
    only4kanak

Viewing 25 results - 2,626 through 2,650 (of 32,492 total)
Skip to toolbar