exit(1);
}
- require_once INSTALLDIR.'/lib/form.php';
+ require_once INSTALLDIR.'/lib/noticeform.php';
require_once INSTALLDIR.'/lib/htmloutputter.php';
/**
{
$this->element('link', array('rel' => 'stylesheet',
'type' => 'text/css',
- 'href' => theme_path('display.css', 'base') . '?version=' . LACONICA_VERSION,
+ 'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION,
'media' => 'screen, projection, tv'));
$this->element('link', array('rel' => 'stylesheet',
'type' => 'text/css',
- 'href' => theme_path('thickbox.css', 'base') . '?version=' . LACONICA_VERSION,
+ 'href' => theme_path('css/thickbox.css', 'base') . '?version=' . LACONICA_VERSION,
'media' => 'screen, projection, tv'));
$this->element('link', array('rel' => 'stylesheet',
'type' => 'text/css',
- 'href' => theme_path('display.css', null) . '?version=' . LACONICA_VERSION,
+ 'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION,
'media' => 'screen, projection, tv'));
foreach (array(6,7) as $ver) {
if (file_exists(theme_file('ie'.$ver.'.css'))) {
$user = common_current_user();
$this->elementStart('ul', array('id' => 'nav'));
if ($user) {
- common_menu_item(common_local_url('all', array('nickname' => $user->nickname)),
+ $this->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
_('Home'));
}
- common_menu_item(common_local_url('peoplesearch'), _('Search'));
+ $this->menuItem(common_local_url('peoplesearch'), _('Search'));
if ($user) {
- common_menu_item(common_local_url('profilesettings'),
+ $this->menuItem(common_local_url('profilesettings'),
_('Settings'));
- common_menu_item(common_local_url('invite'),
+ $this->menuItem(common_local_url('invite'),
_('Invite'));
- common_menu_item(common_local_url('logout'),
+ $this->menuItem(common_local_url('logout'),
_('Logout'));
} else {
- common_menu_item(common_local_url('login'), _('Login'));
+ $this->menuItem(common_local_url('login'), _('Login'));
if (!common_config('site', 'closed')) {
- common_menu_item(common_local_url('register'), _('Register'));
+ $this->menuItem(common_local_url('register'), _('Register'));
}
- common_menu_item(common_local_url('openidlogin'), _('OpenID'));
+ $this->menuItem(common_local_url('openidlogin'), _('OpenID'));
}
- common_menu_item(common_local_url('doc', array('title' => 'help')),
+ $this->menuItem(common_local_url('doc', array('title' => 'help')),
_('Help'));
$this->elementEnd('ul');
$this->elementEnd('dl');
$this->elementEnd('div');
}
- // SHOULD overload (perhaps this should be a MUST because sometimes it is not used)
+ // SHOULD overload
- function showLocalNav($menu)
+ function showLocalNav()
{
- $action = $this->trimmed('action');
-
- $this->elementStart('dl', array('id' => 'site_nav_local_views'));
- $this->element('dt', null, _('Local views'));
- $this->elementStart('ul', array('id' => 'nav'));
- foreach ($menu as $menuaction => $menudesc) {
- common_menu_item(common_local_url($menuaction,
- isset($menudesc[2]) ? $menudesc[2] : null),
- $menudesc[0],
- $menudesc[1],
- $action == $menuaction);
- }
- $this->elementEnd('ul');
- $this->elementEnd('dd');
- $this->elementEnd('dl');
+ // does nothing by default
}
function showContentBlock()
function showSecondaryNav()
{
$this->elementStart('ul', array('id' => 'nav_sub'));
- common_menu_item(common_local_url('doc', array('title' => 'help')),
+ $this->menuItem(common_local_url('doc', array('title' => 'help')),
_('Help'));
- common_menu_item(common_local_url('doc', array('title' => 'about')),
+ $this->menuItem(common_local_url('doc', array('title' => 'about')),
_('About'));
- common_menu_item(common_local_url('doc', array('title' => 'faq')),
+ $this->menuItem(common_local_url('doc', array('title' => 'faq')),
_('FAQ'));
- common_menu_item(common_local_url('doc', array('title' => 'privacy')),
+ $this->menuItem(common_local_url('doc', array('title' => 'privacy')),
_('Privacy'));
- common_menu_item(common_local_url('doc', array('title' => 'source')),
+ $this->menuItem(common_local_url('doc', array('title' => 'source')),
_('Source'));
- common_menu_item(common_local_url('doc', array('title' => 'contact')),
+ $this->menuItem(common_local_url('doc', array('title' => 'contact')),
_('Contact'));
$this->elementEnd('ul');
}
$action = $this->trimmed('action');
$this->elementStart('ul', array('id' => 'nav_views'));
foreach ($menu as $menuaction => $menudesc) {
- common_menu_item(common_local_url($menuaction,
+ $this->menuItem(common_local_url($menuaction,
isset($menudesc[2]) ? $menudesc[2] : null),
$menudesc[0],
$menudesc[1],
$this->elementStart('div', array('id' => 'content'));
}
- // Added @id to li for some control. We might want to move this to htmloutputter.php
- function common_menu_item($id=null, $url, $text, $title=null, $is_selected=false)
+ // Added @id to li for some control.
+ // XXX: We might want to move this to htmloutputter.php
+
+ function menuItem($url, $text, $id=null, $title=null, $is_selected=false)
{
$lattrs = array();
if ($is_selected) {