Skip to content
Snippets Groups Projects
Commit b031f59a authored by ands's avatar ands
Browse files

tweetwall weitergebaut

parent a74edd67
No related branches found
No related tags found
No related merge requests found
<?php
$widget_unit_width = 200;
$widget_unit_height = 200;
$widget_unit_width = 185;
$widget_unit_height = 170;
$widget_spacing_x = 40;
$widget_spacing_y = 40;
$widget_spacing_x = 10;
$widget_spacing_y = 10;
$widgets = array(
//array("widget_name", "style_name", position_x, position_y, size_x, size_y);
......@@ -11,7 +11,7 @@
array("ZoneOffen", "widget_dark", 4,0, 2,1),
array("Dummy", "widget_light", 0,1, 4,2),
array("Marvin", "widget_light", 4,1, 2,1),
array("Dummy", "widget_light", 4,2, 2,4),
array("TwitterWall","widget_light", 4,2, 2,4),
array("Dummy", "widget_light", 0,3, 1,2),
array("Dummy", "widget_dark", 1,3, 2,2),
array("Dummy", "widget_light", 3,3, 1,2),
......
function fillContent(response) {
var content = "";
if (response["tuerOffen"] == false){
content = "<p><font color='cc0000'>Geschlossen</font></p>";
} else {
content = "<p><font color='00cc00'>Offen</font></p>";
}
content += "<p>" + response["tempLounge"] + "&deg;C</p>";
content += "<p>" + response["tempWerkstatt"] + "&deg;C</p>";
$("#ZoneOffen_values").html(content);
}
function updateZoneOffen () {
$.getJSON("widgets/ZoneOffen/ajax.php", function (response)
{
fillContent(response);
});
}
$(document).ready(function()
{
addFunctionToMinuteTimer(updateZoneOffen);
updateZoneOffen();
}
);
......@@ -12,7 +12,19 @@ class TwitterWall implements iWidget
public function giveOutput()
{
$widgetOutput = '<script src="widgets/TwitterWall/TwitterWall.js" type="text/javascript"></script>'."\n";
$widgetOutput = '
<script src="widgets/TwitterWall/jquery.tweet.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".tweet").tweet({
username: "warpzone_ms",
avatar_size: 64,
count: 5,
loading_text: "loading tweets..."
});
});
</script>'."\n";
$widgetOutput .= '<div class="tweet"></div>'."\n";
return $widgetOutput;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment