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.

DefaultFormatter

2»

Comments

  • Sorry, I was quite busy these days. I'm gonna try to find something smart to deal with guests.
    Like the first version, I'm gonna add few lines of conf at the top of the default.php file, just for the guests.

    Something better to suggest ?
  • "I added that to my file, and the errors still appear for guests. Does it have to be added to a specific place in the code? Am I missing something?"

    Sorry, haven't been back here for a while.

    I added it at the top of default.php, after

    <?php
    /*...
    ...*/</b>

    and before

    if (!defined('IN_VANILLA')) exit();


    "Something better to suggest ?"

    My suggestion works for me (although, of course, it's hiding the error messages rather than fixing the error).
  • you just need to add

    && $Context->Session->UserID > 0

    to the if condition in line 44 to exclude guests of the permissions mesh
  • after adding that, i get this error: Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xx/public_html/messageboard/extensions/DefaultFormatter/default.php on line 44
  • ... although also adding error_reporting(5); makes all errors go away.
  • SheilaSheila ✭✭
    Hi!

    Very good add-on, makes things easier and more simple for end users. Noticed that when this add-on is installed, in user profiles option for formatter is still visible and might be confusing. So I commented that out from the source but guess it would be better if DefaultFormatter would do it somehow automatically.

    Meanwhile if somebody is willing to do what I did (and don't blame me if it breaks something ;) ), formatter-line to comment out is in Vanilla.Control.Preferences.Form.php
  • Hello, I am using Vainilla 1.1.8 and I had some errors: not defined PERMISSION_FORMATTERS_ALL ... I just changed each condition: if (!$Context->Session->User->Permissions['PERMISSION_FORMATTERS_ALL'] ) adding isset function if ( isset($Context->Session->User->Permissions['PERMISSION_FORMATTERS_ALL']) && ! $Context->Session->User->Permissions['PERMISSION_FORMATTERS_ALL'] ) And it works perfectly... I dont know if this apply to other versions, It would be nice to update the code. Best, Yo
  • EDIT: Found it!
  • The version (0.1.0) I downloaded on 2010-03-11 worked just fine (locally) with Vanilla 1.1.10...
Sign In or Register to comment.