jfb_output_simple_lightbox

Simple helper to output my "simple lightbox" for "click for more info" links.

Description

jfb_output_simple_lightbox( $deprecated, $contents ); 

Based on http://stephenmcintyre.net/blog/simple-css-lightbox

Parameters (2)

0. $deprecated
The deprecated.
1. $contents
The contents.

Usage

  1. if ( !function_exists( 'jfb_output_simple_lightbox' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-fb-autoconnect/AdminPage.php'; 
  3.  
  4. // The deprecated. 
  5. $deprecated = null; 
  6.  
  7. // The contents. 
  8. $contents = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = jfb_output_simple_lightbox($deprecated, $contents); 
  12.  

Defined (1)

The function is defined in the following location(s).

/AdminPage.php  
  1. function jfb_output_simple_lightbox($deprecated, $contents) 
  2. global $jfbLbID; 
  3. if(!isset($jfbLbID)) $jfbLbID = 0; 
  4. else $jfbLbID++; 
  5. ?> 
  6. <a class="wpfb-moreinfo-lnk" href="javascript:void(0)" title="<?php echo $contents?>" onclick="document.getElementById('wpfb-moreinfo-bg<?php echo $jfbLbID?>').style.display='block'; document.getElementById('wpfb-moreinfo-box<?php echo $jfbLbID?>').style.display='block';">(<?php _e('Click for more info', 'wp-fb-autoconnect'); ?>)</a> 
  7. <div class="wpfb-moreinfo-bg" id="wpfb-moreinfo-bg<?php echo $jfbLbID?>" onclick="document.getElementById('wpfb-moreinfo-bg<?php echo $jfbLbID?>').style.display='none'; document.getElementById('wpfb-moreinfo-box<?php echo $jfbLbID?>').style.display='none';"></div> 
  8. <div class="wpfb-moreinfo-box" id="wpfb-moreinfo-box<?php echo $jfbLbID?>"> 
  9. <a href="javascript:void(0)" onclick="document.getElementById('wpfb-moreinfo-bg<?php echo $jfbLbID?>').style.display='none'; document.getElementById('wpfb-moreinfo-box<?php echo $jfbLbID?>').style.display='none';"><?php _e("Close", 'wp-fb-autoconnect')?></a><br /> 
  10. <div style="padding:5px;"> 
  11. <?php echo $contents; ?> 
  12. </div> 
  13. </div> 
  14. <?php