Howdy, Stranger!

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

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1

Locale files included in plugins

Hey all, I was tinkering with, and I noticed that something was odd with the settings page.

Everything was basically CONSTANT_NAME instead of actual text.

When I forced php to include the locale file included in the plugin (require_once 'C:\xampp\htdocs\vanilla23\plugins\OneallSocialLogin\locale\en.php'; ), everything worked smoothly (even after I then removed that command. Does it cache locales or something?).

Oh, and to get it to work with 2.3 I had to replace these lines

        $Sender->AddCssFile($this->GetResource('design/settings.css', FALSE, FALSE));
        $Sender->AddJsFile($this->GetResource('js/settings.js', FALSE, FALSE)); 

With these.

        $Sender->AddCssFile('settings.css', 'plugins/oneallsociallogin');
        $Sender->AddJsFile('settings.js', 'plugins/oneallsociallogin'); 

Haven't filed a pull request yet since I don't know what's going on with the translation.


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    One thing I could imagine is that they are using two locale files, that's kind of strange and there is no need for the old definition files.

    The location of locale files are cached, yes. If you use memcached, you will not see that. Otherwise you will find a file called /cache/locale_map.ini. If you open that file and look into it, you would find the path to the OneAll plugin

    Concerning that getResource proble, you might find that informative:

    I guess it is better to make two pull requests instead of one, since you address two different problems: one PR with deleting the old language definitions and one with the getResource elimination

  • CaylusCaylus ✭✭

    Really weird. Deleted the cached locations in /cache/locale_map.ini, then the CONSTANT_NAME problem returned (as one would expect, since I expect locales are only loaded when plugins are switched on).

    Disabled the plugin, reenabled the plugin: everything looks good.

    So the initial problem with locales was probably a fluke. I at least can't replicate it.

    Created a pull request for the getResource bit at least.

Sign In or Register to comment.