PHP Classes
Icontem

File: manual.txt


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Peter Klauer  >  Info Box  >  manual.txt  
File: manual.txt
Role: Documentation
Content type: text/plain
Description: How to use infobox
Class: Info Box
Generate help tooltips for Web pages using DHTML
 

Contents

Class file image Download
#
# required
#
# Put infobox.js and infobox.css in the same folder.
# Include class_infobox.php in your webpage.
#

  include 'class_infobox.php';

#
# required
#
# then instantiate a class object
#

  $box = new infobox();

#
# required
#
# in the head section of the html page
# call $box->head() giving the relative path from
# the php page to the folder where both
# infobox.js and infobox.css reside
#

  $box->head('includes/'); // only valid if you put infobox.js into "includes"

#
# optional
#
# now generate the page as usual.
# when an infobox link is to be output
# then write
#

  $box->link( $url, $urltext, $infoboxcaption, $infoboxcontent );

#
# ...providing $url, $urltext, $infoboxcaption and $infoboxcontent
# with useful content before doing so, I hope.
#

#
# optional
#
# The users of your page get quickly used to this kind of additional information.
# So many other clickable areas like buttons, images, checkboxes
# want to be supported with infobox.
# To get the correct mouse events you do the following
#

  $mouse = $box->newtip('A new tip',"This is the content of the tip");

#
# optional
#
# now put $mouse which contains 
# something like "onMouseOver="tip('infobox23')" onMouseOut="untip()"
# into the output, maybe an img tag
#

  echo "<img$mouse src='beautifulimage.gif' alt=''>";

#
# optional
#
# using the function $box->lasttip() you can have your script
# remember the last infobox number generated and use it in
# multiple places using $box->thistip( $number )
#

#
# required
#
# at the end of the page, just before the closing body tag 
#

  $box->generate();

#
# $box->generate() will generate all tips
#

#
# *** IMPORTANT NOTICE ***
#
# *Never* use single quotes in the strings used for caption or description
# of the infoboxes! They will mess up the javascript code generated by
# $box->generate() resulting in no box working at all.
#

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products