Page 1 of 1

where are the html files?

Posted: Thu Jun 18, 2015 12:13 pm
by sk07ch
Hi Guys, Love the software on the pi! We have been using it for ages and its been great.
I am now looking to change the web interface slightly to fit onto smaller device screens. Maybe add a little bootstrap.

Looking through the files on the pi i have found all of the css and javascript files but i cant find any of the html files.
are these generated by the software ? or am i just looking in the wrong place?

Any help would be great. thanks!

Re: where are the html files?

Posted: Thu Jun 18, 2015 12:21 pm
by janosvitok

Re: where are the html files?

Posted: Thu Jun 18, 2015 12:35 pm
by mcallegari
The HTML code is generated dynamically by QLC+, but you can modify the CSS/JS files if you like. They're in

Code: Select all

/usr/share/qlcplus/web/

Re: where are the html files?

Posted: Thu Jun 18, 2015 1:28 pm
by sk07ch
Thanks for the replies guys. My main goal is to change the main page so i can fit it nicely onto a phone screen.
is there any way i can add a html file? and clone the generated code?
i briefly tried adding a html page to the directory with the css and js files but cant seem t access it. is there a directory where i could add html files and access them over the browser?

Thanks

Re: where are the html files?

Posted: Thu Jun 18, 2015 1:49 pm
by plugz
The HTML code is generated dynamically by QLC+, but you can modify the CSS/JS files if you like. They're in

Code: Select all

/usr/share/qlcplus/web/
This means no, you can't just put an html file in a directory and expect it to be distributed by QLC+.

QLC+ is not an apache web server.

You will either have to play with the css/js files, or change the C++ code and recompile QLC+ yourself.

Re: where are the html files?

Posted: Thu Jun 18, 2015 1:49 pm
by mcallegari
plugz wrote:QLC+ is not an apache web server.
It's not Apache, but it is Mongoose web server :)
If you put something like:

Code: Select all

  else if (QString(conn->uri).endsWith(".html"))
  {
      QString clUri = QString(conn->uri).mid(1);
      if (sendFile(conn, QString("%1%2%3").arg(QLCFile::systemDirectory(WEBFILESDIR).path())
                   .arg(QDir::separator()).arg(clUri), "text/html") == true)
          return MG_TRUE;
  }
After https://github.com/mcallegari/qlcplus/b ... s.cpp#L274
it should redistribute HTML files as well.

Anyway, just playing with the virtualconsole.css file should be enough to adapt the pages to the screen size

Re: where are the html files?

Posted: Fri Jun 19, 2015 2:23 am
by sk07ch
Thanks heaps guys. One last thing, where can webaccess.cpp be found?

Thanks

Re: where are the html files?

Posted: Fri Jun 19, 2015 2:23 am
by mcallegari