Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Global Preference Setting

mattmatt ✭✭
edited April 2007 in Questions
This discussion is related to the Global Preference Setting addon.
Global Preference Setting

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
  • PROBLEM!

    this addon works ... yes ... but only on the current users, not to the future ones :(

    Example:
    I set "VisualEditing" to 1 - fine - all exisiting user got "VisualEditing" on now.
    But every NEW user who signs up AFTER i did this will have 0 (standard)

    :(((

    Is it a bug or should it be like this?
    Of course i do want that ALL users (even the future ones) got "VisualEditing" at 1

    any idea? help? thx!
  • I only have a basic understanding of what this addon does. WIth that understanding, it changes settings of current users, not create a default setting. So, no Eugen, its not going to do what you want. You'd have to go into each extension, I'm assuming, and change the default for each. And I have no idea where to start with that. You'd have to post that question in each individual extension discussion.
  • hi garvin! thats the problem - i think the most users think this addon will create a DEFAULT setting and not just editing ols database entries :( Would even make more sense. but anyway ... i fixed my problem "dirty" until a addon is available who does what most users expect - to be able to set default prefernces for addons ;) thx for answering. greetings eugen
  • yeah this does not do what i thought it would do
  • mattmatt ✭✭
    Sorry, it is completely out of scope to manage default values for all extensions.

    I suggest you change the extension so the default is as you require, then use this extension to clear that preference for all existing users so that every user is using the default value unless they opt to change it.
  • Oh, doesn't set a default.
Sign In or Register to comment.