Location: PHPKode > projects > Simple Way to Usenet > swun/libs/swun/themes/tfeat_imdb.class.php
<?php
/**
 *  
 * @author  Benjamin Gillissen <hide@address.com>
 * 
 *	**************************************************************

	Copyright (C) 2009  Benjamin Gillissen
	
	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 2
	of the License, or (at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details at:
	http://www.gnu.org/copyleft/gpl.html

 *	**************************************************************
 */
/* used to catch a nfo request on any page.
 * 
 */ 
class tfeat_imdb {
	
	const PROFILE = FALSE;
	
	public function __construct(){ }
	
	public static function implent(){
		ajax::RegisterFunction('tt_imdb');
		thm_mediaq::append_js_file('tooltip_imdb');
		thm_mediaq::append_js_file('tooltip_update'); 
		return TRUE; 
	}
	
	public static function genpart($part, $of=FALSE){
		list($id, $dst) = split(":", $part);
		$o='<img 	style="mouse:pointer:height:14px" 
					src="'.themes::get_active_conf('img').'/metas/meta_imdb.gif" 
					alt="[imdb]" 
					onmouseover="tooltip_imdb(\''.$id.'\', \''.$dst.'\', dw_Tooltip);" 
					class="showTip imdb_'.$dst.'"/>
				<input type="hidden" id="ttlock_imdb_'.$dst.'" value="0" />
				<div style="position:absolute;visibility:hidden" id="tooltip_imdb_'.$dst.'">'.langs::translate('tt_loading', NULL, 'search').'</div>';
		if ( !$of ){ return $o; } 
		call_user_func($of, $o);
		return TRUE;
	}
}
return TRUE;
Return current item: Simple Way to Usenet