# HG changeset patch # User Nathan Phillip Brink # Date 2011-02-04 00:40:21 # Node ID e890665419df245887325e9b90017979cd5c615e # Parent 7c21f6d1b18bd037640de7baa9f65b6f9167a204 Add a $qtips_always option which can be used to override session-based qTips hiding. diff --git a/inc/class.page.php b/inc/class.page.php --- a/inc/class.page.php +++ b/inc/class.page.php @@ -46,6 +46,7 @@ set_include_path(get_include_path() . PA $feedback_emails = array('ez@ethanzonca.com, ngelderloos7@gmail.com, ohnobinki@ohnopublishing.net'); $use_captcha = FALSE; $admin_enable_purge = FALSE; +$qtips_always = FALSE; $config_inc = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc'; if (file_exists($config_inc)) { diff --git a/inc/config.inc.example b/inc/config.inc.example --- a/inc/config.inc.example +++ b/inc/config.inc.example @@ -19,6 +19,19 @@ */ /** + * \file + * \brief + * A file documenting available configuration options and their + * defaults. + * + * Copy this file to config.inc after installing + * slate_permutate. Uncomment any options whose defaults you want to + * change. The commented-out example options display, in most cases, + * the default values for the variables which will be used if they're + * not specified. + */ + +/** * \brief * Use clean URLs for saved schedules. Default: FALSE. * @@ -94,3 +107,18 @@ * because it causes irreparable information loss. */ /* $admin_enable_purge = FALSE; */ + +/** + * \brief + * Specify whether or not to always display qTips to users. + * + * Set to TRUE to display the qTips unconditionally. Set to FALSE to + * only show qTips to the user the first time he visits + * slate_permutate. + * + * The qTip is the little black box which tells a user to enter a + * course number into the input page. For casual users, it directs the + * attention to where the user should start. For advanced users, the + * whole concept may appear silly ;-). + */ +/* $qtips_always = FALSE; */ diff --git a/input.php b/input.php --- a/input.php +++ b/input.php @@ -60,7 +60,7 @@ else $my_hc .= ' class_last = add_class(); '; } -if (!isset($_SESSION['saw_qtips'])) +if ($qtips_always || !isset($_SESSION['saw_qtips'])) { $my_hc .= ' addTips();'; $_SESSION['saw_qtips'] = TRUE;