• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

countdown for znote!

Oldschool'er

Tibia since 1998'
Joined
Dec 14, 2010
Messages
2,198
Reaction score
149
Location
United States
hello im trying to figure out how to add a countdown for znote, like what file do i open and what do i but it? :|


this is what i want to add, but idk what file to add it and where on the file to put it.
Code:
<div align="center" style="margin: 15px 0px 0px;"><noscript><div align="center" style="width: 140px; border: 1px solid rgb(204, 204, 204); text-align: center; color: rgb(249, 249, 255); font-weight: bold; font-size: 12px; background-color: rgb(4, 2, 68);"><a href="http://mycountdown.org/My_Countdown/My_countdown/" style="text-decoration: none; font-size: inherit; color: rgb(249, 249, 255);">My Countdown </a></div></noscript><script type="text/javascript" src="http://mycountdown.org/countdown.php?cp2_Hex=040244&cp1_Hex=F9F9FF&img=1&hbg=&fwdt=150&lab=1&ocd=My Countdown&text1=Royal Legends ONLINE&text2=&group=My Countdown&countdown=My Countdown&widget_number=3010&event_time=1399914000&timezone=America/New_York"></script></div>
 
Put it in index.php, I assume you only want to display the countdown on your startpage.
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
    if ($config['allowSubPages'] && file_exists("layout/sub/index.php")) include 'layout/sub/index.php';
    else {
        $cache = new Cache('engine/cache/news');
        if ($cache->hasExpired()) {
            $news = fetchAllNews();
         
            $cache->setContent($news);
            $cache->save();
        } else {
            $news = $cache->load();
        } ?>

        <div align="center" style="margin: 15px 0px 0px;"><noscript><div align="center" style="width: 140px; border: 1px solid rgb(204, 204, 204); text-align: center; color: rgb(249, 249, 255); font-weight: bold; font-size: 12px; background-color: rgb(4, 2, 68);"><a href="http://mycountdown.org/My_Countdown/My_countdown/" style="text-decoration: none; font-size: inherit; color: rgb(249, 249, 255);">My Countdown </a></div></noscript><script type="text/javascript" src="http://mycountdown.org/countdown.php?cp2_Hex=040244&cp1_Hex=F9F9FF&img=1&hbg=&fwdt=150&lab=1&ocd=My Countdown&text1=Royal Legends ONLINE&text2=&group=My Countdown&countdown=My Countdown&widget_number=3010&event_time=1399914000&timezone=America/New_York"></script></div>

        <?php // Design and present the list
        if ($news) {
            function TransformToBBCode($string) {
                $tags = array(
                    '[center]{$1}[/center]' => '<center>$1</center>',
                    '[b]{$1}[/b]' => '<b>$1</b>',
                    '[size={$1}]{$2}[/size]' => '<font size="$1">$2</font>',
                    '[img]{$1}[/img]'    => '<a href="$1" target="_BLANK"><img src="$1" alt="image" style="width: 100%"></a>',
                    '[link]{$1}[/link]'    => '<a href="$1">$1</a>',
                    '[link={$1}]{$2}[/link]'  => '<a href="$1" target="_BLANK">$2</a>',
                    '[color={$1}]{$2}[/color]' => '<font color="$1">$2</font>',
                    '[*]{$1}[/*]' => '<li>$1</li>',
                );
                foreach ($tags as $tag => $value) {
                    $code = preg_replace('/placeholder([0-9]+)/', '(.*?)', preg_quote(preg_replace('/\{\$([0-9]+)\}/', 'placeholder$1', $tag), '/'));
                    $string = preg_replace('/'.$code.'/i', $value, $string);
                }
                return $string;
            }
            foreach ($news as $n) {
                ?>
                <table id="news">
                    <tr class="yellow">
                        <td class="zheadline"><?php echo getClock($n['date'], true) .' by <a href="characterprofile.php?name='. $n['name'] .'">'. $n['name'] .'</a> - <b>'. TransformToBBCode($n['title']) .'</b>'; ?></td>
                    </tr>
                    <tr>
                        <td>
                            <p><?php echo TransformToBBCode(nl2br($n['text'])); ?></p>
                        </td>
                    </tr>
                </table>
                <?php
            }
        } else {
            echo '<p>No news exist.</p>';
        }
    }
include 'layout/overall/footer.php'; ?>
 
can someone help me i copy paste it the page isn't fucked but the count down isn't showed
i hve tried alot of count downs im using znote 1.5
i had wrote before in the page that could be the problem?
 
Back
Top