• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC Znote Acc Active casters error

Niioxce

Otland lurker
Joined
Jun 22, 2012
Messages
324
Reaction score
4
Location
Sweden
I dont even know what "active casters" is tbh, but anyway it's annoying and i wonder if i can fix it or get rid of it
ae0b07a86c6d46e6b033a6e744ecea5b.png

Error:
Code:
[LIST]
string(93) "SELECT * FROM players WHERE group_id < 2 AND broadcasting = 1 ORDER BY viewers DESC LIMIT 5;" 
(query - SQL error) 
Type: select_multi (select multiple rows from database)

Unknown column 'broadcasting' in 'where clause'
[/LIST]
[LIST]
[/LIST]
 
Solution
You probably don't have a live-cast system installed on your OT server.
This is something that came with the custom layout you are using.

Remove this piece of code from your layout/overall/footer.php file:
HTML:
<div class="right_box">
    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
    <div class="title"><img src="layout/img/casts.gif"><span style="background-image: url(layout/widget_texts/casts.png);"></span></div>
    <div class="content">
        <div class="rise-up-content">
        <ul class="toplvl">
        <?php
            $cache = new Cache('engine/cache/topCasts');
            if ($cache->hasExpired()) {
                $znotePlayers =...
Active casters are most likely referring to people whom are casting their gameplay for others to see (like TibiaCast). The error itself is due to a missing column broadcasting within the players table. You can amend this by adding it through your MySQL interface (phpMyAdmin or whatever you use).

Code:
ALTER TABLE `players` ADD `broadcasting` INTEGER(11) DEFAULT 0;

But that won't remove the Active Casters section on the website, to do that you'd have to go to your layouts file and manually remove it from the code.
 
You probably don't have a live-cast system installed on your OT server.
This is something that came with the custom layout you are using.

Remove this piece of code from your layout/overall/footer.php file:
HTML:
<div class="right_box">
    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
    <div class="title"><img src="layout/img/casts.gif"><span style="background-image: url(layout/widget_texts/casts.png);"></span></div>
    <div class="content">
        <div class="rise-up-content">
        <ul class="toplvl">
        <?php
            $cache = new Cache('engine/cache/topCasts');
            if ($cache->hasExpired()) {
                $znotePlayers = mysql_select_multi('SELECT * FROM players WHERE group_id < 2 AND broadcasting = 1 ORDER BY  viewers DESC LIMIT 5;');
                $cache->setContent($znotePlayers);
                $cache->save();
            } else {
                $znotePlayers = $cache->load();
            }
            if($znotePlayers){
                foreach($znotePlayers as $player)
                {
                    $nam = $player['name'];
                    if (strlen($nam) > 15)
                    {$nam = substr($nam, 0, 12) . '...';}
                    echo '<li style="margin: 6px 0;"><div style="position:relative; left:-48px; top:-48px;"><div style="background-image: url(layout/outfitter/outfit.php?id='.$player['looktype'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                    <a style="margin-left: 19px;" href="characterprofile.php?name=' .$player['name']. '">' .$nam. '</a>';
                  
                    echo '<span style="float: right;">'.$player['viewers'].'</span></li>';
                }
              
            }
            else
            {
                echo '<center>No active casts.</center>';
            }
            ?>
            </ul>
        </div>
    </div>
    <div class="border_bottom"></div>
</div>
 
Solution
Back
Top