Hi,
I'm trying to add a new preference to PhpWiki but I'm not doing very well
with it.
checkbox: "Display TextFormattingRules while editing."
I've added a new preference to the array in main.php and set up the
userprefs.tmpl but the checkmark always comes up checked (or always
unchecked). I'd like to add another preference to also allow
context-sensitive plugin help on the edit screen, but just trying to get
this simple pref to work I'm ready to pull my hair out.
Thanks for your help,
Carsten
main.php
'editHelpTfr' => new _UserPreference(true),
also tried
'editHelpTfr' => new _UserPreference_int(1,0,1),
userprefs.tmpl
<?php
if ($request->getPref('editHelpTfr')) {
$editHelpTfrCB = HTML::input(array('type' => 'checkbox',
'name' => 'pref[editHelpTfr]',
'value' =>
$request->getPref('editHelpTfr'),
'checked' => 'checked'
));
} else {
$editHelpTfrCB = HTML::input(array('type' => 'checkbox',
'name' => 'pref[editHelpTfr]',
'value' =>
$request->getPref('editHelpTfr')
));
?>
|