Link to home
Start Free TrialLog in
Avatar of Elena Strekozova
Elena Strekozova

asked on

Is there a way to change a default info icon that Virtuemart 1.x.x. admin panel draws from Joomla?

Hello!
I wonder if there's a way to make old VM admin panel's info icon to be changed to a different one. As a default, VM "borrows" it from Joomla (it's a small blue circle with white letter "i" in it).
What I mean is that to make VM use a different icon (not the one Joomla has).
Thanks!
Avatar of lenamtl
lenamtl
Flag of Canada image

The easiest way to change it is to find another icon with same name, format and size and replace it in the directory (using FTP).

Otherwise it is more complicate because you will have to edit a few files
right click on icon to find out the name and  folder
I believe you want to edit EDIT PROFILE icon
icon-48-user-profile.png
Dimensions 48 × 48
/administrator/templates/bluestork/images/header/icon-48-user-profile.png

The template name may be different in your case this is the default one
Avatar of Elena Strekozova
Elena Strekozova

ASKER

Changing the icon is what I've done already and there was no point for me to do it in the same size and format, 'cos I care more about how front-end looks. You still don't get it, there's no problem switching the graphics for con_info.png file. It's a kindergarten assignment. The problem is that IT POINTS in HTML (actually, somewhere in PHP code) to a JOOMLA ICON. So what exactly I'm asking is WHICH PHP VM file I will have to edit in order to point that info icon of VM NOT TO JOOMLA con_info.png file
Looks like I'm getting there, but I still need help. I might ask at JS forum, since it's mostly a JS code inside VM's php file. Here's a link to the file in VM:
/home/XXX_XXX/public_html/administrator/components/com_virtuemart/classes
File name is htmlTools.class.php
Inside this file there's
 * Utility function to provide ToolTips
 *
 * @param string $tooltip ToolTip text
 * @param string $title The Box title
 * @param string $image
 * @param int $width
 * @param string $text
 * @param string $href
 * @param string $link
 * @return string HTML code for ToolTip
 */
function vmToolTip( $tooltip, $title='Tip!', $image = "{mosConfig_live_site}/images/M_images/con_info.png", $width='350', $text='', $href='#', $link=false ) {
	global $mosConfig_live_site, $database;
	
	defined( 'vmToolTipCalled') or define('vmToolTipCalled', 1);
	
	$tooltip = str_replace('"','"',$tooltip);
	$tooltip = $database->getEscaped($tooltip);
	$tooltip = str_replace("'","\'",$tooltip);
	
	if ( !empty($width) ) {
		$width = ',WIDTH, -'.$width;
	}
	if ( $title ) {
		$title = ',TITLE,\''.$title .'\'';
	}
	$image = str_replace( "{mosConfig_live_site}", $mosConfig_live_site, $image);
	if( $image != '' ) {
		$text 	= vmCommonHTML::imageTag( $image, '', 'top' ). ' '.$text;
	}
	
	$style = 'style="text-decoration: none; color: #333;"';
	if ( $href ) {
		$style = '';
	}
	if ( $link ) {
		$tip = vmCommonHTML::hyperLink( $href, $text, '','', "onmouseover=\"Tip( '$tooltip' );\" onmouseout=\"UnTip()\" ". $style );
	} else {
		$tip = "<span onmouseover=\"Tip( '$tooltip' $width $title );\" onmouseout=\"UnTip()\" ". $style .">". $text ."</span>";
	}

	return $tip;
}
/**
 * @deprecated 
 */
function mm_ToolTip( $tooltip, $title='Tip!', $image = "{mosConfig_live_site}/images/M_images/con_info.png", $width='', $text='', $href='#', $link=false ) { return vmToolTip( $tooltip, $title, $image, $width, $text, $href, $link ); }

/**
 * Utility function to provide persistant HelpToolTips
 *
 * @param unknown_type $tip
 * @param unknown_type $linktext
 */
function vmHelpToolTip( $tip, $linktext = ' [?] ' ) {
        global $mosConfig_live_site;

        if( !defined( 'vmHelpToolTipCalled')) {
                echo '<script type="text/javascript" src="'.$mosConfig_live_site.'/components/com_virtuemart/js/helptip/helptip.js"></script>
                        <link type="text/css" rel="stylesheet" href="'.$mosConfig_live_site.'/components/com_virtuemart/js/helptip/helptip.css" />';
                define('vmHelpToolTipCalled', 1);
        }
        $tip = str_replace( "\n", "", 
                        str_replace( "&lt;", "<", 
                        str_replace( "&gt;", ">", 
                        str_replace( "&amp;", "&", 
                        @htmlentities( $tip, ENT_QUOTES )))));
        $varname = 'a'.md5( $tip );
        echo '<script type="text/javascript">//<![CDATA[
        var '.$varname.' = \''.$tip.'\';
        //]]></script>
        ';
        echo '<a class="helpLink" href="?" onclick="showHelpTip(event, '.$varname.'); return false">'.$linktext.'</a>
';
}

Open in new window

Strange... I don't know a thing about JS and PHP and I still could google the file. Why all the so-called "experts-coders" here cannot help?
ASKER CERTIFIED SOLUTION
Avatar of Elena Strekozova
Elena Strekozova

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Good for me!