|
|
Welcome to the Invelos forums. Please read the forum
rules before posting.
Read access to our public forums is open to everyone. To post messages, a free
registration is required.
If you have an Invelos account, sign in to post.
|
|
|
|
Invelos Forums->DVD Profiler: Layouts and Reports |
Page:
1 2 3 ...16 Previous Next
|
HTML Window - Galleries |
|
|
|
Author |
Message |
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | I got playing around with SH84's version of the Episode guide window... and made up one for galleries... but did come up with a bit of a problem that maybe someone here can help me with... First off... here is the index view (of course you can make your HTML as fancy as you like)... And here is when you click on one of the thumbnails... As you see it opens the image in the same window and I have a link under the pic to make it go back to the index. Now... I only know very limited basic html... this way I need an html file for every image... what I would like to do is have 1 html for each profile... and when I click on the thumbnail... get the full sized image as a pop-up. Can anyone help me with that? Oh... and here is the code for the Image Gallery html window Quote: <HTML> <HEAD> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //-->
function showgallery() { var epg = ("C:/gallery/<DP NAME="TITLE">/gallery-" + DP_UPC + ".html"); var notes = DP_Notes.indexOf("gallery=1"); if (notes != -1) { window.location.href= epg ; } else { document.write("No Gallery Available!"); } } </SCRIPT> </HEAD> <BODY onload="showgallery()"> </BODY> </HTML> With this setup you name your html files gallery-upc.html and in your not section you put <gallery=1> the brackets makes the input into notes invisible asa long as you have html for note checked in options. | | | Pete |
| Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | OK - I did something similar on my webpage, so maybe it can be adapted to suit your needs. I'll try anyway! First of all, this is how I set up the hyperlinks to the full image: <a href="image.htm?URL=London 014"> <img border="0" src="images/London%20014_small.jpg" width="74" height="100"></a> the URL bit refers to the name of the image you want to open, obviously the SRC refers to the thumbnail image. Now on the new page, image.htm, I had this coding: <html> <head> <script Language="JavaScript"> // // QueryString // function QueryString(key) { var value = null; for (var i=0;i<QueryString.keys.length;i++) { if (QueryString.keys[i]==key) { value = QueryString.values[i]; while (value.indexOf('+') > -1){ value = value.substring(0,value.indexOf('+')) + ' ' + value.substring(value.indexOf('+') + 1); } break; } } return value; } QueryString.keys = new Array(); QueryString.values = new Array(); function QueryString_Parse() { var query = window.location.search.substring(1); var pairs = query.split("&"); for (var i=0;i<pairs.length;i++) { var pos = pairs[i].indexOf('='); if (pos >= 0) { var argname = pairs[i].substring(0,pos); var value = pairs[i].substring(pos+1); QueryString.keys[QueryString.keys.length] = argname; QueryString.values[QueryString.values.length] = value; } } } QueryString_Parse(); </script> <link rel="stylesheet" type="text/css" href="style/style.css"> </head> <body> <script language="JavaScript"> </script> <a href=" history.back()"> <script> document.write("<img border='0' src='images/"+QueryString("URL")+".jpg'>") </script></a> <p> <a class="menu" href=" history.back()">Back</a></td> </body> </html> This script takes the URL from the hyperlink and creates QueryString("URL") which is combined together with "images/" and ".jpg" to create the full image info. Hope you can get it to work! |
| Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | Hell, all the tabs vanished - I hope that won't stop it working! |
| Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Thanks for trying northernbloke... but couldn't get it to work... but an idea occured to me... MarkEJHarrison postsed a popup script for episode guides on the old intervocative forums... I found that and was able to make it all work... and no longer need more then 1 html file per prifle... For example here is my html file for Thir13en Ghosts... Quote: <head> <script language=JavaScript> <!-- function openWindow(Link) { width = 750; height = 600;
popupWin = window.open(Link, 'EpGuide', 'scrollbars,resizable,dependent,status,width=' + width + ',height=' + height); popupWin.focus();
return false; } //--> </script>
</head> <body bgcolor="black"> <center> <font size="2" color="#000000" face="Arial"> <div><table width="70%" bgcolor="black" border="0" cellpadding="2" cellspacing="2"> <th colspan=4><center><font color="red"><h1>Thir13en Ghosts</h1></font></theader> <tr valign="top"> <td> <center><a href="#" onClick="return openWindow('00.jpg');"><img src="tn_00.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('01.jpg');"><img src="tn_01.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('02.jpg');"><img src="tn_02.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('03.jpg');"><img src="tn_03.jpg"></a></center> </td> </tr> <tr valign="top"> <td> <center><a href="#" onClick="return openWindow('04.jpg');"><img src="tn_04.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('05.jpg');"><img src="tn_05.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('06.jpg');"><img src="tn_06.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('07.jpg');"><img src="tn_07.jpg"></a></center> </td> </tr> <tr valign="top"> <td> <center><a href="#" onClick="return openWindow('08.jpg');"><img src="tn_08.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('09.jpg');"><img src="tn_09.jpg"></a></center> </td> <td> <center><a href="#" onClick="return openWindow('10.jpg');"><img src="tn_10.jpg"></a></center> </td> <td> </td> </tr> </table> </div> </font> </center> </body> </html> So... now when I click on an image it opens in it's own pop-up without the need of a new window or anything... like this... So looks like I have it all working now... only thing I wouldn't mind changing is the pop-up window size to size itself depending on the size of the image and it would be perfect for my needs! | | | Pete |
| Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | Yeah, I've been trying to get it to work too, but no luck. I may be wrong, but it seems that once you load in a new webpage into the HTML window (as you do with the onload command) you lose the ability to use HEADER_VARS, so unfortunately my code, which depends on being able to use DP_TITLE won't work. Glad you found an alternative though |
| Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | PS In order to customize the width and height, do two things:
replace:
function openWindow(Link) { width = 750; height = 600;
with:
function openWindow(Link, width, height) {
and in the links, instead of:
onClick="return openWindow('00.jpg');"
put:
onClick="return openWindow('00.jpg', 750, 600);"
etc. Obviously, you replace the 750 and 600 with whatever you need it to be. Just tried it and it works fine! |
| Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Thanks... works great!.. just now have to play around with it to get all the images right! | | | Pete |
| Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | Here is my version of your idea, Addeicted2DVD, I hope you don't mind It uses the notes field, searches for <gallery=#>, where '#' is the number of images for that profile. It rearrange the images depending on the available size. It uses a popup window like your script, but it is resized according to the image size It uses the same popup window between clicks, but the focus method doesn't go all the way (the user must click IEs toolbar button ). But , I didn't use the same storage location approach as you did, so my script needs the last folder in the hierarchy to be unformatted UPC number. See here. Anyway, I hope you all give it a go... so, here is the code: Quote: Code on page 5 in this thread.
He, he, it was AGES ago it was on that page... it's over here now / x | | | Last edited: by xyrano |
| Registered: March 13, 2007 | Posts: 4,506 |
| Posted: | | | | I realy like this... But i'm not good with HTML. Is there a way that this feature can be downloaded as a plug-in exe file ? | | | Registered: July 7 2000 |
| Registered: March 13, 2007 | Reputation: | Posts: 3,321 |
| Posted: | | | | Quoting Addicted2DVD: Quote: Thanks for trying northernbloke... but couldn't get it to work... but an idea occured to me... MarkEJHarrison postsed a popup script for episode guides on the old intervocative forums... I found that and was able to make it all work... and no longer need more then 1 html file per prifle... Cool! Glad to see you were able to adapt my old code and find new life for it. If you need any more help with it, let me know. | | | Get the CSVExport and Database Query plug-ins here. Create fake parent profiles to organize your collection. |
| Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | Quoting Zwollenaar: Quote: I realy like this... But i'm not good with HTML. Is there a way that this feature can be downloaded as a plug-in exe file ? You don't need to be good with HTML. Just do this: VIEW -> HTML Windows -> Edit... Then right-click the left pane and choose New... Name it whatever you wish (Gallery sounds nice ) Then come here, and select the whole thing in the quote in Xyrano's post and press CTRL-C on your keyboard. Go back to Profiler, click inside the right pane (where you see the minimalist HTML code automatically generated) and type CTRL-A and the CTRL-V. Voila! Just click OK to close this window, and from the main DVD Profiler window, go to VIEW -> HTML Windows and you should see your new window listed there. Click it, and it'll appear. |
| Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | Xyrano:
I think I've found two problems.
First, it seems that if the UPC starts with a 0, that 0 gets truncated in the path to the image. For instance, Star Wars: Episode 1..
The UPC is 024543023876, but, it's looking for the picture in "[...]/DVD%20Profiler/Databases/Default/images/gallery/24543023876/00.jpg"
Second, I don't know why, but in my Star Wars Trilogy boxset (the original one), I don't get the message "No Gallery Available!", I just get the header "Star Wars Trilogy, Image Gallery" with nothing. Doesn't change a thing wether I put the <gallery=#> or not. | | | Last edited: by RossRoy |
| Registered: March 13, 2007 | Reputation: | Posts: 3,436 |
| Posted: | | | | Quoting RossRoy: Quote: First, it seems that if the UPC starts with a 0, that 0 gets truncated in the path to the image. For instance, Star Wars: Episode 1..
The UPC is 024543023876, but, it's looking for the picture in "[...]/DVD%20Profiler/Databases/Default/images/gallery/24543023876/00.jpg" Oh, thanks for that, Ross... I was just going crazy here, as my test profile also starts with a zero... but upon closer looking, it seems to be worse than that. If there is a 0 in the middle somewhere, the path gets cut off after that I am wondering iof this could be done without mentioning the number of images in the Notes field. I remember reading a while back, that the images can be preloaded into an array, and while doing so you can check if the array field has a size. If it doesn't, you stop loading and start displaying. ...or something like that. (I forgot where I read that ) EDIT: Weird, for profiles by Disc-ID it doesn't show the "No Gallery available" message | | | Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan. Registered: May 29, 2000 (at InterVocative) | | | Last edited: by nuoyaxin |
| Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Quoting xyrano: Quote: Here is my version of your idea, Addeicted2DVD, I hope you don't mind
It uses the notes field, searches for <gallery=#>, where '#' is the number of images for that profile. It rearrange the images depending on the available size.
It uses a popup window like your script, but it is resized according to the image size It uses the same popup window between clicks, but the focus method doesn't go all the way (the user must click IEs toolbar button ).
But , I didn't use the same storage location approach as you did, so my script needs the last folder in the hierarchy to be unformatted UPC number. See here.
Anyway, I hope you all give it a go... so, here is the code:
Quote: <HTML> <HEAD> <style type="text/css"> * { color: white; font-family: verdana; font-size: 10pt; } html, body { margin: 5pt; background-color: rgb(0, 0, 83); } .title { font-size: 12pt; font-weight: bold; margin-top: 15pt; margin-bottom: 15pt; width: 100%; text-align: center; } .images { padding: 5pt; } img { margin: 5pt; width: 100; cursor: hand; } </style> <script type="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </script> </HEAD> <BODY> <div class="title"><DP NAME="TITLE" ShowDesc="YES">,<br />Image Gallery</div> <div class="images"> <script type="text/javascript"> <!-- /* ######## Gallery Viewer ######## @title - Gallery Viewer @filename - GalleryViewer_1.0.html @version - 1.0 @date - 2007-05-18 @author - xyrano @dependencies - DVD Profiler v3+, IE. */ var gsl = "E:\\DVD Profiler\\Gallery\\" + DP_UPC; var int = DP_Notes.indexOf("<gallery=");
if (int != -1) { var ims = DP_Notes.substring(int, DP_Notes.indexOf(">", int)); ims = ims.replace("<gallery=","");
for (var i = 0; i < ims; i++) { var img = (i <= 9) ? '0' + i: i; var imp = gsl + "\\" + img + ".jpg"; document.write('<img src="' + imp + '" onClick="newWindow(\'' + img + '\');return false;">'); } } else { document.write("No Gallery Available!"); }
function newWindow(img) { var imp = gsl + "\\" + img + ".jpg"; var doc = '<html><body style="margin:0;padding:0;"><img src="' + imp + '"></body></html>'; var win = window.open("", 'Gallery', 'scrollbars=no, resizable, dependent, status=no'); win.document.write(doc); win.document.close(); var imw = win.document.images[0].width; var imh = win.document.images[0].height; win.resizeTo(imw + 12, imh + 38); win.focus(); }
//--> </script> </div> </BODY> </HTML>
/ xyrano Awesome xyrano.... I throw it out there and you improve it!.... seems like a good arrangement to me! let me go see if I can get this to work now. | | | Pete |
| Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | Quoting RossRoy: Quote: Xyrano:
I think I've found two problems.
First, it seems that if the UPC starts with a 0, that 0 gets truncated in the path to the image. For instance, Star Wars: Episode 1..
The UPC is 024543023876, but, it's looking for the picture in "[...]/DVD%20Profiler/Databases/Default/images/gallery/24543023876/00.jpg"
Second, I don't know why, but in my Star Wars Trilogy boxset (the original one), I don't get the message "No Gallery Available!", I just get the header "Star Wars Trilogy, Image Gallery" with nothing. Doesn't change a thing wether I put the <gallery=#> or not. Thanks for testing it. I don't know why it gets truncated if it starts with 0. Maybe the DP_UPC variable is better!? Change to that one instead. I should have used DP_UPC from the beginning (script updated). Maybe that clears the Star Wars Trilogy problem too |
| Registered: March 13, 2007 | Reputation: | Posts: 3,436 |
| Posted: | | | | Quoting xyrano: Quote:
Thanks for testing it. I don't know why it gets truncated if it starts with 0. Maybe the DP_UPC variable is better!? Change to that one instead. I should have used DP_UPC from the beginning (script updated). Maybe that clears the Star Wars Trilogy problem too You're fast!!! Was just going to [post myself, that DP_UPC works... (I just looked up how it was done for the EPGs....) Great job, xyrano! Thank you very much for this! ...and of course to you too, Pete, as you got the ball rolling. | | | Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan. Registered: May 29, 2000 (at InterVocative) |
|
|
Invelos Forums->DVD Profiler: Layouts and Reports |
Page:
1 2 3 ...16 Previous Next
|
|
|
|
|
|
|
|
|