Template Variables

13 posts / 0 new
Last post
#1 Tue, 10/03/2017 - 06:29
adelphia
adelphia's picture

Template Variables

Is there a list of all the current template variables anywhere that's up to date? I mean for the likes of ${DOM}, ${WEBMIN_PROTO}, ${USER} etc? The only one I can find is here but it's marked obsolete.

On completely separate issues, why when I create a topic my signature doesn't show but it does if I reply and lastly, where can I make feature requests? Particularly I would like to request the Reboot/Shutdown buttons under Webmin -> Bootup and Shutdown are shown at the top as well as the bottom, or perhaps shown as a separate mini menu item?

Tue, 10/03/2017 - 13:54
Joe
Joe's picture

I've marked it not obsolete, as it is mostly up to date. It also has a new URL and is linked from the System documentation page. https://www.virtualmin.com/documentation/system/templates

"On completely separate issues, why when I create a topic my signature doesn't show but it does if I reply"

I have no idea. Probably the same reason as everything that's wack about the website: Drupal is horribly inconsistent, has bizarrely separated abstractions (e.g. nodes vs. comments), and just plain makes no sense sometimes. (Though it's getting better over time. Nonetheless, we'll be moving to new forum software in 2018, so we'll have fun new bugs to complain about next year.)

"where can I make feature requests? Particularly I would like to request the Reboot/Shutdown buttons under Webmin -> Bootup and Shutdown are shown at the top as well as the bottom, or perhaps shown as a separate mini menu item?"

The best place is probably the github (for Webmin, in this case). But, that's a good idea, and something I can implement right now. I've checked into my own Webmin repo, and made a pull request. It's up to Jamie whether to merge it into Webmin or not, but I think it's a reasonable change. You can see the state of that here: https://github.com/webmin/webmin/pull/643

--

Check out the forum guidelines!

Tue, 10/03/2017 - 15:09 (Reply to #2)
adelphia
adelphia's picture

Just taken a look Joe and I see someone doesn't like it already ;) Can it be added to the little icons at the bottom of the left menu where you log out, run terminal etc? I don't care where it's at just as long as I don't have to keep going to the boot/shutdown page and then scrolling to the bottom of the list and then clicking reboot and then confirming I want to reboot, if that makes sense... Typically if I have a console window open then I'll just type reboot there and it's done ;)

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Tue, 10/03/2017 - 15:28 (Reply to #3)
Joe
Joe's picture

Why are you rebooting so often? I only do it when there's a kernel update...so every few weeks on average.

I guess I agree with Ilia (maybe...I don't think it's so bad, but that page is already really crowded and has too much stuff going on). But, there's probably something we can do to improve that UI. I'll talk it over with Ilia, and see if we can come up with something.

Do you know about the pop-up terminal? If you hit Alt-K it'll pop up a command shell, so you could run reboot there. You can also run commands from the smart search box, by putting an ! in front of it, e.g. !reboot. (These are both features of Authentic Theme, so you'll need to be using that theme.)

I definitely don't want it in the mini menu (again, rebooting should be rare, and mini menu already has too many things in it).

--

Check out the forum guidelines!

Wed, 10/04/2017 - 02:55 (Reply to #4)
adelphia
adelphia's picture

I don't really boot that often unless Webmin tells me to, in which case the button is already there, but I do like to check my system every so often to ensure that the server comes up after, let's say a power cut although they are few and far between also. If I run into an issue that I think maybe resolved by a reboot (Windows 10 minded I'm afraid) I will also do a reboot.

I also tried adding "init 6" (if I recall) as a custom command but that just looked ugly on a reboot.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Wed, 10/04/2017 - 23:21 (Reply to #5)
Joe
Joe's picture

Ilia also suggested making a custom link/hotkey that goes straight to /init/reboot.cgi, which would give you a super quick way to get to that page. Lots of options for common tasks.

https://github.com/webmin/webmin/pull/643#issuecomment-334084649

--

Check out the forum guidelines!

Thu, 10/05/2017 - 03:42 (Reply to #6)
adelphia
adelphia's picture

I'll look into this. Am I allowed to comment on the git pages? I don't want to clutter either the forum or git with unwanted comments or "how do I" questions about this by putting it in the wrong place. It's a bit difficult knowing who is who on here versus their git user name too;)

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Thu, 10/05/2017 - 04:06 (Reply to #7)
Joe
Joe's picture

Sure! You're welcome to comment on git issues. I'm swelljoe on github, Ilia is qooob, Jamie is jcameron, but we try to never bother Jamie with anything before the rest of us have tried to deal with it first, because he has a family with kids and another full-time job.

We don't guarantee any sort of response time on github. Our priorities are in this order: 1. Issues here, 2. forums here, 3. github issues at the end of all that. Though we try to handle everything, we're just four people and dealing with hundreds of thousands of lines of code and a million or so total users (counting Webmin and Virtualmin).

--

Check out the forum guidelines!

Thu, 10/05/2017 - 06:23 (Reply to #8)
adelphia
adelphia's picture

Wish I could help more. Although I'm a programmer, I would class myself as advanced rather than an expert. I do like to tinker with "all things" that have some kind of user interface and I'm in the process of creating an Alexa Skill but that takes time and you need to comply with any 3rd party APIs that may be used.

Maybe I'll "follow" github as I'm sure an extra pair of eyes wouldn't go amiss although I would only try to comment on stuff I understand ;)

Right now though, I'm trying to get my Samba sorted (GRRRR!). It was working before I reformatted my server and now, for some unknown reason, I have no clue as to why I can't get it working again; just keeps denying access from Windows but I can see the list OK in Webmin file manager.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Fri, 10/06/2017 - 03:36
adelphia
adelphia's picture

What is the variable for the web site protocol (HTTP/HTTPS) etc? Is it HTTP_PROTO, WEB_PROTO, WEBMIN_PROTO or something else? I'd like to add this to my Apache template (rather than using http: as in the example) such that a non SSL would use http and an SSL site would use https without having to remember to change it.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Fri, 10/06/2017 - 03:53 (Reply to #10)
Joe
Joe's picture

Would this do what you're after?

${IF-SSL}
https://${DOM}
${ELSE-SSL}
http://${DOM}
${ENDIF-SSL}

I don't believe there is a protocol variable, as it's not an either/or thing; all sites that have https also have http, so there wouldn't be one HTTP_PROTO for a site with SSL, there'd be two (both http and https).

--

Check out the forum guidelines!

Fri, 10/06/2017 - 04:52
adelphia
adelphia's picture

That would work fine thanks Joe. Just wondered why there is one for WEBMIN_PROTO then? Surely that's the same thing isn't it, just specifically for the Webmin page?

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Fri, 10/06/2017 - 06:31 (Reply to #12)
Joe
Joe's picture

No, it's not the same. Webmin is a completely separate server, and only runs on either http or https (but it would be madness to run it on http). Webmin has its own web server, it isn't simply a page in Apache or nginx. The Webmin port is also available on ${WEBMIN_PORT} since that is a thing that can change.

--

Check out the forum guidelines!

Topic locked