Trev
The Dumb One
I found THIS thread a couple of days ago and thought to myself "I'll have some of that". However, when I started 'going into' it, I realised that I didn't know enough about the protocol of green and red text etc. so decided to ask for help rather than brick my box, as they say.
So' I'll repost the code to save swapping about then 'give it some' with questions.
The top two lines seem to point at two files with preceding --- and +++
I have the file ".../mod/webif/html/lib/topbar.jim" but not the file ".../mod/webif/html/lib/topbar-orig.jim". Presumably the latter is a backup for 'brick' prevention?
Q1. What is the relevance of the --- and +++ in front of these two lines?
Q2. I assume that green lines starting with a '+' are to be added where indicated in the code and those in red starting with a '-' are to be deleted? But are the '+' left in (I guess not?)
Q3. What about the last line that is in red, but has no '-'
Q4. What is the third line, "@@ -27,11 +27,18 @@" all about?
So' I'll repost the code to save swapping about then 'give it some' with questions.
Diff:--- /mod/webif/html/lib/topbar-orig.jim +++ /mod/webif/html/lib/topbar.jim @@ -27,11 +27,18 @@ if {[system model] eq "HDR" && [system usbdisks] > 0} { source /mod/webif/include/usbeject.jim } +set dmson [system param DMS_START_ON] +set lstn [system is_listening 9000] +set stat [expr $dmson?"Server is enabled":"Server is disabled"] +set img [expr $dmson && $lstn?"181_1_00_Help2_Green.png":"181_1_00_Help1_Red.png"] +set stat [expr $lstn?"$stat and is running.":"$stat and is NOT running."] source /mod/webif/include/vfd.jim -puts { +puts " <div id=idletime></div> -</div> -} +<div id=serverstat> +Server Status: <img class=va src=/images/$img title=\"$stat\"> +</div></div> +" source /mod/webif/include/toolbar.jim puts { <script type=text/javascript src=/js/topbar.js></script>
The top two lines seem to point at two files with preceding --- and +++
I have the file ".../mod/webif/html/lib/topbar.jim" but not the file ".../mod/webif/html/lib/topbar-orig.jim". Presumably the latter is a backup for 'brick' prevention?
Q1. What is the relevance of the --- and +++ in front of these two lines?
Q2. I assume that green lines starting with a '+' are to be added where indicated in the code and those in red starting with a '-' are to be deleted? But are the '+' left in (I guess not?)
Q3. What about the last line that is in red, but has no '-'
Q4. What is the third line, "@@ -27,11 +27,18 @@" all about?