n3wjack (@n3wjack)

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • @n3wjack

    Participant

    👀
    😁

    @n3wjack

    Participant

    Just an update to confirm that this issue is fixed if you use the bbp style pack plugin mentioned above, with the latest version of bbpress. 👍

    @n3wjack

    Participant

    According to the trac ticket, there’s a fix coming in v2.7: https://bbpress.trac.wordpress.org/ticket/3445

    No idea when 2.7 going to be released.

    @n3wjack

    Participant

    What option fixes that bug? There’s a lot to configure I see. 😮

    @n3wjack

    Participant

    Did this get fixed in the latest release (2.6.9)?

    I reverted to the 2.6.6 to fix that issue in the 2.6.7.

    @n3wjack

    Participant

    What I do in this case is use client side JavaScript code to inject a new HTML element at the position you want it, with your custom code.
    I put a Custom HTML widget on the page which has all the required JS & CSS code.
    The advantage of this approach is that you don’t need to mess with the PHP files of your WordPress or bbPress setup, so when you do an upgrade in the future, you don’t have to worry about your changes being overwritten, or your site to break because of your changes.

    I use the code below to place a Reply button on top of the page. When it’s clicked, it will scroll down to the new post form at the bottom of the page (the most recent post is on top).

    <script type="text/javascript">
    	// Add the reply shortcut button at the top.
    	let btn = document.createElement("a");
        btn.href='javascript:document.getElementsByClassName("bbp-footer")[0].scrollIntoView()'	
    
    	btn.innerText='Reply'
    	btn.className='nj-replybtn'
    
    	let n = document.getElementsByClassName('bbp-replies')[0];
    
    	if (n !== null) {  
    		n.parentNode.insertBefore(btn, n);
    	}
    
    </script>
    <style>
    	.nj-replybtn {
    		color: white;
    		background-color: #007acc;
    		
    		padding: 5px;
    		margin: 2px;
    	}
    </style>
Viewing 6 replies - 1 through 6 (of 6 total)