It is currently Thu Apr 18, 2024 4:17 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 1:05 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7650
I still don't see the connection with Coollector :wacko:


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 1:13 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
(cool) Hector wrote:
I still don't see the connection with Coollector :wacko:


The idea was to use the exported data files from coollector as the data source for the web app. :whistle:


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 1:35 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7650
kakashi wrote:
The idea was to use the exported data files from coollector as the data source for the web app. :whistle:

That's what I thought, but I fail to see how it's worth all your hard work. Isn't it easier to just use Coollector ? Or XBMC ? Why do you need a web interface ? Are you trying to access your files from the internet when you're not home ? Or to give access to your friends ?


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 2:13 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
(cool) Hector wrote:
Or XBMC ?

I use XBMC sometimes.

(cool) Hector wrote:
That's what I thought, but I fail to see how it's worth all your hard work.

Not that much work...

(cool) Hector wrote:
Are you trying to access your files from the internet when you're not home ? Or to give access to your friends ?

My home network has quite a few pc's operating on it.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 2:27 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7650
kakashi wrote:
My home network has quite a few pc's operating on it.

Well, all your PCs could have Coollector installed, and your coollection file could be shared on the network.

Anyway, I will improve the export feature soon, and you'll do whatever you want with it ;)


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Mon Nov 12, 2012 3:26 am 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
Sorry but i cant leave without first defending JSON.

w3schools wrote:

When Coollector generates a json file it in essence declares a javascript array containing all the relevant information. All that is really necessary to display the information is to simply assign the values in the array to a HTML object ( in this case <div id="movies"></div> ).
Code:
document.getElementById('list_desc').innerText=listdesc + ':';
   
for(i=0 ; i<moviecount ; i++)
   document.getElementById('movies').innerHTML+=
      '<div class="movie"><p class="title">' + movies[i].title +
      '</p><img class="poster" src="' + imagefolder + movies[i].imglocation + '"></div>';   
            


The 2 lines of code above (3 if you count the for loop separately) will create all the necessary HTML objects and fill them with the relevant information.

Attachment:
Capture.PNG
Capture.PNG [ 829.62 KiB | Viewed 5952 times ]


The resulting HTML template is only 1.5kb in size and already contains styling information and the four required lines of JavaScript.
Attachment:
Coollector Web List.zip [1.39 MiB]
Downloaded 283 times


Last edited by kakashi on Mon Nov 12, 2012 1:11 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Mon Nov 12, 2012 10:57 am 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7650
kakashi wrote:
When Coollector generates a json file

When ? Never :P

Sorry, I'm not convinced :beee:


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Mon Nov 12, 2012 12:25 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
:shock:


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Mon Nov 12, 2012 12:27 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7650
kakashi wrote:
:shock:

Don't even try, my heart is a rock.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Mon Nov 12, 2012 4:23 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
(cool) Hector wrote:
it's possible to have a combo box to change the style at any moment. It 'll just change the XSLT that is used.

Can be done with JSON too. It's actually pretty easy...

Attachment:
Capture.JPG
Capture.JPG [ 126.44 KiB | Viewed 5936 times ]


Plus there's all the 'little' things that are easily done with the values in a JavaScript array. e.g. changing title color to yellow if the movie is owned etc.

Attachment:
Coollector Web List.zip [1.39 MiB]
Downloaded 267 times


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Mon Nov 12, 2012 5:01 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7650
Ok, ok, ok.

The future export feature will handle XML and json.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Mon Nov 12, 2012 11:47 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
:yahoo: :yahoo: :yahoo:

the defense rests. :whistle:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2024 phpBB Group