titre, auteur, date
The second line is only returned when SHOWTITLE is used.
Function get_thumb ()
=====================
Parameters
· WIDTH, HEIGHT, HCROP, VCROP, KEEPRATIO, BASENAME, TEXTBOX, SHOWTITLE, MYCLASSHREF, MYCLASSIMG
Description
· This function returns the html code to display thumbnails.
Utilisation
·
Function get_thumb_array ()
===========================
Parameters
· WIDTH, HEIGHT, HCROP, VCROP, KEEPRATIO, BASENAME, TEXTBOX, SHOWTITLE, MYCLASSHREF, MYCLASSIMG
Description
· Return an array with thumbnail data.
Utilisation
· $thumb_array = get_thumb_array()
The returned array is:
o $thumb_array['post_url'] = post url (permalink)
o $thumb_array['server_image'] = absolute path to thumbnail
o $thumb_array['image_location'] = thumbnail url
o $thumb_array['alt_text'] = post title
o $thumb_array['post_ID'] = post ID
o $thumb_array['the_image'] = image url
o $thumb_array['show_title'] = SHOWTITLE result (html code string)
Function get_recent_thumbs ()
=============================
Parameters
· WIDTH, HEIGHT, HCROP, VCROP, KEEPRATIO, TEXTBOX, SHOWTITLE, MYCLASSHREF, MYCLASSIMG, LIMIT, CATEGORY
Description
· This function returns the html code to display the last posts as thumbnails.
o CATEGORY: you may specify a category to get posts from
Utilisation
·
Function get_random_thumb ()
============================
Parameters
· WIDTH, HEIGHT, HCROP, VCROP, KEEPRATIO, TEXTBOX, SHOWTITLE, MYCLASSHREF, MYCLASSIMG, LIMIT
Description
· This function returns the html code to display a random thumbnail.
Utilisation
·
Function tb_post_thumb_test ()
==============================
Parameters
· true/false: if 'true', tests only image. If ‘false', tests images, videos and video streams. Default is false.
Description
· This function tests if an image is in post content. Tests are:
o Images are found with the tag
o Video are found with Regex parameter in options.
o Video stream are found with link templates for Youtube, Dailymotion and gvideo.
Utilisation
· if (tb_post_thumb_test())
This functions use post data, so they should be used inside the Loop.
== Simple examples ==
To display the last 8 posts:
$posts = get_posts('numberposts=8&offset=0');
foreach ($posts as $post) :
setup_postdata($post);
$post_link = get_thumb(‘KEEPRATIO=0&VCROP=10&HCROP=10&MYCLASSHREF=thumb-class’);
if ( !empty($post_link) ) { echo $post_link; }
endforeach;
To display a random thumbnail:
get_random_post(‘LIMIT=5&KEEPRATIO=1&WIDTH=240&HEIGHT=5000’);
L'utilisation d'une hauteur de 5000 permettra de conserver la largeur ŕ 240.
To display posts with their title and date below:
$posts = get_posts('numberposts=8&offset=0');
foreach ($posts as $post) :
setup_postdata($post);
$post_link = get_thumb(‘SHOWTITLE=TD’);
if ( !empty($post_link) ) { echo $post_link; }
endforeach;
== Advanced examples ==
To display a thumbnail for posts containing an image and an excerpt after:
';
}
else echo '';
$post->post_content = exclude_regex($post->post_content);
the_excerpt();
echo '
';
?>
=====================
== Post formatting ==
=====================
If you insert an image with a thumbnail in your post, with Image Manager for example, the image will be displayed using highslide.
================================
== Highslide effect functions ==
================================
Possible effects are ($hs_function):
· hs_newwindow: open an iframe with a new web page. Size is given by width and height parameters.
· hs_overlay: display an image. Size is image size.
· hs_html: display an html content. Width is given by width parameter, height adjusts to content.
Frames can be bordered by 4 different aspects ($hs_style):
· rounded-white: white border with rounded corner.
· drop-shadow: white border with shadow effect.
· beveled: grey smooth border.
· outer-glow: white border glowing outside.
Function LB_effect ()
=====================
Parameters
· $hs_function='hs_html'
· $style='rounded-white'
· $width='700'
· $height='500'
· $arg_array
· $html_content=''
· $tag=''
Description
· This function displays a content from post-thumb using highslide:
· $arg_array is an array which is returned by get_thumb_array or pt_thumb_array functions.
· $html_content is used to display html content with 'hs_html' effect.
· $tag is used to named "id" tags inside highslide display
Utilisation
·
Function pt_get_effect ()
=========================
Parameters
· $hs_function
· $hs_style
· $hs_url
· $hs_width
· $hs_height
· $hs_ID
· $hs_text
· $hs_image=''
· $hs_img_url=''
· $hs_slasha=''
· $hs_content=''
Description
· This function displays a content using highslide:
o $hs_url is url to link to
o $hs_ID is used to named "id" tags inside highslide display
o $hs_text is used for title
o $hs_img_url is image url (if hs_overlay is used)
o $slasha is a string appended to main html code. It's usually used to display additional informations (title, author, date).
o $hs_content is used to display html content with 'hs_html' effect.
Utilisation
·
Function pt_thumbed_link ()
===========================
Parameters
· $hs_style
· $hs_url
· $hs_width
· $hs_height
· $hs_ID
· $hs_text
· $hs_image=''
· $hr_text='
· $hr_title=''
Description
· This function displays an icon with highslide effect then a direct link.
o $hs_url is url to link to
o $hs_ID is used to named "id" tags inside highslide display
o $hs_text is used for title on icon
o $hs_image is icon url. Default is post-thumb-path/images/pong.gif
o $hr_text is displayed text on direct link. Default is $hs_text.
o $hs_title is used for title on direct link. Default is $hs_text.
o $html_content is used to display html content with 'hs_html' effect.
Utilisation
·
Constant POSTHUMB_INFRAME
=========================
Parameters
· None.
Description
· This constant is defined in header.
· It can be tested inside theme template to adapt display.
· It is true if display is in a frame.
Utilisation
·
Function pt_list_categories ()
==============================
Parameters
· Same as wp_list_categories.
Description
· This function works just like wp_list_categories except that it adds an highslide effect to each category link.
Utilisation
·
Function pt_list_bookmarks ()
=============================
Parameters
· Same as wp_list_bookmarks.
Description
· This function works just like wp_list_bookmarks except that it will open links in a pop-up frame.
Utilisation
·
Function pt_next_post_link ()
=============================
Parameters
· Same as next_post_link.
Description
· This function works just like next_post_link except that it will follow links inside a pop-up frame.
Utilisation
·
Function pt_previous_post_link ()
=================================
Parameters
· Same as previous_post_link.
Description
· This function works just like previous_post_link except that it will follow links inside a pop-up frame.
Utilisation
·