WordPress WebCam Image Viewer

[ Preview WebCam ]
Required fields in red




Optional Settings

Usage Instructions
This plugin allows your website to show a constantly resfreshing image from a webcam URL. There are two ways to call this into your site:
  1. Place the [[wpcam]] article into your content
    By placing the string [[wpcam]] into your content for a page or post, this will trigger the internal content filter and replace that text with the appropriate HTML to show the webcam image
  2. Call the function directly from your template
    Calling the rendering function directly from your template will place this onto the page in the position you need your webcam image to live in. The code to execute this from within the template is: if(function_exists('show_wpimgcam_viewer')) { show_wpimgcam_viewer(); } This will render out the appropriate HTML to show the webcam viewer.
7) { $bottomlink .= ''.urldecode($vals[7]).''; } $output = '

Webcam Preview

'; $theimage = ' 1) { $theimage .= ' alt="'.stripslashes(urldecode($vals[4])).'"'; } if($vals[1]>0) { $theimage .= ' width="'.$vals[1].'"'; } if($vals[2]>0) { $theimage .= ' height="'.$vals[2].'"'; } $theimage .= ' />'; if($vals[5]==1) { $output .= ''.$theimage.''; } else { $output .= $theimage; } if(isset($bottomlink) && $vals[8]==1) { $output .= $bottomlink; } $output .= '
'; if($method==0) { echo $output; } else { return $output; } } function filter_wpcam_viewer(&$content) { $temp = explode('[[wpcam]]',$content); if(sizeof($temp)>1) { $content = str_replace('[[wpcam]]',show_wpimgcam_viewer(1),$content); } return $content; } add_action('admin_menu', 'wp_imcam_addoptionpage'); add_action('the_content', 'filter_wpcam_viewer',5); ?>