Jump to main content
University Computer Centre
Extension Modules for websites
<h1>Pop-up windows for photosimage gallerieshelp textsetc.</h1>
<?php
# Use of "highslide" effects
    require_once('php/hs.inc');

    echo hs_image('/tu/images/campus-200.jpg'# small image
                  '/tu/images/campus.jpg',     # larger image
    # text under larger image: (HTML)
    'The auditorium building on Reichenhainer Straße … Photo:&nbsp;Jacob&nbsp;Müller',
    # styles for small image
    array(
        'img_style' => 'float:left;margin:0.5em 12px 0.5em 0px;border:solid orange 1px',
        'img_alt' => 'Auditorium building'
    ));
/*
 hs_image(image_small, image_large, text, array(...));
  * for pop-up effect of large images
  * returns HTML, output by echo (or further processing)
  * Arguments:
      image_small ... filename of the small image (immediately visible)
      image_large  ... filename for larger image (visible in pop-up)
      text ... HTML text as caption
      array('property' => 'value', ...)
        Properties:       can also be empty: array()
          img_style ... style for small image (CSS)
          img_alt   ... alt tag for small image (text)
          img_title ... title tag for small image (text), default: Click to enlarge
          img_w, img_h ... width and height (pixels), default: auto detected
 */


    echo '<p>load (small) website as pop-up: ';
    echo hs_url('<b>Planning</b>''planung.html.en?content''Example', array());
    echo '</p>';
/*
 hs_url(text, URL, title, array(...));
  * for pop-up effect of a website
  * returns HTML, output by echo (or further processing)
  * Arguments:
      text  ... link text that is clickable (HTML)
      URL   ... web address of the page to be expanded
                web pages in TUCAL layout can be addressed with ?content
                so that only content (without frame) will be displayed
      title ... title of the pop-up window (text)
      array('property' => 'value', ...)
        Properties:       can also be empty: array()
          w, h ... width and height (pixels), default: auto detected
 */


    echo '<div>HTML output, e.g. for help texts: ';
    echo hs_html('<b>More</b>','
  <img width="200" style="float:left;margin:0 1em 1em 0" alt="Auditorium building"
  src="/tu/images/campus-200.jpg" />
  <p>The description of the image or an informative text
  with image as decorative elements.</p>
  <p><b>The description of the image or an informative text
  with image as decorative elements.</b></p>',
       'Title', array('w' => 330'h' => 230));
    echo '</div>';
/*
 hs_html(text, HTML text, title, array(...));
  * for pop-up effect with HTML text
  * returns HTML, output by echo (or further processing)
  * Arguments:
      text  ... Link text that is clickable (HTML)
      HTML text ... HTML code, will be displayed after expanding
      title ... title of the popup window (text)
      array('property' => 'value', ...)
        Properties:       can also be empty: array()
          w, h ... width and height (pixels), default: auto detected
 */


 require_once('php/mail.inc');
 require_once('php/tel.inc');
 echo '<p>E-mail address protection: ' .
       prot_mailadr('webmaster@tu-chemnitz.de') .
       ' and Click2Dial: ' telnu('31879') . '</p>';
?>

<a href="mod.php.en?mode=demo&code=mod_hs_slideshow">Example for image gallery</a>
<br clear="both" />

Show output with this program code