make addon (featured) settings page work
This commit is contained in:
parent
982034b87d
commit
24565182a4
@ -60,7 +60,7 @@ function settings_aside(&$a) {
|
|||||||
array(
|
array(
|
||||||
'label' => t('Feature settings'),
|
'label' => t('Feature settings'),
|
||||||
'url' => $a->get_baseurl(true).'/settings/featured',
|
'url' => $a->get_baseurl(true).'/settings/featured',
|
||||||
'selected' => ((argv(1) === 'addon') ? 'active' : ''),
|
'selected' => ((argv(1) === 'featured') ? 'active' : ''),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
@ -665,20 +665,20 @@ function settings_content(&$a) {
|
|||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
if((argc() > 1) && (argv(1) === 'addon')) {
|
if((argc() > 1) && (argv(1) === 'featured')) {
|
||||||
$settings_addons = "";
|
$settings_addons = "";
|
||||||
|
|
||||||
$r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' ");
|
$r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' ");
|
||||||
if(! count($r))
|
if(! count($r))
|
||||||
$settings_addons = t('No Plugin settings configured');
|
$settings_addons = t('No feature settings configured');
|
||||||
|
|
||||||
call_hooks('plugin_settings', $settings_addons);
|
call_hooks('plugin_settings', $settings_addons);
|
||||||
|
|
||||||
|
|
||||||
$tpl = get_markup_template("settings_addons.tpl");
|
$tpl = get_markup_template("settings_addons.tpl");
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$form_security_token' => get_form_security_token("settings_addon"),
|
'$form_security_token' => get_form_security_token("settings_featured"),
|
||||||
'$title' => t('Plugin Settings'),
|
'$title' => t('Feature Settings'),
|
||||||
'$settings_addons' => $settings_addons
|
'$settings_addons' => $settings_addons
|
||||||
));
|
));
|
||||||
return $o;
|
return $o;
|
||||||
|
Reference in New Issue
Block a user