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

If page == home (why do not work in MACC?)

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
Hello, I'm trying to add this script [MAAC] Simple news ticker system.
I'm trying to show it only if page == home but it's not working, why?

This is my full index.tpl (template)
PHP:
 Index.tpl - Pastebin.com[/url]

This is the part where I'm adding
[php]
//BEGIN OF TICKERS BOARD
<div id="news" class="Box">
    <div class="Corner-tl" style="background-image:url({$template_path}/images/content/corner-tl.gif);"></div>
     <div class="Corner-tr" style="background-image:url({$template_path}/images/content/corner-tr.gif);"></div>
     <div class="Border_1" style="background-image:url({$template_path}/images/content/border-1.gif);"></div>
     <div class="BorderTitleText" style="background-image:url({$template_path}/images/content/title-background-green.gif);"></div>
     <img id="ContentBoxHeadline" class="Title" src="{$template_path}/images/strings/headline-news.gif" alt="Contentbox headline" />
     <div class="Border_2">
       <div class="Border_3">
         <div class="BoxContent" style="background-image:url({$template_path}/images/content/scroll.gif);">
      
//BEGIN OF TICKERS
    <?php
echo "<div id='tickers'>";
    $this->load->helper('text');
    ?>
    <script type="text/javascript">
    $(document).ready(function() { 
        $(".tickerButton").each(function() { 
            $(this).click(function() {
                if ($(this).html() == "-")
                    $(this).html("+")
                else
                    $(this).html("-")
                $(this).parent().find("span").each(function() {
                    $(this).toggle();
                });
            });
        });
    });
    </script>
    <?php
    foreach($tickers['news'] as $value) {
        echo '<div style="border: 1px black dotted; padding: 3px 3px 3px 3px; margin-bottom: 3px;"><a href="#" class="tickerButton">+</a>'.date('d M Y',$value['date']).', <span>'.word_limiter($value['text'], $config['newsTickerWords']).'</span><span style="display: none">'.$value['text'].'</span></div>';
        //
    }
    echo "</div><br/>";?>
//END OF TICKERS

       </div>
       </div>
     </div>
     <div class="Border_1" style="background-image:url({$template_path}/images/content/border-1.gif);"></div>
//END OF TICKERS BOARD

<div id="news" class="Box">
    <div class="Corner-tl" style="background-image:url({$template_path}/images/content/corner-tl.gif);"></div>
     <div class="Corner-tr" style="background-image:url({$template_path}/images/content/corner-tr.gif);"></div>
     <div class="Border_1" style="background-image:url({$template_path}/images/content/border-1.gif);"></div>
     <div class="BorderTitleText" style="background-image:url({$template_path}/images/content/title-background-green.gif);"></div>
     <img id="ContentBoxHeadline" class="Title" src="{$template_path}/images/strings/headline-news.gif" alt="Contentbox headline" />
     <div class="Border_2">
       <div class="Border_3">
         <div class="BoxContent" style="background-image:url({$template_path}/images/content/scroll.gif);">
                {$main}
       </div>
       </div>
     </div>
     <div class="Border_1" style="background-image:url({$template_path}/images/content/border-1.gif);"></div>
 
Back
Top