summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog4
-rw-r--r--i18n.cpp22
-rw-r--r--pages/pageelems.ecpp6
-rw-r--r--pages/setup.ecpp36
-rw-r--r--setup.cpp5
-rw-r--r--setup.h4
6 files changed, 59 insertions, 18 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 272acde..6556c42 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2007-06-15 Dieter Hametner <dh+vdr at gekrumbel dot de>
+
+ * setup.ecpp: added option to disable infobox at all.
+
2007-06-14 Dieter Hametner <dh+vdr at gekrumbel dot de>
* infobox: Keep update status of infobox in session. This allows
diff --git a/i18n.cpp b/i18n.cpp
index d4f6c1c..0906e86 100644
--- a/i18n.cpp
+++ b/i18n.cpp
@@ -1301,6 +1301,28 @@ const tI18nPhrase Phrases[] = {
"", // Dansk
"", // Czech
},
+ { "Show dynamic VDR information box", // English
+ "Zeige eine dynamische VDR Status Box", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "", // Français
+ "", // Norsk
+ "", // Finnish
+ "", // Polski
+ "", // Español
+ "", // Greek
+ "", // Svenska
+ "", // Românã
+ "", // Magyar
+ "", // Català
+ "", // Russian
+ "", // Hrvatski
+ "", // Eesti
+ "", // Dansk
+ "", // Czech
+ },
{ "View the schedule of this channel", // English
"Zeige Programm dieses Kanals", // Deutsch
"", // Slovenski
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index 093255a..26cbf27 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -37,7 +37,7 @@ int update_status(1);
<div class="page_header">
<a href="<$ LiveSetup().GetStartScreenLink()$>">
<img src="<$ LiveSetup().GetThemedLink("img", "logo.png") $>" alt="VDR Live!" class="logo"></img></a>
- <& infobox &>
+<%cpp>if (LiveSetup().GetShowInfoBox()) { </%cpp><& infobox &><%cpp> } </%cpp>
</div>
<div style="clear: both"></div>
</%def>
@@ -85,7 +85,7 @@ int update_status(1);
<# ---------------------------------------------------------------------- #>
<%def infobox_start_update>
-<%cpp> { </%cpp>LiveStatusRequest('ibox.xml', 'infobox', <%cpp> if (update_status) { reply.sout() << "true"; } else { reply.sout() << "false"; } </%cpp>)<%cpp> } </%cpp>
+<%cpp> if (LiveSetup().GetShowInfoBox()) { </%cpp>LiveStatusRequest('ibox.xml', 'infobox', <%cpp> if (update_status) { reply.sout() << "true"; } else { reply.sout() << "false"; } </%cpp>)<%cpp> } </%cpp>
</%def>
<# ---------------------------------------------------------------------- #>
@@ -130,7 +130,7 @@ int update_status(1);
<%def ajax_js>
<script type="text/javascript" src="ajax.js"></script>
- <script type="text/javascript" src="vdr_status.js"></script>
+ <%cpp>if (LiveSetup().GetShowInfoBox()) { </%cpp><script type="text/javascript" src="vdr_status.js"></script><%cpp> } </%cpp>
</%def>
<# ---------------------------------------------------------------------- #>
diff --git a/pages/setup.ecpp b/pages/setup.ecpp
index 4499e98..008bec3 100644
--- a/pages/setup.ecpp
+++ b/pages/setup.ecpp
@@ -9,24 +9,26 @@ using namespace std;
</%pre>
<%args>
string lastchannel;
- bool useauth = 0;
+ bool useauth = false;
string login;
string pass;
string times;
string startscreen;
string theme;
string localnetmask;
+ string showInfoBox;
int authchanged = 0;
</%args>
<%session scope="global">
bool logged_in(false);
</%session>
<%include>page_init.eh</%include>
-<{
+<%cpp>
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
-}>
+</%cpp>
<%cpp>
#define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" );
+#define CHECKIF(x) reply.out() << ( (x) ? "checked=\"checked\"" : "" );
std::string message;
@@ -47,6 +49,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
LiveSetup().SetTimes(times);
LiveSetup().SetStartScreen(startscreen);
LiveSetup().SetTheme(theme);
+ LiveSetup().SetShowInfoBox(!showInfoBox.empty());
LiveSetup().SaveSetup();
message = tr("Setup saved.");
}
@@ -64,6 +67,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
startscreen = LiveSetup().GetStartScreen();
theme = LiveSetup().GetTheme();
localnetmask = LiveSetup().GetLocalNetMask();
+ showInfoBox = LiveSetup().GetShowInfoBox() ? "1" : "";
</%cpp>
<& pageelems.doc_type &>
<html>
@@ -94,9 +98,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<& menu active=("setup") &>
<div class="inhalt">
<form method="POST" name="setup" action="setup.ecpp">
- <input type="hidden" name="authchanged" value="<$ authchanged $>" id="authchanged"/>
- <input type="hidden" name="message" value="<$ message $>" id="message"/>
- <table class="formular" cellpadding="0" cellspacing="0">
+ <input type="hidden" name="authchanged" value="<$ authchanged $>" id="authchanged"/>
+ <input type="hidden" name="message" value="<$ message $>" id="message"/>
+ <table class="formular" cellpadding="0" cellspacing="0">
<tr class="head">
<td class="toprow leftcol rightcol" colspan="2"><div class="boxheader"><div><div><$ tr("Setup") $></div></div></div></td>
</tr>
@@ -107,7 +111,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<tr>
<td class="label leftcol"><div class="withmargin"><$ tr("Use authentication") $>:</div></td>
<td class="rightcol">
- <input type="checkbox" name="useauth" id="useauth" value="1" <{ reply.out() << ( useauth ? "checked=\"checked\"" : "" ); }> onclick="changeduseauth(this)"/>
+ <input type="checkbox" name="useauth" id="useauth" value="1" <%cpp> CHECKIF(useauth); </%cpp> onclick="changeduseauth(this)"/>
<div id="authsection" style="display: none">
<table border="0" cellpadding="0" cellspacing="0" class="dependent">
<tr>
@@ -127,6 +131,12 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
</td>
</tr>
<tr>
+ <td class="label leftcol"><div class="withmargin"><$ tr("Show dynamic VDR information box") $>:</div></td>
+ <td class="rightcol">
+ <input type="checkbox" name="showInfoBox" id="showInfoBox" value="1" <%cpp> CHECKIF(!showInfoBox.empty()); </%cpp>/>
+ </td>
+ </tr>
+ <tr>
<td class="label leftcol"><div class="withmargin"><$ tr("additional fixed times in 'What's on?'") $>:</div></td>
<td class="rightcol"><input type="text" name="times" value="<$ times $>" id="times" />
<& tooltip.help text=(tr("Format is HH:MM. Separate multiple times with a semicolon")) &></td>
@@ -134,11 +144,11 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<tr>
<td class="label leftcol"><div class="withmargin"><$ tr("Start page") $>:</div></td>
<td class="rightcol"><select name="startscreen" size="1" id="startscreen">
- <option value="whatsonnow" <{ SELECTIF(startscreen == "whatsonnow") }>><$ tr("What's on now?") $></option>
- <option value="whatsonnext" <{ SELECTIF(startscreen == "whatsonnext") }>><$ tr("What's on next?") $></option>
- <option value="schedule" <{ SELECTIF(startscreen == "schedule") }>><$ tr("Schedule") $></option>
- <option value="recordings" <{ SELECTIF(startscreen == "recordings") }>><$ tr("Recordings") $></option>
- <option value="timers" <{ SELECTIF(startscreen == "timers") }>><$ tr("Timers") $></option>
+ <option value="whatsonnow" <%cpp> SELECTIF(startscreen == "whatsonnow") </%cpp>><$ tr("What's on now?") $></option>
+ <option value="whatsonnext" <%cpp> SELECTIF(startscreen == "whatsonnext") </%cpp>><$ tr("What's on next?") $></option>
+ <option value="schedule" <%cpp> SELECTIF(startscreen == "schedule") </%cpp>><$ tr("Schedule") $></option>
+ <option value="recordings" <%cpp> SELECTIF(startscreen == "recordings") </%cpp>><$ tr("Recordings") $></option>
+ <option value="timers" <%cpp> SELECTIF(startscreen == "timers") </%cpp>><$ tr("Timers") $></option>
</select></td>
</tr>
<tr>
@@ -158,7 +168,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
continue;
}
</%cpp>
- <option value="<$ e->d_name $>" <{ SELECTIF(theme == e->d_name) }>><$ e->d_name $></option>
+ <option value="<$ e->d_name $>" <%cpp> SELECTIF(theme == e->d_name) </%cpp>><$ e->d_name $></option>
<%cpp>
}
}
diff --git a/setup.cpp b/setup.cpp
index c59f4eb..8f97a67 100644
--- a/setup.cpp
+++ b/setup.cpp
@@ -29,7 +29,8 @@ Setup::Setup():
m_adminLogin("admin"),
m_theme("marine"),
m_lastwhatsonlistmode("detail"),
- m_tntnetloglevel("INFO")
+ m_tntnetloglevel("INFO"),
+ m_showInfoBox(1)
{
m_adminPasswordMD5 = "4:" + MD5Hash("live");
liveplugin = cPluginManager::GetPlugin("live");
@@ -85,6 +86,7 @@ bool Setup::ParseSetupEntry( char const* name, char const* value )
else if ( strcmp( name, "Theme" ) == 0 ) m_theme = value;
else if ( strcmp( name, "LocalNetMask" ) == 0 ) { m_localnetmask = value; }
else if ( strcmp( name, "LastWhatsOnListMode" ) == 0 ) { m_lastwhatsonlistmode = value; }
+ else if ( strcmp( name, "ShowInfoBox" ) == 0 ) { m_showInfoBox = atoi(value); }
else return false;
return true;
}
@@ -208,6 +210,7 @@ bool Setup::SaveSetup()
liveplugin->SetupStore("StartPage", m_startscreen.c_str());
liveplugin->SetupStore("Theme", m_theme.c_str());
liveplugin->SetupStore("LastWhatsOnListMode", m_lastwhatsonlistmode.c_str());
+ liveplugin->SetupStore("ShowInfoBox", m_showInfoBox);
return true;
}
diff --git a/setup.h b/setup.h
index 7952740..c3973cd 100644
--- a/setup.h
+++ b/setup.h
@@ -45,6 +45,7 @@ public:
bool GetIsLocalNet() const { return m_islocalnet; };
std::string GetLastWhatsOnListMode() const { return m_lastwhatsonlistmode; }
std::string GetTntnetLogLevel() const { return m_tntnetloglevel; }
+ bool GetShowInfoBox() const { return m_showInfoBox != 0; }
void SetLastChannel(int lastChannel) { m_lastChannel = lastChannel; }
void SetAdminLogin(std::string login) { m_adminLogin = login; }
std::string SetAdminPassword(std::string password);
@@ -55,8 +56,8 @@ public:
void SetTheme(std::string theme) { m_theme = theme; }
void SetLocalNetMask(std::string localnetmask) { m_localnetmask = localnetmask; }
void SetIsLocalNet(bool islocalnet) { m_islocalnet = islocalnet; }
-
void SetLastWhatsOnListMode(std::string mode) { m_lastwhatsonlistmode = mode; SaveSetup(); }
+ void SetShowInfoBox(bool show) { m_showInfoBox = show ? 1 : 0; }
bool SaveSetup();
@@ -93,6 +94,7 @@ private:
bool m_islocalnet;
std::string m_lastwhatsonlistmode;
std::string m_tntnetloglevel;
+ int m_showInfoBox;
bool CheckServerPort();
bool CheckServerIps();