Slooze PHP Cross Reference Image Galleries

Source: /src/slooze_local.php - 182 lines - 8241 bytes - Summary - Text - Print

   1  <?php
   2  /*

   3   * Slooze PHP Web Photo Album

   4   * Copyright (c) 2000 Slooze developers (see AUTHORS file)

   5   * $Id: slooze_local.php,v 1.21 2006/07/09 06:04:39 mdkendall Exp $

   6   *

   7   * Local customisations - edit this file only

   8   * Uncomment and edit as required

   9   */
  10  
  11  /* --------

  12   * Strings. Edit these definitions to customise the words used, or to

  13   * localise Slooze for lanugages other than English. These strings only affect

  14   * the displayed HTML, they have no effect on the operation of the script or

  15   * the names of tables and fields in the database. */
  16  
  17  /* Display Text for Navigation */

  18  define('SLZ_STR_NAV_FIRST','First');
  19  define('SLZ_STR_NAV_PREVIOUS','Previous');
  20  define('SLZ_STR_NAV_NEXT','Next');
  21  define('SLZ_STR_NAV_LAST','Last');
  22  define('SLZ_STR_NAV_TEXT_SEPARATOR','|');
  23  
  24  /* Headings for forms */

  25  define('SLZ_STR_HDR_UPDATE_TOPIC', 'Update topic'); /* heading for update topic form */
  26  define('SLZ_STR_HDR_DELETE_TOPIC', 'Delete topic'); /* heading for delete topic form */
  27  define('SLZ_STR_HDR_ADD_TOPIC', 'Add topic'); /* heading for add topic form */
  28  define('SLZ_STR_HDR_UPDATE_PICTURE', 'Update picture'); /* heading for update picture form */
  29  define('SLZ_STR_HDR_DELETE_PICTURE', 'Delete picture'); /* heading for delete picture form */
  30  define('SLZ_STR_HDR_ADD_PICTURE', 'Add picture'); /* heading for add picture form */
  31  define('SLZ_STR_HDR_ADD_ALL_PICTURES', 'Add all pictures'); /* heading for add all pictures form */
  32  define('SLZ_STR_HDR_UPDATE_ROLL', 'Update roll'); /* heading for update roll form */
  33  define('SLZ_STR_HDR_DELETE_ROLL', 'Delete roll'); /* heading for delete roll form */
  34  define('SLZ_STR_HDR_ADD_ROLL', 'Add roll'); /* heading for add roll form */
  35  define('SLZ_STR_HDR_ADD_COMMENT', 'Add comment'); /* heading for add comment form (disabled) */
  36  define('SLZ_STR_HDR_DELETE_COMMENT', 'Delete comment'); /* heading for delete comment form (disabled) */
  37  define('SLZ_STR_HDR_ADD_RATING', 'Add rating'); /* heading for add rating form (disabled) */
  38  
  39  /* Headings for other page elements */

  40  define('SLZ_STR_HDR_ROLL', 'Roll'); /* heading for single roll */
  41  define('SLZ_STR_HDR_ROLLS', 'Rolls'); /* heading for list of rolls */
  42  define('SLZ_STR_HDR_SEARCH', 'Search results'); /* heading for search results */
  43  
  44  /* Displayed names of fields (mostly used on forms) */

  45  define('SLZ_STR_DESCRIPTION', 'Description'); /* description field */
  46  define('SLZ_STR_SUMMARY', 'Summary'); /* summary field */
  47  define('SLZ_STR_COMMENT', 'Comment'); /* comment field */
  48  define('SLZ_STR_RATING', 'Current rating'); /* rating field */
  49  define('SLZ_STR_TOPICID', 'TopicID'); /* TopicID field */
  50  define('SLZ_STR_PARENTTOPICID', 'Parent topic'); /* ParentTopicID field */
  51  define('SLZ_STR_ROLLID', 'RollID'); /* RollID field */
  52  define('SLZ_STR_FRAMEID', 'FrameID'); /* FrameID field */
  53  
  54  /* Action buttons for forms */

  55  define('SLZ_STR_BUTTON_UPDATE', 'Update'); /* Update button */
  56  define('SLZ_STR_BUTTON_DELETE', 'Delete'); /* Delete button */
  57  define('SLZ_STR_BUTTON_ADD', 'Add'); /* Add button */
  58  define('SLZ_STR_BUTTON_ADDALL', 'Add All Pictures'); /* Add all pictures button */
  59  define('SLZ_STR_BUTTON_RATE', 'Rate It'); /* Add rating button */
  60  define('SLZ_STR_BUTTON_SEARCH', 'Search'); /* Search button */
  61  
  62  /* Ratings */

  63  define('SLZ_STR_RATING_M2', 'Dreadful');  /* rating -2 text */
  64  define('SLZ_STR_RATING_M1', 'Poor');      /* rating -1 text */
  65  define('SLZ_STR_RATING_0',  'Average');   /* rating 0 text */
  66  define('SLZ_STR_RATING_P1', 'Good');      /* rating +1 text */
  67  define('SLZ_STR_RATING_P2', 'Excellent'); /* rating +2 text */
  68  
  69  /* Error messages */

  70  define('SLZ_STR_ERR_DFLT', 'Unknown error'); /* default error message */
  71  
  72  /* Miscellaneous text used in page bodies */

  73  define('SLZ_STR_NO_DESC', 'No description'); /* default description for topic */
  74  define('SLZ_STR_MOST_VIEWED', 'Most viewed'); /* link text for most viewed pictures*/
  75  define('SLZ_STR_HIGHEST_RATED', 'Highest rated'); /* link text for highest rated pictures*/
  76  define('SLZ_STR_SEARCH_TERM', 'Search term'); /* search term */
  77  define('SLZ_STR_VIEWS', 'views'); /* views */
  78  define('SLZ_STR_COMMENT_EMAIL_SUBJECT', 'Slooze - Comment added'); /* email subject */
  79  
  80  /* --------

  81   * To store data in text files use slooze_csv and slooze_ct_csv

  82   * Comment this entire section out if using an RDBMS (until

  83   * end of MySloozeCtCsv) */
  84  
  85  require ("slooze_csv.php");
  86  require ("slooze_ct_csv.php");
  87  
  88  class MyCsv extends Csv {
  89  //var $path = "./";  /* path to csv files e.g. "/usr/foo/htdocs/photos/" */

  90  //var $nl = "\n";  /* newline sequence, use "\r\n" for windows */

  91    /* public: constructor, call parent constructor */

  92    function MyCsv() {
  93      $this->Csv();
  94    }
  95  }
  96  
  97  class MySloozeCtCsv extends SloozeCtCsv {
  98    var $csvClass = "MyCsv";  /* type of csv file data store */
  99    /* public: constructor, call parent constructor */

 100    function MySloozeCtCsv() {
 101      $this->SloozeCtCsv();
 102    }
 103  }
 104  
 105  /* --------

 106   * To store data in an RDBMS use slooze_ct_sql and whichever db_*.inc

 107   * is applicable for your particular database. Uncomment as required.

 108   * Get the db_*.inc files from PHPLib - http://sourceforge.net/projects/phplib */
 109  
 110  //require("slooze_ct_sql.php");

 111  
 112  //require("db_mysql.inc"); /* uncomment exactly one of these db_*.inc files */

 113  //require("db_msql.inc");

 114  //require("db_mssql.inc");

 115  //require("db_oci8.inc");

 116  //require("db_odbc.inc");

 117  //require("db_oracle.inc");

 118  //require("db_pgsql.inc");

 119  //require("db_sybase.inc");

 120  //require("db_usql.inc");

 121  
 122  //class MyDB_Sql extends DB_Sql {

 123  //  var $Host = "localhost";

 124  //  var $Database = "slooze";

 125  //  var $User = "";

 126  //  var $Password = "";

 127  //  /* public: constructor, call parent constructor */

 128  //  function MyDB_Sql($query = "") {

 129  //    $this->DB_Sql($query);

 130  //  }

 131  //}

 132  
 133  //class MySloozeCtSql extends SloozeCtSql {

 134  //  var $sqlClass = "MyDB_Sql";  /* type of RDBMS data store */

 135  //  var $sqlPicturesOrderBy = "FrameID";  /* Pictures table field to sort photos by */

 136  //  /* public: constructor, call parent constructor */

 137  //  function MySloozeCtSql() {

 138  //    $this->SloozeCtSql();

 139  //  }

 140  //}

 141  
 142  /* --------

 143   * Always include slooze

 144   * Uncomment the $ctClass line below that applies to you

 145   * Uncomment other lines to customise */
 146  
 147  require ("slooze.php");
 148  
 149  class MySlooze extends Slooze {
 150  //  var $admin = FALSE;         /* enable full admin mode */

 151  //  var $enableComments = TRUE; /* enable user addition of comments */

 152  //  var $enableRatings = TRUE;  /* enable user rating of pictures */

 153  //  var $enableViews = FALSE;   /* enable counting how many times a picture has been viewed */

 154  //  var $enableNav = TRUE;      /* enable First|Prev|Next|Last navigation */

 155  //  var $enableCache = FALSE;   /* enable caching of pages for speed */

 156  //  var $enableSearch = TRUE;   /* enable user search functionality */

 157  //  var $enableCommentsEmail = FALSE; /* enable email of new comments */

 158  //  var $allPathsLower = FALSE; /* make all image paths lower-case, no matter their recorded case */

 159  //  var $showCommentIPs = FALSE; /* put IP of commenter before comment */

 160  //  var $ownIPSubstring = "192.168.1."; /* don't count picture views coming from this address substring */

 161  //  var $sortThreshold = 5;  /* number of pics in topic before sorting offered */

 162  //  var $basePath = "./"; /* path to photos directory */

 163  //  var $cachePath = "./cache/"; /* path to cache directory */

 164  //  var $baseURL = "./";  /* URL of photos directory */

 165  //  var $actionURL = "";  /* URL for further actions */

 166  //  var $picture_suffix = ".jpg";  /* filename suffix for pictures */

 167  //  var $thumb_suffix = "-t.jpg";  /* filename suffix for thumbnails */

 168  //  var $thumb_height = 64;        /* height for auto-generated thumbnails */

 169  //  var $nl = "\r\n";              /* newline sequence */

 170  //  var $emailTo = "user@example.com"; /* email address notifications are sent to */

 171  //  var $emailFrom = "webmaster@example.com"; /* email address notifications are sent from */

 172  
 173    var $ctClass = "MySloozeCtCsv";   /* store data in text files */
 174  //var $ctClass = "MySloozeCtSql";   /* store data in RDBMS */

 175  
 176    /* public: constructor, call parent constructor */

 177    function MySlooze() {
 178      $this->Slooze();
 179    }
 180  }
 181  
 182  ?>

title

Description

title

Description

title

Description

title

title

Body