Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Set List

edited February 2009 in Vanilla 1.0 Help
Set List
«1

Comments

  • Aint tried it but it sounds bloody good!
  • are there other types of elements to be used, or just the ones you specify in the readme example?
  • also another question: i understand that there is no problem if the extension using setlist is installed in an environment without the setlist extension, but then does the settings form work? or then the extension works, but without the settings form? sorry for the bugging :P
  • No worries mate, that's exactly the question I want to be clear on.

    The idea is that other extensions rely on Set List only to display the settings form. Without Set List, extension settings can still be changed by directly editing the conf/settings.php file, if you like that sort of thing. So the extension works normally, but without the settings form.

    As for the elements, it's only the ones listed in the readme. Others might make it into a future release.
  • ok, done!

    (spam) I've released a new version of ShowParticipants and I've used SetList for the settings form (/spam)

    and it works very very well!!

    well done squirrel ;)
  • Very nice, although there's one other thing I didn't make clear:

    Order doesn't matter. Set List will pick up on any extension's form regardless of where each extension appears in extensions.php. No more hand-editing your settings files!
  • i'm getting this error when i activate the extension:

    Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/thescot2/public_html/forums/extensions/SetList/default.php on line 80

    looks pretty great otherwise, any tips?
  • Amazing, stupendous, fantastic, brilliant, genius.

    Thank you SO MUCH, I can't tell you how much I've been waiting for something like this. IMNSHO this really *should* be added to the core of Vanilla - or at least something as simple as it. I just never got time to learning how to do it the Vanilla way because it was anything but simple to a layman - this is easy :)

    Thank you once again squirrel, this is brilliant!
  • Same problem as Gauzy
    Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/pitbull/public_html/community/extensions/SetList/default.php on line 80
    When activate the extension
  • Yes, same problem than fatro and Gauzy

    Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /var/www/vhost/skytime.info/home/html/foro/extensions/SetList/default.php on line 80
  • My bad.

    These errors are happening because I used references in some foreach() loops, not realizing that PHP 4 does not support this. It should be fixed now. I'll upload the new version in just a minute.
  • Uploaded version 1.0.1 of Set List.
  • New in version 1.0.1:
    • Fixed the parse error on line 80 (and others). See previous post.
    • Stopped using the '@' operator to suppress error messages (small performance boost).
    • Non-string values for form element defaults are no longer discarded (you should still use strings anyway).
  • i'v got 2 things i would like to propose:

    language support, so people can write config forms in many languages, each with format SetList_MYLANGHERE.ini
    // get active language $XMLLang = $this->Context->GetDefinition('XMLLang'); $SetList = "SetList_{$XMLLang}.ini"; // Parse any SetList.ini files for enabled extensions. $extensions = DefineExtensions($this->Context); foreach ($extensions as $key => $ext) { $iniFile = $this->Context->Configuration['EXTENSIONS_PATH'].substr($ext->FileName, 0, -11).$SetList; if (!file_exists($iniFile)) $iniFile = $this->Context->Configuration['EXTENSIONS_PATH'].substr($ext->FileName, 0, -11).'SetList.ini'; if ( $ext->Enabled ) { $this->parseIniFile($key, $iniFile); } }
    the second is to use encoding with htmlspecialchars, cos national character got messy without it
    (its frst line of RenderLabel function)
    $label = htmlentities($this->formData['elements'][$element]['label'], ENT_QUOTES, 'UTF-8');
  • Language support is meant to go into the Vanilla/languages/########/definitions.php file, like any other extension. Labels pulled from the SetList.ini file are registered with the Vanilla dictionary and will get replaced if another definition already exists. Check the README.html file for more details.

    The htmlentities() thing is a bug. That shouldn't be there at all. Vanilla assumes that labels in the dictionary are always in encoded form.
  • Hello. I have a fresh install of 1.1.5 because I thought some previous customization caused this. The only extensions I have are Notify, Expire, and Set List.
    When I change the days inactive (in order to close a post after x days) it returns the following error msg at the top of the screen:

    Notice: Use of undefined constant IgnoreWhispers - assumed 'IgnoreWhispers' in /home/content/n/a/m/namasteweb/html/tradingboard/extensions/Expire/default.php on line 43

    Help! (Happy Holidays)
  • It was a bug in Expire. I just fixed it.
  • Uploaded version 1.1.0 of Set List.
  • Set List version 1.1.0:
    • Fixed some minor output bugs.
    • Added the ability to create file upload elements.
  • Created .../extensions/SetList

    Uploaded all files (4 of them) to this directory (includes default.php and settings_setlist_form.php)

    Enabled SetList at tab "settings", page "extensions", by clicking radio button ... checkmark
    appears.

    Under heading ExtensionOptions (one word) I see reCAPTCHA (which I also installed) but no SetList!

    SetList directory attributes are 777

    What have I missed?

    Thanks,

    Roger
Sign In or Register to comment.