[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
Help with custom Index.htm
02-04-2012, 11:36 AM
Post: #16
RE: Help with custom Index.htm
Are you able to telnet to your c-200?

CSI Installed?

You could use Telnet Client: Putty
Config: IP of your C-200
Port: 23
Connection Type: Telnet

In the telnet box typ: mount [enter]
some listing should appear.
That shows your able to mount manually.

exit [enter] to close the box

My Idea is that the index.htm file will call a whsmount.cgi (mount the shares) and then leads you to your homescreen (with 2 buttons index2.htm or homescreen.htm).

First you need a new user on your windows maschine (e.g. user: nmt / password: nmt1234)
Then you need two/three more files on your share-root on your c-200

[index.htm]
Code:
<html>
<meta HTTP-EQUIV="REFRESH" content="5; url=http://localhost.drives:8883/SATA_DISK/whsmount.cgi"></meta>
<head>
</head>
<body>
<a href="http://localhost.drives:8883/SATA_DISK/whsmount.cgi"> Homescreen starten </a>
<br>
</html>

[whsmount.cgi] Change the ip-adress to your share and your username and password (Homescreen.htm or change to your renamed old index.htm)
Code:
#!/bin/sh

#mounting

mywhsmount() {
  mkdir -p "$2"
  /bin/mount -t cifs "$1" "$2" -o username=your_windows_nmt_user,password=your_windows_nmt_password
  ls -a "$2";
};
########################
### Mount of WHS2003 ###
########################

mywhsmount "//192.168.100.101/Videos" "/opt/sybhttpd/localhost.drives/SATA_DISK/mnt/whs";

#now to the homescreen

echo "Content-type: text/html";
echo
cat << EOF
<HTML>
<meta http-equiv="Refresh" content="5; url=http://localhost.drives:8883/SATA_DISK/Homescreen.htm">
Please wait while Homescreen is loading...
</HTML>

After starting the index.htm it will call the whsmount.cgi and after that takes you to the Homescreen.htm

[your old index.htm / Homescreen.htm]
Code:
<html>
    <head>
        <link rel="StyleSheet" type="text/css" href="exportindex_item_pch.css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Select Library</title>
    </head>
    <body bgproperties="fixed" focustext="#FFCC33" focuscolor="transparent" onloadset="1"onload="initpage()" background="jukebox/pictures/Index/set_background.jpg">
        <table class="main" align="center" border="0" cellpadding="0" cellspacing="0" height="600">  
             <tr align="left">
                <td colspan="3">
                    <table cellpadding="0" cellspacing="0" height="100"
                        align="center">
                        <td align="center">
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td id="Td1" align="center" height="60" width="800">
                                        <span></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td id="Td2" align="center" height="50" width="800" background="Instructions.png">
                                        <span></span>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </table>
                </td>
            </tr>
            <tr align="center" valign="middle">
                <td>
                    <table border="0" align="center" cellpadding="0" cellspacing="0" height="400">
                        <tr>
                            <td id="Td3" align="center" height="80" width="0">
                                <span></span>
                            </td>
                        </tr>
                        <tr>
                            <td  align="center" valign="middle" width="400">
                                <a href="jukebox/Other_All_1.html" tvid="1" name="1" onfocus="show(1)"onblur="hide(1)">
                                    <img src="Indexed_small.png" onfocussrc="jukebox/pictures/Index/box_selection.png"onmouseover="show(1)" onmouseout="hide(1)" />
                                </a>
                            </td>
                            <td align="center" valign="middle" width="400">
                                <a href="http://localhost.drives:8883/SATA_DISK/mnt/whs" tvid="2" name="2" onfocus="show(2)"onblur="hide(2)">
                                    <img src="Staging_small.png" onfocussrc="jukebox/pictures/Index/box_selection.png"onmouseover="show(2)" onmouseout="hide(2)" />
                                </a>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>

C-200 @50'' Panasonic TH-50PX8EA
(BR, 2,5''HDD 500GB, LAN)
A-110 @42'' LG LED-TV
(3,5''HDD 1TB, LAN)
CH3SNAS 1TB+500GB, DNS-323 2x2TB,
ACER WHS H-340 1TB
!! VOTE FOR !! multiple switchable external subtitles (srt)
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to MikeHunter for this post
02-10-2012, 06:32 PM
Post: #17
RE: Help with custom Index.htm
@mstrong: Any progress?

C-200 @50'' Panasonic TH-50PX8EA
(BR, 2,5''HDD 500GB, LAN)
A-110 @42'' LG LED-TV
(3,5''HDD 1TB, LAN)
CH3SNAS 1TB+500GB, DNS-323 2x2TB,
ACER WHS H-340 1TB
!! VOTE FOR !! multiple switchable external subtitles (srt)
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to MikeHunter for this post
02-26-2012, 10:10 PM
Post: #18
RE: Help with custom Index.htm
(02-10-2012 06:32 PM)MikeHunter Wrote:  @mstrong: Any progress?

Sorry. I had to travel for business. I am not having any luck. I guess I am missing why I need to mount two shares. I just want an index.html file that lets me either launch the jukebox or that takes me to a folder to browse my jukebox.
Find all posts by this user
Add Thank You Quote this message in a reply
02-27-2012, 08:55 AM
Post: #19
RE: Help with custom Index.htm
I thought you've already figured it out how to open a folder by a html link (kdoske).
So i thought opening folders wasn't your problem anymore.
And if this two folders are on your internal harddisk there should be nothing else to do.

But if you have two shares and you want to open the shared folders one after the other - it won't work because the device
can only mount one share at a time. If you want the second share to be mounted by the device, you have to browse to it
via the internal "browser" (gui) and until you done that - you aren't able to open it via html.

So if you want to open two shared folders via html - one way (described by me) is the "pre-mount" via bash script.
The device will think that these folders belongs to your internal harddisk an there will be no problem to open the "shared" folder via html afterwards.

Please tell me if i get you wrong.

C-200 @50'' Panasonic TH-50PX8EA
(BR, 2,5''HDD 500GB, LAN)
A-110 @42'' LG LED-TV
(3,5''HDD 1TB, LAN)
CH3SNAS 1TB+500GB, DNS-323 2x2TB,
ACER WHS H-340 1TB
!! VOTE FOR !! multiple switchable external subtitles (srt)
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to MikeHunter for this post
04-15-2012, 05:34 AM (This post was last modified: 04-18-2012 04:10 AM by mstrong.)
Post: #20
RE: Help with custom Index.htm
I was finally able to give this another try tonight. Sorry I have been away. I have a new born at home and have not had much spare time. Here is where I am.

I am not trying to open two different shares. I am trying to make two buttons in an index.htm file. I will put the index.htm in the root of my share. One button opens the index-YAMJ.htm file in the folder on my share. index-YAMJ.htm was created using YAMJ. The other button opens a folder called staging on my share (these are both on the same share) and allows me to browse all the files in this folder.

I have tried Kdoske and can't get anything to work. I always get "request cannot be processed". Here are the details of my share on the PCH C-200.

Protocol: SAMBA
IP/Host Name: CORUSCANT
Share Folder: Movie Library
Share Name: Movie Library CORUSCANT
User Name: Guest

I don't know if this matters but the CORUSCANT server is a Windows Home Server.
Find all posts by this user
Add Thank You Quote this message in a reply
04-21-2012, 04:08 AM (This post was last modified: 04-21-2012 04:33 AM by mstrong.)
Post: #21
RE: Help with custom Index.htm
OK. I think I finally figured this out. One last question I am hoping someone can help me with so I can finish my index.htm file and post it here.

This is how I can link an icon to the preference page on the C-200:

"file:///opt/sybhttpd/default/preferences.htm"

How do I link to the source screen (the one the system boots to that lets you go from settings, to network, etc?

Is there a list of all the system htm files on the C-200 I can look at?
OK. I figured it out. Thank you for all the help. I now have an index-YAMJ.htm file that YAMJ creates. I also have an index.htm file (code below). The index.thm file has 4 buttons. One goes to the start up wheel. One goes to my index-YAMJ.htm file. One goes to my stagging folder so that I can browse the contents and test iso's. The last goes to the C-200 preference screen.

Code:
<html>
<head>
</head>
<body div background="icons/background.jpg" onloadset="" text="#15609F" link="#CCCCCC" vlink="#CCCCCC" alink="#56A0C7" class="oneColLiqCtr">
<font face= "arial"></font>
</body>
<table width="100%" align="center">
<tr>
<td height="85"></td>
</tr>
</table>
<table width="100%" align="center">
<tr>
<td height="470" valign="bottom" align="center">
<a href="http://localhost.drives:8883/NETWORK_SHARE/Movie Library CORUSCANT/index-YAMJ.htm"  name="icon_movies" id="thumbimage"><img src="icons/icon_movies.png" border="0" alt="" onfocussrc="icons/icon_movies_on.png"/></a>
<td height="470" valign="bottom" align="center">
<a href="http://localhost.drives:8883/NETWORK_SHARE/Movie Library CORUSCANT/Staging"  name="icon_playlist" id="thumbimage"><img src="icons/icon_playlist.png" border="0" alt="" onfocussrc="icons/icon_playlist_on.png"/></a>
</td>
</tr>
</table>
<table width="100%" align="center">
<tr>
<td height="75" valign="bottom" align="left">
<a href="http://127.0.0.1:8883/start.cgi?list" tvid="HOME" id="thumbimage">
                <img src="icons/icon_small_home.png" width="50" height="50" onfocussrc="icons/icon_small_home_on.png"/></a>
<td  valign="bottom" align="right">
<a href="file:///opt/sybhttpd/default/preferences.htm" id="thumbimage">
<img src="icons/icon_small_settings.png" width="50" height="50" onfocussrc="icons/icon_small_settings_on.png"/></a>
</td>
</tr>
</table>
</body>
</html>

Here is the code that worked for each of my buttons.

To the Start Wheel:
href="http://127.0.0.1:8883/start.cgi?list"

To the index-YAMJ.htm file:
href="http://localhost.drives:8883/NETWORK_SHARE/Movie Library CORUSCANT/index-YAMJ.htm"

To the staging folder:
href="http://localhost.drives:8883/NETWORK_SHARE/Movie Library CORUSCANT/Staging"

To the preferences:
href="file:///opt/sybhttpd/default/preferences.htm"
Find all posts by this user
Add Thank You Quote this message in a reply
07-02-2012, 02:41 PM
Post: #22
RE: Help with custom Index.htm
This is great thanks MStrong - do you know how to tie remote buttons to these links is it just
<code>tvid="green"</code>
And so on?

Is there a list of all the remote button call-signs anywhere?

Cheers,

Nik.

-----------------------
PCH A210
Netgear ReadyNAS NV+ 4x1.5TB Raid5
Harman/Kardon Amp
InFocus IN76 projector
2.5m Screen
Find all posts by this user
Add Thank You Quote this message in a reply
07-05-2012, 11:49 AM
Post: #23
RE: Help with custom Index.htm
I don't have the direct link on me, but there's a list of buttons/tvid's in the wiki.

Pannasonic Plasma 50" -->HK254-->Emotiva xpa-5 & upa-2
A100 w/ 500gb HDD, A200 w/ mn100, c200 w/ 2.5" 250gb
Calm 2.1, YAMJ - Redefined 1.8a skin, Music Jukebox 8
WHS ex490 w/ 2.5tb's
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  A-300 index.htm hispanico 2 1,388 09-04-2012 11:15 AM
Last Post: hispanico
  Slick index.htm coming soon jonny555 7 2,624 08-26-2012 10:09 PM
Last Post: jonny555
Brick [Index.html] NMT Index - Kdoske NMT Customizer v0.3.7.exe - Windows Index Creator Kdoske 780 402,040 02-16-2012 07:15 PM
Last Post: ridley
  index.htm modding question PaaDii 4 2,322 01-04-2012 12:42 PM
Last Post: Onraed
  index.htm link to a .name folder HELP PLEASE... Tsurugi_Takuma 0 1,920 12-08-2011 10:12 PM
Last Post: Tsurugi_Takuma
Star [Index.html-HD] Aeon Index HD marcin77 226 119,608 10-31-2011 08:29 PM
Last Post: steve_guitar
  Password Protect Link in index.htm? hakras 2 2,430 08-15-2011 01:58 AM
Last Post: hakras
  [Index.htm] Calm 2.1.1 meowmoo 27 10,981 08-05-2011 07:57 PM
Last Post: P50X20
  Adjustable OSD Transparency on Custom Themes? anthrojohn 1 1,561 07-16-2011 03:00 PM
Last Post: excal
  [Index.htm] Popdex cprobert 40 15,396 07-02-2011 08:34 PM
Last Post: JamesTF

Forum Jump: