Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,101 through 4,125 (of 32,481 total)
  • Author
    Search Results
  • #195374
    Robin W
    Moderator

    ok, sorry but you can only fault find by testing.

    Only having a live site is not a good policy, suggest you invest time in creating a test site

    Creating a Test Site

    #195373
    Robin W
    Moderator

    the function (1) can sit in your plugin

    the template (2) can also be in your plugin, but yes, you’ll need some code to do this

    in my style pack plugin I have a directory and sub directory called

    templates/templates1 and in this I have a bbpress templates I have amended eg

    wp-content/plugins/bbp-style-pack/templates/template1/loop-forums.php

    then in my plugin code I have (you’ll need to amend BSP_PLUGIN_DIR to a suitable name for your plugin

    if(!defined('BSP_PLUGIN_DIR'))
    	define('BSP_PLUGIN_DIR', dirname(__FILE__));
    
    add_action( 'bbp_register_theme_packages', 'bsp_register_plugin_template1' );
    
    function bsp_register_plugin_template1() {
    	bbp_register_template_stack( 'bsp_get_template1_path', 12 );
    }
    
    function bsp_get_template1_path() {
    	return BSP_PLUGIN_DIR . '/templates/templates1';
    }

    This loads all templates in that directory and registers them with bbpress

    come back if that doesn’t work for you with your code

    #195372
    jd-fb
    Participant

    Thanks Robin. I previously played with bbp_show_lead_topic, and I couldn’t get it to work (which is why I posted my question above.) I guess I was missing step 2, which is the template.

    Question: Do the steps you describe change if I’m developing a plugin, instead of a theme? If I’m correct, the following code should help me (correct?)

    correct way to override bbpress templates

    #195351
    Al_ambique
    Participant

    Hello,
    I’d like to share my workaround to fix the following problem:
    After importing all topics and posts and forums and users from my old WebsiteA, I couldn’t see any topics inside my forums on my new WebsiteB. The counts were correct, but I could only see sticky topics inside each forum, nothing else.

    I tried the built-in fixing tools, but that was a BAD IDEA. It broke my site every time I tried it (blank page on front-end without any error). The only way to fix it was to restaure the whole database!

    So I looked at the database and found that a simple info was missing. All topics were set with post_parent = 0, while the corresponding postmeta _bbp_forum_id field was set correctly.
    All that was needed to do is to update this post_parent field by fetching this meta value.
    Here’s my working SQL script (of course do NOT FORGET to save your database first…):

    UPDATE 'wp_posts' 
    SET post_parent = (
    SELECT meta_value 
    FROM 'wp_postmeta' 
    WHERE post_id=ID AND meta_key="_bbp_forum_id") 
    WHERE post_parent = 0;

    I also want to point something VERY annoying when using the WP importer. WordPress asked me to match every single forum user from WebsiteA with the dropdown list of users from WebsiteB, which is very stupid since I had imported all the users. They were all identical.
    It literally took me an hour to select every user on the dropdown menu…
    The user IDs were the same on both websites!! Why not auto-selecting???????

    I hope some dev will see this and fix it somehow, because it sounds like something quite easy to fix 😉
    Have a nice day

    jimmy369
    Participant

    Hi Robin, So sorry for late reply.

    Yes, I still stuck on the issue. Hoping the topics of the certain forum (by forum ID) can automatically close after 30 minutes, even if it has updated during this period. I paste the original code of the plugin and I have tried to modify it but failed. I will appreciate your patience and help with this situation.

    #195313
    Robin W
    Moderator

    …and say where it is appearing – ie within the forums list, the topic list in a single forum, a page with shortcode etc.

    #195310
    Robin W
    Moderator

    ok, so concentrating on a topic and it’s reply list and ignoring forums, you are saying that you would like

    from clicking a topic in the forum list (a list of topics in the forum) you are taken to a page which displays

    • the topic name
    • some content/info but styled and controlled by you
    • the replies as per normal
    • the reply form

    If so I suspect you need to do two things

    1. use this piece of code in your functions file

    bbp_show_lead_topic

    2. amend content-single-topic-lead.php in your child theme’s bbpress directory.

    by

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-single-topic-lead.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-single-topic-lead.phpbbPress will now use this template instead of the original and you can amend this

    I have no idea how technical you are and whether that gives you enough to go ahead and fix, or if you need further help – let me know

    #195305
    Robin W
    Moderator

    I would only expect keymasters to see this – can you confirm that a user with participant access is seeing this, and say where it is appearing – ie within the forums list, the topic list in a single forum, a page with shortcode etc.

    #195255
    Ahmet Akdel
    Participant

    Hi Robin W, thank you for answer. My bbpress site some areas are broken in mobile. You can look screenshot or my forum page: notdefteri.net/forum Is there an add-on or code for %100 mobile compliance? thank you

    https://ibb.co/bAxWgz

    #195246
    jd-fb
    Participant

    Thanks for the reply… but I think looking at the theme files only confused me more. (Sorry!)

    I’ve taken a look at templates/loop-replies.php that’s built-into the plugin, which (if I understand correctly) is what is used when a user is viewing a topic’s page (in other words http://domain.com/forum/topic/awesomness/). I’m kind of confused as to how it works – near the bottom of this template, it calls another template using bbp_get_template_part( 'loop', 'single-reply' ); – and it does this whether it’s the topic’s content or a reply to the topic.

    So, I’m uncertain if I need to modify the WP_Query (or where), or if I should modify the template.

    #195232
    jd-fb
    Participant

    I just noticed that this website, bbpress.org, does something similar to what I’m looking for. (Except, I’d remove the avatar and date.)

    So, how does that work? I noticed that this site’s theme is called BB’s Parent, but that doesn’t seem to be available to the public (so I can’t check its code 🙁 )

    #195217
    vickybbpress
    Participant

    Hello Support,
    I am not able to see the reply form for my WP users(as subscriber) who are logged in on website.
    I have checked the code of “form-reply.php” and it is saying in starting that <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>

    My issue is even I have assign all of my user who’s role “subscriber” to “keymaster” as well, but when I go to my website front end and try to login as user it works but when I go to list of topics it says “You must be logged in to reply to this topic.”

    Please help

    #195216
    Ashaani
    Participant

    I’ve been having a similar issue (WordPress 4.9.8, bbpress 2.5.14, no Buddypress). Forum users with the Participant role were able to view the existence of private forums but not any of the actual topics inside them. I tried creating a new role with read_private_topics enabled as well and assigning it to them, but to no avail. The only thing that seemed to fix it is what @kingstringy mentioned above:

    The only thing that repairs the issue is switching each forum to public, saving the forum, then returning the forum to private status and saving again. Bulk edit doesn’t work — only updating each forum individually.

    After having done that, users with the standard Participant role are able to see private forums again, with no other customization or plugins needed.

    I wonder if there is a bug with the Bulk Actions dropdown in the Forums admin page? That’s what I used to set them to Private originally. Maybe it failed to update something that it needed to, whereas setting the visibility to Private on each forum individually succeeded.

    jd-fb
    Participant

    I noticed that there is no space before the word “days” in your line here
    if ( $last_active < strtotime( '-' . $this->old_topic_age_setting() . 'days' ) ) :

    This means that it’ll result in “-1days”, and every example I’ve seen for strtotime() has a space before the word “days”, so ‘-1 days’.

    I haven’t used strtotime() a lot so I’m not totally sure, but that one space could make a difference.

    #195208
    Robin W
    Moderator

    ok, I’ve taken a further look.

    so I create a new topic, put in a title, then in the content I click the img button and get a prompt for URL which I enter, and then a prompt comes up for description which I enter, and then I press ok.

    The content then shows

    <img src="http://xxx.co.uk/wp-content/uploads/2018/03/aunt.bmp" alt="this is the image" />

    I click submit and the image appears in the topic

    can you describe what is different for you ?

    jimmy369
    Participant

    I hope that it is appropriate to ask this question here. (WordPress 4.9.8, bbPress 2.5.14, Theme:TwentyTen)
    I hope that one of my forums can automatically close the topics after 30 minutes.
    I read this discussion (https://bbpress.org/forums/topic/auto-close-topic-after-some-time-days/) and tried to modify it myself, but I failed.
    Later I found a plugin called BBP Close Old Topics (https://wordpress.org/plugins/bbp-close-old-topics/).
    I tried to modify it myself, but in the end it can only be automatically close the topics after one day.
    I guess… is this the problem with these code?

    // Get timestamp of last activity of the topic.
    		$last_active = strtotime( get_post_field( 'post_date', bbp_get_topic_last_active_id( $topic_id ) ) );
    
    		// Compare last active timestamp with defined time period.
    		if ( $last_active < strtotime( '-' . $this->old_topic_age_setting() . 'days' ) ) :

    Is there something missing here that the command can only catch D (day) and not catch i (minute)?

    I’m at my wits’ end with this issue……Thank you so much.

    #195196
    jd-fb
    Participant

    I was wondering if there were a way to not have a topic’s content appear in its own box at the top of the reply list. Ditto for the forum content (in other words, the HTML that output using bbp_topic_content() and bbp_forum_content() respectively).

    The built-in bbPress styling shows the topic and forum content in a box that has the same (or very simiar) styling as replies. In my case, I’d like to remove the box so that the content appears as though it’s the lead-in text of a page (with H2s, H3s and so forth) with the replies + reply form below.

    Can someone point me in the right direction?

    Idea / potential solution 1)
    I found that I can do this:

    add_action ('bbp_template_before_single_topic', 'show_text');
    function show_text() {
    	ob_start();	
    	echo '<div class="my_class">';
    	add_action ('bbp_get_topic_content', 'do_shortcode'); // added b/c the content may have shortcodes
    	bbp_topic_content();
    	echo '</div>';   
    	$output = ob_get_clean();   
    	echo $output;
    }

    But this results in the topic content appearing in both the “top” of the page (as I’d prefer) and in its box listed with the replies (which I’d like to remove).

    Idea / potential solution 2)
    I’m guessing there’s something I can do with a template. If so, can someone direct me to how my plug-in can override bbPress’s template? I haven’t done a lot of template work.

    Troubleshooting
    – All themes have this “extra box” issue.
    – Using WP 4.9.8
    – Using bbPress 2.5.14-6684
    – I’m working on a local site, so I can’t provide a link

    Milega
    Participant

    Dear Buddypress community,

    I’m facing hard time to simply add space between topic tabs using the bbp-topic-index shortcode.

    I only found this post with a reply on this problem here : https://bbpress.org/forums/topic/space-between-posts/

    However, the solution given seems either outdated either wrong because there is no such things as topic.php in my bbpress or theme directory.

    I cannot find the template (.php) used to render the topics index table and I tried adding margin through CSS but none worked.

    I see the topics list is designed as table using tr and td but don’t know how to customize it.

    Any help would be appreciated,

    Sincerely,

    #195138
    darunia77
    Participant

    Hello,

    I just installed bbpress on my site (greenteacoffeedate.com) and noticed that it hides notifications from another plugin in user’s profile. It does not hide standard BP notifications like, someone sent you a message or commented on your activity post (in BP, not BB). The plugin in question is this one and it’s no longer supported so I can’t reach out to the plugin designer. So members can’t see who viewed their profile in notifications.

    Buddypress Who clicked at my Profile?

    I looked at the code in my Chrome inspector and this is what happens. Please see linked image:
    Screenshot

    So I can see that the description is turned off ( the one on top) but where do I turn it back on (like in the bottom yellow rectangle). I tried to play with display tag in css but it doesn’t seem to do it. Any thoughts?

    #195105
    trialanderror87
    Participant

    It worked! Thanx! But what i did was different because i dont know how to access the custom css of my style pack plugin…so what i did was dashboard >appearance >customize >additional css then I pasted your code and it worked like a magic! thank you very much!

    #195104
    Robin W
    Moderator

    I can’t see that code has been loaded

    1. is that code still in your site?
    2. whereabouts have you put it ? ie in which file or part of wordpress

    #195102
    Robin W
    Moderator

    try

    #sidebar .bbp-login-form label {
    	width: 100px !important;
    }
    #195100
    Robin W
    Moderator

    try

    
    #sidebar .bbp-login-form label {
    	width: 100px;
    }
    
    #195095
    Robin W
    Moderator

    your theme is overwriting

    put this in the custom css tab of my style pack plugin

    a.bbp-forum-link {
    display : block !important ;
    }
    #195091
    Robin W
    Moderator

    titles are theme related, so you would need to modify the theme template being used by bbpress.

    see

    Step by step guide to setting up a bbPress forum – Part 1

    part 8, and create a bbpress.php file from the template your theme is using to display bbpress. This plugin will show you what templates are being used

    Show Current Template

Viewing 25 results - 4,101 through 4,125 (of 32,481 total)
Skip to toolbar