Frontend Configuration Reference

The table below lists all the configuration variables present in the default onpub_conf.php config file. The table also lists each variable's default value along with possible alternate values.

Paste variable names along with their new values in to onpub_conf_local.php to override their default values. For example:

<?php

// Example onpub_conf_local.php file..

// Display article with ID 2 on the home page instead of article ID 1.
$onpub_disp_article = 2;

// etc..

?>
Variable Name
Description
Default Value
Alternate Value(s)
Database Config
$onpub_db_host MySQL server host where Onpub database is installed. 'localhost' MySQL server hostname
$onpub_db_name MySQL database where Onpub tables are installed. '' MySQL database name
$onpub_db_user MySQL username used to connect to Onpub database. '' MySQL account username
$onpub_db_pass MySQL password used to connect to Onpub database. '' MySQL account password
Directories Config
$onpub_dir_local Path to local include files. 'local/' Absolute or relative path
$onpub_dir_root Path to the root Onpub directory. All files and directories below this variable are included/referenced relative to the path defined here. '' Absolute or relative path
$onpub_dir_yui Path to YUI directory. 'yui/' Path relative to $onpub_dir_root
$onpub_dir_api Path to OnpubAPI directory. 'api/' Path relative to $onpub_dir_root
$onpub_dir_frontend Path to default Onpub frontend directory. 'frontend/' Path relative to $onpub_dir_root
$onpub_dir_manage Path to the Onpub management interface. 'manage/' Path relative to $onpub_dir_root
Display Config
$onpub_disp_website ID of Onpub Website to display. 1 ID of Onpub website to display with frontend
$onpub_disp_article ID of Onpub Article to display on the home page. Set this to null if you don't want to display an article on the home page. 1

ID of Onpub article to display on home page

NULL for no home page article

$onpub_disp_updates Set this to false if you do not want to display "What's New" on the home page. true false to not display "What's New" on home page
$onpub_disp_login Set this to false to hide the Onpub "Login" link. true false to not display Onpub login link on the frontend
$onpub_disp_menu Set this to false to hide the Onpub menu bar. true false to not display the menu bar
Local File Includes Config
$onpub_inc_foot This file is included right before the closing </body> tag. Suitable for pasting in Google Analytics and/or other dynamic includes. 'onpub_foot.php' PHP file name (relative to $onpub_dir_local)
$onpub_inc_head This file is included immediately before the opening <head> tag. Suitable for initializing JS variables and/or other dynamic PHP/JS code. 'onpub_head.php' PHP file name (relative to $onpub_dir_local)
$onpub_inc_article_info This file is included in the right-side column after the published/updated dates on article pages. 'onpub_article_info.php' PHP file name (relative to $onpub_dir_local)
$onpub_inc_css If present, this file is included in place of the default Onpub CSS file. This allows you to define your own CSS styles to create a completely original layout (in combination with tweaking the yui variables below). 'onpub.css' CSS file name (relative to $onpub_dir_local)
YUI Config
$onpub_yui_page_width Sets the overall page width. Possible values are documented here: http://developer.yahoo.com/yui/3/cssgrids/#page_width 'yui3-d1'

'yui3-d0' 100%. Centered. 10px left/right margin.

'yui3-d1' 750px. Centered. Fluid.

'yui3-d1f' 750px. Centered. Fixed.

'yui3-d2' 950px. Centered. Fluid.

'yui3-d2f' 950px. Centered. Fixed.

'yui3-d3' 974px. Centered. Fluid.

'yui3-d3f' 974px. Centered. Fixed.