Changeset - e890665419df
[Not reviewed]
default
0 3 0
Nathan Brink (binki) - 15 years ago 2011-02-04 00:40:21
ohnobinki@ohnopublishing.net
Add a $qtips_always option which can be used to override session-based qTips hiding.
3 files changed with 30 insertions and 1 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -37,24 +37,25 @@ set_include_path(get_include_path() . PA
 

	
 
/**
 
 * Not sure if there's a better place for this... it'd be a pita to
 
 * make a new include file like doconfig.inc but maybe that'll make
 
 * sense soon.
 
 */
 
/* defaults */
 
$clean_urls = FALSE;
 
$ga_trackers = array();
 
$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)) {
 
  require_once($config_inc);
 
}
 

	
 

	
 
//**************************************************
 
// class.page.php   Author: Ethan Zonca
 
//
 
// Provides an interface for generating a styled
 
// XHTML page, supporting modular script inclusion
inc/config.inc.example
Show inline comments
 
@@ -10,24 +10,37 @@
 
 * (at your option) any later version.
 
 *
 
 * slate_permutate is distributed in the hope that it will be useful,
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
 * GNU Affero General Public License for more details.
 
 *
 
 * You should have received a copy of the GNU Affero General Public License
 
 * along with slate_permutate.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/**
 
 * \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.
 
 *
 
 * Before setting this to TRUE, make sure that you have read and
 
 * understood ../.htaccess.example and copied it to ../.htaccess .
 
 */
 
/* $clean_urls = FALSE; */
 

	
 
/**
 
 * \brief
 
 *   Custom clean URLs for schedule sharing. $clean_urls must be enabled.
 
 * 
 
@@ -85,12 +98,27 @@
 
 */
 
/* $admin_enable = FALSE; */
 

	
 
/**
 
 * \brief
 
 *   Enable purging saved schedules through the admin/rehash.php
 
 *   script or web interface.
 
 *
 
 * Set to TRUE to enable this functionality. It is disabled by default
 
 * 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; */
input.php
Show inline comments
 
@@ -51,25 +51,25 @@ if ($sch)
 
    {
 
      $my_hc .= input_class_js($sch->class_get($class_key), '    ');
 
    }
 
}
 
else
 
  {
 
    $default_classes = school_default_classes($school);
 
    foreach ($default_classes as $default_class)
 
      $my_hc .= input_class_js($default_class, '    ');
 
    $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;
 
  }
 
$my_hc .= '  });
 
';
 

	
 
$inputPage->headcode_add('scheduleInput', $inputPage->script_wrap($my_hc), TRUE);
 

	
 
$inputPage->head();
 

	
 
/*
0 comments (0 inline, 0 general)