WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Blogroll
Enhancement request - image borders (3 posts)

  1. callumw
    Member
    Posted 3 years ago #

    Hi
    I use the plugin to show the images for the links, but it would be great if we can have the option to put a coloured border around the images too.

    It helps separate each icon/image in the list, but if a theme doesn't automatically have the .css set to draw a line around every picture then it doesn't show.

    I tend not to have picture borders on my themes by default as it can easily mess up the look of a site when using img spacers in the content.

    My current workaround is to add the style info to the advanced_blogroll.php file.

    I change:

    if ( strpos($bookmark->link_image, 'http') !== false )
    					$output .= "<img src=\"$bookmark->link_image\" height=\"$height\" width=\"$width\" $alt $title /></a>\n";
    				else // If it's a relative path
    					$output .= "<img height=\"$height\" width=\"$width\" src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title /></a>\n";
    			} 
    
    			if ($showform == 2) {
    				if (strlen($bookmark->link_image)>2) {
    				  $output .= "<li>";
    			      $output .= '<span class="linkimg">';
    				  $image = "<img src=\"$bookmark->link_image\" height=\"$height\" width=\"$width\" $alt $title />";

    to

    if ( strpos($bookmark->link_image, 'http') !== false )
    					$output .= "<img src=\"$bookmark->link_image\" height=\"$height\" width=\"$width\" style=\"border: 1px solid black\" $alt $title /></a>\n";
    				else // If it's a relative path
    					$output .= "<img height=\"$height\" width=\"$width\" src=\"" . get_option('siteurl') . "$bookmark->link_image\" style=\"border: 1px solid black\" $alt $title /></a>\n";
    			} 
    
    			if ($showform == 2) {
    				if (strlen($bookmark->link_image)>2) {
    				  $output .= "<li>";
    			      $output .= '<span class="linkimg">';
    				  $image = "<img src=\"$bookmark->link_image\" height=\"$height\" width=\"$width\" style=\"border: 1px solid black\" $alt $title />";

    Basically adding style=\"border: 1px solid black\" to the 3 img src

    Hope it's useful info

    CW

    http://wordpress.org/extend/plugins/advanced-blogroll/

  2. bleggate
    Member
    Posted 2 years ago #

    Legend this worked a treat for adding a border to images in advanced blogroll. Thank you

  3. callumw
    Member
    Posted 2 years ago #

    No worries.
    Would be good if it was an option by default tho?

    CW

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic