-
Notifications
You must be signed in to change notification settings - Fork 3
/
index1.htm
324 lines (315 loc) · 9.69 KB
/
index1.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<title>Twinsight - a different view of twitter</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link rel="stylesheet" href="css/jtwitter.css" type="text/css" />
<link rel="stylesheet" href="css/bluedream.css" type="text/css" />
<link rel="stylesheet" type="css/text/css" href="base-min.css">
<link rel="stylesheet" href="http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts-min.css" type="text/css" />
<link rel="stylesheet" href="css/fifa.css" type="text/css"/>
<script type="text/javascript" src="http://yui.yahooapis.com/3.1.1/build/yui/yui-min.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.jtwitter.js"></script>
<script type="text/javascript" src="js/inline-search.js"></script>
<script type="text/javascript" src="js/demo.js"></script>
<script type="text/javascript" src="js/yqlgeo.js"></script>
<script type="text/javascript" src="js/jquery.relatedtweets-1.0.js"></script>
<script type="text/javascript">
var lat;
var lon;
var bar;
var p;
var categories=new Array();
var users=new Array();
var tweetscum="";
</script>
<script type="text/javascript">
var ter;
var tweetTerms=new Array();
$(document).ready(function(){
$('#createkwords').hide();
$('#term22').hide();
$('#doc2').hide();
$('#createkwords').click(function() {
$("#cat").html('<center><img src="loading.gif" id="loading" /></center>');
$("#term").html('<center><img src="loading.gif" id="loading" /></center>');
var text = $("#pagebody").text();
if (text=="") {
alert("There is no text to send");
} else {
text = text.replace(/<\/?[^>]+(>|$)/g,"")
//alert("Category")
//alert( "Data Saved: " + text );
$.ajax({
type: "POST",
url: "tagger.php",
data: { text:text },
dataType: text,
success: function(data){
// alert( "Data Saved: " + data );
$("#cat").html(data);
},
error: function(msg) { alert(msg) }
});
//alert("Keywords")
//alert( "Data Saved: " + text );
$.ajax({
type: "POST",
url: "keyword.php",
data: { text:text },
dataType: text,
success: function(data){
//alert( "Data Saved: " + data );
$("#term").html(data);
$("#term").hide();
$("#term22").html(data);
myFunction();
$('#doc2').fadeIn();
},
error: function(msg) { alert(msg) }
});
}
});
// Get your own tweets
$('#getting').hide();
$('#posts').hide();
$('#submit').click(function(){
var u=$('#username').val();
$('#getting').fadeIn();
$('#posts').fadeIn();
$("#logo").slideUp();
$("#logo").fadeIn();
$("#logo").attr("src", "small.png");
var x;
var y;
if($('#username').val() != ''){
if($('#number').val() != '')
{ x=$('#number').val(); }
else
{ x=10; }
if($('#key').val() != '')
{ y=$('#key').val(); }
else
{ y='*'; }
$.jTwitter($('#username').val(),x, function(data){
$('#posts').empty();
$('#tuser').text($('#username').val());
$.each(data, function(i, post){
$('#pagebody').append(
'<div class="demo">'
+'<div class="users">'
+ post.text
+'<hr noshade="noshade" />'
+' </div>'
+'</div>'
);
});
});
}
$('#getting').fadeOut();
$('#createkwords').fadeIn();
});
});
var getSrc=function(name)
{
var str="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20twitter.user.profile%20where%20id%3D";
str=str+'\''+name+'\'';
str=str+"&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=cbfunc";
alert(str);
var scr=document.createElement("script");
scr.setAttribute("type","text/javascript");
scr.setAttribute("src",str);
document.body.appendChild(scr);
}
var myFunction=function()
{
YUI().use('slider','anim', function (Y) {
var current = 'time';
var bar1=new Array();
var ter1=document.getElementById("term22").textContent;
bar1 = ter1.split(",");
var data = bar1;
var all = data.length;
var maxval={time:0};
var def=3;
var names = '';
maxval.time = all;
function update( e ) {
addNames(e.newVal);
}
function addNames(val){
Y.one('#current').set('innerHTML',val);
var names = '';
for(var i=0;i<all;i++){
if(i < val){
names += '<li>'+data[i]+'</li>';
}
}
Y.one('#slidenames').set('innerHTML','<ul>'+names+'</ul>');
}
createSlider(maxval.time);
function createSlider(maxval){
addNames(def);
Y.one('#maxval').set('innerHTML',maxval);
Y.one('#slider').set('innerHTML','');
var xSlider = new Y.Slider({
length : 300,
min : 0,
max : maxval,
value : def
});
xSlider.after( "valueChange", update);
xSlider.render('#slider')
}
function r(num){
return Math.round(num*100)/100
}
function filter(what,value){
var data = fifa.data.query.results.Result;
var all = data.length;
var names = '';
var time=0,shots=0,passes=0,tackles=0,saves=0,count=0;
var w = what.toLowerCase();
for(var i=1;i<all;i++){
names += '<li><button>'+data[i]+'</span></button></li>';
count++;
}
var n = Y.one('#names').prepend('<ul class="hid">'+
'<li class="summary"><span>'+
what+': '+value+'</span> Time: '+time+
' ('+r(time/count)+' average) '+
'Shots '+shots+' ('+r(shots/count)+
' average) Passes '+passes+
' ('+r(passes/count)+' average) '+
'Tackles '+tackles+
' ('+r(tackles/count)+' average) '+
'Saves '+saves+' ('+r(saves/count)+
' average)<button>delete</button>'+
'<div></div></li>'+names+'</ul>');
var an = Y.one('#names ul');
an.setStyle('opacity',0);
var height = an.getStyle('height');
an.setStyle('height',0);
an.removeClass('hid');
var myAnim = new Y.Anim(
{
node:an,
to:{
opacity:1,
height:height
},
duration:.3
}
);
myAnim.run();
};
});
}
</script>
<style>
body{
position:relative;
background-position:center
}
#container {
width: 46.5em;
background: #FFFFFF;
margin: 0 auto;
border: 1px solid #000000;
text-align: left;
}
#header {
color:#003F87;
font-size: 1.17em;
margin: 1em 0;
}
form {
margin-left:15px;
margin-bottom:20px;
}
form p {
clear: left;
margin: 0;
padding: 0;
padding-top: 5px;
}
form p label {
float: left;
width: 30%;
font: bold 0.9em Arial, Helvetica, sans-serif;
}
.style1 {font-size: 14px}
.style1 {font-size: 14px}
.style2 {font-size: 14px}
.style2 {font-size: 14px}
#apDiv1 {
position:absolute;
left:525px;
top:14px;
width:289px;
height:78px;
z-index:1;
}
</style>
</head>
<body class="yui3-skin-sam yui-skin-sam">
<div id="apDiv1"><img src="enter.png" alt="enter ur twitter username" width="300" height="95" /></div>
<p align="left"> </p>
<p align="left"><img src="in.png" alt="logo" />
<img alt="" src="search.jpg" height="79" width="63" />
<input name="username" id="username" type="text" />
</p>
<table align="center" border="1" width="890">
<tbody>
<tr>
<td rowspan="3">
<div id="container">
<form>
<p class="style1" align="center">List <strong><input name="number" id="number" value="30" size="4" type="text" /></strong>Number of Tweets</p>
<p class="style1" align="center"><span class="style2"></span><input name="gettweets" value="Get The Tweets of Above Id" id="submit" type="button" /></p>
<p class="style1" align="center">
<form>
<p><label></label></p>
<center><input id="createkwords" value="Get His Nature" type="button" /></center>
<p> </p></form> </p><center><hr>
Filter Your Tweets:<input name="keywords2" type="text" /></strong></span><span class="demo-search style1"> </center>
<hr>
</form>
<div id="getting">Getting your tweets...</div><br />
<div id="pagebody"></div>
<h1 id="header"> </h1>
</div>
</td>
<td height="54"></td>
<td>This User has a taste of:<strong>
<div id="cat"></div></strong></td></tr>
<tr>
<td colspan="2" height="40">User Mostly talks about:
<div id="term"></div>
<div id="doc2" class="yui-t7">
<div id="bd" role="main">
<ul id="buttons">
<li>
<span class="digit">0</span>
<span id="slider"></span>
<span class="digit" id="current"></span> of <span class="digit" id="maxval">0</span>
</li>
</ul>
<div id="slidenames"></div>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="2"><br />
<div id="twitter_update_list">
<iframe id="yres" src="http://mycollect.in/mycollect/web/ysearchnews.php?query=bangalore+yahoo&type=news" height="600" width="400"></iframe>
</div>
</td>
</tr>
</tbody>
</table>
<div id="term22"></div>
</body>
</html>