• 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!

(Geisor) Tibiacom News Ticker missing?

Tyson12302

New Member
Joined
Aug 6, 2014
Messages
264
Reaction score
4
I been looking at forums for such a long time and i tried all but the News Ticker still doesn't appear. Here are my codes/scripts
newsticker.js
Code:
// status of the news ticker entries (0 = closed / 1 = open)
state = new Array("0", "0", "0", "0", "0");

function TickerAction(id) {
  var line = id.substr(12, 1);
  if(state[line] == "0") {
    state[line] = "1";
    OpenNews(id);
  }
  else {
    state[line] = "0";
    CloseNews(id);
  }
}

function OpenNews(id)
{
  var div = document.getElementById(id)
  var idShort = id.concat("-ShortText");
  var idMore = id.concat("-FullText");
  var idButton = id.concat("-Button");
  document.getElementById(idShort).style.display = "none";
  document.getElementById(idMore).style.display = "block";
  document.getElementById(idButton).style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/minus.gif')";
}

function CloseNews(id)
{
  var div = document.getElementById(id)
  var idShort = id.concat("-ShortText");
  var idMore = id.concat("-FullText");
  var idButton = id.concat("-Button");
  document.getElementById(idShort).style.display = "block";
  document.getElementById(idMore).style.display = "none";
  document.getElementById(idButton).style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/plus.gif')";
}
[code]

basic.css
[code]
/* News Ticker */

.Content #NewsTicker .BoxContent {
  padding: 5px;
  min-height: 90px;
  height: auto !important;
  height: 100px;
}

.Content #NewsTicker .BoxContent .Row {
  position: relative;
  width: 100%;
}

.Content #NewsTicker .NewsTickerIcon {
  position: absolute;
  top: 1px;
  left: 1px;
  height: 16px;
  width: 16px;
  background-repeat: no-repeat;
}

.Content #NewsTicker .NewsTickerText {
  font-size: 9pt;
  position: relative;
  margin-left: 20px;
}

.Content #NewsTicker .NewsTickerDate {
  font-size: 7pt;
  position: absolute;
  top: 0px;
  float: left;
}

.Content #NewsTicker .NewsTickerShortText {
  margin-left: 85px;
  height: 14px;
}

.Content #NewsTicker .NewsTickerFullText {
  margin-left: 85px;
  margin-right: 20px;
  display: none;
}

.Content #NewsTicker .NewsTickerExtend {
  position: relative;
  right: 0px;
  top: 1px;
  right: 1px;
  height: 12px;
  width: 12px;
  background-repeat: no-repeat;
  float: right;
  cursor: pointer;
  z-index: 10;
}

latestnews.php
PHP:
//######################## SHOW TICKERS AND NEWS #######################
$time = time();
    $query = $SQL->query("SELECT * FROM `players` ORDER BY `experience` DESC")->fetch();
    $query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();
    $housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();
    $housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=1;')->fetch();
    $players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
    $accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
    //$banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();
    $guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();
    ///End Queries ///
        // top kills - guilds
$main_content .= '<div class="NewsHeadline">
    <div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
        <table border="0">
            <tr>
                <td style="text-align: center; font-weight: bold;">
                    <font color="white">Most powerfull guilds</font>
                </td>
            </tr>
        </table>
    </div>
</div>
<table border="0" cellspacing="3" cellpadding="4" width="100%">
    <tr>';

foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
    `g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`
FROM `killers` k
    LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
    LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
    LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
    LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
    GROUP BY `name`
    ORDER BY `frags` DESC, `name` ASC
    LIMIT 0, 3;') as $guild)
    $main_content .= '        <td style="width: 25%; text-align: center;">
            <a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guild_image.php?id=' . $guild['id'] . '" width="64" height="64" border="0"/> <br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
        </td>';

$main_content .= '    </tr>
</table>';
  

  
    $main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['vdarkborder'] .'><td align="center" class=white colspan=1><b>Welcome to Neuofia
    <tr><td><table border=0 cellpadding=1 cellspacing=1 width=100%>

    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Last joined us: <a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a>, player number '.$query2['id'].'. Welcome and wish you a nice game!</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Currently, the best player on the server is: <a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).'). Congratulations!</center></td></tr>
    <table border=0 cellpadding=0 cellspacing=1 width=100%>
      <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Free Houses:</b> '.$housesfree[0].'</center></td>
    <td><center><b>Rented Houses:</b> '.$housesrented[0].'</center></td></tr>     
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$accounts[0].'</center></td>
    <td><center><b>Players</b> in database: '.$players[0].'</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Banned</b> accounts: '.$banned[0].'</center></td>
    <td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>

    </table></td></tr></table>';
if($action == "") {

//show tickers if any in database or not blocked (tickers limit = 0)
$tickers = $SQL->query('SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;');
$number_of_tickers = 0;
if(is_object($tickers)) {
foreach($tickers as $ticker) {
if(is_int($number_of_tickers / 2))
        $color = "Odd";
else
        $color = "Even";
$tickers_to_add .= '<div id="TickerEntry-'.$number_of_tickers.'" class="Row" onclick=\'TickerAction("TickerEntry-'.$number_of_tickers.'")\'>
  <div class="'.$color.'">
    <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div>
    <div id="TickerEntry-'.$number_of_tickers.'-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div>
    <div class="NewsTickerText">
      <span class="NewsTickerDate">'.date("j M Y", $ticker['date']).' -</span>
      <div id="TickerEntry-'.$number_of_tickers.'-ShortText" class="NewsTickerShortText">';

basic.css
Code:
/* News Ticker */

.Content #NewsTicker .BoxContent {
  padding: 5px;
  min-height: 90px;
  height: auto !important;
  height: 100px;
}

.Content #NewsTicker .BoxContent .Row {
  position: relative;
  width: 100%;
}

.Content #NewsTicker .NewsTickerIcon {
  position: absolute;
  top: 1px;
  left: 1px;
  height: 16px;
  width: 16px;
  background-repeat: no-repeat;
}

.Content #NewsTicker .NewsTickerText {
  font-size: 9pt;
  position: relative;
  margin-left: 20px;
}

.Content #NewsTicker .NewsTickerDate {
  font-size: 7pt;
  position: absolute;
  top: 0px;
  float: left;
}

.Content #NewsTicker .NewsTickerShortText {
  margin-left: 85px;
  height: 14px;
}

.Content #NewsTicker .NewsTickerFullText {
  margin-left: 85px;
  margin-right: 20px;
  display: none;
}

.Content #NewsTicker .NewsTickerExtend {
  position: relative;
  right: 0px;
  top: 1px;
  right: 1px;
  height: 12px;
  width: 12px;
  background-repeat: no-repeat;
  float: right;
  cursor: pointer;
  z-index: 10;
}
 
