CarpeDiem
26-07-2006 23:27:12
sox
27-07-2006 12:13:23
CarpeDiem
27-07-2006 18:49:14
Amish
28-07-2006 19:18:56
Gobble
30-08-2006 01:41:35
Amish
30-08-2006 17:52:00
siit
30-08-2006 18:43:03
CarpeDiem
02-11-2006 19:12:41
airjrdn
17-06-2007 15:11:09
DDS
20-06-2007 12:20:32
ymerc
20-06-2007 14:52:28
B-22
30-06-2007 00:59:02
ymerc
03-07-2007 15:19:51
B-22
03-07-2007 21:57:35
ymerc
04-07-2007 02:56:56
B-22
04-07-2007 10:28:22
ymerc
04-07-2007 13:19:36
ymerc
06-07-2007 19:47:34
B-22
07-07-2007 23:36:47
ymerc
08-07-2007 15:19:53
ymerc
10-07-2007 14:30:52
ymerc
11-07-2007 00:52:35
MockY
12-07-2007 21:25:13
Amish
15-07-2007 13:30:42
ymerc
15-07-2007 14:35:58
Amish
15-07-2007 15:33:24
Amish
15-07-2007 15:44:16
ymerc
15-07-2007 16:58:16
B-22
15-07-2007 22:49:22
ymerc
16-07-2007 15:21:37
jackslade
26-07-2007 02:43:24
ymerc
26-07-2007 14:36:42
jackslade
26-07-2007 18:23:02
Haven't had much time recently to play with it, but out of curiousity what are the vibe functions you're talking about?[/quote2y4ue11x]
Well just looking at the docs without any coding, it looks like we could use
array<Directory> get_directories(string virtualPath)
array<File> get_files(string virtualPath)
I don't have that much time either, but I might have something by early next week. Sounds like in another post that a new version will have search built in, so I don't know how much effort it is worth to put into this.
jackslade
27-07-2007 06:33:41
ymerc
27-07-2007 13:20:26
jackslade
27-07-2007 17:48:33
ymerc
27-07-2007 19:28:41
jackslade
27-07-2007 20:48:06
ymerc
27-07-2007 21:02:09
In order to use this, I modified the left.html to include a new tab, Search, that includes an entry and button.[/quote12wvl4cl]
THIEF!
Just Kidding... it was hardly a copyrighted idea.![]()
Good work on that. It is pretty slow but it works!
Maybe someday I'll figure out why this blasted thing doesn't work and I can post a fast one!
jackslade
27-07-2007 22:39:36
Good work on that. It is pretty slow but it works![/quotenjihztxj]
Thanks, I think the main reason it is slow is because of the actual find part. I had to create a brute force find since the str_findfirst doesn't work on a more than one character.
Oh well, hopefully the next version will improve these functions or have its own search.
sgmorton
31-07-2007 19:17:19
ymerc
01-08-2007 20:32:35
jackslade
02-08-2007 19:16:21
Although that does bring up the idea of trying to combine the two approaches.... i.e. get the files and directories from vibescript, and store them in a javascript array to be searched with Regex.....[/quote1usdd9be]
Funny, I thought of the same thing and actually tried it out. Seemed faster, but it still takes time to output all the files into an array.
I actually created a .Net console application that will index all the files indexed by vibestreamer and create a javascript array. Then take the regex for javascript and search the array. It is pretty fast, but I have to run my indexer whenever I update vibestreamers index.
ymerc
03-08-2007 14:14:44
jackslade
03-08-2007 21:58:10
ymerc
08-08-2007 00:06:20
jackslade
08-08-2007 06:13:33
ymerc
08-08-2007 14:36:05
kris333
09-08-2007 07:21:04
dudek
09-08-2007 11:07:52
mysticc
09-08-2007 13:36:50
bs88243
09-08-2007 15:23:40
ymerc
09-08-2007 17:15:53
jackslade
09-08-2007 18:34:41
However, it would be cool, if the search-function was able to search through both filenames AND ID3 tags. Is that possible?[/quote3g2lacvi]
I was thinking of adding that next. The indexer could read the id3 tags as well and I could modify the search to have some options on what to search.
That way you could search against album, year, or song title entries.
Let me look into it.
B-22
09-08-2007 20:07:15
B-22
10-08-2007 02:36:36
maelue
11-08-2007 20:07:18
B-22
12-08-2007 15:06:53
maelue
13-08-2007 09:32:09
jackslade
13-08-2007 20:51:14
maelue
14-08-2007 16:52:45
B-22
14-08-2007 19:50:35
mysticc
16-08-2007 17:57:57
jackslade
16-08-2007 21:01:41
mysticc
16-08-2007 23:04:15
mysticc
17-08-2007 00:02:15
jackslade
17-08-2007 00:25:33
mysticc
17-08-2007 00:48:34
jackslade
17-08-2007 00:49:56
mysticc
17-08-2007 01:02:21
mysticc
17-08-2007 16:45:34
jackslade
17-08-2007 18:24:26
mysticc
17-08-2007 22:18:19
jackslade
17-08-2007 23:15:20
mysticc
17-08-2007 23:31:43
geforcer
18-08-2007 00:13:17
B-22
18-08-2007 17:33:55
geforcer
18-08-2007 18:15:32
B-22
18-08-2007 19:26:33
jackslade
18-08-2007 19:29:30
omegatotal
26-08-2007 04:54:24
nemesispapi
14-11-2007 22:42:09
nemesispapi
14-11-2007 22:49:13
nemesispapi
14-11-2007 23:06:52
Potatoking
23-01-2008 15:50:47
nitramf
06-02-2008 14:34:48
Potatoking
08-02-2008 13:25:09
juinz
25-02-2008 20:33:33
aron
31-03-2008 12:53:19
ifloydian
26-04-2008 01:07:59
Steen
18-06-2008 20:01:23
mkormendy
05-08-2008 06:51:29
B-22
19-05-2009 00:54:43
Well after looking at the work done by ymerc, I conclude that even though his code works locally, it won't work remotely or intergrated with the actual player. My reason behind this is that the xml files are stored outside of the web directory and thus can not be accessed by javascript.
[/quoteuwe3o87o]
wel after the script that ymerc sent
![]()
<html>
<head>
<script language="javascript" type="text/javascript">
var xmlDoc;
var streamServerDoc;
window.onload = loadIndex;
function loadIndex() { // load share.xml
// most current browsers support document.implementation
if (document.implementation && document.implementation.createDocument) {
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.load("share.xml");
}
// MSIE uses ActiveX
else if (window.ActiveXObject) {
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load("share.xml");
}
}
function searchIndex() { // search the index (duh!)
if (!xmlDoc) {
loadIndex();
}
// get the search term from a form field with id 'searchme'
var searchterm = document.getElementById("searchme").value;
var allitems = xmlDoc.getElementsByTagName("File");
results = new Array;
if (searchterm.length < 3) {
alert("Enter at least three characters");
} else {
for (var i=0;i<allitems.length;i++) {
// see if the XML entry matches the search term,
// and (if so) store it in an array
var name = allitems.getAttribute("Name");
var exp = new RegExp(searchterm,"i");
if ( name.match(exp) != null) {
results.push(allitems);
}
}
// send the results to another function that displays them to the user
showResults(results, searchterm);
}
}
// The following is just an example of how you
// could handle the search results
function showResults(results, searchterm) {
if (results.length > 0) {
// if there are any results, put them in a list inside the "resultshere" div
var resultshere = document.getElementById("resultshere");
var local = document.getElementById("local");
var header = document.createElement("h5");
var list = document.createElement("ul");
var searchedfor = document.createTextNode("You've searched for "+searchterm);
resultshere.appendChild(header);
header.appendChild(searchedfor);
resultshere.appendChild(list);
for (var i=0;i<results.length;i++) {
var listitem = document.createElement("li");
var alink = document.createElement("a");
var item = document.createTextNode(results.attributes.getNamedItem("Name").value);
if (local.checked) {
//Absolute Path
alink.setAttribute('href', recurseParentForPath(results,"") + results.attributes.getNamedItem("Name").value);
}
else {
//Virtual Path
alink.setAttribute('href', "virtual/" + recurseParentForVirt(results,"") + results.attributes.getNamedItem("Name").value);
}
list.appendChild(listitem);
//listitem.appendChild(item);
listitem.appendChild(alink);
alink.appendChild(item);
}
} else {
// else tell the user no matches were found
var resultshere = document.getElementById("resultshere");
var para = document.createElement("p");
var notfound = document.createTextNode("Sorry, I couldn't find anything like "+searchterm +"!");
resultshere.appendChild(para);
para.appendChild(notfound);
}
}
function loadStreamServerDoc() { // load StreamServer.xml
// most current browsers support document.implementation
if (document.implementation && document.implementation.createDocument) {
streamServerDoc = document.implementation.createDocument("", "", null);
streamServerDoc.load("streamserver.xml");
}
// MSIE uses ActiveX
else if (window.ActiveXObject) {
streamServerDoc=new ActiveXObject("Microsoft.XMLDOM");
streamServerDoc.async=false;
streamServerDoc.load("streamserver.xml");
}
}
// Recursively get the absolute path to the file
function recurseParentForPath(node,path) {
if (node.parentNode.baseName== "StreamDirectory") {
path = (Path(node.parentNode.getAttribute("GUID")) + String.fromCharCode(92) + path);
}
else {
if (node.parentNode.baseName== "Directory") {
path = node.parentNode.getAttribute("Name") + String.fromCharCode(92) + path;
path = recurseParentForPath(node.parentNode,path);
}
}
return path;
}
// A function to return the stream directory path for a GUID
function Path(guid) {
if (!streamServerDoc) {
loadStreamServerDoc();
}
var dirs = streamServerDoc.getElementsByTagName("StreamDirectory");
results = new Array;
for (var i=0;i<dirs.length;i++) {
var searchGuid = dirs.getAttribute("GUID");
if ( searchGuid == guid ) {
return (dirs.getAttribute("Path"));
break;
}
}
}
// Recursively get the Virtual Directory
function recurseParentForVirt(node,path) {
if (node.parentNode.baseName== "StreamDirectory") {
path = (VirtualDir(node.parentNode.getAttribute("GUID")) + String.fromCharCode(47) + path);
}
else {
if (node.parentNode.baseName== "Directory") {
path = node.parentNode.getAttribute("Name") + String.fromCharCode(47) + path;
path = recurseParentForVirt(node.parentNode,path);
}
}
return path;
}
// A function to return the virtual name for a GUID
function VirtualDir(guid) {
if (!streamServerDoc) {
loadStreamServerDoc();
}
var dirs = streamServerDoc.getElementsByTagName("StreamDirectory");
results = new Array;
for (var i=0;i<dirs.length;i++) {
var searchGuid = dirs.getAttribute("GUID");
if ( searchGuid == guid ) {
return (dirs.getAttribute("VirtualName"));
break;
}
}
}
</script>
</head>
<body>
<form action="" >
<input type="text" id="searchme" />
<input type="submit" onclick="searchIndex(); return false;" />
<input type="checkbox" id="local" />Local
</form>
<div id="resultshere">
</div>
</body>
</html>
it can be remotely accessing just as he said That code does not run in the actual vibestreamer, it is just a standalone html that goes in your vibestreamer directory (where the xml files are located).
explaind vibe streamer settings /mime types add xml [application/xml] and xml [text/xml] put them both in shared and webserver file types
copy the streamserver.xml and the share.xml in the standard map ,now open the share.xml and put this tag in it <?xml version="1.0" encoding="ISO-8859-1"?> works for me with signs like ˆ‘öº&
and make a link in your vibestreamer and name it search.html ..whatever
only 1 bug its not transcoding anything its full stream and when your users have winamp they can download your mp3 to![]()
SO ... i terminated the link
i wish there was Someone that makes the results link that giving by request from this script by clicking on it , that it goes in the actual vibeplayer because this searchfunction is very fast even with my 8 mb share.xml ...so any help will do[urluwe3o87o]http://www.vibestreamer.com/forum/viewtopic.php?t=101&postdays=0&postorder=asc&start=15[/urluwe3o87o]
Kajoe
26-06-2009 23:33:10
Hey can anyone tell me how to add a search engine to the skin of the program i love the program but i really want to have people be able to search my site for music i was thinking of putting it next to playlists on the left any ideas?[/quote2v9ax8w3]
look for it
http//www.somethinginteractive.com/ind ... be-server/
B-22
08-07-2009 11:05:30
B-22
14-07-2009 00:40:04
Well after looking at the work done by ymerc, I conclude that even though his code works locally, it won't work remotely or intergrated with the actual player. My reason behind this is that the xml files are stored outside of the web directory and thus can not be accessed by javascript.
[/quote3ug38054]
wel after the script that ymerc sent
![]()
<html>
<head>
<script language="javascript" type="text/javascript">
var xmlDoc;
var streamServerDoc;
window.onload = loadIndex;
function loadIndex() { // load share.xml
// most current browsers support document.implementation
if (document.implementation && document.implementation.createDocument) {
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.load("share.xml");
}
// MSIE uses ActiveX
else if (window.ActiveXObject) {
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load("share.xml");
}
}
function searchIndex() { // search the index (duh!)
if (!xmlDoc) {
loadIndex();
}
// get the search term from a form field with id 'searchme'
var searchterm = document.getElementById("searchme").value;
var allitems = xmlDoc.getElementsByTagName("File");
results = new Array;
if (searchterm.length < 3) {
alert("Enter at least three characters");
} else {
for (var i=0;i<allitems.length;i++) {
// see if the XML entry matches the search term,
// and (if so) store it in an array
var name = allitems.getAttribute("Name");
var exp = new RegExp(searchterm,"i");
if ( name.match(exp) != null) {
results.push(allitems);
}
}
// send the results to another function that displays them to the user
showResults(results, searchterm);
}
}
// The following is just an example of how you
// could handle the search results
function showResults(results, searchterm) {
if (results.length > 0) {
// if there are any results, put them in a list inside the "resultshere" div
var resultshere = document.getElementById("resultshere");
var local = document.getElementById("local");
var header = document.createElement("h5");
var list = document.createElement("ul");
var searchedfor = document.createTextNode("You've searched for "+searchterm);
resultshere.appendChild(header);
header.appendChild(searchedfor);
resultshere.appendChild(list);
for (var i=0;i<results.length;i++) {
var listitem = document.createElement("li");
var alink = document.createElement("a");
var item = document.createTextNode(results.attributes.getNamedItem("Name").value);
if (local.checked) {
//Absolute Path
alink.setAttribute('href', recurseParentForPath(results,"") + results.attributes.getNamedItem("Name").value);
}
else {
//Virtual Path
alink.setAttribute('href', "virtual/" + recurseParentForVirt(results,"") + results.attributes.getNamedItem("Name").value);
}
list.appendChild(listitem);
//listitem.appendChild(item);
listitem.appendChild(alink);
alink.appendChild(item);
}
} else {
// else tell the user no matches were found
var resultshere = document.getElementById("resultshere");
var para = document.createElement("p");
var notfound = document.createTextNode("Sorry, I couldn't find anything like "+searchterm +"!");
resultshere.appendChild(para);
para.appendChild(notfound);
}
}
function loadStreamServerDoc() { // load StreamServer.xml
// most current browsers support document.implementation
if (document.implementation && document.implementation.createDocument) {
streamServerDoc = document.implementation.createDocument("", "", null);
streamServerDoc.load("streamserver.xml");
}
// MSIE uses ActiveX
else if (window.ActiveXObject) {
streamServerDoc=new ActiveXObject("Microsoft.XMLDOM");
streamServerDoc.async=false;
streamServerDoc.load("streamserver.xml");
}
}
// Recursively get the absolute path to the file
function recurseParentForPath(node,path) {
if (node.parentNode.baseName== "StreamDirectory") {
path = (Path(node.parentNode.getAttribute("GUID")) + String.fromCharCode(92) + path);
}
else {
if (node.parentNode.baseName== "Directory") {
path = node.parentNode.getAttribute("Name") + String.fromCharCode(92) + path;
path = recurseParentForPath(node.parentNode,path);
}
}
return path;
}
// A function to return the stream directory path for a GUID
function Path(guid) {
if (!streamServerDoc) {
loadStreamServerDoc();
}
var dirs = streamServerDoc.getElementsByTagName("StreamDirectory");
results = new Array;
for (var i=0;i<dirs.length;i++) {
var searchGuid = dirs.getAttribute("GUID");
if ( searchGuid == guid ) {
return (dirs.getAttribute("Path"));
break;
}
}
}
// Recursively get the Virtual Directory
function recurseParentForVirt(node,path) {
if (node.parentNode.baseName== "StreamDirectory") {
path = (VirtualDir(node.parentNode.getAttribute("GUID")) + String.fromCharCode(47) + path);
}
else {
if (node.parentNode.baseName== "Directory") {
path = node.parentNode.getAttribute("Name") + String.fromCharCode(47) + path;
path = recurseParentForVirt(node.parentNode,path);
}
}
return path;
}
// A function to return the virtual name for a GUID
function VirtualDir(guid) {
if (!streamServerDoc) {
loadStreamServerDoc();
}
var dirs = streamServerDoc.getElementsByTagName("StreamDirectory");
results = new Array;
for (var i=0;i<dirs.length;i++) {
var searchGuid = dirs.getAttribute("GUID");
if ( searchGuid == guid ) {
return (dirs.getAttribute("VirtualName"));
break;
}
}
}
</script>
</head>
<body>
<form action="" >
<input type="text" id="searchme" />
<input type="submit" onclick="searchIndex(); return false;" />
<input type="checkbox" id="local" />Local
</form>
<div id="resultshere">
</div>
</body>
</html>
it can be remotely accessing just as he said That code does not run in the actual vibestreamer, it is just a standalone html that goes in your vibestreamer directory (where the xml files are located).
explaind vibe streamer settings /mime types add xml [application/xml] and xml [text/xml] put them both in shared and webserver file types
copy the streamserver.xml and the share.xml in the standard map ,now open the share.xml and put this tag in it <?xml version="1.0" encoding="ISO-8859-1"?> works for me with signs like ˆ‘öº&
and make a link in your vibestreamer and name it search.html ..whatever
only 1 bug its not transcoding anything its full stream and when your users have winamp they can download your mp3 to![]()
SO ... i terminated the link
i wish there was Someone that makes the results link that giving by request from this script by clicking on it , that it goes in the actual vibeplayer because this searchfunction is very fast even with my 8 mb share.xml ...so any help will do[url3ug38054]http://www.vibestreamer.com/forum/viewtopic.php?t=101&postdays=0&postorder=asc&start=15[/url3ug38054][/quote3ug38054]
is there any way that the mp3 links you get by search results in this script,that you can link it to a certain player like WMP,FLASHPLAYER by an onclick event. sorry to bothered again but this script works on remote and its fast! there must be a way to avoid that the mp3 results just by right clicking that users only downloading it by this searchscript![]()
i was thinking like an external flashplayer and embedding in this html file so the links can play on it ....any help will do
THANX FOR REPLY!
B-22
05-08-2009 11:35:31
yuanyelss
20-01-2011 08:05:52