Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BuddyPress-Links 0.4.x Releases and Support

@wpsec

Participant

Another suggestion: Add a “processing” icon that is temporarily displayed when fetching remote page data so people know that something is happening after they click the button to “fetch page details”.

An easy way to add that feature is to add a div to the default theme form (bp-links-default/single/forms/details.php) right under the nonce field, like so:

<?php wp_nonce_field( 'bp_links_save_link-auto-embed', '_wpnonce-link-auto-embed' ) ?>

<div id="waiting"> </div>

Then add some CSS for the div in the bp-links-default/_inc/css/forms.css file:

#waiting {

background: transparent url('../images/loading.gif') no-repeat scroll 0 0;

height: 33px;

width: 33px;

margin: 0 auto;

text-align:center;

display:none;

}

Next, drop a loading.gif image into the _inc/images folder. (here’s one as an example: http://www.minimelive.com/images/nav/processing5.gif — not sure whose site that is though)

And finally, modify the forms.js file to show and hide the div at the appropriate time. Somewhere around line 190 [ right before jQuery.post(ajaxurl… ] add this:

jQuery('#waiting').show();

And somewhere around line 240 [ after e_loader.toggle() ] hide the div:

jQuery('#waiting').hide();

That ought to do it ;-)

Skip to toolbar