Change number of tickets to something higer than 0:
Code:
//show tickers if any in database or not blocked (tickers limit = 0)$tickers = $SQL->query('SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;');$number_of_tickers = 0;
if(is_object($tickers)) {
foreach($tickers as $ticker) {
if(is_int($number_of_tickers / 2))$color = "Odd";
else$color = "Even";
 
I think the problem is somewhere else since i dont see the News Ticker Box on the latest news
xLFyjUl.png
 
I think the problem is somewhere else since i dont see the News Ticker Box on the latest news
xLFyjUl.png

Well, as i said: you can see this at the php code:
PHP:
//show tickers if any in database or not blocked (tickers limit = 0)$tickers = $SQL->query('SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;');
$number_of_tickers = 0;
if(is_object($tickers)) {
  foreach($tickers as $ticker) {
    if(is_int($number_of_tickers / 2))
      $color = "Odd";
    else
      $color = "Even";
It saiys that will show tickers if theres any on database or the tickets limits is > 0. There is set to 0

Im just wondering. Try to look at your code.
 
Nah thats nothing to do with it. Its either my columns in DB or my codes are wrong and they don't display the news. My News Ticker box is empty. I have the z_news_tickers on my DB and it has a message there and it still doesnt appear. Even if i use other layouts the news ticker doesn't appear. Can something be blocking the news ticker or do i have to enable it?
aHf2dRz.png
 
PHP:
<?PHP
# Account Maker Config
$config['site']['serverPath'] = "C:/Users/Tyson/Desktop/OTS RENEW/";
$config['site']['useServerConfigCache'] = false;
$towns_list[0] = array(1 => 'Yalahar', 2 => 'Carlin', 3 => "Ab'dendriel", 4 => "Kazordoon", 5 => "Thais", 6 => "Venore", 7 => "Darashia", 8 => "Ankrahmun", 9 => "Edron", 10 => "Port Hope", 11 => "Ethno", 12 => "Liberty Bay", 13 => "Svargrond", 14 => "Cormaya", 15 => "Gengia");
$config['site']['newchar_towns'][0] = array(5);

$config['site']['outfit_images_url'] = 'http://outfit-images.ots.me/outfit.php';
$config['site']['item_images_url'] = 'http://item-images.ots.me/960/';
$config['site']['item_images_extension'] = '.gif';
$config['site']['flag_images_url'] = 'http://flag-images.ots.me/';
$config['site']['flag_images_extension'] = '.png';

# Create Account Options
$config['site']['one_email'] = false;
$config['site']['create_account_verify_mail'] = false;
$config['site']['verify_code'] = true;
$config['site']['email_days_to_change'] = 3;
$config['site']['newaccount_premdays'] = 999;
$config['site']['send_register_email'] = false;

# Create Character Options
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_towns'][0] = array(5);
$config['site']['max_players_per_account'] = 7;


# Emails Config
$config['site']['send_emails'] = false;
$config['site']['mail_address'] = "[email protected]";
$config['site']['smtp_enabled'] = true;
$config['site']['smtp_host'] = "mail.gmx.com";
$config['site']['smtp_port'] = 25;
$config['site']['smtp_auth'] = false;
$config['site']['smtp_user'] = "[email protected]";
$config['site']['smtp_pass'] = "xxxx";

# PAGE: whoisonline.php
$config['site']['private-servlist.com_server_id'] = 1;
/*
Server id on 'private-servlist.com' to show Players Online Chart (whoisonline.php page), set 0 to disable Chart feature.
To use this feature you must register on 'private-servlist.com' and add your server.
Format: number, 0 [disable] or higher
*/

# PAGE: characters.php
$config['site']['quests'] = array();
$config['site']['show_skills_info'] = true;
$config['site']['show_vip_storage'] = 11551;

# PAGE: accountmanagement.php
$config['site']['send_mail_when_change_password'] = true;
$config['site']['send_mail_when_generate_reckey'] = true;
$config['site']['generate_new_reckey'] = false;
$config['site']['generate_new_reckey_price'] = 500;

# PAGE: guilds.php
$config['site']['guild_need_level'] = 15;
$config['site']['guild_need_pacc'] = false;
$config['site']['guild_image_size_kb'] = 50;
$config['site']['guild_description_chars_limit'] = 2000;
$config['site']['guild_description_lines_limit'] = 6;
$config['site']['guild_motd_chars_limit'] = 250;

# PAGE: adminpanel.php
$config['site']['access_admin_panel'] = 3;

# PAGE: latestnews.php
$config['site']['news_limit'] = 6;
$config['site']['news_ticks_limit'] = 10;


# PAGE: killstatistics.php
$config['site']['last_deaths_limit'] = 40;

# PAGE: team.php
$config['site']['groups_support'] = array(2, 3, 4, 5, 6);

# PAGE: highscores.php
$config['site']['groups_hidden'] = array(4, 5, 6);
$config['site']['accounts_hidden'] = array(1);

# PAGE: shopsystem.php
$config['site']['shop_system'] = true;

# PAGE: lostaccount.php
$config['site']['email_lai_sec_interval'] = 180;

# Layout Config
$config['site']['layout'] = 'tibiacom';
$config['site']['vdarkborder'] = '#505050';
$config['site']['darkborder'] = '#D4C0A1';
$config['site']['lightborder'] = '#F1E0C6';
$config['site']['download_page'] = false;
$config['site']['serverinfo_page'] = true;
 
Nope, its seems correct. Sorry, but i dont have gesior, so i cant help you more, hope someone can guide you :/
 
Not sure what the issue is but try checking your database table: z_news_tickers

Make sure there is data in there and if there is make sure that the hide_ticker column for the tickers you wish to show are 0 and not 1.
 
Here is the data in z_news_tickers
Ib43yN2.png

The issue basically is that my News Ticker is empty with no news on it. Its like its either blocked or i have no idea :p. if you look at my 4th post you can see the box empty.
 
Those are supposed to be generated by gesiors code. that date is a timestamp, you can google it.

If you access as admin on gesiors, cant you add news or tickers?
 
Fixed!! Changed
PHP:
<span class="NewsTickerDate">'.date('d/m/Y', $row['post_date']).' -</span>
to
PHP:
<span class="NewsTickerDate">'.date("d/m/Y", $ticker['date']).' -</span>
 
Back
Top