Announcement

Collapse
No announcement yet.

Custom Links Do Not Show in Ultra View Status

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Links Do Not Show in Ultra View Status

    I have a links.htm file that redirects to a links.vbs file with my custom links. All works fine, except that there are no links on my Ultra View Status page. All other stock HS pages work fine. How/where are links at top of page controlled for Ultra View Status?

    Thanks!
    :-p

    #2
    The call to the links.htm must also be in any custom pages. Not everyone puts it into their creations. I wish everyone did so the look would be more standard accross pages.

    -Shane

    Comment


      #3
      Since I'm not at home right now, I can't test or see where it needs to go. Where exactly in Ultra View Status does the code need to be? What should it say? I'm sure I could figure it out if I look more, but since I don't have access right now, I'd really appreciate a detailed answer. I know you guys have done it.

      Thanks!
      :-p

      Comment


        #4
        Still can't figure it out. I get all the links when accessing the default HS webpage. I get no links when accessing the UltraView Status page. Where, in UV, do I need to tell it about the links.htm page? Please help.

        :-p

        Comment


          #5
          HomeSeer no longer provides the ability to build Links by reading the config or registry file. Ultra View2 won't be able to render those links until it's converted into a plug-in.

          I requested a function to auto-generate the links, but it appears there wasn't enough interest in it.
          http://ubb.homeseer.com/eve/ubb.x?a=...1&m=5126076054

          Regards,
          Ultrajones
          Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

          Comment


            #6
            Ultrajones: Correct me if I'm wrong, but you're post is looking for some more advanced functionality to make the custom links easier. At this point, I'm only interested in getting it to work, by whatever means. I see other people's UV pages with custom links at the top. Example...


            Tom Kern: How do you do it? Maybe it's so easy that I can't figure it out.

            :-p

            Comment


              #7
              Look at the last function (function CreateLinkBar()) in the ultra_view2_html.inc file and see if that helps. That's were I changed mine.

              Comment


                #8
                Ah ha! Now we're talkin' Thanks Waldoman! I'm looking at the ultra_view2_html.inc file. I have not modified this file from what was included with UV that I downloaded. First thing I notice is that it's looking for a key named start_with_custom. My settings.ini does not have such a key. A little further down, it's looking for keys named gCustomPageDesc and gCustomPageFile. My settings.ini does not have these either. So in the end, the output of the CreateLinkBar function is "". No wonder I get nothing. Do I need to add these keys to my settings.ini? What values should they contain?

                :-p

                Comment


                  #9
                  I use something called Web Wrapper created by A.J. Gyomber. This is nice because it adds the header and footer to all of your asps with two lines of code, plus all pages look consistent. I almost always have to add it when I begin with someone elses code, but its just my preference. If you want to try it, download the plugin called Web Wrapper from the updater. Don't forget to enable it under interfaces, then add these lines of code to your asps:

                  <%=hs.plugin("Web Wrapper").Header("Guest Downloads",0, False)%>

                  and

                  <%=hs.plugin("Web Wrapper").Footer%>

                  For the header, which loads the bar, icons & links, specify the page title where I have "Guest Downloads". The second parameter is an auto refresh time (zero for none) and the third will require authorized users to view (True or False). Put this at the top of your page. The footer just adds your tail.htm to the bottom of the page.

                  There is also a useful table creation method available if you want to use it. Once you have the plugin enabled, run the asp called "hspi_web.asp" from your web server to see if everything is set up properly and for instructions.

                  Hope this helps & thanks A.J.!

                  -Tom
                  -Tom

                  Visit Kernhome
                  Kern Theater Gallery

                  (User: guest / Pass: guest)

                  Comment


                    #10
                    Thanks Tom! I did notice references to Web Wrapper in your pages. Not being familiar, I avoided it. Sounds interesting. I'll check it out. Don't be surprised if I need a little more assistance along the way.

                    :-p

                    Comment


                      #11
                      No Prob. I'd be happy to help.
                      -Tom

                      Visit Kernhome
                      Kern Theater Gallery

                      (User: guest / Pass: guest)

                      Comment


                        #12
                        Web Wrapper is the way to go. I’m sorry I didn’t start out that way. Now I would have to make a lot of changes to all my pages as I hard coded most everything. That’s what I get for not being a real programmer I suppose. I currently use the doo_menu bars and my code in UltraView2 is as follows. Tom, could I incorporate something like this into Web Wraper? I’m not a programmer so go slow.

                        function CreateLinkBar()
                        dim strHTML
                        dim HSFSO
                        dim strFile

                        SET HSFSO = CreateObject("Scripting.FileSystemObject")
                        SET strFile = HSFSO.OpenTextFile(hs.GetAPPPath & "\html\meta.htm",1)
                        strHTML = strFile.ReadAll
                        strFile.close
                        SET strFile = HSFSO.OpenTextFile(hs.GetAPPPath & "\html\links.htm",1)
                        strHTML = strHTML & vbCrLf & strFile.ReadAll
                        strFile.close
                        CreateLinkBar = strHTML
                        end function

                        Comment


                          #13
                          Do you mean in addition to Web Wrapper? I think if you inserted the code you have there for CreateLinkBar, you would end up with two sets of links displayed. The Web Wrapper will automatically call the links.htm. I almost used the doo_menu bar several times myself but haven't gotten it just right yet. I think you are supposed use Jim's links.htm file which contains the whole layout of your bar. Is that what you are opening there? If you just want to use Jim's code, you should only have to directly replace your links.htm with Jim's then copy your meta.htm file (since it didn't exist before). I think there are some additions to the style.css file as well.

                          As for Web Wrapper, just call the header and footer just like I described earlier in this thread and Jim's links.htm will do the rest. There shouldn't be anything else special to do. Make sense?

                          -Tom
                          -Tom

                          Visit Kernhome
                          Kern Theater Gallery

                          (User: guest / Pass: guest)

                          Comment


                            #14
                            No, not in addition.
                            Yes, I'm using Jim's links.htm

                            I'll try a page or two with Web Wrapper.
                            Thanks.

                            Comment


                              #15
                              OK, I'm back. I've installed Web Wrapper. I still do no get any links in my Ultra View Status page or any page other than HS' stock webpage. For example, I built an empty page with only the following...
                              <pre class="ip-ubbcode-code-pre">&lt;%@ LANGUAGE=VBScript %&gt;
                              &lt;html&gt;
                              &lt;head&gt;
                              &lt;title&gt;Untitled Document&lt;/title&gt;
                              &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
                              &lt;/head&gt;
                              &lt;body&gt;
                              &lt;%=hs.plugin("Web Wrapper").Header(CStr(strTitle),0, False)%&gt;
                              &lt;/body&gt;
                              &lt;/html&gt;</pre>

                              Then, I have a links.htm with the following...
                              <pre class="ip-ubbcode-code-pre">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
                              &lt;html&gt;
                              &lt;head&gt;
                              &lt;title&gt;Untitled Document&lt;/title&gt;
                              &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
                              &lt;/head&gt;
                              &lt;SCRIPT language="Javascript" src="/links.vbs"&gt;&lt;/SCRIPT&gt;
                              &lt;body&gt;
                              &lt;/body&gt;
                              &lt;/html&gt;</pre>

                              My links.vbs is basically like the following...
                              <pre class="ip-ubbcode-code-pre">Sub Main()
                              Dim strHTML
                              If Request.ServerVariables("AUTH_USER") &lt;&gt; "guest" Then
                              strHTML = "&lt;a href=""/ultra_view2_status.asp""&gt;&lt;B&gt;QuickView&lt;/b&gt;&lt;/a&gt;" &_
                              " | &lt;a href=""/stat""&gt;&lt;B&gt;Devices&lt;/b&gt;&lt;/a&gt;" &_
                              " | &lt;a href=""/tope""&gt;&lt;B&gt;Events&lt;/b&gt;&lt;/a&gt;" &_
                              " | &lt;a href=""/logo""&gt;&lt;B&gt;Log Out&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;"
                              Else
                              strHTML = "&lt;a href=""/ultra_view2_status.asp""&gt;&lt;B&gt;QuickView&lt;/b&gt;&lt;/a&gt;" &_
                              " | &lt;a href=""/stat""&gt;&lt;B&gt;Devices&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;"
                              End If
                              Response.Send "document.write('" & strHTML & "');"
                              End Sub</pre>

                              I'm expecting that the Web Wrapper line in my first file will look for links.htm. Then, my links.htm will redirect to links.vbs. Links.vbs provides all the links. I get no links in my Ultra View Status page. I do get the links in the default HS webpage. Do I have the concept right? What am I missing?

                              :-p

                              Comment

                              Working...
                              X