GetThumb($arg); } /***********************************************************************************/ /* Get thumbnail. Loop function. /***********************************************************************************/ function get_single_thumb ($settings, $post, $arg='') { global $PTRevisited; return $PTRevisited->GetSingleThumb($post, $arg); } /***********************************************************************************/ /* Display recent posts /***********************************************************************************/ function get_recent_thumbs ($arg='', $beforeli='', $afterli='', $before='', $after='') { global $PTRevisited; echo $PTRevisited->GetTheRecentThumbs($arg, $beforeli, $afterli, $before, $after); } /***********************************************************************************/ /* Display recent posts /***********************************************************************************/ function get_the_recent_thumbs ($arg='', $beforeli='', $afterli='', $before='', $after='') { global $PTRevisited; return $PTRevisited->GetTheRecentThumbs($arg, $beforeli, $afterli, $before, $after); } /***********************************************************************************/ /* Return random thumbnails. /* /* RLIMIT: number of thumbnail to display. Default is 1. /***********************************************************************************/ function get_random_thumb ($arg='', $beforeli='', $afterli='', $before='', $after='') { global $PTRevisited; echo $PTRevisited->GetRandomThumb($arg, $beforeli, $afterli, $before, $after); } /***********************************************************************************/ /* Return random thumbnails. /* /* RLIMIT: number of thumbnail to display. Default is 1. /***********************************************************************************/ function get_the_random_thumb ($arg='', $beforeli='', $afterli='', $before='', $after='') { global $PTRevisited; return $PTRevisited->GetRandomThumb($arg, $beforeli, $afterli, $before, $after); } /****************************************************************/ /* Returns displayable post content /****************************************************************/ function pt_the_excerpt($length=40, $title_after= false, $arg='') { global $PTRevisited; return $PTRevisited->pt_TheExcerpt($length, $title_after, $arg); } /***********************************************************************************/ /* Display recent posts /***********************************************************************************/ function get_recent_medias ($arg='', $beforeli='', $afterli='', $before='', $after='') { global $PTRevisited; echo $PTRevisited->GetTheRecentThumbs($arg.'&media=1', $beforeli, $afterli, $before, $after); } /***********************************************************************************/ /* Get wordTube Playlist. /***********************************************************************************/ function get_WTMedia ($vid, $arg='', $play_width=0, $play_height=0) { global $PTRevisited; return $PTRevisited->pt_GetWTMedia($vid, $arg, $play_width, $play_height); } /***********************************************************************************/ /* Get wordTube Playlist. /***********************************************************************************/ function get_WTPlaylist ($pid, $arg='', $play_width=0, $play_height=0, $mp3=false, $flv=false) { global $PTRevisited; return $PTRevisited->pt_GetWTPlaylist($pid, $arg, $play_width, $play_height, $mp3, $flv); } /***********************************************************************************/ /* Get /***********************************************************************************/ function get_wordTubeTag ($content='') { global $PTRevisited; return $PTRevisited->pt_ReplaceWordTubeMedia($content); } /***********************************************************************************/ /* Get /***********************************************************************************/ function get_Youtube ($id, $title, $thumb) { global $PTRevisited; return $PTRevisited->pt_GetYoutube($id, $title, $thumb); } /****************************************************************/ /* Includes features in header /****************************************************************/ function pt_include_header() { global $PTRevisited; return $PTRevisited->pt_include_header(); } /***********************************************************************************/ /* Deprecated functions /* /* the following functions have no real use except to ensure compatibility with /* with previous versions of post-thumb revisited: /* function LB_effect /* function pt_get_effect /* function pt_LB_effect /* function get_thumb_array /***********************************************************************************/ /***********************************************************************************/ /* Display thumbnail with HS effect. /***********************************************************************************/ function LB_effect ($hs_function='hs_html', $style='rounded-white', $width='700', $height='500', $arg_array, $html_content='', $tag='') { $post_url = $arg_array['post_url']; $site_image = $arg_array['image_location']; if (function_exists('jLanguage_processTitle')) $arg_array['alt_text'] = jLanguage_processTitle($arg_array['alt_text']); $alt_text = $arg_array['alt_text']; $id_ID = $arg_array['post_ID'].$tag; $show_title = $arg_array['show_title']; $html_body = __($html_content); $img_url = $arg_array['the_image']; if (empty($arg_array['title'])) $title = $arg_array['alt_text']; else $title=$arg_array['title']; $position = "align: 'center'"; $outlineType = "outlineType: '".$style."'"; if ($show_title == '') $slasha = ''; else { $slasha = '
'.$show_title.''; } return pt_get_effect ($hs_function, $style, $post_url, $width, $height, $id_ID, $alt_text, $site_image, $img_url, $slasha, $html_body, '', $title); } /***********************************************************************************/ /***********************************************************************************/ function pt_get_effect ($hs_function, $hs_style, $hs_url, $hs_width, $hs_height, $hs_ID, $hs_text, $hs_image='', $hs_img_url='', $hs_slasha='', $hs_content='', $hs_caption='', $hs_title='') { $url_inframe = pt_return_get($hs_url); if ($hs_caption=='') $hs_caption = __('Direct Link', 'post-thumb'); if ($hs_title=='') $hs_title = $hs_text; switch ($hs_function) : case 'hs_iframe' : case 'hs_newwindow' : $h = new pt_highslide ($hs_url, $hs_image, $hs_text); $h->set_borders ($hs_style); $h->set_title ($hs_title); $h->set_size($hs_width, $hs_height); $h->set_colors('white'); $h->set_href_text(); $hs_output = 'iframe'; $h->set_bottom ($hs_caption); break; case 'hs_overlay' : $h = new pt_highslide ($hs_img_url, $hs_image, $hs_text); $h->set_borders ($hs_style); $h->set_title ($hs_title); $h->set_size($hs_width, $hs_height); $h->set_colors('white'); $h->set_href_text(); $h->set_caption(); $hs_output = 'overlay'; break; case 'hs_link' : $h = new pt_highslide ($hs_url, '', $hs_text); $h->set_borders ($hs_style); $h->set_title ($hs_title); $h->set_size($hs_width, $hs_height); $h->set_colors('white'); $h->set_href_text(); $hs_output = 'iframe'; $h->set_bottom ($hs_caption); break; case 'hs_html' : $h = new pt_highslide ($hs_url, $hs_image, $hs_text); $h->set_borders ($hs_style); $h->set_title ($hs_title); $h->set_size($hs_width, $hs_height); $h->set_colors('white'); $h->set_href_text(); $hs_output = 'html'; $h->set_bottom (); $h->set_body ($hs_content); break; case 'hs_ajax' : $h = new pt_highslide ($hs_url, $hs_image, $hs_text); $h->set_borders ($hs_style); $h->set_title ($hs_title); $h->set_size($hs_width, $hs_height); $h->set_colors('white'); $h->set_href_text(); $hs_output = 'ajax'; $h->set_bottom (); break; case 'hs_htmllink' : $h = new pt_highslide ($hs_url, '', $hs_text); $h->set_borders ($hs_style); $h->set_title ($hs_title); $h->set_size($hs_width, $hs_height); $h->set_colors('white'); $h->set_href_text(); $hs_output = 'html'; $h->set_bottom (); $h->set_body ($hs_content); break; endswitch; $post_link = $h->highslide_link($hs_output); unset ($h); return $post_link; } /****************************************************************/ /* Return LB_effect for current post /****************************************************************/ function pt_LB_effect ($arg='', $hs_function='hs_link', $hs_style='beveled', $hs_width=700, $hs_height=500) { global $post; $html_body = $post->post_content; $post_link = get_thumb_array ($arg); echo LB_effect ($hs_function, $hs_style, $hs_width, $hs_height, $post_link, $html_body); } /***********************************************************************************/ /* Get thumbs with default options - return array /***********************************************************************************/ function get_thumb_array ($arg='') { global $post; $settings = get_option('post_thumbnail_settings'); $p = new pt_post_thumbnail($settings, $post, $arg); $thumb_array['post_url'] = $p->post_url; $thumb_array['server_image'] = $p->thumb_path; $thumb_array['image_location'] = $p->thumb_url; $thumb_array['alt_text'] = $p->alt_text; $thumb_array['post_ID'] = $p->post->ID; $thumb_array['the_image'] = $p->the_image; $thumb_array['show_title'] = $p->show_title; $thumb_array['title'] = $p->img_title; unset($p); return $thumb_array; } ?>