############################################### # No Margin Pop Up Window Version 2.0 # # PHP Version # ############################################### # # # Script Made By Dodo # # http://www.regretless.com # # # # Script is Released Under LinkWare # # You are free to use the script as # # long as you link back to my page. # # # # # ############################################### =================== General Information =================== I wrote this script because I wanted something that will allow me to call up many pop up windows that doesn't have margins for IMAGES for my digital camera page. With this script, you no longer need to write html for every single image in order to make them show up in popup without margins. I hope it will be useful for you all =) In order to use this script, please make sure your server supports php. If you are unsure, contact your tech support or check out the php tutorials at http://dodo.pitas.com. Copyright notice: Please do not distribute this script without notifying me. You may feel free to edit the script and it would be nice if you let me know how you made the script better. I would like to improve this script and create newer versions. Thank you! Send all comments to: Dodo: dodo@regretless.com ============== Included Files ============== readme - Everything you need to know about using my script nmimage.php - The file you use to pop images in the popup with no margins test.php - The page that shows you that my script works! picture.gif - Sample popup picture picturethumbnail.gif - Sample popup picture thumbnail ============ Installation ============ 1. Upload nmimage.php file to a directory perferrably where you want to use this script. To call this script in your pages, you have to make sure - Your server supports php - The page you want to call the script from has a php extension. 2. Open test.php for an exmaple. The following part defines the function popup "; if($thumbnail != "" && $thumbnail != "none") { if($mode == "highlight") { if(!$fmode[1]) $fmode[1] = "black"; if(!$fmode[2]) $fmode[2] = "white"; print ""; } elseif($mode == "shake") { print ""; } elseif($mode == "ghighlight") { if(!$fmode[1]) $fmode[1] = 50; print ""; } else { print ""; } } else { print "$des"; } } // end of function ?> it must stay at the TOP of the file you are calling the pop up. ******************************** ABOUT SPECIAL EFFECTS - skip if you are not interested ******************************** These special effects are done with the help of javascripts found here: http://www.dynamicdrive.com/dynamicindex15/ In order to use this new function, you MUST add the corresponding header part of the javascript between your . +++++++++++++ for highlight +++++++++++++ add: where is the configuration of the image when first load your page. In the above configuration, the border width is "1px" and the border color is "white" by default. You may edit them accordingly. +++++++++ for shake +++++++++ add: where var rector=3 is the default speed +++++++++++++++++++++ for gradual-highlight +++++++++++++++++++++ add: ********************* NOW call the function ********************* Then to call the function in your script, you only need ONE LINE, something like: let's go over all the parameters from left to right. a) the directory where your nmimage.php is stored with "/" at the end and leave it "" if it's the same directory. b) the title of the pop, the mouseover caption and the popup window target name. c) the picture that shows up in your pop up! You can also use "directory/images/picture.gif" d) the name of the thumbnail file of the popup. You can also use "directory/images/picturethumbnail.gif" If you do not wish to use thumbnail, please put "none" for that parameter! e) that is the description for your pop up link if you put "none" in your thumbnail paramter. Don't worry about it if you already have a thumbnail. --------------------------------------------- using special effects - ignore if you DO NOT want to use them --------------------------------------------- f) optional mode parameter for the effect. Default to false. in the parameter you will specify which special effect you want to use and its corresponding variable components! --HIGHLIGHT-- to use this effect, you need to specify the mode, mouseover border color and onmouseout border color. and you do like i.e. "highlight,#000000,#FFFFFF" separate the variables with COMMA ONLY (no space) Go to http://www.dynamicdrive.com/dynamicindex4/highlight2.htm if you are confused. --SHAKE-- to use this effect, you need to specify the mode and that's it. put "shake". --GRADUAL-HIGHLIGHT-- to use this effect, you need to specify the mode, and the default opacity from "0 - 99". and you do like i.e. "ghighlight,50" or "ghighlight,40" separate the variables with COMMA ONLY (no space) Go to http://www.dynamicdrive.com/dynamicindex4/highlightgrad.htm if you are confused. ---------------------------------------------- Width and height of the thumbnail or popup image will be automatically detected by the script. WOOHOO, php rocks! 3. Make sure you change all the variables correctly every single time you call the popup for a different image. =============== Online tutorial =============== You may find it at http://dodo.pitas.com under toturials >> php, use the forum if you have difficulties with the script ================ Script In Action ================ To see the script in action, please visit http://www.regretless.com/dodo/pure/dcam/ ======= Updates ======= May 02, 2003: made sure the $target is automatically configured. Feburary 15, 2002: Combined my script with the highlight javascript. June 30, 2001: Added the option for wether you want thumbnail or description when linking the popup. September 07, 2001: Added the GetImageSize so no need to enter width and height of the image. Added a function for calling the script!