02.10.2016, 20:11
02.10.2016, 20:13
literówka, popraw na
$(".currentTeamOnline")append(currentOnline) ;
$(".currentTeamOnline").append(currentOnline)
02.10.2016, 20:16
Dalej nic, nie jest czasem za dużo zamknięć nawiasów w tym twoim kodzie? fałszywy alarm.
02.10.2016, 20:18
Na 100% źle próbujesz
https://jsfiddle.net/ofae5ne3/
https://jsfiddle.net/ofae5ne3/
02.10.2016, 20:28
Jest jakiś problem z pobraniem zawartości {$teamonline} do zmiennej, więc obejdziemy to trochę. Nie jest prawidłowy sposób naprawienia błędu (obchodzimy go) ale zadziała. Wrzuć tutaj szablon teamonline (prawdopodobnie szablony globalne) oraz index
02.10.2016, 20:31
index
teamonline
TeamOnline ubogie, gdyż wywaliłem całą tabelę, aby wypisało mi same nicki.
Kod:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
<script type="text/javascript">
$( document ).ready(function() {
$( "xd" ).append( document.createTextNode( "1000" - current_users ) );
});
</script>
<script type="text/javascript">
$( document ).ready(function() {
var currentOnline = '{$teamonline}';
console.log("Zawartość: " + teamOnline)
console.log("Typ: " + typeof(teamOnline))
$(".currentTeamOnline").append(currentOnline) ;
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-84294705-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
{$header}
<div style="width: 74%; float: left;">
{$pollbox}
<center>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<td class="shead" colspan="2">
<center><font size="2">
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1759" alt=""><img src="http://haxballerz.xaa.pl/flagi/niemcy.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1763" alt=""><img src="http://haxballerz.xaa.pl/flagi/watykan.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1760" alt=""><img src="http://haxballerz.xaa.pl/flagi/urugwaj.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1758" alt=""><img src="http://haxballerz.xaa.pl/flagi/serbia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1762" alt=""><img src="http://haxballerz.xaa.pl/flagi/panama.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1765" alt=""><img src="http://haxballerz.xaa.pl/flagi/namibia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1755" alt=""><img src="http://haxballerz.xaa.pl/flagi/korea.jpg"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1766" alt=""><img src="http://haxballerz.xaa.pl/flagi/kanada.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1761" alt=""><img src="http://haxballerz.xaa.pl/flagi/jamajka.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1764" alt=""><img src="http://haxballerz.xaa.pl/flagi/francja.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1757" alt=""><img src="http://haxballerz.xaa.pl/flagi/finlandia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1756" alt=""><img src="http://haxballerz.xaa.pl/flagi/bosnia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1767" alt=""><img src="http://haxballerz.xaa.pl/flagi/algieria.png"></a>
</font></center>
</td></table>
<br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead22" colspan="2"><center>
<i class="fa fa-bullhorn"></i> [DONATE] DOTACJA NA HOSTING FORUM <a href="http://haxballerz.xaa.pl/showthread.php?tid=1628">(klik)</a>
<br>
<i class="fa fa-bullhorn"></i> [MOD] REKRUTACJA NA MODERATORA FORUM NADAL OTWARTA
<br>
<i class="fa fa-bullhorn"></i> [INFO] ZAPOZNAJ SIĘ Z TERMINARZEM IO, ZNAJDZIESZ GO W MENU "IGRZYSKA"
</center></td>
</tr>
</div>
</td>
</tr>
</table>
<div style="margin:5px; margin-top:5px"><div class="quotetitle"><input class="button2 btnlite" type="button" value="Pokaż Stream" style="text-align:center;width:135px;margin:0px;padding:0px;background-color: #810F0F;color: #fff;border: solid 1px #333;padding: 5px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Ukryj Stream'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Pokaż Stream'; }" /></div><div class="quotecontent"><div style="display: none;">
</div></div></div>
</center>
{$dvz_shoutbox}
<br>
{$dvz_stream}
{$forums}
</div>
<div id="sidebar">
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2">
<center>
<i class="fa fa-tumblr-square"></i> <a href="ts3server://haxballerz.gclan.pl">TeamSpeak: haxball.eu</a>
<br><br>
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channelid="UCCH0hy_9fBX6AnZLeDk_nDg" data-layout="default" data-count="default"></div>
</center>
</td>
</tr>
</div>
</td>
</tr>
</table>
<br>
{$inferno_shoutbox}
{$usermiesiaca}
<br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2"><center><i class="fa fa-birthday-cake"></i> Forum Istnieje</center><span id="updatemessage" style="float: right;"></span></td>
</tr>
<td class="trow3"><center>
<b style="color: #FF4E4E; font-size: 20px;">
<script>
<!--
/*
Count up from any date script-
By Website Abstraction (www.wsabstract.com)
Over 200+ free scripts here!
*/
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getFullYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" Dni"
document.write(difference)
}
//enter the count up date using the format year/month/day
countup(2016,02,18)
//-->
</script></b>
</center></td>
</div>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2"><center><i class="fa fa-bar-chart"></i> Forum Odwiedzono</center><span id="updatemessage" style="float: right;"></span></td>
</tr>
<td class="trow3"><center>
<b style="color: #FF4E4E; font-size: 20px;">
<script type = "text/javascript" src = "//www.deszczowce.pl/licznik/licznik.php?id=99564477"></script>
</b>
</center></td>
</div>
</td>
</tr>
</table>
</br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2"><center><i class="fa fa-child"></i> Do 1.000 Brakuje</center><span id="updatemessage" style="float: right;"></span></td>
</tr>
<td class="trow3"><center>
<b style="color: #FF4E4E; font-size: 20px;">
<xd></xd> Graczy
</b>
</center></td>
</div>
</td>
</tr>
</table>
{$najb}
<br>
{$topStats['Posters']}
{$topStats['Reputation']}
{$topStats['TimeOnline']}
</div>
{$boardstats}
<br class="clear" />
{$footer}
</body>
</html>
teamonline
Kod:
{$teamonline_row}{$teamonline_no}
TeamOnline ubogie, gdyż wywaliłem całą tabelę, aby wypisało mi same nicki.
02.10.2016, 20:38
index na
teamonline na
Kod:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
<script type="text/javascript">
$( document ).ready(function() {
$( "xd" ).append( document.createTextNode( "1000" - current_users ) );
});
</script>
<script type="text/javascript">
$( document ).ready(function() {
var currentOnline = $('.TeamOnlineContent').clone()
$('.TeamOnlineContent').detach()
console.log("Zawartość: " + currentOnline)
console.log("Typ: " + typeof(currentOnline))
$(".currentTeamOnline").append(currentOnline) ;
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-84294705-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
{$header}
<div style="width: 74%; float: left;">
{$pollbox}
<center>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<td class="shead" colspan="2">
<center><font size="2">
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1759" alt=""><img src="http://haxballerz.xaa.pl/flagi/niemcy.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1763" alt=""><img src="http://haxballerz.xaa.pl/flagi/watykan.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1760" alt=""><img src="http://haxballerz.xaa.pl/flagi/urugwaj.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1758" alt=""><img src="http://haxballerz.xaa.pl/flagi/serbia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1762" alt=""><img src="http://haxballerz.xaa.pl/flagi/panama.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1765" alt=""><img src="http://haxballerz.xaa.pl/flagi/namibia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1755" alt=""><img src="http://haxballerz.xaa.pl/flagi/korea.jpg"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1766" alt=""><img src="http://haxballerz.xaa.pl/flagi/kanada.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1761" alt=""><img src="http://haxballerz.xaa.pl/flagi/jamajka.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1764" alt=""><img src="http://haxballerz.xaa.pl/flagi/francja.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1757" alt=""><img src="http://haxballerz.xaa.pl/flagi/finlandia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1756" alt=""><img src="http://haxballerz.xaa.pl/flagi/bosnia.png"></a>
<a href="http://haxballerz.xaa.pl/showthread.php?tid=1767" alt=""><img src="http://haxballerz.xaa.pl/flagi/algieria.png"></a>
</font></center>
</td></table>
<br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead22" colspan="2"><center>
<i class="fa fa-bullhorn"></i> [DONATE] DOTACJA NA HOSTING FORUM <a href="http://haxballerz.xaa.pl/showthread.php?tid=1628">(klik)</a>
<br>
<i class="fa fa-bullhorn"></i> [MOD] REKRUTACJA NA MODERATORA FORUM NADAL OTWARTA
<br>
<i class="fa fa-bullhorn"></i> [INFO] ZAPOZNAJ SIĘ Z TERMINARZEM IO, ZNAJDZIESZ GO W MENU "IGRZYSKA"
</center></td>
</tr>
</div>
</td>
</tr>
</table>
<div style="margin:5px; margin-top:5px"><div class="quotetitle"><input class="button2 btnlite" type="button" value="Pokaż Stream" style="text-align:center;width:135px;margin:0px;padding:0px;background-color: #810F0F;color: #fff;border: solid 1px #333;padding: 5px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Ukryj Stream'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Pokaż Stream'; }" /></div><div class="quotecontent"><div style="display: none;">
</div></div></div>
</center>
{$dvz_shoutbox}
<br>
{$dvz_stream}
{$forums}
</div>
<div id="sidebar">
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2">
<center>
<i class="fa fa-tumblr-square"></i> <a href="ts3server://haxballerz.gclan.pl">TeamSpeak: haxball.eu</a>
<br><br>
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channelid="UCCH0hy_9fBX6AnZLeDk_nDg" data-layout="default" data-count="default"></div>
</center>
</td>
</tr>
</div>
</td>
</tr>
</table>
<br>
{$inferno_shoutbox}
{$usermiesiaca}
<br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2"><center><i class="fa fa-birthday-cake"></i> Forum Istnieje</center><span id="updatemessage" style="float: right;"></span></td>
</tr>
<td class="trow3"><center>
<b style="color: #FF4E4E; font-size: 20px;">
<script>
<!--
/*
Count up from any date script-
By Website Abstraction (www.wsabstract.com)
Over 200+ free scripts here!
*/
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getFullYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" Dni"
document.write(difference)
}
//enter the count up date using the format year/month/day
countup(2016,02,18)
//-->
</script></b>
</center></td>
</div>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2"><center><i class="fa fa-bar-chart"></i> Forum Odwiedzono</center><span id="updatemessage" style="float: right;"></span></td>
</tr>
<td class="trow3"><center>
<b style="color: #FF4E4E; font-size: 20px;">
<script type = "text/javascript" src = "//www.deszczowce.pl/licznik/licznik.php?id=99564477"></script>
</b>
</center></td>
</div>
</td>
</tr>
</table>
</br>
<table border="0" cellspacing="0" cellpadding="10" class="tborder">
<tr>
<td class="shead" colspan="2"><center><i class="fa fa-child"></i> Do 1.000 Brakuje</center><span id="updatemessage" style="float: right;"></span></td>
</tr>
<td class="trow3"><center>
<b style="color: #FF4E4E; font-size: 20px;">
<xd></xd> Graczy
</b>
</center></td>
</div>
</td>
</tr>
</table>
{$najb}
<br>
{$topStats['Posters']}
{$topStats['Reputation']}
{$topStats['TimeOnline']}
</div>
{$boardstats}
{$teamonline}
<br class="clear" />
{$footer}
</body>
</html>
teamonline na
Kod:
<span class="TeamOnlineContent">{$teamonline_row}{$teamonline_no}</span>