Location: PHPKode > scripts > One-page Gallery > onepage/index.php
<?php
session_start();
$mainpath = "http://" . $_SERVER['SERVER_NAME'];
$maininc = $_SERVER['DOCUMENT_ROOT'];
$mainurl = $_SERVER['PHP_SELF'];
include_once($maininc . "/prikljucak/updated.php");
include_once($maininc . "/prikljucak/language.php");
include_once($maininc . "/prikljucak/custom.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php 
      if(strpos($mainurl, 'hrvat') !== FALSE) {
	     echo $meta_hrv;
      } else {
	     echo $meta;
      }
?>
<script language="JavaScript" src=<?php echo '"' . $mainpath; ?>/onepage/scripts/onepage.js" type="text/JavaScript"></script>
<link rel="stylesheet" href=<?php echo '"' . $mainpath; ?>/onepage/css/onepage.css" type="text/css" />
</head>
<body>
  <div id="main">
     <div id="header"> 
       <div id="menu"> 
          <?php 
             if(strpos($mainurl, 'hrvat') !== FALSE) {
	            echo $menu_hrv;
             } else {
	            echo $menu;
             }
          ?>
          <div id="menu_right">
           <?php echo $eng_lang . ' ' . $cro_lang; ?> 
          </div>       
       <div class="break">   
       </div>       
       </div>
     </div>
     <div id="content">
     <div id="content_right_border">  
      <!-- CONTENT -->
        <!-- CONTENT LEFT-->
        <?php echo $left_menu; ?>
        <!-- END OF CONTENT LEFT-->
        <!-- CONTENT RIGHT-->
        <div class="naslovnica">
              <h1>One-page gallery</h1>
              <p>One-page Gallery v.9.0 is powered by ajax and php and show your images with a JPG (JPEG), GIF or PNG extensions.</p>

              <h3>Example:</h3>
              <?php 
                 include_once($_SERVER['DOCUMENT_ROOT'] . "/onepage/scripts/onepage.php");
              ?> 
              
              <h3>Features:</h3>
              <p>
                 -	CSS compatible with all browsers<br />
                 -	Grab all images with jpg (jpeg), gif or png extensions<br />
                 -	Do all stuff and create thumbs in fly<br />
                 -	Do not use iframe<br />
                 -	Simple change multiple stored images by titles<br />
                 -	Sorting titles by subfolder name or by order<br />
                 -	Simple and easy installation<br />
                 -	Does not need any type of databases<br />
                 -	Free (<a class="orange" href=<?php echo '"' . $mainpath; ?>/prikljucak/gpl.txt" target="_blank">GNU GENERAL PUBLIC LICENSE - Copyright (C) 2005-<?php echo $this_year; ?> Wangchuk Sonam</a>)</p>

              <h3>Installation:</h3>
              <p>1.	Extract onepage.zip in your root folder.</p>
              <p>2.	Copy these two lines in head part of your page: </p>
              <p class="code">&lt;script language="JavaScript" src="onepage/scripts/onepage.js" type="text/JavaScript"&gt;&lt;/script&gt;<br />&lt;link rel="stylesheet" href="onepage/css/onepage.css" type="text/css" /&gt;</p>
              <p>If your page is out of root folder it is necessary to change path (src/href definition) to onepage.js and onepage.css</p>
              <p>3.	Copy this code in body part of your page:</p><p class="code">&lt;?php include_once($_SERVER['DOCUMENT_ROOT'] . "/onepage/scripts/onepage.php"); ?&gt;</p>
              <p>4.	In this step create one or more subfolders in gallery folder. Insert your images in this subfolder(s)</p>
              <p>5. Create one title.txt file in any new subfolder(s). Type title in this file.</p>
              <p>6.	Delete subfolders what is coming in installation pocket.</p>
              <p>Before step 7 if you update gallery folder on localhost or on your hosting you will see your images and titles. </p>

              <p>7.	Now customization. Open onepage_custom.php with some text editor. In second line type how many thumbs you want in the line. In line three type max width and height for thumbs. In line four type max image width and height.</p>
              <p>8.	The next fifth line is important if you have more then one subfolder with images and if you want to sort them in your way. Otherwise One-page gallery will sort subfolders by their names (not by titles in title.txt). Type here carefully names of your subfolders. First one wills first display and so on. Don't forget double quotes and coma on the end (coma except last one)</p>
              <p>9.	In sixth line type text what you want to see in front of your titles. Save onepage_custom.php.</p> 
              <p>10. This last step is little bit tricky but if you change max thumbs or thumbs width/height you need to center it. Open onepage.css in css folder with some text editor. Go to line 32 (width definition for #gall_thumbs) and calculate ($max_thumbs x $thumbs_WH) + ($max_thumbs x 15) for example:<br />(8x70)+ (8x15) = 560 + 120 = 680 <br />This calculation is approximately and maybe need little bit +/- correction for exact center. For less number off thumbs maybe is better to use 20 instead of 15 for right calculation. And, please don't forgot to write px after number in width definition. </p>
              <p>OK, this is all what you need. Of course you can change some other definitions in onepage.css (borders, background color, etc.). If you need you can change arrows (previous/next navigation) in images folder, too. </p>
              <h3>Need help with installation? </h3>
              <p>- 10 € offer include installation and basic customization for one page. In installation are not included gallery images or any work on them (resize, rename, etc.). (For order please use Moneybookers donation button)<br />- 15 € offer include installation, full customization for one page and changing arrow color and arrow background. In installation are not included gallery images or any work on them (resize, rename, etc.). (For order please use Moneybookers donation button)</p>
              <p>Any question? Don't hesitate to contact me.</p>
              <h3>Download</h3>   
              <p>One-page Gallery v.9.0 is packed in onepage.zip file (688Kb)</p>
              <p class="center orange bold">
                 <?php
                    $display = 'onepage';
                    include $_SERVER["DOCUMENT_ROOT"] . "/mdc_9/scripts/display.php";
                    echo $download . ' people have downloaded this script';
                    ?>              
              </p>
              <p class="center">
                 <?php
                    $path = "http://" . $_SERVER['SERVER_NAME'] . "/mdc_9/scripts/download.php";
                    echo '<a class="download" href="' . $path . '?id=onepage"> </a>';
                 ?>              
              </p>
                 <div class="rate">
                    <form action="http://www.hotscripts.com/rate/65700/?RID=N342516" method="post" style="display: block; position: relative; left: 79px; margin: 0; padding: 8px 0 0; width: 153px; overflow: hidden; text-align: left; font-size: 12px; color: #ffffff;">Like my script? Rate it! <br /><select name="rate" style="width: 98px; overflow: hidden; color: #464646; float: left; margin: 3px 3px 0 0; padding: 1px; border: 1px solid #ffaa00; font-size: 12px; clear: none;"><option value="5">Excellent</option><option value="4">Very Good</option><option value="3">Good</option><option value="2">Fair</option><option value="1">Poor</option></select><input type="image" src="http://cdn.hotscripts.com/img/widgets/btn_vote-3.gif" style="width: 49px; height: 22px; overflow: hidden; float: left; margin: 4px 0 0; clear: none; padding: 1px; border: 0;" /></form>
                 </div>
              <p>If you like this site and my scrips:<br />
                 -	Support my work with donation<br />
                 -	Rate this script<br />
                 -	Place a link to Phoenix PHP on your website <br />
                 -	Refer Phoenix PHP in one of good Webmaster's forum<br />
                 -	Spread a word about Phoenix PHP</p>
              <h3>Other scripts:</h3>   
              <p><?php include_once($maininc . "/prikljucak/other.php"); ?></p>
        </div>
        
        <!-- END OF CONTENT RIGHT-->
      <!-- END OF CONTENT -->
     <div class="break">
     </div>
     </div>
     </div>
     <div id="bottom">       
       <div id="bottom_line">   
         <div id="bottom_left">
         </div>       
             <?php echo $footer; ?>
        </div>           
      </div>
      <div class="break">
      </div>
  </div>
</body>
</html>
Return current item: One-page Gallery