HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Great plugin -- a suggestion

sudden156sudden156 ✭✭
edited October 2017 in Feedback

Admin Mode works really well. I have one suggestion though. The 'Log in' link seems to invite any member to log in only to discover that they can't. It would be better if it said 'Admin login'. I trust you don't mind me changing it in my locale file.

Comments

  • Actually, I quite like this:

  • R_JR_J Ex-Fanboy Munich Admin

    @sudden156 said:
    I trust you don't mind me changing it in my locale file.

    I'm not sure what exactly you've meant with "your locale file". But just in case you didn't know that already: you can have a site specific locale file which you can use for exactly such a purpose. Create a file /conf/locale.php and put your translation there.

  • I meant I changed it in the en.php file I found in the /locale/ directory in your plugin.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    edited October 2017

    That works (obviously!), but if the plugin were updated and you uploaded the new version then your changes would be lost.

    The Vanilla way is to do as @R_J suggests, and use your own locale file.

    That way, you won't have to make further changes.

    It is trivial in this instance, but it is a useful thing to know, and a good habit to get in to.

  • Yes, I haven't looked much into the proper way of doing it as I make notes on what changes I've made to things in case I need to re-do them. There aren't usually many things. Same with custom.css, rather than do that I just append my CSS to the end of style.css and note that I've done it. But I should develop a better habit, I agree. Only today I was thinking that actually.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    edited October 2017

    For custom css, you really should adopt the Vanilla way, or else you have to rewrite each time you update Vanilla.

    There's a plugin, CSSEdit, that makes it even easier (and it is really easy anyway.)

  • I've at last done custom.css properly, adding it to the Default theme. Works fine. Will it also get applied to the Mobile theme? I'm afraid I don't have a mobile phone to check.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    edited November 2017

    If you've added custom.css in the default theme folder, you will still face the same issues on upgrade.

    The idea is to create a new theme folder, which is not overwritten on upgrades.

    Copy the default folder, and rename it. Edit the about.php - you MUST change the theme name line to match the folder name you chose. The rest isn't really important, unless you are going to distribute your theme.

    Go to Dashboard and select your new theme.

    Mobile themes are served separately.

    You can either create your own custom mobile theme (or edit an existing mobile theme)

    https://open.vanillaforums.com/discussion/26490/tutorial-how-to-create-a-new-mobile-theme

    or, it is possible to force Vanilla to use your current theme, but it may not be optimal for mobile users.

    Set this in your conf/config.php

    $Configuration['Garden']['MobileTheme'] = 'nameofdesktoptheme';

    Before I had a tablet/phone, I used Opera mobile emulator to test mobile themes:

    https://www.opera.com/developer/mobile-emulator

  • I remember now why I append my little bit of extra CSS to the main style.css file in /applications/dashboard/design/. Because it does cascade down to the included mobile theme. It may be an unintended or less elegant way to do things, but it seems a decidedly less complicated way.

    If the main reason for not doing this is because of overwriting in upgrades, then this doesn't really concern me because I never upgrade that way (too scared). What I do is to set up a parallel installation in another directory, get it working properly, and then redirect the URL of the forum with .htaccess. As I don't have any pages in Google to worry about as it is a closed forum it doesn't matter to change the URL every so often.

    Cheers for the link to the Opera mobile emulator. That's really handy.

Sign In or Register to comment.