• Resolved Win Win

    (@aminericher)


    Is there any way to accomplish SOMETHING LIKE THIS :

    <div class="bpfb_form_container"><div class="bpfb_toolbar_container"><a href="#photos" class="bpfb_toolbarItem" title="Add photos" id="bpfb_addPhotos"><span>Add photos</span></a>?<a href="#videos" class="bpfb_toolbarItem" title="Add videos" id="bpfb_addVideos"><span>Add videos</span></a>?<a href="#links" class="bpfb_toolbarItem" title="Add links" id="bpfb_addLinks"><span>Add links</span></a></div><form action="https://example.com/activity/post/" method="post" id="whats-new-form" name="whats-new-form" role="complementary">
    
    	  </span><div id="sl"></div>
    	<div id="whats-new-avatar">
    		<a href="https://example.com/">
    			<img src="https://example.com/userphoto.jpg" class="avatar userphoto" width="150" height="150">		</a>
    	</div>
    
    	<h5>What's New User?</h5>
    
    	<div id="whats-new-content">
    		<div id="whats-new-textarea">
    			<textarea name="whats-new" class="bp-suggestions" id="whats-new" cols="50" rows="10"></textarea>
    		</div><div class="bpfb_actions_container bpfb-theme-new bpfb-alignment-left"><div class="bpfb_controls_container"></div><div class="bpfb_preview_container"></div><div class="bpfb_action_container"></div><input type="button" id="bpfb_cancel_action" value="Cancel" style="display: none;"></div>
    
    		<div id="whats-new-options">
    			<div id="whats-new-submit">
    				<input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="Publish " style="display: inline-block;">
    
    				<input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups">
    
    		</div><!-- #whats-new-options -->
    	</div><!-- #whats-new-content -->
    
    	<input type="hidden" id="_wpnonce_post_update" name="_wpnonce_post_update" value="7f4e026c63"><input type="hidden" name="_wp_http_referer" value="/activity/">
    </form></div>

    Please ignore css coding as it would not be an issue.
    The problem is how to put the <div class=”bpfb_toolbar_container”> BEFORE whats-new-form as described in the html and the image.
    Any suggestions? Thanks

    https://www.ads-software.com/plugins/buddypress-activity-plus/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey there aminericher,

    Hope you’re well today!

    You should be able to place the toolbar above what’s new form with some jQuery.

    Please try adding the following to the bottom of your theme functions.php:

    add_action('wp_head', 'my_custom_js_script');
    
    function my_custom_js_script(){
    ?>
    <script>
    jQuery(window).load(function () {
        $bp = jQuery("#whats-new-form");
        $fb = jQuery(".bpfb_actions_container");
        if (!$bp.length || !$fb.length) return false;
    
        $bp.before($fb)
        $fb.show();
    });
    </script>
    <?php
    }
    ?>

    You’ll also have to add the following CSS as well:

    .bpfb_actions_container { display: none; }

    With this the bpfb_toolbar_container will be above what’s new line.

    Hope this helps ??

    Cheers,
    Bojan

    Thread Starter Win Win

    (@aminericher)

    Thank you Bojan. The code works like a charm, you made my day !! Just to note that the last `?>’ in the code above should be deleted, otherwise it will display at the top of the front end.
    Thank you again !!!

    Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey again,

    Glad to hear that the code is working for you ??

    Have a great day!

    Cheers,
    Bojan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[bpfb_toolbar_container] BEFORE [what's new]’ is closed to new replies.