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.

Global Preference Setting

mattmatt ✭✭
edited April 2007 in Vanilla 1.0 Help
Global Preference Setting
«1

Comments

  • Uploaded version 0.1 of Global Preference Setting.
  • mattmatt ✭✭
    Thanks to Mark for the code to do the dirty work, and to the Poll and Members Page extensions from which I learnt a lot.
  • Does "global changing" imply that the option to change it back is disabled or not visible for every single user but the admin?
    Another extension, "Discussion Overview", only makes sense when it replaces the default index page. People can, however, show the overview in a seperate tab -- I don't want that. I want to change some poll settings globally as well.

    but all that only makes sense if the users can't change it back individually :)
  • mattmatt ✭✭
    After using this extension, users are free to change their own preference back individually. This may help with your Poll query, I'm not sure?

    I think the only way you're going to get what you want is by creating a Vanilla theme to make the forum look and act exactly as you require. Or perhaps make an extension to remove or replace the parts of Vanilla that you don't want.
  • Aww damn :( So there is no way of setting global preferences which are not visible to the individual users (so they can't change them)?

    I thought if enabling these preferences for every extension is so easy, why isn't disabling them by another extension easy as well? :) Probably it's best to ask the authors to include an option which disables individual changing of preferences for their extension.
  • mattmatt ✭✭
    Well, yes, but that's not quite what you asked first time. ;)

    What you should do is use this extension to set the preference globally, then go into the extension responsible for the preference and comment out the line that adds the preferences to the settings pane. But this is a real hack of a way to do it, as it will stop you updating those extensions easily. But it would work.

    You'd be looking for lines like the one below. This one is where my extension adds it's preference to the settings pane. Try to find a similar one for "Discussion Overview". Of course, if you're unfamiliar with PHP you could muck things up royally messing with these things. :)

    $Context->Configuration['PERMISSION_GPS_MANAGEMENT'] = '0';
    Maybe there's room for an extension to override preferences, removing them from the setting pane before that get a chance to be displayed?
  • Changing the PHP code is no problem for me. Since some extensions weren't working in the first place because they did not get their path's set up correctly (should be dirname(__FILE__).'/file_in_your_folger.php') so I had to change their code, changing that settings-line shouldn't be much of a problem either.

    But it bugs me that I have to change that every time I update the extension :(

    I'll give your idea a try. Better than nothing, I think.
  • whats this in the code
    $html = <<<END1
  • mattmatt ✭✭
    It's HEREDOC syntax assignment. Set a variable to multi-line text denoted by two markers.

    See here: http://uk2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
  • It would be nice to have a list of the syntax's we can use.
  • mattmatt ✭✭
    I'm not sure what you mean? It's just PHP code so all those syntax rules apply. See the PHP manual as above.

    Or am I misunderstanding you?
  • Sorry, I have clarity issues at times. What i'm looking for is a list of preferences that can be changed and what they will do...globally. We already know from the top discussion what NotifyOnNewWhisper or ShowActivePoll do. I'd like to know what else is possible.
  • there is no preference list cause every extension adds its own.
    My FCKeditor one has a VisualEditing Preference. other extensions will have there own stuff.
  • Well for instance, I would like to force check "show email" on my forum. That is something built into the core, how would I set something like that?
  • Oh u cannot that, that is not in the preference field. Its in the UtilizeEmail field

    just run this query in your database
    UPDATE LUM_User SET UtilizeEmail = "1" WHERE UtilizeEmail = "0";
  • How can I force that all my users to remove the checkbox

    Hide my username from the "Who's Online" panel
  • Is there a list of "commands" for Global Preference Settings plugin? It is a great plugin but... How do I know what to type in in order to make features global. It would be great if some how there were a drop down box for the plugins I am currently using. Please advise!
  • qlskydiver: see below

    insanefisher: 'm afraid you have to get deep down and dirty and root around in the extension or database to see what to reset. I don't have time to make it any better, sorry!
  • As and when people find out what "commands" work for this extension, they should post them in here. Then at least we can keep a user maintained list in here!
  • Preference to change: JumpToLastReadComment - Set to 1 to enable Forum Preference 'Jump to the last read comment when clicking on discussion topic' for all users Preference to change: VisualEditing - Set to 1 to enable Forum Preference 'Enable Visual editing toolbar (not compatible with Safari Browser)' for all users
Sign In or Register to comment.