Some very simple improvements for styling and UX
-
Warning: i’m not an expert and this could break your site. This is my first contribution ever. Don’t use this code if you don’t know what you are doing, because i’m sure i don’t.
These are some very simple changes i made to make styling easier and improve the user experience. Screenshots here and here. As you can see, it works great with Buddypress Activity Privacy. I removed the add link option because i don’t need it, this change is not included in this code.
js/bpfb_interface.js (line 247):
var html = '<div id="bpfb_tmp_photo"> </div>' + '<ul id="bpfb_tmp_photo_list"></ul>' + '<input type="button" id="bpfb_add_remote_image" value="' + l10nBpfb.add_remote_image + '" /><div id="bpfb_remote_image_container"></div>' + '<input type="button" id="bpfb_remote_image_preview" value="' + l10nBpfb.preview + '" />';
js/bpfb_interface.js (line 377):
function createMarkup () { var html = '<div class="bpfb_actions_container bpfb-theme-' + _bpfb_data.theme.replace(/[^-_a-z0-9]/ig, '') + ' bpfb-alignment-' + _bpfb_data.alignment.replace(/[^-_a-z0-9]/ig, '') + '">' + '<div class="bpfb_toolbar_container">' + '<div class="bpfb_toolbarItem_container">' + '<a href="#photos" class="bpfb_toolbarItem" title="' + l10nBpfb.add_photos + '" id="bpfb_addPhotos"><span>' + l10nBpfb.add_photos + '</span></a>' + '</div>' + '<div class="bpfb_toolbarItem_container">' + '<a href="#videos" class="bpfb_toolbarItem" title="' + l10nBpfb.add_videos + '" id="bpfb_addVideos"><span>' + l10nBpfb.add_videos + '</span></a>' + '</div>' + '<div class="bpfb_toolbarItem_container">' + '<a href="#links" class="bpfb_toolbarItem" title="' + l10nBpfb.add_links + '" id="bpfb_addLinks"><span>' + l10nBpfb.add_links + '</span></a>' + '</div>' + '</div>' + '<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="' + l10nBpfb.cancel + '" style="display:none" />' + '</div>'; $form.wrap('<div class="bpfb_form_container" />'); $textContainer.after(html); }
CSS:
#buddypress #whats-new-content { padding-bottom: 10px !important; } #buddypress #whats-new-post-in-box { float: right; margin: 5px; } #buddypress #whats-new-post-in, #buddypress #whats-new-submit { margin-top: 0 !important; } #buddypress #bpfb_remote_image_preview { float: right; } #buddypress #bpfb_video_url_preview { float: right; margin: 13px 0 0 0; } #buddypress .bpfb_remote_image, #buddypress #bpfb_video_url { margin: 10px 0 0 0; width: 100% !important; } #buddypress .bpfb_preview_container { margin-top: 13px; } #buddypress .bpfb_action_container { float: right; }
As i said before, this is my first contribution ever, so take special care if you are going to use this code. I hope this inspires the plugin’s author to update the plugin to make styling/layout and UX a lot better. Because, right now, it’s just awful.
- The topic ‘Some very simple improvements for styling and UX’ is closed to new replies.