[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
01-20-2012, 06:18 AM (This post was last modified: 01-20-2012 06:19 AM by mstrong.)
Post: #1
Help with custom Index.htm
On my popcorn hour C-200 I have my main video library a folder called staging. I put movies that I recently ripped in the staging folder so that I can make sure they are going to play the way I want them too before I add them to my library. The folder structure looks like this.

../MovieLibrary
/Jukebox (sub folder)
/Music (sub folder)
/Photo (sub folder)
/Staging (sub folder)
/Video (sub folder)
/index.htm (file)

I have put the index.htm in the root folder so that it is easier for my family to navigate to the movie library. I would like to make a custom index.htm so that has two buttons. One button that takes you straight to Other_All_1.htm in the jukebox folder and one that takes me to the staging folder and lets me browse the list of files there.

I have gotten this about half working. My new index.htm file launches and allows me to click on both buttons. The button that takes me to Other_All_1.htm works great.

Problem #1: The button that is supposed to take me to staging and let me browse the files doesn't work.

I am getting the feeling that the C-200 only supports some html. I can't get the formating of the screen right.

Problem #2: I can't get it to look right.

Can anyone tell me how to wire up the second button so that it will let me browse the files in staging?
Is there a guide or list (or even examples) that I can use to help me figure out how to make my new index.htm look right?
Find all posts by this user
Add Thank You Quote this message in a reply
01-21-2012, 06:42 AM (This post was last modified: 01-21-2012 06:42 AM by mstrong.)
Post: #2
RE: Help with custom Index.htm
Anyone?

Basically, I need to know how to add a link to my index.htm file that opens a folder instead of a file.

I also need to know how to edit the htm so that I can get the look I want.

Can anyone help?
Find all posts by this user
Add Thank You Quote this message in a reply
01-21-2012, 07:37 AM (This post was last modified: 01-21-2012 07:37 AM by excal.)
Post: #3
RE: Help with custom Index.htm
its been a loooooong time since I tried doing something like your second button. I can't quite remember the commands, but if you dig through some of the other custom index.htm files I think you'll find what you're looking for.

The wiki has a bunch of information as far as formating the html for the popcornhour. There's a bunch of custom dimensions and stuff you'll need to be aware of to make it look right on screen.


btw, i'm moving this to the theme and custom menu section, you're likely to get more specific help there.

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
01-21-2012, 07:56 AM (This post was last modified: 01-21-2012 07:57 AM by mstrong.)
Post: #4
RE: Help with custom Index.htm
(01-21-2012 07:37 AM)excal Wrote:  its been a loooooong time since I tried doing something like your second button. I can't quite remember the commands, but if you dig through some of the other custom index.htm files I think you'll find what you're looking for.

The wiki has a bunch of information as far as formating the html for the popcornhour. There's a bunch of custom dimensions and stuff you'll need to be aware of to make it look right on screen.


btw, i'm moving this to the theme and custom menu section, you're likely to get more specific help there.

Thanks. I will look through the Wiki. Where do I find the custom index.htm files you refer too?
Find all posts by this user
Add Thank You Quote this message in a reply
01-21-2012, 04:02 PM
Post: #5
RE: Help with custom Index.htm
ACtually this old thread describes how to make links to the files...


http://www.networkedmediatank.com/showth...?tid=13624

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
[+] 1 user says Thank You to excal for this post
01-21-2012, 11:07 PM (This post was last modified: 01-21-2012 11:21 PM by mstrong.)
Post: #6
RE: Help with custom Index.htm
I have everything working now except for the button that should open the folder "staging". Here is what I am using. Can anyone help me?

<a href="http://localhost.drives:8883/NETWORK_SHARE/CORUSCANT:Movie Libraray CORUSCANT/" 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>

On the C-200. I have 2 SMB shares.
The first is called "Movie Library CORUSCANT" and maps to the folder "CORUSCANT/Movie Libraray"
The second is called "Movie Staging CORUSCANT" and maps to the folder "CORUSCANT/Movie Libraray/Staging"

I I go to my networks shares on the C-200 and click on these shares they both open the correct folder. Simply want to click in button in my index.htm and have it open the "Movie Staging CORUSCANT" share and let me browse the folder.

Help please. I have spent hours reading and trying differnt things and can't get this to work.
Find all posts by this user
Add Thank You Quote this message in a reply
01-22-2012, 02:30 PM
Post: #7
RE: Help with custom Index.htm
Hello mstrong,

The PCH does NOT allow Multiple Mounted Drives...
There are a Few Special Functions that let You hack the PCH using CSI
to Do Multiple Mounted Drives... But some time this causes issues
when playing back large files ... Or so I am told ...

I do NOT use it so ... Who knows Some people swear by it ...

Good Luck

Michael T.

A100 & C200 Movie Flow, Music Video Flow, Media Menu Flow, Music Flow, Photo Flow
Click Here Media Flow Forum
The Complete Media Flow Suite ...
Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
01-22-2012, 04:06 PM
Post: #8
RE: Help with custom Index.htm
'Michael is right, you can only have one share mounted at a time... where are you keeping the index.htm file?

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
01-22-2012, 07:09 PM (This post was last modified: 01-23-2012 08:32 AM by MikeHunter.)
Post: #9
RE: Help with custom Index.htm
I do not totally agree with that.

What about mounting the shares manual at boot time or by starting over html
There are some threads in this forum how to do this. And this is not done by magic. Wink

After installing csi you should have a file called start_app.sh in your pch share folder
Code:
#!/bin/sh
#

PATH=/share/Apps/Telnetd/bin:/share/bin:/share/Apps/AppInit:$PATH
HOME=/share
export TERM="xterm"
alias mc="mc -c"

#Copy waitimages when they are available
if [ -n "`ls -Al /share/Photo/_waitimages_/*.jpg 2>/dev/null`" ]; then
    cp /share/Photo/_waitimages_/* /bin
fi

#For some NMT hardware (like Popcorn B-110) compatibility may go up when creating a
#symbolic link HARD_DISK to SATA_DISK
if [ ! -d "/opt/sybhttpd/localhost.drives/HARD_DISK" ]; then
    ln -s /opt/sybhttpd/localhost.drives/SATA_DISK /opt/sybhttpd/localhost.drives/HARD_DISK
fi

#cleanup old files
rm -f /share/busybox 2>&1 >/dev/null
rm -f /share/commands.cgi 2>&1 >/dev/null
#M_A_R_K_E_R_do_not_remove_me
/share/Apps/oversight/bin/oversight.sh REBOOTFIX #{oversight} #{oversight}
sh /share/mymount.cgi >/share/logfile.txt

exit 0

where you can startup own cgi
sh /share/mymount.cgi >/share/mountlog.txt

mymount.cgi
(replace the xxx in the ip-adress with the adresses of your pc's, nas or whatever / for windows server you'll need a user 'nmt' and same password on your windows maschine)
Code:
#!/bin/sh

echo "Content-type: text/html";
echo "";
echo "Please be patient when mounting Shares";
echo "<br>";
mymount() {
  mkdir -p "$2"
  /bin/mount -t cifs "$1" "$2" -o username=nmt,password=1234
  ls -a "$2";
  echo "<br>";
};

########################
### Mount of CH3SNAS ###
########################
echo "ch3snas Volumes:";
echo "<br>";
mymount "//192.168.xxx.xxx/Volume_1/Video/ch3snas_v1" "/opt/sybhttpd/localhost.drives/SATA_DISK/Video/ch3snas_v1";
########################
### Mount of DNS-323 ###
########################
echo "DNS-323 Volumes:";
echo "<br>";
mymount "//192.168.xxx.xxx/Volume_1/Video/dns323_v1" "/opt/sybhttpd/localhost.drives/SATA_DISK/Video/dns323_v1";
########################
###  Mount of A-110  ###
########################
echo "A-110 Volumes:";
echo "<br>";
mymount "//192.168.xxx.xxx/share/Music/a110" "/opt/sybhttpd/localhost.drives/SATA_DISK/Music/a110";
echo "<br>";
echo "<br>";
echo "ready!<br>";
echo "Press <A href="http://localhost.drives:8883/SATA_DISK/index.htm"><STRONG>Back to Index</STRONG></A>";

exit 0;

And if needed the mounting can also be done by calling the cgi via html (as long as the c200 supports this)
Code:
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
</HEAD>
<BODY vLink=#000000 aLink=#0000ff link=#000000 bgColor=#ffffff>
<P align=center><BR>
<BR>
<FONT size=6 color=#000000>
Mounting the Share takes some time!!!<BR>
Please be patient for a minute.<BR>
<BR>
Press <A href="http://localhost.drives:8883/SATA_DISK/mymount.cgi"><STRONG>Enter</STRONG></A> to start mounting the shares.<BR>
Press the <STRONG>Home</STRONG> key when finished.<BR>
(some file listing info might appear on the screen)<BR>
<BR>
</FONT>
</BODY>
</HTML>

Ok, windows server need some changes in coding/mounting. Ask if you need further information or search in this forum

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
01-24-2012, 12:20 AM
Post: #10
RE: Help with custom Index.htm
Well yes, as you and Michael have pointed out you CAN have multiple shares mounted.... but with default/stock settings you can only have one.

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
01-24-2012, 04:38 AM (This post was last modified: 01-24-2012 05:07 AM by mstrong.)
Post: #11
RE: Help with custom Index.htm
I only created the second share because it was something I had not tried yet. If I don't need it I am happy to get rid of it.

Here is what I am trying to do.

I have a home server named CORUSCANT.
The home server has a shared folder called "Movie Library".
The shared folder maps to a folder on CORUSCANT located at d:/data/share/Movie Library
My Movie Library has the following folder structure.
d:/data/Movie Library
/(sub folder) Jukebox
/(sub folder) Music
/(sub folder) Photo
/(sub folder) Staging
/(sub folder) Video
/(file) index.htm

I have mapped the above shared folder (Movie Library) on the C-200 to a share called "Movie Library CORUSCANT".
The share is Samba.

When the C-200 boots it dipslays the index.htm file.
Inside this index.htm file I have two buttons.
One button opens the Other_All_1.html file found in the Jukebox folder. This allows me to browse my index and watch movies already in my jukebox.
The second button is supposed to navigate to the folder "Staging" and let the user browse all the files and sub folders in that directory.

The second button does not work. Can someone please tell me the syntax to use for the second button so that it will take me from the index.htm file to the "Statging" folder and allow me to brose the folder?

I know many of you have tried to help and I have tried the suggestions I understand and many other things I have thought of on my own, but I can't get the second button to work.
Find all posts by this user
Add Thank You Quote this message in a reply
01-24-2012, 09:37 AM
Post: #12
RE: Help with custom Index.htm
Please post your two html files in code-tags
( [ code] [/ code] without spaces in brackets )

Would help me to understand. thx

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
01-25-2012, 07:33 AM
Post: #13
RE: Help with custom Index.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/NETWORK_SHARE/Movie Staging CORUSCANT" 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>
Find all posts by this user
Add Thank You Quote this message in a reply
02-02-2012, 09:08 AM
Post: #14
RE: Help with custom Index.htm
MikeHunter,

Any Ideas?

Thanks!
Find all posts by this user
Add Thank You Quote this message in a reply
02-03-2012, 09:38 AM (This post was last modified: 02-04-2012 11:07 AM by MikeHunter.)
Post: #15
RE: Help with custom Index.htm
Sorry, for being so rare last week(s).
I just playing around with my whs (hope yours also a windows maschine) to puzzle some html together for you.

til now i think there will be no way round the mounting by hand (html/cgi), but still searching ...
Give me the weekend to get some new information about it.

reminder for me
Code:
#!/bin/sh
#functions
mywhsmount() {
  mkdir -p "$2"
  /bin/mount -t cifs "$1" "$2" -o username=windows_account,password=windows_account_pass
  ls -a "$2";
};
########################
### Mount of WHS2003 ###
########################
mywhsmount "//192.168.100.101/Videos" "/opt/sybhttpd/localhost.drives/SATA_DISK/testmnt/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>

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
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  A-300 index.htm hispanico 2 1,384 09-04-2012 11:15 AM
Last Post: hispanico
  Slick index.htm coming soon jonny555 7 2,621 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 401,864 02-16-2012 07:15 PM
Last Post: ridley
  index.htm modding question PaaDii 4 2,317 01-04-2012 12:42 PM
Last Post: Onraed
  index.htm link to a .name folder HELP PLEASE... Tsurugi_Takuma 0 1,918 12-08-2011 10:12 PM
Last Post: Tsurugi_Takuma
Star [Index.html-HD] Aeon Index HD marcin77 226 119,583 10-31-2011 08:29 PM
Last Post: steve_guitar
  Password Protect Link in index.htm? hakras 2 2,425 08-15-2011 01:58 AM
Last Post: hakras
  [Index.htm] Calm 2.1.1 meowmoo 27 10,975 08-05-2011 07:57 PM
Last Post: P50X20
  Adjustable OSD Transparency on Custom Themes? anthrojohn 1 1,560 07-16-2011 03:00 PM
Last Post: excal
  [Index.htm] Popdex cprobert 40 15,386 07-02-2011 08:34 PM
Last Post: JamesTF

Forum Jump: