Skip to content

Commit

Permalink
Remove extraneous whitespace, fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowled committed Dec 21, 2015
1 parent 11b7790 commit e4ee15e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 77 deletions.
106 changes: 32 additions & 74 deletions terrafirma/config.inc.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
<?php

// Be nice to the frontend users. They don't need the additional constants

// and file lookups. Only load them when in Admin mode.

if ($serendipity['GET']['adminModule'] == 'templates' || $serendipity['POST']['adminModule'] != 'templates') {

// Probe for a language include with constants. Still include defines

// later on, if some constants were missing

$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';

if (file_exists($probelang)) {

include $probelang;

}



include dirname(__FILE__) . '/lang_en.inc.php';

}

$serendipity['smarty']->assign(array('currpage'=> "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']));

$template_config = array(
array(
array(
'var' => 'abouttitle',
'title' => 'abouttitle',
'name' => ABOUT_TITLE,
'description' => ABOUT_TITLE_DESC,
'type' => 'string',
'default' => 'About',
),
array(
array(
'var' => 'about',
'title' => 'about_text',
'name' => ABOUT_TEXT,
Expand All @@ -51,84 +40,53 @@
'desc' => array(AT_POS, AT_NEG)),
'default' => 'false'
),
array(
array(
'var' => 'aboutpageurl',
'title' => 'About page URL',
'description' => ABOUT_URL,
'type' => 'string',
'default' => '#',
),
array(
array(
'var' => 'amount',
'name' => NAVNUM,
'description' => NAVNUMDESC,
'type' => 'string',
'default' => '4',
),

);

$template_config_groups = NULL;

if (version_compare($serendipity['version'],"1.1.beta3") >= 0) {
$vars = serendipity_loadThemeOptions($template_config);

$navlinks = array();

for ($i = 0; $i < $vars['amount']; $i++) {
$navlinks[] = array(
'title' => $vars['navlink' . $i . 'text'],
'href' => $vars['navlink' . $i . 'url']
);

$template_config[] = array(
'var' => 'navlink' . $i . 'text',
'name' => NAV_LINK_TEXT . ' #' . $i,
'description' => NAV_LINK_DESC . ' #' .$i,
'type' => 'string',
'default' => constant('NAV_DEFAULT_' . $i),
);

$template_config[] = array(
'var' => 'navlink' . $i . 'url',
'name' => NAV_LINK_URL . ' #' . $i,
'description' => NAV_LINK_URL_DESC . ' #' . $i,
'type' => 'string',
'default' => '#',
);
}



$vars = serendipity_loadThemeOptions($template_config);



$navlinks = array();



for ($i = 0; $i < $vars['amount']; $i++) {

$navlinks[] = array(

'title' => $vars['navlink' . $i . 'text'],

'href' => $vars['navlink' . $i . 'url']

);

$template_config[] = array(

'var' => 'navlink' . $i . 'text',

'name' => NAV_LINK_TEXT . ' #' . $i,

'description' => NAV_LINK_DESC . ' #' .$i,

'type' => 'string',

'default' => constant('NAV_DEFAULT_' . $i),

);

$template_config[] = array(

'var' => 'navlink' . $i . 'url',

'name' => NAV_LINK_URL . ' #' . $i,

'description' => NAV_LINK_URL_DESC . ' #' . $i,

'type' => 'string',

'default' => '#',

);

}





$serendipity['smarty']->assign_by_ref('navlinks', $navlinks);
$serendipity['smarty']->assign_by_ref('subnavlinks', $subnavlinks);

$serendipity['smarty']->assign_by_ref('navlinks', $navlinks);
$serendipity['smarty']->assign_by_ref('subnavlinks', $subnavlinks);
}

?>
6 changes: 3 additions & 3 deletions terrafirma/info.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Name: terrafirma (2009-08-16)
Author: NodeThirtyThree (ported by Christian Hoffmann)
Date: 20 June 2007
Name: terrafirma (2009-08-16)
Author: NodeThirtyThree (ported by Christian Hoffmann)
Date: 20 June 2007

0 comments on commit e4ee15e

Please sign in to comment.