Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 3,976 through 4,000 (of 32,517 total)
  • Author
    Search Results
  • #197171

    In reply to: topic reply

    Robin W
    Moderator

    nothing I know of does this.

    Like everything, this can be coded, but beyond free help from me I’m afraid.

    #197145
    tapiohuuhaa
    Participant

    Enable Visual Editor

    “In some cases, text pasted into the visual editor will bring along unwanted styles and HTML markup. You can use another function to force pasted text to be cleaned up. ”

    I added the function, but it does not work. See

    Suomen Kuvalehti 50/2018

    Do I need some plugin for TinyMCE

    #197144
    phil1ooo
    Participant

    Hello
    New to bbpress “to be honest I have always used wpForo” and I am finding it to be far far easier than this bbpress option and a much cleaner appearance, where I would of had wpForo up and running in less than 30 minutes, I have been working on this bbPress for 2 days now and still now where near making it usable to frontend members”

    But here I am giving you guys the benefit of the dout as my current needs require something a little different.
    My issue not displaying the profile page as that is childs play to do but to get the /user page edited so that it all properly aligns https://support.ozy.net.au/support-forums/users/dummy/

    Now click on this link https://support.ozy.net.au/support-forum/ to login.
    I have created a dummy account that I will leave active for a few days giving you change to have a look
    UN – dummy@yours.com
    PW – 1dummytest1

    I understand/know these are widgets but my issue is not being able to access this USERS page to make any changes and i can’t seem to find it anywhere in the system or cPanel file system.

    I also have the same issue with another plugin but just can’t find it right now.
    This “bbp Topic Count” plugin also doesn’t work as no shortcodes displayed here actually work
    Thi scan be seen here https://support.ozy.net.au/top-users/ at it should appear above the profile you see there “considering you do see that profile from your end that is”

    Having said this I have spent the last 2 days looking online at options and ways around all these things but most of what you find is so outdated and the rest in most part doesn’t work.

    I am creating this for a network which means just setting it up is a big job without the hassles this plugin is giving me and the last thing I need is constant maybe’s and what if’s so either this plugin works or it doesn’t. Not trying to be rube just very direct in my needs.

    Hope you can help.
    Cheers

    #197125
    jaykaybee
    Participant

    I’m new to wordpress and bbPress. I found a post that described the problem I am having, but a “keymaster” closed the thread… I don’t see how to solve this problem.

    The original thread was:
    https://bbpress.org/forums/topic/breadcrumb-and-forum-index-issues/

    Here is my restatement of the issue:

    I am new to WordPress and BBpress, using Astra theme. I have read some forum topics on the problem I am having, but some are now closed and did not provide answers in remedial enough fashion! (I’m not a coder.)
    Here is how I am experiencing the problem, you can follow along on the links below (I used BBP stylepack to remove the “home” link)
    1. I navigate to https://devgo.jeffbelkora.com/forums/. This presents a blank page.
    2. As suggested in a prior forum here, I set up a WordPress page called forums with a bbpress shortcode [bbp-forum-index]. Still, the URL /forums/ presents a blank page.
    3. Bizarrely (to me), I can see this forum index only if I change the URL to Forums/ with a capital F. Huh? Now this page displays a list of forums, namely one I created called “Resource Messages”. Very confused as to how the uppercase F came to display the right index. I stumbled on that accidentally.
    4. I click on “Resource Messages” This takes me to /forums/forum/resource-messages/. The URL now has a lowercase f in forums. This will be a problem in a minute!
    5. Now I click on “Resource Message 2” link and I’m taken to /forums/topic/20181219-resource-message-2/. Incidentally, I am working on an entire project to strip down the forum into a one-way bulletin board… but this post is just about the forum breadcrumbs.
    6. Now the problem arises where I click on the breadcrumb for forums, whose link is /forums/. As seen in item 1, this presents a blank page.
    Now, other posters pointed to BBP StylePack “breadcrumbs” setting. And I have tried to insert my forum page (with the shortcode [bbp-forum-index]) URL (/forums/) into their “override” box. But instead of showing the forum index, it shows a blank page.
    Help! I am so confused. I would really appreciate any tips or links to further resources, in very remedial terms.

    #197113

    In reply to: Trackbacks

    Robin W
    Moderator

    ah – thanks – try this

    // Force ping_status on bbPress post types
    add_filter( ‘pings_open’, ‘rew_force_ping_status’ ); 
    function rew_force_ping_status( $open, $post_id = 0 ) { 
    // Get the post type of the post ID
    $post_type = get_post_type( $post_id );
    // Default return value is what is passed in $open
    $retval = $open;
    // Only force for bbPress post types
    	switch ( $post_type ) {
    	case bbp_get_forum_post_type() :
    	case bbp_get_topic_post_type() :
    	case bbp_get_reply_post_type() :
    	$retval = false;
    	break;
    	// Allow override of the override
    	return apply_filters( ‘rew_force_ping_status’, $retval, $open, $post_id, $post_type );
    	}
    } 
    #197112

    In reply to: Trackbacks

    cdwed
    Participant

    OK…here is what I get for an error message:

    The code snippet you are trying to save produced a fatal error on line 19:

    syntax error, unexpected end of file

    #197111

    In reply to: multiple forums

    Robin W
    Moderator

    create a page and put this shortcode in for each forum you want to display where xx is the foirum number

    [bbp-single-forum id=xx]

    eg

    [bbp-single-forum id=56] 
    [bbp-single-forum id=68] 
    [bbp-single-forum id=27] 
    
    #197110

    In reply to: Trackbacks

    Robin W
    Moderator

    sorry, should have put ‘code’ round the sentence

    so should have read

    ‘you seem to have <strong> and </strong> in your code, that is not in the version I posted’

    but if that is not the issue, can you post the exact error you are getting

    #197106

    In reply to: Trackbacks

    cdwed
    Participant

    I dont get it. I copied your code exactly as below. Is there an AND symbol getting in there in the copy function?

    // Force ping_status on bbPress post types
    add_filter( ‘pings_open’, ‘rew_force_ping_status’ );

    function rew_force_ping_status( $open, $post_id = 0 ) {

    // Get the post type of the post ID
    $post_type = get_post_type( $post_id );
    // Default return value is what is passed in $open
    $retval = $open;
    // Only force for bbPress post types
    switch ( $post_type ) {
    case bbp_get_forum_post_type() :
    case bbp_get_topic_post_type() :
    case bbp_get_reply_post_type() :
    $retval = false;
    break;
    // Allow override of the override
    return apply_filters( ‘rew_force_ping_status’, $retval, $open, $post_id, $post_type );
    }

    #197105
    Robin W
    Moderator

    ok, that is quite ambitious, so well done for getting so far.

    As I think you are doing, you should only change files in the templates and then only by copying them to a bbpress folder in your child theme. The originals can (and should) stay in the bbpress plugin file. bbpress will see your files in the child theme and use them instead.

    to move the topic content – the word ‘test’ in your example

    #bbpress-forums div.bbp-forum-content, #bbpress-forums div.bbp-reply-content, #bbpress-forums div.bbp-topic-content {
    	margin-left: 0px !important;
    }
    #197104

    In reply to: Trackbacks

    Robin W
    Moderator

    you seem to have and in your code, that is not in the version I posted

    #197103

    In reply to: Trackbacks

    cdwed
    Participant

    I put in the code and got a syntax error. I loaded it in just as you wrote it. So it will not run.

    Can you check on this please?
    Here is what you posted:

    // Force ping_status on bbPress post types 
    add_filter( 'pings_open', 'rew_force_ping_status' ); 
    
    function rew_force_ping_status( $open, $post_id = 0 ) { 
    
    <strong>// Get the post type of the post ID 
    $post_type = get_post_type( $post_id ); 
    // Default return value is what is passed in $open 
    $retval = $open; 
    // Only force for bbPress post types 
    switch ( $post_type ) { 
    case bbp_get_forum_post_type() : 
    case bbp_get_topic_post_type() : 
    case bbp_get_reply_post_type() : 
    	$retval = false; 
    break; 
    // Allow override of the override 
    return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type ); 
    } </strong>
    #197083
    jaykaybee
    Participant

    I am trying to configure bbpress for one way announcements to an audience of members in my website. Meaning I as the author am posting topics in chronological order, with no possibility of replies. So not a normal forum.

    This has meant removing a lot of extraneous information normally displayed: I don’t need or want author, freshness, voices, etc.

    I am new to WordPress, BBpress, and I am not a coder. I have proceeded, through trial and error, to “inspect” the pages and use custom CSS to hide objects that I don’t want (display: none !important), and to look at the php files such as content-single-topic-lead.php and remove any references to author (e.g. bbp-topic-author).

    Without understanding much of what I’m doing, I’m getting very close to achieving the intended effect. Now I’m stuck because when someone clicks in Resource Messages (the “forum” name) on an actual topic, they see an indented display of content, because the author column (which normally displays author name and avatar etc, which I hid using CSS display: none !important) is still present (if empty).

    Please see https://devgo.jeffbelkora.com/square/topic/20181219-resource-message-2/

    So my questions are:
    1. Can anyone instruct me on how to remove that first author/avatar column?
    2. How to resize column 2, or otherwise adapt it so each topic’s content displays as a left-justified text?

    Please be very remedial in any tips you can give me. I have created a “bbpress” subfolder inside my “astra” child theme via “files” in my cpanel. I am deleting code in php files there adding custom css inside the astra child theme “customizer”.

    If you are going to suggest changing files, could you please specify how I need to place them in my child theme to make this futureproof to updates etc.?

    Thank you!

    #197065
    Robin W
    Moderator

    not sure why that would be – bbp_get_forum_title just does a check and then executes get_the_title

    the full function is

    function bbp_get_forum_title( $forum_id = 0 ) {
    		$forum_id = bbp_get_forum_id( $forum_id );
    		$title    = get_the_title( $forum_id );
    
    		return apply_filters( 'bbp_get_forum_title', $title, $forum_id );
    	}

    It seems to work fine on my test site.

    Is there a particular circumstance or is it consistently wrong on your site?

    #197057
    Foliferous
    Participant

    Hello,

    I noticed a weird thing, the Admin profile has this empty DIV on its page:

    Check it out.

    Other profiles don’t have that. Check it out.

    It seems to be this here:

    <div class="comments-area"></div>

    What is this and what is it doing there? How do I remove it? Is it some space for user comments on profiles? And why do other users don’t have that?

    Thanks!

    By the way I love bbpress, it’s awesome. I used a lot of other forum software (IPB, vBulletin, phpBB), but this one’s really the best!

    #197041
    rgilman
    Participant

    Apologies for the delay in reporting back. I was able to modify the (style pack) latest activity widget to meet my needs. Thank you!

    Along the way I found what may be a bug. On line 255, bbp_get_forum_title($forum) gets the topic title but get_the_title($forum) gets the forum title.

    #197039
    mattbru
    Participant

    Okay, I GOT IT!
    The key is to compare the topic id and the reply id. If they are equal, then its the first reply in bbpress.

    Here is my full solution:

    <?php
    function add_content_before_first_reply_content($content,$id){
    
    	$post = get_post($id);
    	$topic_id = bbp_get_topic_id();
    	$reply_id = bbp_get_reply_id();
    	$content_to_add = '';
    
    	if ($topic_id === $reply_id) {
    		// do whatever you need to in  here
    		$content .= $content_to_add;
    	}
    
    	return $content;
    
    }
    add_filter( 'bbp_get_reply_content', 'add_content_before_first_reply_content', 99, 2 );
    #197038
    mattbru
    Participant

    Thank you Robin W. But that does not work.

    $count = get_post_meta($topic_id, '_bbp_reply_count', false);
    is the same as
    $count = bbp_get_topic_reply_count($topic_id);
    Except the second one returns a number, first one gives you an array.
    The results of what you suggested gives me array([0]=>6) , meaning there are six replies to the topic.

    If you do a conditional like this: if ($count === 0) { // then code } , its only going to run the code if there are no replies to the post. That’s not what I need.

    #197037
    Robin W
    Moderator

    ok, get the topic ID, and then in your hook to bbp_theme_before_reply_content look up whether the topic has had any replies by using

    $count = get_post_meta ($topic_id, '_bbp_reply_count' , false)

    If $count=0, then there have been no replies, so this is the first.

    #197036
    mattbru
    Participant

    wp v5.0.1
    bbpress v2.5.14

    How can I hook into the FIRST reply on a single topic page? I want to add an image attachment only to the first reply, but i cannot find how to do so. I hooked into the action “bbp_theme_before_reply_content“, but it adds the image to every reply on the page!

    I thought about getting a list of all reply ids, then comparing the current reply id (bbp_get_reply_id()) with the first id in the array, and showing content if they are equal. That would solve the problem. BUT I also failed at getting the list of ids – I tried with bbp_get_all_child_ids

    I also wish the FIRST reply in the loop would have a unique id or class, but it does not 🙁

    Here is the page:

    Meet My New Crested Gecko

    #197034
    Info Ekonomi
    Participant

    PekMez your solution does work, but still modifying the core code will be overwritten on the upcoming update, and we will probably forget about this in the future. So after upgrade our BBPress version we forget to re-modify this code.

    Anyway how about now, is there a solution for BreadCrumbs without modifying the core?

    #197015
    tekgazet
    Participant

    Sure. I used the bbp_new_topic_pre_content Filter Hook and the code I used is as under:

     //code to limit number of characters in topic contents to 500 characters
     
    function tm_limit_topic_content( $topic_content )
    {
        /* Check for number of characters in topic contents  */
        if (strlen($topic_content) > 500) {
    		$revised_content = substr($topic_content, 0, 500);
    		}	
    	else {
    		$revised_content = $topic_content ;
    	}		
     
        return $revised_content ;
    }
     
    add_filter( 'bbp_new_topic_pre_content', 'tm_limit_topic_content' );
    #196987
    eigodeasobo
    Participant

    I want to display only the following two on buddypress activity.

    ※When creating topics for BBP.
    ※When comment for topics.

    What should I write in “※” below?

    wp-content>plugins>buddypress>bp-templates>bp-legacy>buddypress>members>single>activity.php
    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) . ‘&action=※※’ ) ) : ?>

    tekgazet
    Participant

    I want to limit the number of characters in the Topic Content Text Area in bbPress to a maximum limit (of say 500 characters). How can I do it?

    I tried to do it by using the maxlength attribute of textarea (bbp_topic_content) in the stylesheet file, but this attribute is not working (may perhaps be because this attribute was included in HTML5 version only). However, if I use this in Developer Tools in Chrome while inspecting the text area for Topic Content, it works fine; but that is only for testing and I am not able to make a permanent change by editing the source file or through any plugin.

    Other two methods could be javascript to check on local machine the number of characters being entered, but I understand that this can easily be cheated by disabling javascript. Moreover, I am not fully sure how to do it.

    Third method could be to use for action or filter hook. Can you please suggest me which hook to be used and sample code, if any?

    Thanks in advance.

    #196959
    wpturk
    Participant

    @robin-w , thanks for your advise. RC7 partially solved the problem.

    This is before updating topic (post_id:54878) in admin area:

    mysql> select * from forum_postmeta where meta_key="_bbp_subscription" ; 
    +---------+---------+-------------------+------------+
    | meta_id | post_id | meta_key          | meta_value |
    +---------+---------+-------------------+------------+
    .....
    .....
    |   35265 |   54878 | _bbp_subscription | 11743      |
    +---------+---------+-------------------+------------+

    This is after updating the topic (post_id:54878) in admin area:

    mysql> select * from forum_postmeta where meta_key="_bbp_subscription" ; 
    +---------+---------+-------------------+------------+
    | meta_id | post_id | meta_key          | meta_value |
    +---------+---------+-------------------+------------+
    .....
    .....
    |   35265 |   54878 | _bbp_subscription | 11743      |
    |   35280 |   54879 | _bbp_subscription | 1          |
    +---------+---------+-------------------+------------+

    So, the user subscription is there but there is a new unnecessary row, the admin user is subscribed to a non-existing topic. post_id=54879 does not exist.

    Who can we report bugs?

Viewing 25 results - 3,976 through 4,000 (of 32,517 total)
Skip to toolbar