Jump to content

Add Image inplace of Language Text


hjames82

Recommended Posts

Hi there everyone (Again)

 

I need a little help replacing a call out to a Language File with an Image. If anyone can help I would be appreciative.

 

I need to replace the $_MT_LANG->RECOMMENT.... with an Image

Teaser Code:

$html .= '>'.$_MT_LANG->RECOMMEND	."</a>";

 

Full Code: (The image path is Comment Out at the bottom of the page)

<?php
/**
* MAFiASCRiPTS
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

//Base plugin class.
global $mosConfig_absolute_path;
require_once $mosConfig_absolute_path.'/components/com_mtree/Savant2/Plugin.php';

class Savant2_Plugin_ahrefrecommend extends Savant2_Plugin {

function plugin( &$link, $attr=null )
{
	global $Itemid, $_MT_LANG, $mtconf;//, $mt_show_recommend;

	# Load Parameters
	$params =& new mosParameters( $link->attribs );
	$params->def( 'show_recommend', $mtconf->get('show_recommend') );

	if ( $params->get( 'show_recommend' ) == 1 ) {

		$html = '';
		// $html = '<img src="images/M_images/indent1.png" width="9" height="9" />';

		$html .= '<a href="';

		$html .= sefRelToAbs("index.php?option=com_mtree&task=recommend&link_id=".$link->link_id."&Itemid=".$Itemid);

		$html .= '"';

		# Insert attributes
		if (is_array($attr)) {
			// from array
			foreach ($attr as $key => $val) {
				$key = htmlspecialchars($key);
				$val = htmlspecialchars($val);
				$html .= " $key=\"$val\"";
			}
		} elseif (! is_null($attr)) {
			// from scalar
			$html .= " $attr";
		}

		$html .= '>'.$_MT_LANG->RECOMMEND	."</a>";

		# Return the recommend link
		return $html;
	}

}

}
?>

<!--<<img src="http://gamersspace.net/components/com_mtree/img/email_article.gif">>-->

 

Thanks,

James

Link to comment
https://forums.phpfreaks.com/topic/126751-add-image-inplace-of-language-text/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.