yacy_search_server/htroot/Trails.html
orbiter 01b97ef3f8 added new cybertag-tracking feature that was inspired by itgrl
from the forum discussion in
http://forum.yacy-websuche.de/viewtopic.php?p=12612#p12612

The feature will provide two basic entities:
- you can integrate image links which point to your yacy installation anywhere in the web.
  the image can be loaded with
  <img src="http://<yourpeer>:<yourport>/cytag.png?icon=invisible&nick=<yournickname_or_community_id>&tag=<anything>">
  This will place a invisible 1-pixel image. If you change the icon=invisible to icon=redpill, you will see a red pill
  Use this, to track your activity in the web.
- you can view your tracks at
  http://localhost:8080/Tracks.html
- There is a public api to your tracks at
  http://localhost:8080/api/tracks_p.json
  which needs authentication


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5581 6c8d7289-2bf4-0310-a012-ef5d649a1542
2009-02-06 15:06:19 +00:00

67 lines
2.1 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CyTag Trails</title>
#%env/templates/metas.template%#
<script language="Javascript">
function search() {
var xmlHttpReq = false;
var self = this;
if (window.XMLHttpRequest) { // Mozilla/Safari
self.xmlHttpReq = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('GET', "api/trail_p.json", true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
updatepage(self.xmlHttpReq.responseText);
}
}
self.xmlHttpReq.send(null);
}
function updatepage(str) {
var rsp = eval("("+str+")");
var trails = rsp.trails;
var html = "";
var item;
html += "<table class=\"networkTable\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">";
html += "<tr class=\"TableHeader\" valign=\"bottom\">";
html += "<td>time</td>";
html += "<td>trail</td>";
html += "<td>nick</td>";
html += "<td>tag</td>";
html += "<td>icon</td>";
html += "<td>ip</td>";
html += "<td>agent</td></tr>";
for (var i = 0; i < trails.length; i++) {
item = trails[i];
if (item.time == null) break;
html += "<tr class=\"TableCellLight\"><td>"+ item.time + "</td>";
html += "<td>" + item.trail + "</td>";
html += "<td>" + item.nick + "</td>";
html += "<td>" + item.tag + "</td>";
html += "<td>" + item.icon + "</td>";
html += "<td>" + item.ip + "</td>";
html += "<td>" + item.agent + "</td></tr>";
}
html += "</table>";
document.getElementById("trails").innerHTML = html;
}
</script>
</head>
<body>
#%env/templates/header.template%#
<script type="text/javascript">
search();
</script>
<div id="trails"></div>
#%env/templates/footer.template%#
</body>
</html>